uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
59282196-0c54-44ed-9962-bd19f9be4489
bakarova05/bakarova05
3/main.cpp
/*/1 #include <iostream> #include <vector> #include <algorithm> #include <string> #include <cmath> /** * @brief функция сравнивает первые буквы слов в векторе с буквами строки s. * Если наше words[i][0]!=s[i] условие верно, то прекращаем функцию * * @param s строка * @param words вектор из строк * @return bool ...
ALGO
0.999547
3.863073
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-03-23T08:13:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2d45a19057...
ddf6e7f1-2c7f-4b5f-a19c-6a58e95c077c
shakilaust/leetcode
918. Maximum Sum Circular Subarray.cpp
class Solution { public: int maxSubarraySumCircular(vector<int>& A) { int curSum = 0; int mx = 0; int mxEndHere = 0; int sz = A.size(); vector < int > left( sz , 0 ); vector < int > right( sz , 0 ); for( int i = 0 ; i < sz ; i++ ) { curSum...
ALGO
0.999715
5.752245
{ "github_metadata": { "branch": "master", "commit_count": 664, "repo_created_at": "2018-11-21T11:15:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fce0c082...
cc23b505-a3f7-481f-9b84-b064fe134043
minidomo/Kattis
C++/goatrope.cpp
#include <bits/stdc++.h> using namespace std; int x, y; double dist(int x1, int y1) { int xd = x - x1; int yd = y - y1; return sqrt(xd * xd + yd * yd); } int main() { ios_base::sync_with_stdio(false); cin.tie(0); int x1, y1, x2, y2; cin >> x >> y >> x1 >> y1 >> x2 >> y2; double d; ...
ALGO
0.999738
3.926872
{ "github_metadata": { "branch": "master", "commit_count": 401, "repo_created_at": "2018-02-17T20:59:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "914a1e...
8522dc0d-afec-4ec6-90d2-a703871e36d9
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/13_10_40.cpp
#include <stdio.h> #include <iostream> #include <string.h> #include <string> #include <vector> #include <map> #include <stdlib.h> #include <utility> #include <algorithm> #include <math.h> #include <sstream> #define ms(a,b) memset(a,b,sizeof(a)) #define inf 1<<28 #define ll long long #define FOR_0(i,n) for(i=0;i<n;i++) ...
ALGO
0.99809
3.729484
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc1f87b6a...
2b2a832a-36ee-4a3e-9712-3724a02c2260
SylviaTLopez/trabalho
FilaAlocacao/main.cpp
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.cpp * Author: silvi_000 * */ #include <cstdlib> #include "filaaloc.h" using namespace std; struct no{ in...
ALGO
0.993701
3.553611
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-06-28T03:59:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0a7466f71...
5bed8bba-06ae-440f-af26-e61d428d6148
SeanPMulligan/leetcode
matrix_problems/sort_mail.cpp
/* You are given a list of mailboxes. Each mailbox is a list of strings, where each string is either "junk", "personal", "work". Go through each mailbox in round robin order starting from the first one, filtering out junk, to form a single pile and return the pile. Input mailboxes = [["work", "personal"], ["junk", "pe...
ALGO
0.999371
6.35978
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2020-05-12T14:19:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "156f01476...
92a3cade-e7c2-4bf8-a737-47c4d73c55ca
Uri005/c_development
listas/listasSobrecargasOperadores.cpp
#include <iostream> #include <list> #include <algorithm> // Para usar find_if #include <iterator> // Para usar distance using namespace std; class Persona { public: Persona(const string& nombre, int edad) : nombre(nombre), edad(edad) {} void mostrarDatos() const { cout << "Nombre: " << nombre << ", ...
ALGO
0.999053
5.901687
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-12-19T21:27:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d9968e881a...
cbdcf13c-0a19-48be-bae6-3ce6e0005a52
Hrishikesh0511/CSES
DP/TwoSets(II).cpp
// Your task is to count the number of ways numbers 1,2,\ldots,n can be divided into two sets of equal sum. // For example, if n=7, there are four solutions: // \{1,3,4,6\} and \{2,5,7\} // \{1,2,5,6\} and \{3,4,7\} // \{1,2,4,7\} and \{3,5,6\} // \{1,6,7\} and \{2,3,4,5\} // Input // The only input line contains an ...
ALGO
0.999996
4.781285
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-12-17T08:18:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77c10cd6f609...
a60f233a-3cc2-42dd-9b3a-112a155897bb
tiankonguse/ACM
contest/codeforces/round/403/403C.cpp
/* * 403C.cpp * * Copyright edward_mj * */ #include <cstdio> #include <cstring> #include <iostream> #include <sstream> #include <algorithm> #include <vector> #include <set> #include <map> #include <bitset> #include <string> using namespace std; #define rep(i,n) for (int i = 0; i < (int)(n); i++) #define foreach...
ALGO
0.99998
4.099019
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2013-03-25T04:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 40, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b6b43...
46a792eb-5df1-4b0e-82ea-e10f7433c16a
NoureldinYosri/competitive-programming
codeforces/777/E/main.cpp
#include <bits/stdc++.h> #define loop(i,n) for(int i = 0;i < (n);i++) #define range(i,a,b) for(int i = (a);i <= (b);i++) #define all(A) A.begin(),A.end() #define PI acos(-1) #define pb push_back #define mp make_pair #define sz(A) ((int)A.size()) #define vi vector<int> #define vl vector<long long> #define vd vector<doub...
ALGO
0.999823
3.49968
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2015-08-04T09:08:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9df4f4217...
26663eb4-f364-44c5-a81d-3259c8034b99
aritradev/My-practice-Problem
L_Diverse_Team.cpp
#include <bits/stdc++.h> using namespace std; #define cobra_69xp #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) using ll = long long int; using ull = unsigned long long int; #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define in insert #define pb push_back #define ...
ALGO
0.999998
3.364775
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-11-01T08:41:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66b1334a19d...
f1342b5e-486d-45bc-8422-e42c3b3c39fa
Hoff22/CompetitiveProgramming
CSES/Introductory/13 (hanoi).cpp
#include <bits/stdc++.h> #define N 200000 #define MAX 1000000000 #define E 0.00000001 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFll 0x3f3f3f3f3f3f3f3fll #define LEFT(x) (2 * x) #define RIGHT(x) (2 * x + 1) #define se second #define fi first using namespace std; // int count(int a){ // if(a == 1) retur...
ALGO
0.999719
3.949315
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-10-24T23:39:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b64c5f43959...
de4e9b15-8df0-474c-ad5b-d68153d8883e
1779296311/leetcode
commonAncestor.cpp
/********************************************* * ------------------------ * ------------------------ * file name: commonAncestor.cpp * author : @ JY * date : 2020--03--10 **********************************************/ #include <iostream> #include <queue> #include <stack> #include <climits> #i...
ALGO
0.999932
4.866064
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-03-28T01:13:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f9f1ac8d...
264f91fb-59c6-47f9-bd05-0bcc6f78159a
tsaichen1o/Cody
leetcode/20241122_1072.cpp
/** * @file 20241122_1072.cpp * @author auntieyafen (<EMAIL>) * @brief 1072. Flip Columns For Maximum Number of Equal Rows * @version 0.1 * @date 2024-11-22 * * @copyright Copyright (c) 2024 * */ class Solution { public: int maxEqualRowsAfterFlips(vector<vector<int>>& matrix) { unordered_map<str...
ALGO
0.999987
6.401976
{ "github_metadata": { "branch": "main", "commit_count": 158, "repo_created_at": "2024-01-03T08:22:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "566c838d81...
71b9857f-dc55-4876-b0fe-7fd724598665
antoniocarrillo69/DDMyFEM
DDM/EsquemaMaestro-Esclavo/Paralelo2/Esquema_ME.hpp
#include "mpi.h" /// Clase base para definir el Esquema Maestro-Esclavo /** Clase base para definir el Esquema Maestro-Esclavo para programar en paralelo mediante el paso de mensajes usando MPI, donde el primer procesador (id = 0) es el nodo mestro y el resto son los nodos esclavos. Las tare...
ALGO
0.99789
4.234602
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-03-29T16:44:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a3cdb595c...
afcbc940-9ad2-4ad4-a24c-bb03e29b3e67
ishandutta2007/codeforces-k
krijgertje/normal/1285/E.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <cstring> #include <list> #include <cassert> #include <climits> #inclu...
ALGO
0.999385
3.836443
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bc2a3955b6a...
b60b0d21-346b-481f-9e4b-c61a444979f5
mushabell/Introduction-to-Data-Structures-and-Algorithms
Program 3/ZybooksFullPoints/Tree.cpp
#include "Tree.h" #include "iostream" #include <stdexcept> void Tree::insert(const string &value){ Node* curr = root; //it is a new tree and root is nullptr if (curr == nullptr){ Node* newNode = new Node(value); root = newNode; return; } //if the key is already in the tree t...
ALGO
0.995156
3.765077
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-09-17T06:59:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8f3b7f8a5a4...
bda62b64-c833-431d-b45b-97a6a0b0dc19
zerotrac/DailyCompetitive
Google/Codejam2021/Qualification/E.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <cmath> #include <cstdlib> #include <cstring> #include <climits> #include <algorithm> #include <numeric> #include <utility> #include <random> #include <chrono> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include...
ALGO
0.999723
5.008961
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2020-03-30T00:03:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49cf5e0f...
6a5417e8-946a-404f-beeb-cd8eb9569c25
ShuvaG/Vistas-of-Advanced-Computing
Block Matrix Multiplication/Block Matrix Multiplication/Block Matrix Multiplication.cpp
// Matrix Multiplication #include <iostream> #include <time.h> using namespace std; int main() { cout << "Computation for a 2048 x 2048 will take over a minute. Please wait." << endl; int *matrix_1, *matrix_2, *mult_matrix; int n = 2048; int B = 128; matrix_1 = (int*)malloc(n*n * sizeof(int)); matrix_2 = (int*)m...
ALGO
0.999188
3.58426
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-06-11T18:36:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13b97c66b...
b1e42624-92b4-44a6-8809-ef077b0fc7b3
MulengaHankandaChituta/C-exercises
exercises_13.cpp
//To make a profit, a local store marks up the prices of items by a certain percentage. //Write a C++ program that reads the original price of the item sold, the percentage of //the marked-up price, and the sales tax rate. The program then outputs the original //price of the item, the percentage of the mark-up, the st...
TOOL
0.940823
4.351359
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-10T12:00:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5357565965e8...
efe7bdd7-8a5a-4f7b-8abc-22ef17cf640e
ml1150258/CSC_7
Class/CompareFloatEquality/main.cpp
/* * File: main.cpp * Author: Dr. <NAME> * Created on August 24, 2021, 7:51 AM * Purpose: How to compare real/float values for an equality */ //System Level Libraries #include <iostream> //I/O Library #include <cmath> //Math Library #include <iomanip> //Format Library using namespace std; //Library...
TOOL
0.908076
4.783427
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2023-02-15T16:13:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a759cb513...
a3d54663-7191-4099-b9c5-240724b57dd1
ShoumyaPartho/Programmes
Practice/Paint the Array.cpp
// Solved by: Shoumya #include<iostream> #include<ctime> #include<vector> #include<algorithm> #include<iomanip> using namespace std; #define endl "\n" #define ll long long int void fastIO() { ios_base::sync_with_stdio(false); cin.tie(0), cout.tie(0); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freope...
ALGO
0.999963
4.292161
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-04-06T20:01:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1151c992634...
97bb2f5b-65fe-4b88-b8ff-640839394a0e
Code18Aryan/LEETCODE-QUESTIONS
TREES/2415. Reverse Odd Levels of Binary Tree.cpp
#include <bits/stdc++.h> using namespace std; /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int ...
ALGO
0.999999
5.674949
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2025-01-03T14:22:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10c7de0596...
c5e69eb6-c957-435e-b060-f32d37867706
mashiuruab/leetcode
24.cpp
#include<iostream> #include<map> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; ListNode* swapPairs(ListNode* head) { if(head == NULL) return NULL; ListNode* result = head; ListNode* prev = NULL; while(head != NULL) { if(head->next != NUL...
ALGO
0.99998
5.228734
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-01-17T00:18:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8506c11ce5...
ee770603-9922-4b40-b8a4-365af0a99c22
hjiang13/LLM4IR
results/Task2_IR_Decompilation/DecompiledResuts_Human_x_164_O2/DeepSeek_Decompile_o2_result/Run2_DeepSeek_Decompile/CPP_100.cpp
<think> Alright, I'm trying to decompile this LLVM IR code back into C++ source code. Let me start by understanding what this code is doing. Looking at the function definition `@_Z11make_a_pilei`, I notice it's a constructor for a function that returns a `std::vector`. The function takes an integer `%1` which is the s...
ALGO
0.995266
5.906185
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-05-21T20:32:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3cefd7bef0d...
488ce950-28ca-4df9-88bf-55d5428d35b5
aatman-24/CP-3
Practice/Solved/String/Classic/10635 - Prince and Princess.cpp
#include <bits/stdc++.h> #define ll long long #define REP(i,n) for(int i = 0; i < n; i++) #define REP1(i,n) for(int i = 1; i <= n; i++) #define debug cout << "Ok" << endl; #define mod 1000000007 using namespace std; typedef pair<ll,ll> ii; typedef vector<ii> vii; typedef map<char,int> mci; typedef vector<int> vi; ty...
ALGO
0.99997
3.551391
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-12-30T12:22:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f12b5e2db298...
d9063389-1e04-4806-bb22-9ea89fdb15ee
gmaheswaranmca/20220420
trainer/handsOn/Day 4/14/LearningApp.cpp
#define SIZE 5 #include <iostream> using namespace std; void inputSalaries(double salary[], int length) { cout << "Enter salaries one by one:" << endl; for (int index = 0; index < length; index++) { cout << "Salary at index " << index << ":"; cin >> salary[index]; } } void travelSalariesF(double salary[], int ...
ALGO
0.980629
4.043352
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2022-04-22T06:36:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8a471035e...
c5a3c0f2-f98c-4c29-8234-b8b729d1ba11
jungahshin/algorithm
c:c++/2636.cpp
// 2636번. #include <iostream> #include <queue> #include <cstring> using namespace std; int n, m; int cheese[101][101] = {0, }; int visited[101][101] = {0, }; int sec = 0; int final = 0; // 가장 마지막에 남은 치즈조각 수 int dx[4] = {-1, 1, 0, 0}; int dy[4] = {0, 0, -1, 1}; // 외부의 공기들을 표시해주고 이와 인접한 치즈들을 0으로 만들어준다. void bfs() {...
ALGO
0.999972
3.849867
{ "github_metadata": { "branch": "master", "commit_count": 645, "repo_created_at": "2019-07-26T10:26:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0aaf121b...
98f07a4d-6f6a-430b-b01d-5af149acf65c
YashP16/Competitive-Programming
RandomPractice/Dynamic programming standard question/coinchangeproblem.cpp
#include <bits/stdc++.h> #define Pi 3.141592653589793 #define eps 1e-9 #define MAX int(1e9) #define MIN int(-1e9) #define REP(i,n) for(ll i=0;i<(n);i++) #define FOR(i,a,b,c) for(int i=a;i<b;i += c) #define FORd(i,a,b,c) for(int i=a;i>=b;i -=c) #define all(v) ((v).begin(),(v).end()) #define vi vector<int> #define vii v...
ALGO
0.999974
3.556588
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2017-02-24T20:48:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1687f2fbb...
0de68cb9-a4b5-4c29-84a6-b1f912f7ddce
cpgoodri/jsrc
Minimization/minimizerLBFGS.h
#ifndef MINIMIZERLBFGS_H #define MINIMIZERLBFGS_H #include "../Resources/std_include.h" template<class T> class CMinimizerLBFGS { public: static void report_status_code(int status_code); }; template<class T> static void CMinimizerLBFGS<T>::report_status_code(int status_code) { printf("Statu...
ALGO
0.962782
6.322319
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2013-04-11T17:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "925a9bcbd...
834bf657-6b2b-4fb2-ab05-fe70925df796
raincross7/code-similarity
codes/train_code/problem495/problem495_445.cpp
#include <bits/stdc++.h> using namespace std; // 型定義 typedef long long ll; typedef pair<ll, ll> P; // forループ #define REP(i,n) for(ll i=0; i<(ll)(n); ++i) // 定数宣言 const int INF = 1e9; const int MOD = 1e9+7; const ll LINF = 1e18; // グラフ表現 using Graph = vector<vector<int>>; // グラフの辺表現 using Edge = map<pair<int,int>,i...
ALGO
0.999916
4.391113
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a568f2f0dfab...
8b49ff22-8a89-4056-95fb-15d6fcac31e8
OmarAhmed03/Mastering_DS_ALG
Arrays/CPP/Array.h
#ifndef ARRAY_H #define ARRAY_ #include <iostream> using namespace std; template<typename T> class Array { public: Array(int size) { this->size = size; A = new T[size]; length = 0; //ctor } Array() { this->size ...
TOOL
0.993542
4.252821
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-04-26T00:47:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6fbfce47d32...
7e098a20-0c9b-4c0b-af8e-97ffebd92fc0
Ajayjam97/DS_ALGO
C++/8.Trees/1.Generic/13.PredecessorAndSuccessor.cpp
#include<iostream> #include<stack> #include<queue> #include<vector> using namespace std; class Node { public: int data; vector<Node*> children; Node(){ data = 0; children.reserve(100); } Node(...
ALGO
0.999983
3.37172
{ "github_metadata": { "branch": "main", "commit_count": 297, "repo_created_at": "2022-01-01T10:14:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f6409e8457...
ab6a8c8e-8b77-4af1-9318-c0391de85585
ki-opt/AtCoder-ABC
ABC001-ABC100/ABC075/D/src/src.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <unordered_map> #include <cmath> #include <climits> #include <string> #include <queue> #include <stack> #include <set> #include <math.h> #include <float.h> #include <numeric> #include "atcoder/all" using namespace std; using namespace a...
ALGO
0.999833
4.367119
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-02-05T05:00:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2007aecdb...
ca981126-016c-40ee-89fc-f391de862d0f
DuongHaoNika/CPP__CODEPTIT
CPP0421 - SẮP ĐẶT DÃY SỐ.cpp
#include<bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for(int i = a; i <= b; ++i) #define FORD(i, a, b) for(int i = a; i >= b; --i) #define F(i, a, b) for(int i = a; i < b; ++i) #define FD(i...
ALGO
0.999855
3.779871
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-08-15T09:19:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa09b28f3...
adb73a22-75e0-4186-8c57-4d593ef06a20
turbopro/CppFEjune2019
Level1/Level1.4_Ex4/Level1.4_Ex4.cpp
// Level1.4_Ex4.cpp // // C program that creates a table of values, Fahrenheit vs Celsius temperatures // // Table should have a header // Left column shows the temperature in Fahrenheit // The right column shows the temperature in Celsius // Initial range for left column: 0 - 300, in steps of 20 // Right column Cels...
ALGO
0.981621
3.619114
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2019-06-03T03:28:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2f20107...
30900067-ae8d-466e-ab87-9a5d543dbdb7
cycmay/LearnedIndex
include/LIndex/LIndexModel.h
#pragma once #include <array> #include <vector> namespace LIndex{ template <class key_t> class LModel { // the linear regression model of learned index private: public: LModel(){}; LModel(const LModel<key_t> &a); ~LModel(); typedef typename std::vector<key_t>::iterator vector_iterator_t; ...
ALGO
0.930667
5.341609
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2021-06-04T12:34:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f3677e60c...
27ed99c6-d33f-42a5-af36-1a6b66fa7daa
abacus-ustc/abacus-GPU
ABACUS/tools/SIAB/SimulatedAnnealing/backup_old_version/1_Source/src_spillage/Calculate_C4.h
#ifndef CALCULATE_C4_H #define CALCULATE_C4_H #include "common.h" class Calculate_C4 { public: Calculate_C4(); ~Calculate_C4(); void init( ifstream &ifs, const double &ecut, const double &rcut, const double &tolerence, const int &lmax ); void Test( ifstream &ifs, const double &ecut, const double &tolerence); ...
ALGO
0.990586
3.121483
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-03-10T03:37:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17622b35b7...
df63fba3-392a-4f96-a38b-6392c9412909
ThedRk1607/CPtemplates
differenceArrayTechniq/A. Greg and Array.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,n) for(int i = a; i < int(n);i++ ) #define FORR(x,arr) for(auto& x:arr) #define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i) #define ll long long #define ull unsigned long long #define db double #define pb pus...
ALGO
0.999963
3.776333
{ "github_metadata": { "branch": "main", "commit_count": 352, "repo_created_at": "2023-04-21T15:44:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce4c74702c...
ce86cbfa-280b-4664-b442-096006c550cb
jnlindsay/music-cognition
music-cognition/main.cpp
// // main.cpp // music-cognition // // Created by <NAME> on 10/11/2023. // #include <iostream> #include <algorithm> #include "stm.hpp" #include "stp.hpp" using namespace std; int main() { string rhythm; cin >> rhythm; int n = (int)rhythm.size(); // short term memory / prediction STM stm; STP stp; ...
ALGO
0.991783
5.780871
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-11-09T08:11:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8aa9179b23f2...
2c75811e-673d-4ca4-801d-3edaa5eccd7d
benj-chen/exercises
usacosilver/2023jan28/b.cpp
#include<iostream> #include<vector> #include<map> #include<utility> #include<algorithm> #include<queue> #define fr(i,m,n) for (int i=m;i<n;i++) #define fo(i,n) fr(i,0,n) #define f(n) fo(i,n) using namespace std; int main() { int n; cin >> n; char a[n][n]; int p_row[n], p_col[n]; f(n) { ...
ALGO
0.999905
4.677725
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2020-08-04T05:40:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d37fc90...
e018f564-ec11-4075-b0d8-d97e74de2c17
davisking/dlib
dlib/graph_cuts/graph_labeler_abstract.h
// Copyright (C) 2012 <NAME> (<EMAIL>) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_GRAPH_LaBELER_ABSTRACT_Hh_ #ifdef DLIB_GRAPH_LaBELER_ABSTRACT_Hh_ #include "find_max_factor_graph_potts_abstract.h" #include "../graph/graph_kernel_abstract.h" #include "../matrix/matrix_abstr...
ALGO
0.958125
7.132941
{ "github_metadata": { "branch": "master", "commit_count": 8325, "repo_created_at": "2014-01-29T00:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14068, "forks": 3436, "issues": 41, "pull_requests": 5 }, "file_meta": { "content_id": ...
96a6c3de-a862-482e-b6b2-0785dd70a0f0
firearasi/raytracingbasicsqt
lib/aarect.cpp
#include "aarect.h" bool xy_rect::hit(const ray& r, float t0, float t1, hit_record& rec) const { float t = (k-r.origin().z()) / r.direction().z(); if (t < t0 || t > t1) return false; float x = r.origin().x() + t*r.direction().x(); float y = r.origin().y() + t*r.direction().y(); if (x < x0 |...
ALGO
0.928458
5.757471
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-06-10T09:04:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c084c2663...
e873a5f0-783c-4804-98ad-30b1981dcdef
Chinesezjc/Solved-Problems
CodeForces/CF1586F.cpp
// This Code was made by Chinese_zjc_. #include <bits/stdc++.h> // #define debug int n, k, cnt, v[1005][1005]; signed main() { std::ios::sync_with_stdio(false); std::cin >> n >> k; for (int i = 1; i < n; i *= k) { ++cnt; for (int j = 0; j < n; j += i) for (int l = 0; l < n; l...
ALGO
0.999954
3.116376
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2020-12-29T10:37:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a85b53df...
265b1c5a-3214-431f-b34e-c630b65e295d
GarrettOHara/ProcessManagement
dicttree.cpp
/** * This Program was written by: * * <NAME> | cssc1136 | RedId: 822936303 * * CS 480 | Professor Shen | January 2022 **/ #include <ios> #include <stack> #include <queue> #include <iostream> #include "dicttree.h" using namespace std; /* CONSTRUCTOR */ dicttree::dicttree(bool isWord) { for(int i = 0; i < ...
ALGO
0.998914
4.448773
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2022-02-15T20:04:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "203b8672f...
eb2e3d4e-1d1c-4ae4-a36a-7ad5f1e561ec
goldenpython/Contests
UVA/p454v0_cpp11.cpp
/******************************************************************************* * <NAME> * * 2163013577ba2bc237f22b3f4d006856 * * 11a4bb2c77aca6a9927b85f259d9af10db791ce5cf884bb31e7f7a889d4fb385 * * bc9a53...
ALGO
0.999848
4.785018
{ "github_metadata": { "branch": "master", "commit_count": 732, "repo_created_at": "2012-08-07T20:18:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ef6a921...
cd301365-6a7d-4d89-ba6b-fee91fd21bac
Tora416/MultiCodeEmbed
dataset/dataset_raw/gcj_cpp/burden/3264486_5736519012712448_burden.cpp
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> using namespace std; const int Maxn = 2000; int n, k; char s[Maxn]; int main() { // freopen("a.in","r",stdin); // freopen("a.out","w",stdout); int T, w = 0; for (scanf("%d", &T); T--;) { scanf("%s%d", s + 1, &k); printf("Cas...
ALGO
0.999302
3.682943
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2025-07-10T08:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f83134522...
82f3b5c9-3607-4339-a082-e90ae8a6e2bb
raincross7/code-similarity
codes/train_code/problem356/problem356_352.cpp
//#include "bits/stdc++.h" #define _USE_MATH_DEFINES #include<cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <deque> #include <algorithm> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <sta...
ALGO
0.999948
3.502045
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48531cae7c56...
a36ecc76-f60e-4747-9271-bfbbb365d321
loveBabbar/CodeHelp-DSA-Busted-Series
Lecture026 Pointers with Arrays and Functions/pointer_array.cpp
#include<iostream> using namespace std; int main () { //int arr[10] = {23, 122, 41, 67}; /* cout <<" address of first memory block is " << arr << endl; cout << arr[0] << endl; cout <<" address of first memory block is " << &arr[0] << endl; cout << "4th " << *arr << endl; cout << "5th " <<...
ALGO
0.927369
3.086103
{ "github_metadata": { "branch": "main", "commit_count": 170, "repo_created_at": "2021-12-08T19:23:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3573, "forks": 2443, "issues": 67, "pull_requests": 263 }, "file_meta": { "content_id": "9...
88bc1bd7-d97c-4bd6-9ea6-9e561f9d5e16
KuznetsovaViktoria/c-plus-plus-course
tasks/admission/admission.cpp
#include "admission.h" #include <string> #include <vector> #include <unordered_map> AdmissionTable FillUniversities(const std::vector<University> &universities, const std::vector<Applicant> &applicants) { std::vector<const Applicant *> sorted_applicants; for (const auto &person : applicants) { sorted_a...
ALGO
0.964106
4.975121
{ "github_metadata": { "branch": "main", "commit_count": 168, "repo_created_at": "2023-05-14T14:06:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2667df4f5b...
d2d8af58-b31a-47ed-9de3-83651e2ad1e2
kifah-s/Fundamentals_Of_Programming
Gammal_Tech_Academy/Core_Courses/3_Data_Structures/Sec_2_Dynamic_Memory_Allocation/Les_8_free/Problem_Solving/Problem_Solving.cpp
//* Problem Solving .. #include <iostream> #include <array> #include <vector> #include <string> #include <algorithm> #include <set> #include <utility> #include <map> #include <cctype> #include <fstream> #include <queue> #include <cstring> using namespace std; //* Structs .. struct Query { char *text; Query...
ALGO
0.991629
3.393847
{ "github_metadata": { "branch": "main", "commit_count": 2110, "repo_created_at": "2023-04-07T14:22:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f204efaac...
e73deb92-31ff-4a17-aa32-ec014405a3af
9646516/leetcode_source
src/753.cpp
// id:376335767 // runtime:12 ms // memory:8.9 MB // title:Cracking the Safe // translatedTitle:破解保险箱 // questionId:754 // time:2022-10-25 16:11:41 class Solution { public: vector<string>V; string now; vector<int>G[5000]; void dfs(int n,int k){ if(n==0){ V.push_back(now); }e...
ALGO
0.999751
4.965699
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-05-13T15:16:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6dae203ff8f...
fbaf5641-abed-4501-9079-f6d06e7e1c9f
cliqz-oss/keyvi
keyvi/3rdparty/tpie/apps/matrix/sparse_matrix.h
// -*- mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup"; -*- // vi:set ts=4 sts=4 sw=4 noet : // Copyright 2008, The TPIE development team // // This file is part of TPIE. // // TPIE is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public ...
TOOL
0.947308
6.069021
{ "github_metadata": { "branch": "master", "commit_count": 826, "repo_created_at": "2015-07-14T21:25:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 177, "forks": 37, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id": "5ff04d...
c08f479a-b724-4e38-b606-526f53a753a8
RemedyIT/dancex11
dancex11/scheduler/dependency_sorter.h
/** * @file dependency_sorter.h * @author <NAME>, <NAME> * * @copyright Copyright (c) Remedy IT Expertise BV */ #ifndef DAnCEX11_DEP_SORTER_H #define DAnCEX11_DEP_SORTER_H #include <map> #include <set> #include <string> #include <vector> #include "tao/x11/base/stddef.h" namespace DAnCEX11 { class Dependenc...
TOOL
0.90188
7.413685
{ "github_metadata": { "branch": "master", "commit_count": 305, "repo_created_at": "2019-09-17T07:50:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa1e31844...
9a2e39bb-03c4-44f8-ad0a-253d5785bb19
kamyu104/LeetCode-Solutions
C++/split-array-into-consecutive-subsequences.cpp
// Time: O(n) // Space: O(1) class Solution { public: bool isPossible(vector<int>& nums) { auto pre = numeric_limits<int>::min(), cur = 0; auto cnt1 = 0, cnt2 = 0, cnt3 = 0; // count of each length ending at cur for (int i = 0; i < nums.size(); pre = cur) { auto cnt = 0; ...
ALGO
0.999925
5.748231
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
9f0c91cd-779e-47be-80cf-fbf4c9e0455a
djflsdl08/Algorithm
Homework2/main.cpp
#include <stdio.h> #include <stdlib.h> #define MAX 200 #define m 10 typedef struct { int key; }element; typedef struct { element heap[MAX]; int size; }HeapType; void init(HeapType *h){ h->size = 0; } void insert_min_heap(HeapType *h,element x){ int i; i = ++(h->size); while((i!=1)&&(x.ke...
ALGO
0.999982
3.782055
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2016-09-07T08:44:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fb1dfc44...
348e7907-0371-4fa4-ae5b-a752c2b1005e
kimhs982/BOJ_solve_mac
2738.cpp
// 2738번, 행렬 덧셈 #include <iostream> using std::cin; using std::cout; using std::ios_base; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, M; // N(행), M(열) cin >> N >> M; // 2차원 배열 동적할당 int **matrix = new int *[N]; for (int i = 0; i < N; i++) ...
ALGO
0.99376
3.85042
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-06-14T02:32:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb53aad1eb0...
48c03ce3-87e5-4bc7-8663-7c8cf18d04b6
ishandutta2007/codeforces-k
kawatea/normal/350/E.cpp
#include <cstdio> #include <vector> #include <algorithm> using namespace std; int main() { int n, m, k, i, j; int a[300] = {0}; int b[300][300] = {0}; vector <int> v, w; scanf("%d %d %d", &n, &m, &k); for (i = 0; i < k; i++) { int x; scanf("%d", &x); ...
ALGO
0.999963
3.46277
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "945cc9dbdac4...
758ebb8f-c844-4e3e-abd8-d7663113b8ee
mitchnull/advent-of-code
aoc-2024/src/main/cpp/14/main.cpp
#include <bitset> #include <iostream> #include <numeric> #include <sstream> #include <string> #include "../utils.h" using Row = std::bitset<128>; using Map = std::vector<Row>; /* ------------------------------------------------------------------------ */ struct Robot { Pos p; Dir v; inline auto friend operato...
ALGO
0.999929
4.68924
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2024-12-01T21:03:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2076ed3...
6dbf2069-fb94-412a-bf00-10403aab630b
vukanoa/Coding_Problems
1_LeetCode_Top_150_Interview_Questions/47_328_Odd_Even_Linked_List/odd_even_linked_list.cpp
#include <iostream> /* ============== === MEDIUM === ============== =========================== 328) Odd Even Linked List =========================== ============ Description: ============ Given the head of a singly linked list, group all the nodes with odd indices together followed by the nodes with eve...
ALGO
0.999931
6.18817
{ "github_metadata": { "branch": "main", "commit_count": 2647, "repo_created_at": "2022-10-27T12:00:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "075924ee0...
08fb89f0-3a45-47d0-abe1-c37103174322
khattab-o8/Problem-Solving-Cpp
3 - Algorithms & Problem Solving Level 3/Problem #42/#42 - MY Solution(1).c++
#include <string> #include <iostream> #include <vector> using namespace std; vector <string> SplitString(string S1, string Delim) { vector <string> vString; short Pos = 0; string sWord = ""; while ((Pos=S1.find(Delim)) != std::string::npos) { sWord = S1.substr(0, Pos); if (sWord != "") { vString.push_b...
TOOL
0.949891
4.631233
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-11-26T20:07:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ef65b321a...
1f3c6da7-b0b4-4d5b-8ea0-4d32b55048bb
abhishek9125/DSAlgoSet
Dynamic Programming/07. Subset Sum Equals K.cpp
// Bottom Up class Solution{ public: bool isSubsetSum(vector<int>arr, int target){ int n = arr.size(); vector<vector<bool>> dp(n, vector<bool>(target + 1, false)); for(int i = 0; i < n; i++){ dp[i][0] = true; } if(arr[0] <= target) { dp[0][arr[0...
ALGO
0.999989
5.87852
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-08-21T20:43:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d93d7a347a...
df10c939-cfcd-44df-9398-7d29ae78397e
y2jinc/study
3DCharacterAnimation/source/Library.cpp
//Common.cpp written by <NAME>. //This should be called Tools.cpp!!! // Copyright (c) 2001 Tanzanite Software. All rights reserved. // The names, "Tanzanite", and "TechNature" are registered trademarks of Tanzanite Software, and <NAME> // <EMAIL> // <EMAIL> // work in progress : For latest version goto www.tanzani...
ALGO
0.992953
3.438574
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2015-07-10T09:02:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "671034aa6...
45395608-cf19-4b15-babc-a41246643e62
LadybirdBrowser/ladybird
Libraries/LibTextCodec/Decoder.cpp
/* * Copyright (c) 2020, <NAME> <<EMAIL>> * Copyright (c) 2022, <NAME> <<EMAIL>> * Copyright (c) 2023, <NAME> <<EMAIL>> * Copyright (c) 2024, <NAME> <<EMAIL>> * * SPDX-License-Identifier: BSD-2-Clause */ #include <AK/BinarySearch.h> #include <AK/StringBuilder.h> #include <AK/Utf16View.h> #include <AK/Utf8View.h...
TOOL
0.904068
7.221963
{ "github_metadata": { "branch": "master", "commit_count": 70489, "repo_created_at": "2024-05-30T09:18:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 45588, "forks": 1949, "issues": 457, "pull_requests": 50 }, "file_meta": { "content_id"...
ebf93067-ac82-4c9a-8c3b-c8c3da8f9f6e
faizan474/DSA
matrixExponentiation.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #define boost ios_base::sync_with_stdio(false);cin.tie(NULL); #define ull unsigned long long #define deb(x) cout<<#x<<" "<<x<<endl; #...
ALGO
0.999905
3.71524
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-12-02T19:52:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e79234f4...
897f5e45-9a78-42a1-afc9-8e2e173b2081
raincross7/code-similarity
codes/train_code/problem234/problem234_142.cpp
#include "bits/stdc++.h" using namespace std; /////////////////////////////////////////// const long long int INF = 1LL<<60; const long long int Mod = 1000000007; using ll = long long int; using ci = const int; using vi = vector<int>; using Vi = vector<long long int>; using P = pair<int, int>; using PLL = pair<ll, ll...
ALGO
0.999888
3.430946
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cfd054395a3...
9d8c0a94-c55e-4d90-8fa6-fe944ba28678
BhJia/Data-Structure
string/sentence-partition.cpp
#include<bits/stdc++.h> using namespace std; // 句子分割问题:力扣上很多句子分割问题,就是给一个带空格的很长的句子,然后处理其中的单词 // 最后一个单词的长度:把所有单词放到数组中,返回数组尾元素长度 int lengthOfLastWord(string s) { if (s.empty()) return 0; s += " "; string temp = ""; vector<string> res; for (char ch : s) { if (ch == ' ') { ...
ALGO
0.998487
3.707413
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-09-28T01:05:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "599891cb3c6e...
402c9e42-04e3-481a-9c19-e0cc12cdcbb9
shobhitraj1/CP-31-Sheet-Solutions
1000/1000-4-Olya and Game with Arrays.cpp
// Created by <NAME> // Problem link - https://codeforces.com/problemset/problem/1859/B #include <bits/stdc++.h> using namespace std; // Max. beauty can be when transfer all the mins. to one array, // take min of that array (which will be min of mins) & add to 2nd min of remaining arrays #define int long long #defi...
ALGO
0.999968
4.758969
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-08-15T06:08:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81d343c8f96...
287cc32e-4b34-48cb-ab27-6f5eb4f5f286
tpportugal/tpp_valhalla
valhalla/baldr/pathlocation.h
#ifndef VALHALLA_BALDR_PATHLOCATION_H_ #define VALHALLA_BALDR_PATHLOCATION_H_ #include <cstdint> #include <utility> #include <vector> #include <valhalla/baldr/graphid.h> #include <valhalla/baldr/location.h> #include <valhalla/baldr/rapidjson_utils.h> #include <valhalla/baldr/graphreader.h> #include <valhalla/proto/d...
ALGO
0.99033
6.196831
{ "github_metadata": { "branch": "master", "commit_count": 12570, "repo_created_at": "2018-04-04T18:52:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbb02b8...
382b1343-933f-40e8-ae3c-208e281bd797
sergey-pashaev/sedgewick-cpp
src/chapter-3/ex.3.47.cpp
// ex.3.47 // en: Write a program that frees the nodes in positions that are // divisible by 5 in a linked list (the fifth, tenth, fifteenth, and // so forth). // ru: Напишите программу, которая удаляет узлы связного списка, // находящиеся в позициях с номерами кратными 5 (5, 10, 15, ...). #include <catch.hpp> #inc...
ALGO
0.943788
5.611849
{ "github_metadata": { "branch": "master", "commit_count": 258, "repo_created_at": "2018-11-09T03:31:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03b367...
4d7a66b8-4db0-4537-ab48-cb0f4af5a078
PPPhongPhu946/DA24TTA-110124148-KTLT
bai24.cpp
#include <stdio.h> typedef struct { int tuSo; int mauSo; } PHAN_SO; void nhapPhanSo(PHAN_SO *ps); void xuatPhanSo(PHAN_SO ps); int UCLN(int a, int b); void rutGonPhanSo(PHAN_SO *ps); PHAN_SO congPhanSo(PHAN_SO ps1, PHAN_SO ps2); PHAN_SO truPhanSo(PHAN_SO ps1, PHAN_SO ps2); PHAN_SO nhanPhanSo(PHAN_SO ps1, ...
TOOL
0.971743
3.59996
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-19T00:12:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "401348a9df87...
16338cce-4029-4b67-8a88-2e6755a0eaf0
jintongxu/kaoyan
王道课后题/2.3/6.cpp
#include <stdio.h> #include <stdlib.h> #include <iostream> // 定义节点结构体 typedef struct LNode { int data; struct LNode* next; } ListNode; // 初始化带头节点的链表 ListNode* initList() { // 创建头节点并将其 next 指针置为 NULL ListNode* head = (ListNode*)malloc(sizeof(ListNode)); if (head == NULL) { printf("Memory al...
ALGO
0.999976
4.813626
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-08-10T09:15:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ab9c361b96b...
2cff47f0-a3ef-43c6-94a0-e982a8194c24
vineethm1627/CPP
Interview Preparation/06 Divide and Conquer/strict_peak_element.cpp
/* A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks. You may imagine that nums[-1] = nums[n] = -∞. Example 1: Input: nums = ...
ALGO
0.999975
5.84909
{ "github_metadata": { "branch": "master", "commit_count": 630, "repo_created_at": "2020-09-22T19:11:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da31830...
1aa8936b-b969-47ad-a304-77ca09299810
oskaerik/vrp-sa-ga
src/solution.hpp
#ifndef _SOLUTION_HPP_ #define _SOLUTION_HPP_ #include "common.hpp" // Represents a solution class Solution { public: std::vector<int> sequence; std::vector<int> delimiters; // Calculates score of solution double score(const Graph & graph) const { int n = graph.size(); int m = delimit...
ALGO
0.999959
5.620977
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2019-02-21T13:25:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80382e51...
94a800cd-d156-4b7e-b6e2-bd789177db54
Sieabah/cmsc-435
proj6/stub.cpp
/** * stub.cpp * * Written by <NAME> * * This program is an implementation of the content aware image resizing * algorithm */ #define cimg_display 0 #define debug_energy_map 0 #include "CImg.h" #include "slVector.H" #include "Seam.h" #include <iostream> #include <vector> #include <algorithm> using namespac...
ALGO
0.997237
5.806203
{ "github_metadata": { "branch": "master", "commit_count": 145, "repo_created_at": "2020-10-19T03:05:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5089773f...
82858209-c99b-4dac-8e7e-21b9fb9ac5f7
louisfghbvc/Leetcode
Greedy/2551. Put Marbles in Bags.cpp
// Observe end points is adjacent class Solution { public: long long putMarbles(vector<int>& weights, int k) { // goal: find the maximum score, and minimum score // idea: // the order can not change // must put in k bags, each bag is non-empty // cost a[l:r] are only arr[l]+...
ALGO
0.999956
5.128278
{ "github_metadata": { "branch": "master", "commit_count": 2084, "repo_created_at": "2019-12-13T14:09:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae16373...
b9784f3a-1628-43a6-a737-e6bcfeb8183e
kexinrong/rehashing
benchmark/askit_release/treecode/src/askit_kde_main.cpp
#include <mpi.h> #include "askit_alg.hpp" #include "gaussian_kernel.hpp" #include "kernel_inputs.hpp" #include "askit_utils.hpp" #include <CmdLine.h> #include <ompUtils.h> #include <ctime> #include <omp.h> #include <float.h> #include <parallelIO.h> #include <iostream> using namespace Torch; using namespace askit; ...
ALGO
0.98372
5.65126
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2019-05-11T22:15:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "044ec02...
b3447f6f-c394-4386-8fad-ba70b2e76117
iKalous/Study-Files
APPs/Marscode/problems/P16/P16.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; template <class T> inline void read(T &x) { int fg = 1; char ch = getchar(); x = 0; for(;ch < '0' || ch > '9';ch = getchar()) fg = ch == '-' ? -1 : 1; for(;ch >= '0' && ch <= '9';ch = getchar()) x = x * 10 + (ch ^ '0'); x *= fg;...
ALGO
0.999941
4.363574
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-09-23T16:02:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6528e68ed3c5...
b016fc7a-6139-421a-a285-a0d82edbb5f2
OpenLocalizationTestOrg/ECMA2YamlTestRepo2
fulldocset/add/codesnippet/CPP/m-system.drawing.region._5_1.cpp
public: void IsVisible_RectF_Example( PaintEventArgs^ e ) { // Create the first rectangle and draw it to the screen in blue. Rectangle regionRect = Rectangle(20,20,100,100); e->Graphics->DrawRectangle( Pens::Blue, regionRect ); // Create the second rectangle and draw it to the screen in r...
TOOL
0.970741
5.94584
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-02-20T02:36:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62cb56c81e...
7b672439-1707-49d4-b1c2-d565d4697150
ydb-platform/ydb
library/cpp/monlib/dynamic_counters/percentile/percentile_lg.h
#pragma once #include <util/generic/bitops.h> #include <cmath> #include "percentile_base.h" namespace NMonitoring { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Percentile tracker for monitoring /////////////////////////////////////////...
ALGO
0.951707
7.096892
{ "github_metadata": { "branch": "main", "commit_count": 35208, "repo_created_at": "2022-02-07T14:52:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4512, "forks": 701, "issues": 2263, "pull_requests": 682 }, "file_meta": { "content_id": ...
3e154bb5-227c-4684-9c15-c04dcd859471
jinhan814/solutions
ICPC/GERMAN/gcpc22_c.cpp
#include <bits/stdc++.h> using namespace std; struct fenwick { fenwick(int n) : sz(n), tree(n + 1) {} void update(int i, int x) { for (; i <= sz; i += i & -i) tree[i] += x; } int query(int i) const { int ret = 0; for (; i; i -= i & -i) ret += tree[i]; return ret; } int query(int l, int r) const { retur...
ALGO
0.999958
5.127077
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-07-17T02:39:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e777e25bc32...
b09beeec-a463-407c-8db4-95e10ba91ad8
kimurash/atcoder-contest
abc301-400/abc341-350/abc342/b/main.cpp
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> #define rep(i, s, n) for (int i = s; i <= (int)(n); i++) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define arrout(a, s, n) rep(i, s, n)cout<<a[i]<<" "; cout<<endl; #define vecout(v) for(auto elm : (v))cout<<elm<<" "; cout<<endl; using n...
ALGO
0.999991
4.085094
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2023-03-04T14:53:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac5a4b0c02c...
a8c62ac5-f4ed-46db-bc5b-d14c9f6c7997
AtikJawad/Object-Oriented-Programming-with-CPP-by-E.Balagurusamy-Examples-exercise-programs
Chapter 5/Programming Exercises/Exercise 5.2 .cpp
/* 5.2: Write a class to represent a vector (a series of float values). Include member functions to perform the following tasks: (a) To create the vector. (b) To modify the value of a given element. (c) To multiply by a scalar value. (d) To display the vector in the form (10, 20, 30 …) Write a program to test your clas...
ALGO
0.979217
3.661964
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-09-04T09:26:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6ae02d1e29...
81115345-bf16-477c-8fa5-021e446b557e
Alimagde/CompitativeProgramming
SPOJ/SPOJCDC12_H.cpp
/* */ #include <bits/stdc++.h> using namespace std; char str[22]; const int N = 100005; long long seg[4 * N]; long long lazy[4 * N]; int n, m; long long update(int id, int s, int e, int f, int t) { if (f > e || s > t) { return seg[id] + (lazy[id] * (e - s + 1)); } if (s == e) { seg[id] += (lazy[id] + 1); l...
ALGO
0.999718
3.684452
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2017-12-01T15:01:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ab1a6c5...
7847b1e6-e81a-4a67-8144-60305b06a4e2
Gin101/CS101
AtCoder/ABC318B.cpp
#include <iostream> using namespace std; const int maxN = 100; bool flag[maxN][maxN] = {{false}}; int main() { int n = 0; cin >> n; for (int i = 0; i < n; i++) { int a = 0; int b = 0; int c = 0; int d = 0; cin >> a >> b >> c >> d; for (int j = a; j < b; j...
ALGO
0.999086
4.122063
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2021-08-19T15:41:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd15fd0bd...
e25be644-a657-406e-86e3-d2a63b028d41
drlongle/leetcode
algorithms/problem_0090/solution.cpp
/* 90. Subsets II Total Accepted: 68460 Total Submissions: 222134 Difficulty: Medium Given a collection of integers that might contain duplicates, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subsets. For example, If nums...
ALGO
0.99998
5.794234
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2017-02-08T14:00:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a484d7...
463811e4-f0b0-4c5e-a433-df863f457a4f
Maxel31/Atcoder
ABC/319/D.cpp
#include <bits/stdc++.h> using namespace std; # define rep(i, n) for(int i = 0; i < (n); ++i) using ll = long long; using P = pair<int, int>; const long long INF = 1LL << 60; int main(){ // 入力 int N, M; cin >> N >> M; vector<ll> L(N); for(int i = 0; i < N; i++){ cin >> L[i]; L[i]++;...
ALGO
0.999985
3.592412
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-06-04T09:53:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2e123939d0...
5601f8f7-1328-4dc0-83fa-9469a67c13b8
jermp/psds
include/trees/segment_tree_topdown.hpp
#pragma once #include <vector> namespace psds { struct segment_tree_topdown { template <typename T> void build(T const* input, uint64_t n) { m_size = uint64_t(1) << static_cast<uint64_t>(ceil(log2(n))); m_tree.resize(2 * m_size - 1, 0); std::vector<int64_t> in(m_size, 0); std:...
ALGO
0.999528
5.918869
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2019-10-26T12:36:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab801ec...
b5d8c638-b508-4334-96c8-36a117ad789a
Abdul-Rahimm/LeetCode_2023
4.backtracking/qs6.cpp
// بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ #include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() typedef vector<int> vi; typedef vector<vi> vvi; int rows, cols; vector<vector<vector<int>>> coordinates; vector<vector<int>> current; struct VectorHash { size_t operator()(const std::vector<int>&...
ALGO
0.999519
4.215553
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2023-10-07T12:44:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9197c1e3d...
5ee4d312-090c-48c6-b9d6-affa1c67fa82
qgpmztmf/LeetCode
235.cpp
// 235. Lowest Common Ancestor of a Binary Search Tree /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* lowestCommonAncestor(TreeNode*...
ALGO
0.999992
6.618108
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-06-03T06:15:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "606d6db05...
fcb67756-1c9b-48b5-b818-67c3f3bac8f2
dacin21/dacin21_codebook
nt/FFT_double.cpp
namespace FFT{ template <typename dataType> struct Complex { dataType re, im; Complex() : re(0), im(0) {} Complex (const dataType& a, const dataType& b) : re(a), im(b) {} Complex(const complex<dataType>& c) : re(c.real()), im(c.imag()) {} Complex& operator = (const complex<dataType>& c){ this->re = c.re...
ALGO
0.999477
4.654701
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2017-09-11T12:26:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 115, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "510f8...
9c1eedec-ecf1-4da0-9959-3336a57d23a5
nikii2000/OS-LAB
experiment3.cpp
#include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; struct Process { int pid; int arrivalTime; int burstTime; int remainingTime; bool completed; Process(int pid, int arrivalTime, int burstTime) : pid(pid), arrivalTime(arrivalTime), burstT...
ALGO
0.999977
5.361987
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-19T04:58:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d00640307f40...
77fe5bc7-6fd4-430e-8bea-c06fe1d6055e
smaorus/rvt
cbmc_trunk/cbmc_trunk_windows - Copy/src/goto-symex/symex_goto.cpp
/*******************************************************************\ Module: Symbolic Execution Author: <NAME>, <EMAIL> \*******************************************************************/ #include <assert.h> #include <expr_util.h> #include <std_expr.h> #include <i2string.h> #include "goto_symex.h" /**********...
ALGO
0.986316
6.449858
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2015-06-06T08:49:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "208293574...
38dc80b3-7d94-48c7-bc5c-b94cd3a59983
ducpm2303/Competitive-Programming
CTDL&GTD18/Contest10/15.cpp
/*author : mdp*/ #include <bits/stdc++.h> using namespace std; typedef long long ll; struct edge{ ll u,v,w; }; bool negativeCycle = false; vector<edge> E; ll dist[1005]; int n,m,s; void Input(){ cin >> n >> m >> s; E.resize(m+5); negativeCycle = false; for(int i = 1; i <= m; i++){ cin >> E[i...
ALGO
0.999931
4.273601
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-04-04T07:52:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c1b26aec...
e60adf5d-cc65-448b-baae-70846f6629e1
engineerjkk/AlgortihmsAndDataStructures
24.ArrIndex2.cpp
#include <stdio.h> #define N1 9 #define N2 8 #define N3 7 #define N4 6 #pragma warning (disable: 4996) void main() { int B[N1][N2][N3][N4];//4차우너 배열을 반들어놨다. int nBound[4] = {N1, N2, N3, N4}; for (int i = 0; i < nBound[0]; i++) for (int j = 0; j < nBound[1]; j++) for (int k = 0; k < nBound[2]; k++) for (i...
ALGO
0.979573
3.509085
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2021-03-09T15:50:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abe02e79a5...
e779b156-2d31-4b71-ad0a-f40f36c2844e
prachi-io/DSA
LinkedList/DeleteKthCLL/DeleteKthCLL.cpp
/// My /* #include<iostream> using namespace std; struct Node { int data; Node *next; Node (int x) { data = x; next = NULL; } }; Node *deleteKth(Node *head , int K) { Node *curr = head; int i = 1; while(i < K - 1) { curr = curr -> next; i++; } if(curr ...
ALGO
0.999909
3.622174
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2022-01-28T14:20:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7864c42ba...
f7f1682b-b739-434b-89d2-13062a781563
LEECHHE/acmicpc
solved/1058.cpp
#include <cstdio> #include <queue> #include <algorithm> #include <cstring> using namespace std; int main(){ int n; scanf("%d",&n); char adj[50][51]; bool fr[50][50] = { false }; for( int i = 0 ; i < n ; ++i ){ scanf("%s", adj[i]); } for( int i = 0 ; i < n ; ++i ){ for( int j...
ALGO
0.999807
3.519482
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-08-16T11:57:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a37fdfad2...
3747160a-f6b9-44d2-a28d-ab7f7bc17251
semerdzhiev/Exams
sdp-prakt/2018-12-01/2/1-solution.cpp
#include <vector> #include <algorithm> #include <utility> struct Node { int value; Node* left; Node* right; }; bool is_leaf(Node* node) { return !node; } //броя елементи в дървото int count(Node* node) { return is_leaf(node) ? 0 : 1 + count(node->left) + count(node->right); } //[min, max] е интервалът на допу...
ALGO
0.999995
5.624572
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2018-12-05T18:41:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e0b5e20b9...
f2563496-2b6d-4813-a54c-b4b83fbe8ec5
Lyce24/Designing_Algorithms_For_TSP
tsp_randomized_search/cities.hh
/* * API file for Travelling-Salesperson Cities class and utilities */ #pragma once #include <iostream> // container #include <vector> // need to generate random date #include <random> // need to use sqrt and pow method #include <math.h> // need to use algorithm in random_permutation (.count()) #include <algorit...
ALGO
0.993695
6.145118
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-06-06T22:20:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26b67a8b5cf...
f6709765-cb70-4868-86d2-a181b7e8702c
oomph-lib/oomph-lib
demo_drivers/advection_diffusion/two_d_adv_diff_SUPG/two_d_adv_diff_SUPG.cc
//LIC// ==================================================================== //LIC// This file forms part of oomph-lib, the object-oriented, //LIC// multi-physics finite-element library, available //LIC// at http://www.oomph-lib.org. //LIC// //LIC// Copyright (C) 2006-2024 <NAME> and <NAME> //LIC// //LIC// This lib...
ALGO
0.999977
5.458136
{ "github_metadata": { "branch": "main", "commit_count": 1885, "repo_created_at": "2021-03-29T15:44:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 46, "forks": 28, "issues": 11, "pull_requests": 4 }, "file_meta": { "content_id": "dd9bfdd...