uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
23dc2a86-f179-41b7-86fa-7be98fc1ae15
Slacky300/CNS_LAB
Exp4/cryptolib/twofish.cpp
// twofish.cpp - modified by Wei Dai from Matthew Skala's twofish.c // The original code and all modifications are in the public domain. #include "pch.h" #include "twofish.h" #include "secblock.h" #include "misc.h" NAMESPACE_BEGIN(CryptoPP) // compute (c * x^4) mod (x^4 + (a + 1/a) * x^3 + a * x^2 + (a + 1/a) * x + ...
ALGO
0.999854
6.81394
ee9d19f2-4109-4155-9290-f4a1ff4bbf8d
Fengdalu/acm-icpc
baidu/2016/r1/d.cpp
#include <cstdio> #include <cstring> #include <string> #include <map> #include <algorithm> using namespace std; map<string, int>f; char buf[1000]; int main() { int n; scanf("%d", &n); while(n--) { scanf("%s", buf); int len = strlen(buf); sort(buf, buf + len); printf("%d\n", ...
ALGO
0.998929
3.955286
939bb106-38de-47ac-9d88-55648c15468b
Lqs66/llvm-16.0.4
clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
#include "clang/Tooling/Refactoring/Rename/USRFindingAction.h" #include "clang/AST/AST.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/FileManager.h" #include "clang/Frontend/CompilerInstance.h" #include...
TOOL
0.940505
7.584333
b55772c8-b771-4e9b-9cba-e04ab700cc0b
FahimShahriar273/Online-Judge-Library
Codeforces/A_1972_Contest_Proposal.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n,m,c=0; cin>>n; m=n+n; long long int a[n+n]; int b[n]; for (int i=0;i<n;i++) cin>>a[i]; for (int i=n;i<n+n;i++) a[i]= 99999999999; ...
ALGO
0.999717
3.103459
0c5ae3e6-e07c-46df-b817-44a304388eb8
tokabe333/OkabeAtcoder
ABC_300to350/ABC_330/E.cpp
#include <algorithm> #include <climits> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector...
ALGO
0.999958
4.581419
68a6b86c-f42b-49c0-af49-c890485965ee
ehnryx/acm
xx-warsaw-cf102341/k-lct.cpp
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; typedef long long ll;...
ALGO
0.999924
5.071988
83d8dcdf-fb3b-4679-96f8-d9f1ad5c8570
KlaudiaKromolowska/Basics_of_programming
1.4.cpp
#include <stdio.h> int main() { double ziemia=70, ksiezyc; scanf("%lf", &ziemia); printf("%lf\n", ziemia); ksiezyc=ziemia*0.17; printf("Waga na ksiezycu to %lf", ksiezyc); return 0; }
ALGO
0.997854
3.520099
95c8063f-657c-4104-85f1-46c4894b4603
niteshydv01/Data-Structure-Algorithm
1890-sum-of-beauty-of-all-substrings/1890-sum-of-beauty-of-all-substrings.cpp
class Solution { public: int beautySum(string s) { int totalBeauty = 0; for (int i = 0; i < s.size(); i++) { unordered_map<char, int> freq; // Single loop to build frequency and calculate beauty for (int j = i; j < s.size(); j++) { freq[s[j]]++; ...
ALGO
0.999977
6.334413
932e29d1-d505-4612-b33b-ee1694105079
lazywzx/proLang
CPP/CH03/Sub4/prac24.cpp
#include <iostream> #include <string> #include <vector> using std::cin; using std::cout; using std::endl; using std::string; using std::vector; // һڵĺ int main() { int num; vector<int> numbers; cout << "һ" << endl; while (cin >> num) { numbers.push_back(num); } for (auto itb = numbers...
ALGO
0.99942
3.728124
e869d1fb-10cc-4d1c-aea8-42dabcd0e351
bgamer50/Maelstrom
tests/test_search_sorted_sparse.cpp
#include "maelstrom/containers/vector.h" #include "maelstrom/algorithms/sparse/search_sorted_sparse.h" #include "test_utils.hpp" #include <vector> #include <iostream> using namespace maelstrom::test; void test_search_sorted_sparse_device(); void test_search_sorted_sparse_host(); int main(int argc, char* argv[]) { ...
TEST
0.95887
5.809357
10d4db12-de49-4f5e-a110-db560ac93346
SidGit195/Frank-Udemy-C-plus-plus
8. Statements and Operators/testing_of_equility.cpp
/* Be Carefull --> = means assignment --> == means equility */ #include<iostream> using namespace std; int main(){ bool equal_result {false}; bool unequal_result {false}; int num1{}, num2{}; cout << boolalpha; //Will display true/false instead of 0/1 for booleans cout << "Enter two...
ALGO
0.997199
4.330705
4def8450-2497-4d28-8098-3d3940f47392
RamonPortuga/TreinamentoC-_2018
Maior_Menor.cpp
#include <iostream> #define TAM 10 using namespace std; int vetor[TAM],maior,menor; main(){ for(int i=0;i<TAM;i++){ cin>>vetor[i]; } for(int i=0;i<TAM;i++){ if(i==0){ maior=vetor[i]; menor=vetor[i]; } if(maior<vetor[i]) maior=vetor[i]; if(menor>vetor[i]) menor=vetor[i]; } cout<<maior<<"\n"<<m...
ALGO
0.999902
3.258616
f7834c83-e519-4259-80a5-5b04e4dbc8d0
TusharCSE35/Online-Programming
Codeforces/A_Domino_on_Windowsill.cpp
/*********************************************************************************\ * _________ _ _ ________ _ _ __ ________ * * |___ ___|| | | || ______|| | | | / \ | ____ | * * | | | | | || |______ | |_____| | / /\ \ | |____| |...
ALGO
0.997891
3.400356
d942e8ac-532f-4025-9ea8-75ae8dd65000
dayeondev/AlgoStudy
etc/2522_별_찍기_12.cpp
#include<bits/stdc++.h> using namespace std; int n; int main(void){ cin >> n; string str; for(int i = 1; i < n+1; i++){ str = ""; for(int j = 0; j < n-i; j++){ str.append(" "); } for(int j = 0; j < i; j++){ str.append("*"); } cout <...
ALGO
0.999963
3.509037
c2f6f74c-22f2-4008-88b9-8886cbfdac73
Liash66/ASD
sem_3/lab_8/lab_8.cpp
#include <iostream> #include <vector> #include <algorithm> void radix_sort(std::vector<int>& arr) { int max = *max_element(arr.begin(), arr.end()); for (size_t exp = 1; max / exp > 0; exp *= 10) { std::vector<int> buckets[10]; for (int num : arr) { int digit = (num / exp) % 10; buckets[digit].push_bac...
ALGO
0.999791
6.085869
00a86966-06e8-4811-8446-44a59c27fa28
AlexGoodlife/advent-of-code
2024/day_6/second.cpp
#include <cstdio> #include <iostream> #include <string> #include <unordered_set> #include <vector> #include <array> struct Vector2{ int x; int y; public: Vector2(int x, int y) { this->x = x; this->y = y; } bool operator==(const Vector2& otherVec) const { if (this->x == otherVec.x && this->y ==...
ALGO
0.99984
5.053123
dbd07e5a-7609-494c-8281-c774dc663333
strawndri/curso-mfp
contests/semana-01/B_to_my_critics.cpp
#include <iostream> using namespace std; int main() { int t, a, b, c; do { cin >> t; } while ((t < 1) || (t > 1000)); for (int i = 0; i < t; i++) { do { cin >> a >> b >> c; } while ((a < 0 || a > 9) || (b < 0 || b > 9) || (c < 0 || c > 9)); if ((a + b >=...
ALGO
0.997471
3.807283
d46fdf99-d5e5-4724-96dc-ad700bfad4e4
jscslg/Competitive-Programming
archive/Codeforces/675_div2/B.cpp
#include <bits/stdc++.h> #define ll long long #define ldb long double #define MOD 1000000007 #define any_data ll #define f(i,a,b) for(int i=(a);i<(b);++i) #define f_(i,a,b) for(int i=(a);i>=(b);--i) #define vi vector<any_data> #define vvi vector<vi> #define ii pair<any_data,any_data> #define vii vector<ii> #define hmax...
ALGO
0.999948
3.850001
1ef2d242-1c15-4d8e-b88f-b8d191d14c4e
BGWH123/data-data-structure
6.2.5.06.cpp
#include<iostream> using namespace std; #define maxv 20 typedef struct{ int numVertices,numEdges;// int verticesList[maxv]; int Edge[maxv][maxv]; }MGraph; int IsExistEl(MGraph g){ int ans=0; for(int i=0;i<g.numVertices;i++){ int temp=0; for(int j=0;j<g.numVertices;j++){ if(g.Edge[i][j]!=0)temp++; } if(...
ALGO
0.999686
4.306847
75c48a37-68f9-4913-ac90-985aaf3aa247
param321/CS204
add.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int x,y,z,p,q,r,l; cin>>l; while(l--){ string a,b,c; char d; cin>>a>>b; reverse(a.begin(),a.end()); reverse(b.begin(),b.end()); x=max(a.length(),b.length()); y=min(a.length(),b.length()); int rem=0; for(int i=0;i<x;i++){ if(i<y){ p=a[i]-'0'; ...
ALGO
0.99999
4.957301
1dc2cfc9-9cc2-455e-a40a-c71a86c59184
ishandutta2007/codeforces
pyqe/normal/1333/B.cpp
#include <bits/stdc++.h> using namespace std; long long n,a[2][100069]; int main() { long long t,rr,i,ii; bool bad,bad2; scanf("%lld",&t); for(rr=0;rr<t;rr++) { scanf("%lld",&n); for(ii=0;ii<2;ii++) { for(i=1;i<=n;i++) { scanf("%lld",&a[ii][i]); } } bad=1; bad2=1; for(i=1;i<=n;i++) ...
ALGO
0.999867
3.357588
93ebfbb8-93d9-4d7f-af28-2de671957a70
mrGupta04/DAA-Algorithms
subset.cpp
#include <iostream> using namespace std; int countWays(int n, int x, int *a) { int u = n + 1; int v = x + 1; int b[u][v]; for (int i = 0; i < u; i++) { b[i][0] = 1; } for (int i = 1; i < v; i++) { b[0][i] = 0; } for (int i = 1; i < u; i++) { for (int j = 1; j ...
ALGO
0.999991
5.084919
c7fbe97a-d106-48ad-8cc3-6f5119fc6b83
Pyaxy/algorithm-practice
Program_Design/ACWing/BasicAlgorithmCourse/Lecture_1_BasicAlgorithm/第k个数(优化版).cpp
// 题目链接:https://www.acwing.com/problem/content/788/ // 思路: // 使用传统的快排的时间复杂度是nlogn,但是使用快速选择排序时间复杂度为线性 // 使用快排思路将数组分成两部分后,左边的数是严格小于右边的数的,因此如果k小于左边数列的长度,答案一定在左边 // 就不需要排序右边的数组了 #include<iostream> using namespace std; const int N = 100010; int n, k; int p[N]; int quick_sort(int l, int r, int k) { if(l == r) return p...
ALGO
0.999998
4.389698
34929e90-e556-4183-8d63-e06518b2a791
Prosug/Beginner_to_Good_Competitive_Programming_Challenge
BinaryCut.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL) /* Hello this is my code :). I'm Topson/Desconocido/ElProsor I'm learning competitive programming long long day=27; date dayCodeAnt=localdate()-1; date dayCode=localdate()...
ALGO
0.999879
4.166179
474ed4bd-efec-4f0d-928f-b4aebf61393e
AsaPuls/WSQ
WSQ05.cpp
#include <iostream> using namespace std; int main(){ double farh,cel,kel; cout << "Temp in Farhneheit: "; cin >> farh; cel = (5*(farh-32)/9); cout << "Temp in Celcius: " << cel << endl; kel = (cel+273); cout << "Temp in Kelvin: " << kel << endl; if (farh > 100) cout << "The H2O will be boiling" << ...
TOOL
0.987095
3.5488
d661575b-1dcf-40cc-8e59-415d0c81ce60
anurumbetov/factorial
Source.cpp
#include <iostream> #include <conio.h> using namespace std; int Faktorial(int); int main() { int n, fac; cout << "N! faktorialdi esaplaw!" << endl; cout << "N : "; cin >> n; fac = Faktorial(n); cout << endl << "N! faktorial = : " << fac << endl; _getch(); return 0; } int Faktorial(int N) { if (N <= 1) { ...
ALGO
0.994859
3.50536
09f2b6e3-cdbc-4347-ab5a-c3731e093980
mohamedameen93/Vehicle-Steering-Using-Model-Predictive-Control
src/Eigen-3.3/unsupported/doc/examples/BVH_Example.cpp
#include <Eigen/StdVector> #include <unsupported/Eigen/BVH> #include <iostream> using namespace Eigen; typedef AlignedBox<double, 2> Box2d; namespace Eigen { Box2d bounding_box(const Vector2d &v) { return Box2d(v, v); } //compute the bounding box of a single point } struct PointPointMinimizer //how to compute squa...
ALGO
0.999783
6.52624
64af8f3d-72c0-4a32-81f7-a1cace89b83e
sanketRmeshram/CP-ALGO
sos.cpp
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define mp(a,b) make_pair(a,b) #define pb(a) push_back(a) #define boost ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define check(x) cout << #x << " : " << (x) << endl #define all(v) v.begin(),v.end() #define endl '\n' #define...
ALGO
0.999842
3.344847
8c325aef-7293-4dc0-bcef-3d741cd839aa
ishandutta2007/codeforces
um_nik/normal/1055/A.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <ctime> #include <cassert> #include <complex> #include <string> #include <cstring> #include <chrono> ...
ALGO
0.999874
3.301524
425cc874-aace-4dbb-bbea-bce74e12081f
Aditya4769/Cpp
Operating system.cpp
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #define N 5 // Number of philosophers #define RUN_TIME 5 // Running time in seconds sem_t forks[N]; // Semaphores representing the forks sem_t mutex; // Mutex to protect critical sections pthread_t philosophers[N]; ...
ALGO
0.999511
5.103619
4d9708d2-2399-4dd7-92b9-f4c38c96796a
suai-os-2020/os-task3-Sadcoal
main.cpp
// // main faunction is located here, please, DO NOT TOUCH this file // #include "lab3.h" std::random_device rd; // only used once to initialise (seed) engine std::mt19937 rng(rd()); // random-number engine used (Mersenne-Twister in this case) // std::uniform_int_distribution<int> uni(0, sleep_time*2); // guar...
TOOL
0.951265
3.970846
9559f405-ab5f-456a-a023-34a325c666fd
ZamzamNiaz/DSA-preparation
arrays/binarySearch/binarySearch2.cpp
#include <vector> #include <iostream> using namespace std; // Book Allocation // class Solution { // public: // bool isPossible(vector<int>& arr, int n, int m, int mid) { // int studentCount = 1; // int pageSum = 0; // for (int i = 0; i < n; i++) { // if (pageSum + arr[i] <= mi...
ALGO
0.999925
5.692276
fb55e880-8125-4063-9585-b021bbb0859a
alexanderStefanovS/summer-programming-course
Task5.cpp
#include <iostream> using namespace std; int main(){ int arr[1000], n, min_index, max_index, swap; do { cout << "Input array size: "; cin >> n; } while (n <= 0 || n > 1000); cout << "Ok!\nInput array: "; for (int i = 0; i < n; ++i) { cin >> arr[i]; } min_index = max_index = 0; for (int i = 1; i ...
ALGO
0.999173
4.067294
ac83b40d-c9c8-4f2a-97e0-396eedc27327
santi3223/PreseleccionIOI
Codeforces/Problemas/Otros/Jhonny_and_Another_Rating_Drop.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define vb vector<bool> #define pb push_back #define ff(aa, bb, cc) for(ll aa = bb; aa < cc; aa++) #define vl vector<ll> #define pll pair<ll, ll> #define fi first #define se second #define ed "\n" #define all(aaa) aaa.begin(), aaa.end() #define rall(aaa...
ALGO
0.999044
4.187803
7f751540-cea8-4b0d-986d-f57ca6356c41
prasantdas/COMPETITIVE-PROGRAMMING
Graph_Bridges.cpp
#include<bits/stdc++.h> using namespace std; /* * Author : Prasant Das * Date : 15:06:2023 */ // MACROS #define mod 1000000007 #define INF 1e18 #define inf 1e9 #define NINF -1e18 #define ninf -1e9 #define vi vector<int> #define vll vector<long long> #define vl vector<long> #define pb push_b...
ALGO
0.999937
5.194873
aaf91d75-f50f-42e7-bf55-902759a6537b
OhJuhun/PS
SWEA/Simulation/차량정비소.cpp
#include <iostream> #include <cstring> #include <algorithm> #include <queue> #include <vector> using namespace std; #define PREPROCESS ios_base::sync_with_stdio, cin.tie(0), cout.tie(0) #define MAX 98765432 //접수처 수 정비소 수 사람수 A->B를 이용했다 int N, M, K, A, B; int a[10]; //i번을 이용하는데 걸리는 시간 pair<int, int> useA[10]; //A사용정보 p...
ALGO
0.999835
4.030612
6ed44b69-102d-4ddb-8eb5-a3568850b720
thewantedx/CPP-Code-PTIT
CPP0127.cpp
#include<iostream> #include<string> #include <cmath> #include <iomanip> #include <algorithm> using namespace std; int checkSNT(int a){ if(a < 2 ){ return 0; } else{ for(int i = 2 ; i<= sqrt(a) ; i++ ){ if (a % i == 0){ return 0; } } ...
ALGO
0.999914
4.591823
c410fe01-5a9d-4bbf-8cee-a036e1b3b143
linyicheng1/visual_mapping_localization
Thirdparty/g2o/g2o/types/types_six_dof_expmap.cpp
#include "types_six_dof_expmap.h" #include "../core/factory.h" #include "../stuff/macros.h" namespace g2o { using namespace std; Vector2d project2d(const Vector3d& v) { Vector2d res; res(0) = v(0)/v(2); res(1) = v(1)/v(2); return res; } Vector3d unproject2d(const Vector2d& v) { Vector3d res; res(0) =...
ALGO
0.966405
5.55332
a9398e7c-25c0-4447-8bb1-6aa0e3acb123
taehyun-h/cocos2dx_FlyBird
cocos2d/tools/simulator/libsimulator/lib/platform/win32/SimulatorWin.cpp
#pragma comment(lib, "comctl32.lib") #pragma comment(linker, "\"/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='<IP_ADDRESS>' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'\"") #include "stdafx.h" #include <io.h> #include <stdlib.h> #include <malloc.h> #i...
TOOL
0.880182
5.824581
aee5da27-66b6-4853-aea9-300831b49746
shrey12mehrotra/Data-Structures-And-Algorithms
BinaryTree/Diameter_Of_BT.cpp
// longest path between two nodes // path need not pass through root int findDiameter(TreeNode *node, int &diameter) { if(!root) return 0; int left = findDiameter(node->left,diameter); int right = findDiameter(node->right,diameter); diameter = max(diameter,left+right); return 1+max(left,right); } ...
ALGO
0.99976
5.270174
23da46da-8148-4021-acd5-568da5a72933
glerium/OI-Life
Luogu/luogu5338.cpp
#include <bits/stdc++.h> using namespace std; const int maxn=1e6+10; unsigned T,n,m,seed,last; unsigned input(){ seed=seed*17+last; return seed%m+1; } template<typename T>void read(T &x){ T v=0,w=1; char ch=getchar(); while(!isdigit(ch)){if(ch=='-')w=-1;ch=getchar();} while(isdigit(ch))v=v*10+ch-'0',ch=getchar(); ...
ALGO
0.999959
3.742581
5eafbaf6-6f06-4db5-a1a4-9361665eb500
akashmodak97/Competitive-Coding-and-Interview-Problems
Leet Code/DI String Match.cpp
/* Leet Code */ /* Title - DI String Match */ /* Created By - Akash Modak */ /* Date - 02/05/2023 */ // A permutation perm of n + 1 integers of all the integers in the range [0, n] can be represented as a string s of length n where: // s[i] == 'I' if perm[i] < perm[i + 1], and // s[i] == 'D' if perm[i] > perm[i + 1]....
ALGO
0.999894
6.093173
dc4bfc24-e1c6-46fd-ab19-dd2183fae214
Manoj-Kumar13/practice
onlineStackSpan.cpp
class StockSpanner { public: vector<int> a; int n = 0; StockSpanner() { } int next(int price) { int ans = 1; if(n == 0){ a.push_back(price); n++; return 1; } if(price < a[n-1]){ a.push_back(price);...
ALGO
0.999746
6.269625
5b090c36-9360-41a0-a1a6-d5a2f915d997
jaecayy/Array_code_
12.cpp
//Merge two sorted arrays within O(1)space complexity; #include<bits/stdc++.h> using namespace std; void mergeArray(int a[],int b[],int m,int n){ for(int i=0;i<m;i++){ if(a[i]>b[0]){ swap(a[i],b[0]); sort(b,b+n); } } } void printArr(int arr[],int n){ for (int ...
ALGO
0.99991
5.277495
0d77040d-72a9-4263-b65d-217ac97c9d96
Romit-Maulik/Practice
CPP_Tutorials/Pybind_Demo/EIGEN-3.3.7/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp
MatrixXd X = MatrixXd::Random(5,5); MatrixXd A = X + X.transpose(); cout << "Here is a random symmetric 5x5 matrix, A:" << endl << A << endl << endl; SelfAdjointEigenSolver<MatrixXd> es(A); cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl; cout << "The matrix of eigenvectors, V, is:" << endl << ...
ALGO
0.999725
3.056724
6692d2e2-b4ff-440e-904a-c9eb5d7e0581
nitin8777/c-programs
static.cpp
#include <iostream> using namespace std; class A { private: int a; static int b; public: void input(int x, int y) { a = x; b = y; } void out() { cout << a << "___" << b << endl; } }; int A::b = 0; int main() { A ob, obj, obj3; ob.input(10, 5); obj.inp...
ALGO
0.865775
3.785637
5a86ca82-ddf7-4042-8e89-eb23caaeaccb
itohdak/AtCoder
ABC/old/previous/10-/101/B.cpp
#include <iostream> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <numeric> // accumulate(v.begin(), v.end(), 0) using namespace std; #define ll long long ll S(ll n){ ll m = n; ll sum = 0; while(m > 0){ sum += m % 10; m /= 10; } return sum; } int main(){ ll N...
ALGO
0.999927
4.16713
a35d7d08-d941-4bc7-a9ed-f8a8422d906b
Nanduag0/Leetcode
nandincpp/Sum of All Odd Length Subarrays.cpp
class Solution { public: int sumOddLengthSubarrays(vector<int>& a) { int n = a.size(); vector<int> prefix(n); prefix[0] = a[0]; int ans = 0; for(int i=1;i<a.size();i++) prefix[i] += prefix[i-1] + a[i]; for(int i=0;i<a.size();i++) ...
ALGO
0.999606
4.862785
e7d1ba28-b655-4b4d-a4c8-cca8e6186c22
Xie-HIT/xrslam
xrslam/xrslam/src/xrslam/core/initializer.cpp
#include <xrslam/core/detail.h> #include <xrslam/core/feature_tracker.h> #include <xrslam/core/initializer.h> #include <xrslam/core/sliding_window_tracker.h> #include <xrslam/estimation/solver.h> #include <xrslam/geometry/essential.h> #include <xrslam/geometry/homography.h> #include <xrslam/geometry/lie_algebra.h> #inc...
ALGO
0.973453
6.082518
5b4ce051-4b30-4a18-82ef-91d3ac4726d6
jer22/OI
hdu/bestcoder22/1001/1001.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <stack> #include <iostream> using namespace std; int T; int n; int main() { freopen("1001.in", "r", stdin); scanf("%d", &T); while (T--) { scanf("%d", &n); int res = 0; int base = 0; while ((long long)1 << base <= n) base++; base--; whi...
ALGO
0.999701
4.853148
3f450035-eaad-4c27-a50f-71cc6b617ec5
singhakanksha03/Competitive-Coding
Graphs/Is Connected.cpp
/* Given an undirected graph G(V,E), check if the graph G is connected graph or not. V is the number of vertices present in graph G and vertices are numbered from 0 to V-1. E is the number of edges present in graph G. Input Format : First line will contain T(number of test case), each test case follows as. Line 1: Two ...
ALGO
0.99993
5.689885
87538775-29fa-4e8a-9b75-fc979696ed86
ishandutta2007/codeforces
kal013/normal/1555/C.cpp
/*/ Author: kal013 /*/ // #pragma GCC optimize ("O3") #include "bits/stdc++.h" #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" using namespace std; using namespace __gnu_pbds; template<class T> using ordered_set = tree<T, null_type,less<T>, rb_tree_tag, tree_order_statistics_node_update>...
ALGO
0.999984
4.479446
68617677-8cb0-4adf-a5a6-9b73f0f8e577
Silidrone/leetcodesolutions
33/solution1.cpp
class Solution { public: int find_pivot(std::vector<int>& nums, int l, int r) { if(l >= r) return -1; int mid = l + (r - l) / 2; if (mid < r && nums[mid] > nums[mid + 1]) return mid + 1; if (mid > l && nums[mid] < nums[mid - 1]) return mid; if (nums[l] >= nums[mid]) { ...
ALGO
0.999998
6.479505
9c79d709-2f88-4627-8876-6e89d69dbfac
akgarhwal/LeetCode-Solutions
Solutions/C++/Accepted/2089-find-target-indices-after-sorting-array.cpp
/* Problem Title: 2089 - Find Target Indices After Sorting Array Lang: C++ Runtime: 4 ms Memory: 11.6 MB Problem Url: https://leetcode.com/problems/find-target-indices-after-sorting-array Submission Url: https://leetcode.com/problems/find-target-indices-after-sorting-array/submissions/596712040 */ class Solution { pub...
ALGO
0.99998
6.50383
6bdbbfed-55d6-4cb7-8f8d-7c71c3ebfa9f
GeorgeWu1204/MIPS-CPU101
test/cpp_utils/simulator.cpp
#include "MIPS.hpp" #include <iostream> #include <sstream> #include <cassert> #include <iostream> #include <cstdint> #include <string> #include <vector> #include <fstream> #include <cmath> int main(int argc, char** argv) { std::string src1, src2; uint32_t v0; src1 = argv[1]; src2 = argv[2]; std...
ALGO
0.872926
4.683804
4ef3ee1e-3c58-4bec-8554-413cbfaf06c2
OpenTenBase/TXSQL
boost/boost_1_77_0/libs/hana/benchmark/fold_left/compile.cexpr.recursive.erb.cpp
template <typename ...xs> struct list { }; template <typename T> struct basic_type { using type = T; }; template <typename T> constexpr basic_type<T> type{}; template <typename x, typename ...xs> constexpr auto head(list<x, xs...>) { return type<x>; } template <typename x, typename ...xs> constexpr auto tail(list<x...
ALGO
0.955365
4.336886
f5569831-a79d-42c6-af40-3403b98e1d8f
Sheep0811/Hello-world
leetcode/offer57.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { int l = 0, r = nums.size() - 1; while(l<r) { if(nums[l]+nums[r]==target) return vector<int>{nums[l], nums[r]}; else if(nums[l]+nums[r]>target) --r; ...
ALGO
0.999948
6.22598
9dce0550-9ec6-48e4-a5d9-15e2827ef939
raincross7/code-similarity
codes/train_code/problem320/problem320_154.cpp
#include <bits/stdc++.h> #define rep(i, a, n) for(int i = a; i < n; i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n, m; cin >> n >> m; vector<P> a(n); rep(i, 0, n) cin >> a[i].first >> a[i].second; sort(a.begin(), a.end()); int cnt = 0; int cnt_1...
ALGO
0.999952
3.945809
600c5d54-9cf6-41e1-a0d0-8f319b3b07fc
Ajeet1606/LeetCode-practice-problems
0645-set-mismatch/0645-set-mismatch.cpp
class Solution { public: vector<int> findErrorNums(vector<int>& arr) { int n = arr.size(); int dup = -1, missing = 1; for(auto a: arr){ if(arr[abs(a) - 1] < 0) dup = abs(a); else arr[abs(a) - 1] *= -1; } ...
ALGO
0.999758
6.023382
2d150a1e-a242-40cd-bc2a-659f25782fe8
Gauravsaxena816/Linkedlist_dsa
LLq4.cpp
#include<iostream> using namespace std; // Write a C++ program to insert a new node at the beginning of a Singly Linked List. struct Node{ int num; Node* next; }; struct Node* head = NULL; void insert_Node(int n){ struct Node *new_node = new Node; new_node->num=n; new_node->next=head; head=new_no...
ALGO
0.98533
5.702096
b3d699de-37bc-44db-8ad1-f8547515c81e
anirudhchadha02/DS_ALGO
prime_visits.cpp
#include<iostream> using namespace std; void prime_seive(int arr[]) { for( long long i=3;i<100000;i+=2) { arr[i]=1; } arr[2]=1; arr[1]=arr[0]=0; for(long long i=3;i<100000;i++) { if(arr[i]==1) { for(long long j=i*i;j<100000;j+=i) { ...
ALGO
0.99982
3.709106
a551b414-2dc6-4df2-a1da-e1cbcd2b5542
ATHARVBALKI/OJ_V2
server/controllers/codes/39b6e43f-19f1-438b-bc5b-67ba4d81b67a.cpp
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; cout << a + b << en return 0; }
ALGO
0.977855
3.210575
800ce5ef-6b4a-4da6-8ab9-adfb459ae055
suhwan22/algorithm
Baekjoon/0x0A_Simulation/11559/main.cpp
#include <iostream> #include <queue> // 12 x 6 using namespace std; int board[12][6] = {}; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, 1, 0, -1}; bool puyoBomb(); void dropPuyo(); void printBoard(); int main() { ios::sync_with_stdio(0); cin.tie(0); string input; for (int i = 0; i < 12; i++) { cin >> ...
ALGO
0.995559
4.276535
afe67f5a-13b2-4f35-a0fb-a3ae943e8089
wotsushi/competitive-programming
abc/174/d.cpp
#pragma region template 2.4 #include <bits/stdc++.h> using namespace std; template <typename T> using pq_asc = priority_queue<T, vector<T>, greater<T>>; typedef long long ll; typedef vector<ll> vi; typedef vector<vi> vvi; typedef pair<ll, ll> ii; typedef vector<ii> vii; typedef vector<string> vs; #define REP(i, n) for ...
ALGO
0.999796
4.278074
189f8e04-b01d-4e4f-8223-7b339d19b0e5
Amanhacker/Aman-Barnwal-Leetcode-Solutions
1367-linked-list-in-binary-tree/1367-linked-list-in-binary-tree.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ /** * Definition for a binary tree node. * struc...
ALGO
0.999959
5.170598
92f53c9a-504f-4397-8095-ffd0b999b5b1
musnows/Lets-OJ
oj/musnow/newcoder/参数解析.cpp
#include <iostream> #include <string> #include <vector> using namespace std; void DevideParams() { string s; getline(cin, s); vector<string> v; int i =0,begin = 0; for(i=0;i<s.size()-1;i++)//这里小于sz-1是为了后面begin的+1 { if(s[i]=='\"')//注意转义 { size_t found = s.find('\"',i+...
ALGO
0.987026
3.398961
8820bd78-e6ec-4dea-be5f-c68cbf4ca81d
akshatchhabra/TransLRPL
CodeGen/data/transcoder_evaluation_gfg/cpp/CALCULATE_AREA_TETRAHEDRON.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; double f_gold ( int side ) { double volume = ( pow ( side, 3 ) / ( 6 * sqrt ( 2 ) ) ); return volume; } //TOFILL int main() { int n_success = 0; ve...
ALGO
0.941121
5.348305
1e898e91-461c-40ee-a4ff-d924c3fb28d9
mohammadreza-jamali/flutterLearningFundementals
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998859
6.785645
80e289be-baf2-4b4e-a046-1285485403dc
shubhrajyotidey305/Leetcode
318-maximum-product-of-word-lengths/318-maximum-product-of-word-lengths.cpp
class Solution { public: int getMask(char &ch){ return (1<<(ch-97)); } bool doShareCommonLetters(int &bits1, int &bits2){ for(int i=31;i>=0;i--){ int bit1 = (bits1>>i)&1; int bit2 = (bits2>>i)&1; if( bit1 && bit2 ) return true; ...
ALGO
0.999963
5.776075
2aaaa68b-bd25-4e60-a5de-d5a6fee4ebfa
prabhu-kumar007/Coding_blocks_Practice_Questions
Recursion Questions/RECURSION-CODES OF THE STRING.cpp
#include<bits/stdc++.h> using namespace std; char word[][1]={' ','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; void COS(string str,string current,int repo,string out[],int &outpos) { if(str[repo]=='\0') { out[outpos]=current; o...
ALGO
0.999129
4.588169
f2fbb012-fab0-4c77-8927-7493db9e5261
IndeoCore/Efforts-in-Trusses
eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; std::cout << "Row's maximum: " << std::endl << mat.rowwise().maxCoeff() << std::endl; }
ALGO
0.99969
3.881484
e3f010cd-4a30-4fb4-b20e-8de2930ff266
Hozny/programming-solutions
div2b/uva122.cpp
#include <iostream> #include <climits> #include <iomanip> #include <sstream> #include <cstdio> #include <cmath> #include <cstring> #include <cctype> #include <string> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> #include <algorithm> #include <functional> #include <bi...
ALGO
0.99871
3.04425
c55d8328-ccef-4179-8dbe-6ed6049beb1e
Ritik2002Git/IS-practical
3_Ceasar_cipher_decrypt.cpp
#include<iostream> using namespace std; int main() { char message[100], ch; int i, key; cout << "Enter a message to decrypt: "; cin.getline(message, 100); cout << "Enter key: "; cin >> key; for(i = 0; message[i] != '\0'; ++i){ ch = message[i]; if(ch >= 'a' && ch <= 'z'){ ch = ch - key; if(ch < 'a'){ ch = ch + 'z' -...
ALGO
0.999279
3.955889
8b798326-9dea-4837-86ba-bddc86fc076c
pentium3/2014-ICPC-Regional
2014省赛模板/New folder/2013工管5班英语听力/2013210127李茜/双百/搜索/BFS/poj3414.cpp
#include "iostream" #include "cstring" #include "queue" using namespace std; bool s[101][101]; struct node { int a,b; }; struct data { queue<int> pack; int f; }; data f[101][101]; queue<node> bag; int A,B,C; node make(int a,int b) { node tmp; tmp.a=a; tmp.b=b; return tmp; } data bfs(int v) {...
ALGO
0.999953
3.570677
4e96e2a4-7e12-4dbd-8c8b-fa2f75dce321
bikashadhikari1508/DataStructures
Arrays/IntersectionArray.cpp
//Only the common elements are shown #include <iostream> using namespace std; int main() { int temp,min; int n1=5,n2=5; int arr1[n1]={4,2,6,1,9}; int arr2[n2]={2,4,9,8,6}; int size=0; int i,j,k; k=0; int arr3[size]; // //Copy 1st array to 3rd array // for(int i=0 ; i<n1 ; i++) // { /...
ALGO
0.999469
3.518713
25b0d057-eb24-4d3f-9d9f-d91d31826de3
SyedZawwarAhmed/Hacktoberfest-2023
DataStructures/Stack/C++/stack.cpp
#include <iostream> using namespace std; class stack{ public: int top = -1; int *ptr; stack(){ ptr = new int(top+1); } void push(int val){ this->top += 1; ptr = newArr(ptr, top, val); } int pop(){ int t_val = ptr[top]; this->top -= 1; in...
ALGO
0.998556
4.544215
6c0b816c-5575-471e-b16a-e89c10297786
ArtDu/Algorithms
code/online_judge/cses/graphs/investigation.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MAXX = 1e15; const ll MOD = 1e9 + 7; #define P pair #define F first #define S second #define vec vector struct class_cmp { bool operator()(const P<ll, ll> &lhs, const P<ll, ll> &rhs) const { return lhs.F > rhs.F && lhs.S > ...
ALGO
0.999977
4.52376
70d6df6a-2df5-4383-ac11-34fe3e07329c
plushmonkey/elm
elm/path/NodeProcessor.cpp
#include "NodeProcessor.h" #include <elm/RayCaster.h> namespace elm { namespace path { // EdgeSet NodeProcessor::FindEdges(Node* node, float radius) { NodePoint point = GetPoint(node); size_t index = (size_t)point.y * 1024 + point.x; EdgeSet edges = this->edges_[index]; // Any extra checks can be done here...
ALGO
0.993955
6.438292
c8844368-0e3c-4dc8-a7a9-bf1cb69e8cbd
RahulScripted/DSA
Searching/Binary Search/FirstAndLastPositionOfAnElement.cpp
// Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. #include<iostream> #include<vector> using namespace std; vector<int> SearchRange(vector<int>&v,int target){ vector<int>ans(2,-1); ...
ALGO
0.999954
5.774362
1ec0b421-8ad9-41ce-ba1d-2ce1f796e4eb
tylerwolverton/CSPractice
AdventOfCode/AdventOfCode2023/FileUtils.cpp
#include "FileUtils.h" #include <fstream> std::vector<std::string> SplitFileByLine(const std::string& filePath) { std::vector<std::string> lines; std::ifstream inFile(filePath); if (inFile.is_open()) { std::string line; while (getline(inFile, line)) { lines.emplace_back(line); } inFile.close(); } ...
TOOL
0.906212
5.464954
8254c538-a63b-41bf-966b-ff95d82f4dc8
daniel01y/CursoNeriNeitzke
Arquivos_fonte_C_1/algoritmo de media das provas corrigido.cpp
#include <conio.h> #include <stdio.h> main() { float prova1, prova2, prova3, media; printf("Digite a nota da prova 1.: "); scanf("%f",&prova1); printf("Digite a nota da prova 2.: "); scanf("%f",&prova2); printf("Digite a nota da prova 3.: "); scanf("%f",&prova3); prova1 = prova1 * 2 / 10; prova2 = prova2 * ...
TOOL
0.903512
3.064016
5df5d6dc-a7e1-4551-b916-f4458c4d1b96
hycinth22/algorithm-notes-practices-solutions
7数据结构二/树的遍历A1090/树的遍历A1090.cpp
// 树的遍历A1090.cpp // #include <cstdio> #include <vector> #include <algorithm> using namespace std; struct seller { int supplier; double price; }; void assureCalc(vector<seller> &tree, int i, double r) { if (tree[i].price != -1.00) { return; } if (tree[i].supplier != -1) { assureCalc(tree, tree[i].supplier, r); ...
ALGO
0.999493
3.544477
08512790-2b36-47a6-82fb-704414c3eb5b
HieronyM/Competitive-Programming-Code
UVa OJ/6. String Processing/GATTACA.cpp
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <iostream> #include <string> #include <algorithm> #include <vector> #include <map> #include <stack> #include <queue> #include <set> #include <bitset> using namespace std; typedef unsigned long long ULL; typedef long long LL; typedef pa...
ALGO
0.999523
4.143577
20e28104-d579-4e75-ac78-d7598f3480d2
asad5059/CP
B_Flip_the_Bits.cpp
#include <bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define pb push_back #define ff first #define ss second using namespace std; ll lcm(ll a, ll b) { return (a * (b / __gcd(a, b))); } ll fix_mod(ll a, ll b) { return (a % b + b) % b; } void fastio() { ios_base::sync_with_stdi...
ALGO
0.999984
4.639852
33879657-3bba-444a-8e8d-a6ac64f7e1c3
adechan/computer-science-school
Undergrad/First Year/Programming in C/Linked Lists/valueStart.cpp
struct nod { int elt; nod* succ; }; nod *prim, *ultim; nod *p; // Create a list; void creeaza(nod *& prim) { nod *ultim; nod *p, *q; int i, n, x; prim = nullptr; std::cout << "Dati numarul de elemente "; std::cin >> n; std::cout << "Primul element = "; std::cin >> x; prim = new nod; prim->elt = x; ulti...
ALGO
0.991021
4.138551
4477a058-a29d-451d-b78e-baf2b1e8da3d
trapperdot00/cpp_primer_5th_edition_exercises
Chapter11/11.23.cpp
#include <map> #include <vector> #include <string> #include <iostream> #include <sstream> #include <utility> using std::multimap; using std::string; using std::vector; using std::getline; using std::istringstream; using std::pair; using std::make_pair; using std::cin; using std::cout; using std::endl; std::istream &r...
TOOL
0.970381
4.255866
2caf2533-6047-4500-9aba-55398dedc6db
MOHIT-IITP/cp-codeforces
1335A-candies-and-two-sisters.cpp
// MOHIT-IITP #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define MOD1 998244353 #define MOD 1000000007 #define fast \ ios_base::sync_with_stdio(0); \ cin.tie(...
ALGO
0.99975
5.941871
0a409e2e-f903-4d55-a1ea-984eeae93caf
siva0410/atcoder
abc216/d.cpp
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <map> #include <queue> using namespace std; int main(){ int n, m; cin >> n >> m; vector<queue<int>> A(m); for(int i=0; i<m; i++){ int k; cin >> k; for(int j=0; j<k; j++){ int tmp; cin >> tmp; tm...
ALGO
0.999996
4.199434
1fe65e4b-c0d3-45a6-83c0-5cea4e817ef6
ishandutta2007/codeforces
bluediamond/normal/1555/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define int ll const int INF=(int) 1e18; int h, w, x1, y1, x2, y2, h2, w2, sol; bool ok(int px, int py) { int xmin=min(x1, x2), xmax=max(x1, x2); int ymin=min(y1, y2), ymax=max(y1, y2); xmin+=px, xmax...
ALGO
0.999498
3.458588
3afc8d55-00cb-4741-82fc-d60b6b9f6f01
raj-amit25/Cpp_Archive
pattern/9.cpp
//reverse pyramid using no #include<iostream> using namespace std; int main(){ int a; cin>>a; for(int i=1;i<=a;i++){ for(int j=1;j<=a-i+1;j++) { cout<<i<<" "; } cout<<endl; } return 0; }
ALGO
0.999413
3.494653
b35ebaf5-6b1d-4022-89a3-2aa06c44fd9a
EB4LIFE/CODINGHW2023-24
HW2.7SUMDIGYEB.cpp
#include <iostream> using namespace std; int main() { int a; int one; int ten; int hun; int sum; cout << "enter a three digit number:" << endl; cin >> a; hun = a / 100; ten = (a / 10) % 10; one = a % 10; sum = hun + ten + one; cout << "the sum is: " << sum << endl; }
ALGO
0.996782
3.9259
0e5f3900-8476-4319-b64e-c9d045d8b9b9
JosueManuelRoblero/Proyecto_PyM_2020_2
Practica 1/Ejercicio 1 programacion.cpp
#include <stdio.h> #include <math.h> const float PI = 3.141592654; float R; float V; int main() { printf("Dame el radio de la esfera\n"); scanf("%f", &R); V=(PI*pow(R, 3))*4/3; printf("El volumen de la esfera es %f", V); return 0; }
ALGO
0.993786
3.644346
942f317e-9dde-4457-a345-7e3bbb703485
Todah01/Coding_Test
Coding_Test/char_cutting.cpp
#if 0 #include <string> #include <vector> using namespace std; int solution(string s) { int answer = 0, nFirst = 1, nSecond = 0, nTmp = 0; char x = s[0]; bool bBool = false; if (s.size() == 1) { return 1; } for (int i = 1; i < s.size(); i++) { s[i] == x ? nFirst++ : nSecond++...
ALGO
0.999912
4.517694
9a66b56b-eb2a-46e4-b684-9a30f799429d
praggyaverma/DSA-Practice
buildtreeFromPreorderInorder.cpp
/*********************************************************** Following is the Binary Tree Node class structure template <typename T> class BinaryTreeNode { public : T data; BinaryTreeNode<T> *left; BinaryTreeNode<T> *right; BinaryTreeNode(T data) { this -> data = data; l...
ALGO
0.9999
4.876165
8b156d01-7025-4aa1-b9cb-d7e91991d521
sumatrapdfreader/sumatrapdf
ext/unrar/crypt3.cpp
void CryptData::SetKey30(bool Encrypt,SecPassword *Password,const wchar *PwdW,const byte *Salt) { byte AESKey[16],AESInit[16]; bool Cached=false; for (uint I=0;I<ASIZE(KDF3Cache);I++) if (KDF3Cache[I].Pwd==*Password && (Salt==NULL && !KDF3Cache[I].SaltPresent || Salt!=NULL && KDF3Cache[I].Sal...
ALGO
0.967295
3.782971
02f49303-3c1b-430b-87ba-526bd63494cf
TenOne506/gem5-cxlmem
src/systemc/tests/systemc/misc/v1.0/dash3/pulse.cpp
/***************************************************************************** pulse.cpp -- Implementation of the pulse generator. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /*****************************************************...
TOOL
0.928847
6.367835
61fdd75f-bde0-475c-a30c-0d89bc8460d1
JamesJellyfish/Feb4_2020
SpriteLib3.0-ExampleProject/include/Box2D/Collision/b2CollideCircle.cpp
#include "Box2D/Collision/b2Collision.h" #include "Box2D/Collision/Shapes/b2CircleShape.h" #include "Box2D/Collision/Shapes/b2PolygonShape.h" void b2CollideCircles( b2Manifold* manifold, const b2CircleShape* circleA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB) { manifold->pointCou...
ALGO
0.999439
7.761623
c85eba4f-5185-4254-ab88-48cac5620663
KevinHaoranZhang/Leetcode
Sequence/q1-q99/q90-q99/q93/q93.cpp
class Solution { private: vector<string> ans; vector<int> ip_segments; public: vector<string> restoreIpAddresses(string s) { ip_segments.resize(4); back_track(0, 0, s); return ans; } void back_track(int index, int cur_pos, string str) { // the last segment if...
ALGO
0.99988
6.198457
93053155-491f-4fbb-af6e-28b86a852822
Sia714/leetcode-solutions
Tree/226-invert-binary-tree/invert-binary-tree.cpp
/** * 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 x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999959
6.030311
6f3f3d6c-3e84-4f38-9cde-babd5c5cbbd0
csiro-crop-informatics/biokanga
loci2dist/loci2dist.cpp
// loci2dist.cpp : Defines the entry point for the console application. // generates loci length distributions #include "stdafx.h" #ifdef HAVE_CONFIG_H #include <config.h> #endif #include "../libbiokanga/commhdrs.h" const char *cpszProgVer = "0.0.1"; // increment with each release const int cMaxLengthRange = 10000...
DATA
0.946803
4.583678