uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d7aa82d9-5ef6-4994-a166-41f0a5fed0f7
Taheershaik123/data-structures
cpp/peek_element.cpp
#include<iostream> #include<algorithm> using namespace std; int peekElement(int arr[],int size){ int pick =0; for(int i=0;i<size;i++){ if(arr[i]>pick&&arr[i]<=arr[i+1]){ pick = arr[i]; } } return pick; } int main(){ int n; cout<<"Enter the size of the array"<<endl; ...
ALGO
0.999887
3.534577
3878121c-459b-4b4d-a805-368c151b6e16
hanswinderix/ami-toolchain
libc/src/math/generic/copysignf.cpp
#include "src/math/copysignf.h" #include "src/__support/FPUtil/ManipulationFunctions.h" #include "src/__support/common.h" namespace __llvm_libc { LLVM_LIBC_FUNCTION(float, copysignf, (float x, float y)) { return fputil::copysign(x, y); } } // namespace __llvm_libc
ALGO
0.99736
5.697894
212fbab4-459d-4b58-8c4e-0207086036cb
rafikul05/LeetCode
8823-1186-344-reverse-string/8823-1186-344-reverse-string.cpp
class Solution { public: void reverseString(vector<char>& s) { int n = s.size(); int start = 0; int end = n - 1; while (start < end) { swap(s[start], s[end]); start++; end--; } } };
ALGO
0.998722
6.370872
78edd97d-b35f-41cb-9f66-21ccb2da4a55
PaulMuchwat/slide-switcher
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.998762
6.786404
2e001486-1802-48ab-a034-bc39beaa253a
jasmineanand/DataStructureAlgorithm_CPP_ProblemSolving_Solutions
Staircase.cpp
#include <bits/stdc++.h> using namespace std; int staircase(int n) { if (n == 3) { return 4; } if (n == 1 || n == 2) { return n; } int x = staircase(n - 1); int y = staircase(n - 2); int z = staircase(n - 3); return x + y + z; } int main() { int n; cin >>...
ALGO
0.999953
4.795345
43b040b1-cfba-43c1-8686-6ab5320e3e0f
abdullah-nadim/DSA_CPP
selection.cpp
//selection short #include<iostream> using namespace std; int main() { int n,cc=0,cs=0; cin>>n; int arr[n]; for(int i = 0; i<n;i++) { cin>>arr[i]; } for(int i = 0;i<n-1;i++) { for (int j=i+1;j<n;j++) { if(arr[j]<arr[i]) { i...
ALGO
0.999658
3.360504
9e370193-92ad-4e4b-87da-d782e6fda468
Shravanis30/cpp-codes
lec12.cpp
// C++ progarm to print 100 to 1 numbers #include <iostream> using namespace std; int main(){ int i=100; do { cout << i << endl;; i--; } while (i>=1); return 0; }
TOOL
0.918224
3.044706
f2fb97ad-5aeb-43c2-a2fb-b0617dd54617
Padm0069/Leetcode-DSA
0796-rotate-string/0796-rotate-string.cpp
class Solution { public: bool rotateString(string s, string goal) { if(s.size()!=goal.size()) return false; queue<int>q,q1; int n=s.size(); for(int i=0;s[i]!='\0';i++){ q.push(s[i]); q1.push(goal[i]); } //if the string s and goal are equal if(s==go...
ALGO
0.999987
5.76346
0fc61518-9c9a-4656-9fd2-d9f24af8c1e6
iyoy55555/Morphing
opencv/sources/samples/cpp/contours2.cpp
#include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include <math.h> #include <iostream> using namespace cv; using namespace std; static void help() { cout << "\nThis program illustrates the use of findContours and drawContours\n" << "The original image is put up along with the image of drawn c...
TOOL
0.994071
4.544347
40f2aa16-435a-473d-939a-d5332a438195
jdnull/LeetCode
152 Maximum Product Subarray/main.cpp
#include <iostream> #include <algorithm> #include <queue> #include <map> using namespace std; class Solution { public: // not my code int maxProduct(vector<int>& nums) { if (nums.size() == 0) { return 0; } else if (nums.size() == 1) { return nums[0]; } ...
ALGO
0.999876
5.057625
3efac363-24b1-4bc2-a7d2-417821172d8a
amye3057/Baekjoon
DS_100p/Q12.cpp
#include <stdio.h> //ü  𸣰ڴ. 1 ȯ϶ ? Դٰ ̰ ̷ŵ ؼ ϳ.. ϴ н typedef struct { int y; int m; int d; } date; date dateof(int y, int m, int d) { } date after(date x, int n) { } date before(date x, int n) { } int main() { printf("D-DAY \n"); int year; int month; int day; printf(" : "); scanf_s("%d", &year)...
TOOL
0.9937
3.508343
f87c1f58-8ffe-445d-b204-979620b8653f
JnCrMx/blender-test
source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp
/** \file * \ingroup freestyle * \brief Class to define a cell grid surrounding the projected image of a scene */ #include "HeuristicGridDensityProviderFactory.h" namespace Freestyle { HeuristicGridDensityProviderFactory::HeuristicGridDensityProviderFactory(real sizeFactor, ...
ALGO
0.955335
6.925629
e59b87ef-9d3c-45d9-b8b0-6772b63b7efa
Sumitjha480/Leetcode-Questions
Daily-Challenge/February-Challenge/17-Container With Most Water.cpp
https://leetcode.com/explore/challenge/card/february-leetcoding-challenge-2021/586/week-3-february-15th-february-21st/3643/ // Container With Most Water // Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of the...
ALGO
0.999769
6.557588
60485d79-ac80-4ba7-b7ea-b3d9e94b1070
nathanPro/mac0214
codeforces/673/A/temp.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<typename T> void _max(T& a, T b) { a = max(a,b); } template<typename T> void _min(T& a, T b) { a = min(a,b); } int ok[100]; int t, n, in; int main(){ scanf(" %d", &n); ok[0] = 15; for(int i=0;i<n;i++){ scanf(" %d", &in); ...
ALGO
0.998477
3.578193
a66ea35f-668a-4a7e-a8b4-81c9f4bec424
vansh-codes/Complete-Interview-Preparation-GFG
4_Data-Structures-(Advanced)/2_BitMagic/Problems/5_BitDifference.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: // Function to find number of bits needed to be flipped to convert A to B int countBitsFlip(int a, int b){ // Your...
ALGO
0.999856
5.769592
48bba87c-cc95-4887-bbe7-f9550f239afb
semenInRussia/cf
itmo/roi/ccc/a.cpp
// semenInRussia 2025 #include <cstdint> #include <iostream> using namespace std; const int N = 1 << 16; int b[N], a[N], ad[N]; int pop[N]; int cnt[20]; int main() { for (int i = 1; i < N; i++) { pop[i] = pop[i / 2]; if (i & 1) { pop[i]++; } cnt[pop[i]]++; } for (int i = 0; i < 20; i++...
ALGO
0.999884
4.391302
16a0271b-b36d-4d74-92b3-f9e63c25cbe5
JawadN00r/leetcode
201. Bitwise AND of Numbers Range/201. Bitwise AND of Numbers Range.cpp
class Solution { public: int rangeBitwiseAnd(int m, int n) { // edge case - zero AND anything will always stay zero if ((m == 0) || (n == 0)) return 0; // if there is a different amount of digits in binary - always will be zero if ((int)log2(m) != (int)log2(n)) return 0; ...
ALGO
0.999946
6.437033
06e28e4c-de71-44e2-b48f-d2fdab5272c1
chopinic/MIT-6.836-assignment
assn2/starter2/3rd_party/nanogui/ext/eigen/doc/special_examples/Tutorial_sparse_example_details.cpp
#include <Eigen/Sparse> #include <vector> #include <QImage> typedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double typedef Eigen::Triplet<double> T; void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs, Eigen::VectorXd& b, con...
ALGO
0.998569
5.392571
f9e1a95f-88d3-4a4b-9d0f-f4bd4f917ff6
NIKHIL-all-png/NikhilCodes
DSA/Array/BinarySearch/3.cpp
#include<iostream> using namespace std; int L(int arr[],int n,int key){ int s=0; int e=n-1; int mid = s+(e-s)/2; int ans=-1; while(s<=e){ if(arr[mid] ==key){ ans=mid; s=mid+1; } else if(key>arr[mid]){ s=mid+1; } else if(key<arr[mid]){ e=mid-1; ...
ALGO
0.999927
4.591551
98df0771-720d-4f02-be38-4967eeb85908
vishalku03/POTD_challenge_2024
Math Based/NUMBER OF DISTICT INTEGRS AFTER REVERSE OPERATIONS.cpp
/* 3 step : 1. Inset n into set 2. Reverse n and intesert it to set 3. Ans is the size of the set */ class Solution { public: int countDistinctIntegers(vector<int> &nums) { unordered_set<int> ans; for (auto n : nums) { ans.insert(n); // reverse n ...
ALGO
0.999795
5.958591
4c71d4e8-d784-4111-af8b-66464488d111
callmejoee/sortlib
countSort.cpp
#include <iostream> #include <algorithm> #include <cstdlib> #include <ctime> using namespace std; //Count Sorting algorithm impelementaion template<typename T> void countSort(int size, T arr[]) { // Find the maximum element in the array T max = arr[0]; for (int i=1; i<size; i++) { if (arr[i] > max...
ALGO
0.999696
5.481125
e7428174-87da-442a-a5ab-793359f31674
tecton/Leetcode-Exercise
Valid Parentheses.cpp
class Solution { public: bool isValid(string s) { if (s == "") return true; stack<char> pstack; pstack.push(s[0]); for (int i = 1; i < s.size(); ++i) { if (!pstack.empty()) { char c = pstack.top(); if ((c == '(' && s[i] == ')') || (c == ')' && s[i] =...
ALGO
0.999738
6.084255
aecabc3d-9246-4504-9b48-fd92c47793e2
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_2612_22.cpp
#include <bits/stdc++.h> using namespace std; const double PI = acos(-1); const int inf = 0x3f3f3f3f; const long long inff = 0x3f3f3f3f3f3f3f3f; int t; int s; int cnt[1000010], cnt2[1000010]; int mx = 0; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> t; for (int i = 0; i < t; i++) {...
ALGO
0.99976
3.418434
6cd08980-5500-49cb-a89b-c34d88090d62
pathammer/Kinect-Mouse
Mouse-ntk/nestk/deps/opencv/modules/imgproc/src/templmatch.cpp
#include "precomp.hpp" namespace cv { void crossCorr( const Mat& img, const Mat& templ, Mat& corr, Size corrsize, int ctype, Point anchor, double delta, int borderType ) { const double blockScale = 4.5; const int minBlockSize = 256; std::vector<uchar> buf; int depth = ...
ALGO
0.993385
6.134128
09f0d812-44b6-4054-83eb-565e98ca8657
langyo/oi-code-library
luogu/P1003.cpp
#include <iostream> #include <vector> using namespace std; int main() { long n; // 地毯个数 cin >> n; vector<int> a, b, g, k; // 地毯列表 for (long i = 0; i < n; ++i) { long m, n, x, y; cin >> m >> n >> x >> y; // 地毯左下角的坐标 (a, b) a.push_back(m); b.push_back(n); ...
ALGO
0.999892
3.895098
61442eee-3385-4763-9755-7b43e4fa7653
arrows-1011/CPro
AOJ/Volume13/1339.cpp
#include <bits/stdc++.h> using namespace std; #define INF 1e9 typedef long long ll; typedef vector<ll> Vec; struct State{ Vec v; int sp,cost; State(Vec v,int sp,int cost) : v(v),sp(sp),cost(cost) {} bool operator < (const State &s)const{ return cost > s.cost; } }; int ch,cv; const int d[4...
ALGO
0.999875
4.346227
2bc2c85f-d2c0-41e8-93a4-f57260cc1bd2
BHOJANE-VARUN/MyVscode
DSA/dsa450/array/factorialoflarge.cpp
#include <bits/stdc++.h> using namespace std; std::string convertVectorToString(const std::vector<int>& vec) { std::ostringstream oss; // Iterate over the vector in reverse order for (auto it = vec.rbegin(); it != vec.rend(); ++it) { oss << *it ; } // Get the string representation...
ALGO
0.999694
5.744926
228cd94a-5a17-45f6-8c2c-b71e8cc44142
exystech/merlin
kernel/copy.cpp
#include <assert.h> #include <errno.h> #include <stdint.h> #include <string.h> #include <sortix/mman.h> #include <sortix/kernel/copy.h> #include <sortix/kernel/kernel.h> #include <sortix/kernel/kthread.h> #include <sortix/kernel/process.h> #include <sortix/kernel/segment.h> #include <sortix/kernel/string.h> // NOTE:...
TOOL
0.904741
5.783675
6465e2ca-42e2-4b80-b183-5e5e2b7e0564
HaoLe-cyber/Code-C-tasks
session9/CodeCses9task2.cpp
#include <stdio.h> int main(){ int n,i ; printf ("Hay nhap so luong phan tu co trong mang: "); scanf ("%d", &n); int arr[n]; for ( i = 0; i < n; i++) { printf ("Nhap phan tu arr[%d]: ", i); scanf ("%d", arr +i); } int changeIndex, changeElement; printf ("Hay nhap vao...
ALGO
0.993848
3.251639
7a91dd92-a28f-4d03-a25d-0b84249ee042
sugaliudaykiran/dsa_labs
s-3/s-3.1/Rotate_array_by_K_elements.cpp
#include<bits/stdc++.h> using namespace std; void funLeft(int *ar, int n,int k){ if (n==0){ return; } k=k%n; if (k>n){ return; } for(int i=0;i<k;i++){ // TC -> O(K*N).. SC -> O(1) int temp=ar[0]; for (int i=0;i<n-1;i++){ ar[i]=ar[i+1]; }ar[n-1...
ALGO
0.999984
4.303794
091e1475-787a-4f0e-9b40-5418798ced2b
kishanrajput23/Apna-College-CPP-Course
Week 3/8.1 Introduction To Arrays/pr_03_max-min.cpp
#include<iostream> #include<climits> using namespace std; int main() { int n; cin>>n; int array[n]; for (int i=0; i<n; i++) { cin>>array[i]; } int maxNo = INT_MIN; int minNo = INT_MAX; for (int i=0; i<n; i++) { maxNo = max(maxNo, array[i]); minNo = min(minNo...
ALGO
0.999667
4.261649
02b21760-4f2e-493b-9c19-f35cc15d5a79
Charbel-11/Competitive-Programming
Contests/Codeforces/886 Div4/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int t; cin >> t; while(t--) { vector<int> a(3); cin >> a[0] >> a[1] >> a[2]; sort(a.begin(), a.end()); if (a[1] + a[2] >= 10) { cout << "YES\n"; ...
ALGO
0.999468
4.507987
e4e1f877-d7a8-4e9c-9e1e-6ed0febe5f13
StudyingFather/my-code
Codeforces/1023B.cpp
#include <iostream> using namespace std; long long n,k; int main() { cin>>n>>k; if(k<=n)cout<<(k-1)/2<<endl; else if(k>=2*n)cout<<0<<endl; else cout<<(2*n-k+1)/2<<endl; return 0; }
ALGO
0.999908
3.249223
ee4a4300-d6fd-40e2-aba4-4b583d1da61f
fhvirus/CodeArchive
CSES/2215.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); int t;...
ALGO
0.998899
4.042116
2d3c5a23-8ebb-464e-a09c-211db4a77156
OscarMadrid17/tareaSemana6
listaDoblementeEnlazada.cpp
//Lista Doblemente Enlazada /* Prototipos de listas enlazadas **Lista simple enlazada circular **Lista doblemente enlazada circular*/ #include <iostream> using namespace std; struct Nodo{ int data; Nodo *siguiente, *anterior; }; void insertarLista(Nodo *&, int); void mostrarLista(Nodo *); void buscarLista(...
ALGO
0.999568
4.157279
51bf6d1b-5ef8-4dbf-aece-c1ea2e7a4447
linh-gist/GazeEstimationTX2
src/ext/eos/3rdparty/eigen/doc/examples/Tutorial_ArrayClass_addition.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXXf a(3,3); ArrayXXf b(3,3); a << 1,2,3, 4,5,6, 7,8,9; b << 1,2,3, 1,2,3, 1,2,3; // Adding two arrays cout << "a + b = " << endl << a + b << endl << endl; // Subt...
ALGO
0.942926
3.642258
0f5a7126-e931-44be-a662-e71f94a5c4b7
sendoru/ps-cpp-new
source/atcoder/abc239_c.cpp
#include <iostream> #include <vector> #include <algorithm> typedef long long ll; using namespace std; int main(void) { vector<pair<ll, ll>> v1; v1.push_back({ 1, 2 }); v1.push_back({ 2, 1 }); v1.push_back({ -1, 2 }); v1.push_back({ -2, 1 }); v1.push_back({ 1, -2 }); v1.push_back({ 2, -1 }); v1.push_back({ -1, ...
ALGO
0.999953
3.709509
2c3bfb51-46d0-4bab-b1f1-cdb851eb4a66
vrushalingale/https-github.com-AkashSingh3031-The-Complete-FAANG-Preparation
3]. Competitive Programming/08]. LeetCode/1]. Problems/C++/0011)_Container_with_Most_Water.cpp
class Solution { public: int maxArea(vector<int>& height) { int left = 0, right = height.size()-1; int max_area = (right-left)*min(height[left], height[right]); while(left < right) { if(height[left] < height[right]) left++; else ...
ALGO
0.999953
6.519022
419d855e-3d8a-4dd8-9587-30dc15caccfc
yliu-cs/ACM
HDU/HDU-1072.cpp
/*-----------------------------------------------------------*/ /* Blog :henuly.top */ /*-----------------------------------------------------------*/ #include <bits/stdc++.h> using namespace std; #define mem(a,b) memset(a,b,sizeof(a)) #define pb push_back #define mp make_pair ...
ALGO
0.999842
4.625385
7deedc2c-93ea-4044-88ad-dcf0f0bbda70
ishandutta2007/codeforces
moririn2528/normal/1621/E.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<vector> #include<cmath> #include<algorithm> #include<map> #include<queue> #include<deque> #include<iomanip> #include<tuple> #include<cassert> #include<set> #include<complex> #include<numeric> #include<functional> #include<unordered_map> #in...
ALGO
0.999973
3.277103
9c60997e-bbc8-450f-852d-949f78bdc983
Mohit067/CPP
Recursion/GCD.cpp
#include<iostream> using namespace std; void gcd(int a, int b){ if(a==0){ cout<<b; return; } int r = a%b; gcd(r, a); } int main(){ int a = 12; int b = 60; gcd(a, b); }
ALGO
0.999284
3.868236
4d5dd4bb-cf28-4b8c-8b78-90e171d735ee
Yajeshchandra/InterIIT-TechMeet-13.0
src/modules/ekf2/EKF/aid_sources/gnss/gnss_yaw_control.cpp
/** * @file gnss_yaw_control.cpp * Definition of functions required to use yaw obtained from GNSS dual antenna measurements. * Equations generated using src/modules/ekf2/EKF/python/ekf_derivation/derivation.py * */ #include "ekf.h" #include <mathlib/mathlib.h> #include <cstdlib> #include <ekf_derivation/generat...
ALGO
0.998264
4.43201
a23a3e65-ff7c-4e2c-b2dc-66354d08ad67
ishandutta2007/codeforces
realcomplex/normal/987/F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef double db; #define fi first #define se second #define mp make_pair #define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define TEST freopen("in.txt","r",stdin); #define ab(a) ((a < 0) ? (-(a)) : (a...
ALGO
0.999964
4.454291
3e88375f-4395-46f9-8c82-0b5c2ccf7ebf
georgevio/IoT-Embedded
esp-idf/esp32-cam-webPage-faceDetect/managed_components/espressif__esp-dsp/examples/applications/azure_board_apps/graphics/3d_matrix/3d_matrix_src/graphics_support.cpp
#include <malloc.h> #include <math.h> #include "graphics_support.h" void init_perspective_matrix(dspm::Mat &P_m) { const float fov = 90; // field of view in degrees const float near = 0.0001; const float far = 1; const float S = 1 / (tan((fov / 2) * DEG_TO_RAD)); // Init...
ALGO
0.991157
5.809661
b648b1ed-46ed-406a-89b4-6072f496131a
shikhak101/leetcode
N-aryTreePreOrderTraversal.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val, vector<Node*> _children) { val = _val; children = _children; } }; */ class Solution { public: vector<int> res; vector<int> preorder(Node* root) { if(root == N...
ALGO
0.99998
5.776941
63d826e5-4fa7-46a4-9aff-bb6d59bddb38
ishandutta2007/codeforces
qwqcorz/normal/1242/B.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e6+5; const int M=2e6+5; int read() { int s=0; char c=getchar(),lc='+'; while (c<'0'||'9'<c) lc=c,c=getchar(); while ('0'<=c&&c<='9') s=s*10+c-'0',c=getchar(); return lc=='-'?-s:s; } void write(int x) { if (x<0) { putchar('-'); x=-x; } if (x<10) pu...
ALGO
0.999776
4.163004
7a90aaae-0ba7-42a4-8815-dedecbeaded1
ishandutta2007/codeforces
snuke/normal/833/D.cpp
#include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++) #define rng(a) a.begin(),a.end() #de...
ALGO
0.999952
3.876662
786ebe14-f8ec-46c8-a2e3-68c242d36c16
Image-Processing-Systems-Laboratory/2023-oop-design-excellent
1-2/3/assignment1-2-1/assignment1-2-1/assignment1-2-1.cpp
#include<iostream> using namespace std; int main(void) { char arr1[100], arr2[100]; //입력받을 숫자를 문자열 배열로 선언, 100으로 선언하였으므로 최대 크기는 100이다. int temp, bucket[128] = { 0 }; //실제 인덱스의 값을 저장할 변수 temp와 카운트한 값을 저장할 bucket라는 정수형 배열을 선언한다. int flag[10] = { 0 }; //중복 방지를 위해 나온 값을 flag로 구분하기 위해 배열을 선언한다. cin >> arr1 >> arr2; ...
ALGO
0.998905
3.319384
973d421f-8411-4846-afcc-254ef36683ef
Uday-Berad22/DSA_questions
depth_of_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.999645
6.264398
7843ba67-e732-4dd6-8bf3-5bb15d0c5ff4
GouriBiswas/DSA-problems
DSA CODEHELP/Lecture31_Recursion.cpp/power.cpp
#include<iostream> using namespace std; int power(int n){ //base case if(n==0) return 1; //recursive relation // int smallerProblem = power(n-1); // int biggerProblem = 2* smallerProblem; // return biggerProblem; return 2*power(n-1); } int main() { int n; cin>> n; int...
ALGO
0.999954
4.867999
9e057b21-d056-497c-ad6c-9a50ff3457a2
zyx006/SAS
StringUtils.cpp
/* * ַ߽ӿʵ */ #include"StringUtils.h" string doubleToString(double num) { char* buf;//doubleתΪ޷ַ 12.34 -> 1234 int dec, sign;//dec->Сǰмλ sign->0Ϊ1Ϊ buf = _fcvt(num, 2, &dec, &sign); string str; if (sign) str += "-"; int i; for (i = 0; i < dec; i++) { str += buf[i]; } if (dec == 0) str += "0"; if (strcmp...
TOOL
0.863156
4.666818
94607843-b5db-4620-94ec-962d3b6ecf70
PRANAVJARANDE/CodeForces
B_Queue.cpp
#include <bits/stdc++.h> using namespace std; typedef long int int32; typedef unsigned long int uint32; typedef long long int int64; typedef unsigned long long int uint64; typedef long long ll; typedef long double ld; typedef unsigned int ui; typedef unsigned long long ull; typedef pair<ll, ll> pl; typedef vector<int...
ALGO
0.999995
3.906385
21125567-6603-4980-b72c-370084cd5acc
its-satyam/Leetcode-Solutions
0904-fruit-into-baskets/0904-fruit-into-baskets.cpp
class Solution { public: int n=0; int totalFruit(vector<int>& fruits) { int p=fruits[0];//fruit of type 1 int l=fruits[0];//fruit of type 2 int z=0,o=0;//counters for fruits int curr=fruits[0];//recent accessed fruit int curr_pos=0;//no. of times it was recently accessed ...
ALGO
0.99995
5.736487
bcb73b85-e1ec-40c8-a182-ac56ae49cdc2
notacallforhelp/contests
1042DIV3/E.cpp
#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; #define int long long typedef long long ll; typedef long double ld; //ordered_sets template <typename T> using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tre...
ALGO
0.99998
4.953443
b56b1a14-be66-480c-a97c-5e7e0fbc6ea0
Pulkith/Competitive
snippets/Self-Written/BreadthFirstSearchHRSnakesAndLadders.cpp
#include "std.h" using namespace std; int quickestWayUp(vector<vector<int>> ladders, vector<vector<int>> snakes) { bool vis[110]; int dis[110]; int mov[110]; for(int i = 1; i <= 100; ++i) mov[i] = i; for(vi v : ladders) mov[v[0]] = v[1]; for(vi s : snakes) mov[s[0]] =...
ALGO
0.998447
3.883917
55228971-4abc-4662-8591-d09d583306c3
CuriousGu/algorithms
sorting/bubble_sort/bubble_sort.cpp
#include <vector> using namespace std; vector<int> sort(vector<int>& arr) { for(int i=0; i<arr.size(); i++){ for(int j=0; j<arr.size(); j++){ if(arr[j] > arr[j+1]){ int temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } ...
ALGO
0.999936
5.112155
3a397f3e-9f5a-4528-894d-a027c6ffb47e
nobinov/image_resizer_server
include/boost_1_75_0/libs/interprocess/example/doc_where_allocate.cpp
int main () { using namespace boost::interprocess; //Typedefs typedef allocator<char, managed_shared_memory::segment_manager> CharAllocator; typedef basic_string<char, std::char_traits<char>, CharAllocator> MyShmString; typedef allocator<MyShmString, managed_shared_memory::segment_manager> ...
TOOL
0.900086
3.528689
535977b9-6ba9-49fc-b886-20b533a010bf
golchanskiy23/AlgorithmSolutions
CSES/Graphs/RoundTripII.cpp
#include <bits/stdc++.h> bool dfs(int v, std::vector<int>& color, const std::vector<std::vector<int>>& adjList, int& cycleEnd, int& cycleBegin, std::vector<int>& parent){ color[v] = 1; for (auto& u : adjList[v]) { if (color[u] == 1) { parent[u] = v; cycleEnd = v; cy...
ALGO
0.999982
4.494517
0215251a-ef12-4c80-b20d-ddab19c1d398
haseebzafar1020/c-All-parctice-Question-
DSA/Loops_Question/Q9_fibonacci.cpp
//Fabonacci Series #include<iostream> using namespace std; int main (){ int n; cout<<"Enter a number:"; cin>>n; int a=1 ; int b=1; int sum =1; for (int i = 1; i<=n-2 ; i++){ cout<< sum<<endl ; sum = a+b; a = b; b =sum; } }
ALGO
0.999904
3.427588
457fb244-337e-42dd-8e73-054d86a190f3
anuwu/Competitive-Programming
InterviewBit/Tree Data Structure/Right_View_of_Binary_Tree.cpp
int rightView (TreeNode *root, int push, vector<int> &ans) { if (!root) return 0 ; if (push == 0) ans.push_back (root->val) ; int hr, hl ; hr = rightView (root->right, push > 0 ? push-1 : 0, ans) ; hl = rightView (root->left, max(push-1, hr), ans) ; return ...
ALGO
0.99998
5.725635
dca6bf1a-6e20-41aa-b90e-0aabf5b352fd
jmsgrogan/MicrovesselChaste
src/pde/solvers/finite_element/continuum_solvers/CoupledInterfaceOdePdeSolver.cpp
#include "CoupledInterfaceOdePdeSolver.hpp" #include "CoupledVegfPelletDiffusionReactionPde.hpp" /** * A Parabolic PDE with a coupled ODE system on prescribed boundary nodes */ template<unsigned DIM> CoupledInterfaceOdePdeSolver<DIM>::CoupledInterfaceOdePdeSolver(TetrahedralMesh<DIM,DIM>* pMesh, ...
ALGO
0.938623
6.467247
f82a7a23-94c4-48e3-a170-2ff4da2bcf6b
Priyasharma02821/GeeksforGeeks-DSA-Solutions
Difficulty: Basic/Print Elements of Array/print-elements-of-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: // Just print the space seperated array elements void printArray(vector<int> &arr) { for(int i=0; i<=arr.size()-1; i++){ cout<<arr[i]<<" "...
ALGO
0.962784
6.535753
404e352f-ad92-4978-b6ea-d6fcb7945b33
Ruudddiiii/TB3_Task
1.2mxptlyingCH.cpp
/* कर्मण्येवाधिकारस्ते मा फलेषु कदाचन । मा कर्मफलहेतुर्भुर्मा ते संगोऽस्त्वकर्मणि ॥ */ // Author : Rudresh Singh #include <bits/stdc++.h> using namespace std; #define F first #define S second #define mp make_pair #define pb push_back #define xx "\n" double dist(pair<double,do...
ALGO
0.999618
3.555786
d7bca739-92d6-4f32-affd-4bda843b2f17
facebookarchive/clangir
libc/src/math/aarch64/ceilf.cpp
#include "src/math/ceilf.h" #include "src/__support/common.h" namespace __llvm_libc { LLVM_LIBC_FUNCTION(float, ceilf, (float x)) { float y; __asm__ __volatile__("frintp %s0, %s1\n\t" : "=w"(y) : "w"(x)); return y; } } // namespace __llvm_libc
ALGO
0.980015
4.624131
9b104c87-0305-4508-b64d-cdfd38b9fc7c
afuu21/100daysofcode
day_21_wipro2.cpp
#include<bits/stdc++.h> using namespace std; int main() { map<string, int> m1; string x; getline(cin, x); int ff; cin>>ff; string word; stringstream iss(x); while(iss>>word) { m1[word]++; if(m1[word] == ff) { cout<<word<<" "; m1[word] = 0; ...
ALGO
0.999177
3.386248
535ccc21-5068-4cf7-b2f2-8387bbb25f23
VenkataAnilKumar/LeetCode
Solutions/mergeProblems/mergeTwoSortedArray.cpp
// Source : https://oj.leetcode.com/problems/merge-sorted-array/ // Author : Venkata Anil Kumar /********************************************************************************** * * Given two sorted integer arrays A and B, merge B into A as one sorted array. * * Note: * You may assume that A has enough space (s...
ALGO
0.999924
4.988506
2906f5ae-051b-42db-9b2c-7910ba8f560e
barrystyle/rapids-4.3
src/core_read.cpp
#include "core_io.h" #include "primitives/block.h" #include "primitives/transaction.h" #include "script/script.h" #include "serialize.h" #include "streams.h" #include <univalue.h> #include "util.h" #include "utilstrencodings.h" #include "version.h" #include <boost/algorithm/string/classification.hpp> #include <boost/...
TOOL
0.863088
7.209581
b3a7ae09-647c-44aa-b795-fd6d1a558343
Nilay-Patel-5/CPP-Programming
Pr05.4.cpp
/*A team of developers is tasked with building a temperature conversion system for a weather application. To achieve this, the team creates two classes: Celsius and Fahrenheit. These classes handle the conversion between temperature units, with the ability to convert from Celsius to Fahrenheit and vice versa using type...
ALGO
0.975989
6.366227
85781275-a74f-4e39-ad83-01e4a5e646cd
nikhilsolanki12/Data_Structure_Algorithms
DSA/Array/Unique_element.cpp
// find unique element when every element repeat twice except only one #include <iostream> #include <vector> using namespace std; int main() { vector<int> arr{2, 4, 6, 8, 10, 10, 6, 8, 3, 6, 2}; int ans = 0; for (int i = 0; i < arr.size() - 1; i++) { ans = ans ^ arr[i]; } cout << "Uniqu...
ALGO
0.997646
5.173008
d75938c7-ec4d-471f-a35f-d9a4e8af0591
krlargo/Practice-Algorithms
IsWordSquare.cpp
#include <iostream> #include <vector> #include <vector> #include <vector> using namespace std; bool isWordSquare(vector<string> words) { for(int i = 0; i < words.size(); i++) { for(int j = 0; j < words[i].length(); j++) { if(words[i][j] != words[j][i]) return false; } } return true; } int main(int arg...
ALGO
0.994821
4.924262
12c0f313-405f-4b2c-9517-a35a9e073f46
GuacheSuede/MSSubmission1234567890
submission/bollinger/boost_1_69_0/libs/sort/example/parallelstring.cpp
// See http://www.boost.org/libs/sort for library home page. #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int_distribution.hpp> #include <boost/sort/spreadsort/spreadsort.hpp> #include <boost/thread.hpp> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #incl...
ALGO
0.996454
4.75403
b22581ab-f3b5-44fd-8d99-e3d2c9c72260
irving11119/Blind75
solutions/week1/is_palindrome.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: string lower(string s) { for (long i = 0; i < s.size(); i++) { if (s[i] >= 'A' && s[i] <= 'Z') { s[i] = s[i] - 'A' + 'a'; } } return s; } string ...
ALGO
0.999755
5.599082
057d922e-cc86-406f-a7fc-acc031b48851
shiv8115/LeetCode
24. Intersection Point in Y Shapped Linked Lists - GFG/24.-intersection-point-in-y-shapped-linked-lists.cpp
// { Driver Code Starts #include<iostream> #include<bits/stdc++.h> using namespace std; /* Link list Node */ struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; int intersectPoint(struct Node* head1, struct Node* head2); Node* inputList(int size) ...
ALGO
0.999917
5.394017
5641ec17-ac05-4a5b-beb7-c490a330f965
trapperdot00/cpp_primer_5th_edition_exercises
Chapter17/17.13.cpp
#include <bitset> #include <cstddef> #include <string> #include <utility> #include <iostream> using std::bitset; using std::size_t; using std::string; using std::cout; using std::endl; template <size_t N> class Test; template <size_t N> std::ostream &operator<<(std::ostream &, const Test<N> &); template <size_t N> c...
ALGO
0.998516
5.447598
38796049-600b-4cfc-9334-1d91ef935569
commcheck396/Leetcode
37.cpp
class Solution { public: int sudoku_begin[9][9]; int sudoku_dig[9][9]; int line_mark[9][10]; int row_mark[9][10]; int unit_mark[3][3][10]; int SUM_SOLUTION; int dig_mark(int x,int y,int value){ int i,k,b,c; line_mark[x][value]=0; row_mark[y][value]=0; uni...
ALGO
0.99929
6.441505
fe626b96-c0d0-4581-9e01-7e4f8db43959
delwar03/CF
B_Santa_Claus_1.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using o_set = tree<T, null_type, std::less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define int long long #define endl '\n' #define F first #define S secon...
ALGO
0.999965
4.410995
911823a0-cf30-4217-a252-906059c53bcf
cvxgrp/diffcp
cpp/src/cones.cpp
#include <algorithm> #include <cmath> #include <functional> #include <numeric> #include <string.h> #include <stdexcept> #include "cones.h" #define CONE_TOL (1e-8) #define CONE_THRESH (1e-6) #define EXP_CONE_MAX_ITERS (200) const double EulerConstant = std::exp(1.0); const double sqrt_two = std::sqrt(2.0); double ex...
ALGO
0.999722
6.858618
2d7a3189-0fd1-48ac-98c0-fece1bafcae1
harshbhar0629/CrackYourInternship
Arrays/12_container_with_most_water.cpp
#include <bits/stdc++.h> using namespace std; // https://leetcode.com/problems/container-with-most-water/description/ class Solution { public: int maxArea(vector<int>& h) { int n = h.size(); int i = 0, j = n-1; int maxArea = 0; while(i<j){ int area = (min(h[i], h[j]))*(...
ALGO
0.999188
5.906943
0fd1e657-45b0-4c04-b175-3a646ab0e338
tofergregg/CodeReview
course/cs106b/1176/midterm/p5/student_43.cpp
Vector<int> bestRoute(Grid<double> &distance, int startCity) { Queue<int> citiesNotVisited(); Vector<int> path; for(int i = 0; i < distance.numRows; i++){ if(i!= currentCity){ citiesNotVisisted.enqueue(i); } } helper(distance, startCity, citiesNotVisited, path); } Vector<int> helper(Grid<double> &distance,...
ALGO
0.999767
4.460604
03448746-6520-4931-92f2-61a8437fd52f
poncoe/datastructure_cpp_basic
bab7_binnarytree/main.cpp
#include"tree.cpp" int main() { tree a; a = alokasinode(13); left(a) = alokasinode(14); left(left(a)) = alokasinode(39); left(left(left(a))) = alokasinode(31); right(left(left(a))) = alokasinode(50); right(left(a)) = alokasinode(28); left(right(left(a))) = alokasinode(14); right(a)...
ALGO
0.989596
3.861044
f6b87767-4cfb-4236-83fb-363526e4b7b2
Rajsoni03/CPlusPlus-Training
Assignment_2/Yashika's Assignment Solutions/Q.12.cpp
#include <iostream> using namespace std; int main() { double donations[10]; double totaldonations=0; int a; int count =0; cout<<"Donation 1: "; while (count < 10 && cin >> donations[count]) { if (++count < 10) { cout << "Donation " << count+1 << ": "; } } f...
TOOL
0.998549
3.463259
de9aa163-66dc-4e10-b78e-f680e793d2e0
d01000100/3d-pinball
GDP2019_20/include/bullet/BulletCollision/BroadphaseCollision/btDbvt.cpp
///btDbvt implementation by Nathanael Presson #include "btDbvt.h" // typedef btAlignedObjectArray<btDbvtNode*> tNodeArray; typedef btAlignedObjectArray<const btDbvtNode*> tConstNodeArray; // struct btDbvtNodeEnumerator : btDbvt::ICollide { tConstNodeArray nodes; void Process(const btDbvtNode* n) { nodes.push_back(...
ALGO
0.99769
6.302854
8affabfd-e529-4360-ac4e-b221532c44bb
xxalsgh0203/Algorithms
DFS_BFS/BOJ7576.cpp
#include <iostream> #include <queue> #include <stdio.h> using namespace std; int graph[1000][1000]; int N, M, result = 0; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; queue<pair<int, int>> tomato; bool in_range(int nx, int ny) { if (nx >= 0 && ny >= 0 && nx < M && ny < N) return true; else ...
ALGO
0.999945
4.41524
3edb2b3a-4f03-4a76-aea2-36458ff636f2
Colloportus0/MLIRSmith11
llvm/lib/ProfileData/SampleProfReader.cpp
#include "llvm/ProfileData/SampleProfReader.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/IR/Module.h" #include "llvm/IR/ProfileSummary.h" #include "llvm/ProfileData/ProfileCommon.h" #include "llvm/ProfileData/SampleProf.h" #include "llvm/Support/Comman...
TOOL
0.906251
3.161851
ac9248ef-1c94-4d01-96b8-04372b873aca
yoshiya-usui/femtic
src/PARDISOSolverDouble.cpp
#include "mkl_pardiso.h" #include "mkl_types.h" #include "mkl.h" #include "PARDISOSolverDouble.h" #include "OutputFiles.h" // Default constructer PARDISOSolverDouble::PARDISOSolverDouble(): PARDISOSolver(PARDISOSolver::REAL_AND_SYMMETRIC_INDEFINITE) { } // Constructer PARDISOSolverDouble::PARDISOSolverDouble(const ...
ALGO
0.999055
4.070191
e05067c1-a002-42a2-811d-5184d2bf7070
Yukariko/acm
problem/1941/test.cpp
#include <bits/stdc++.h> using namespace std; const int dy[] = {1, -1, 0, 0}; const int dx[] = {0, 0, 1, -1}; bool findGroup[1<<25]; char a[6][6]; int idx(int y, int x) { return 1 << (y * 5 + x); } int solve(int pos, int sCnt, int mask) { if(pos == 6) { if(sCnt < 4) return 0; if(findGroup[mask] == true) ...
ALGO
0.999748
3.853199
36b7a8fc-b05a-42a7-8a4f-6729d687c03f
xunHeaven/leetcode75
36pathSum437.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.999983
5.95225
85073089-788b-46bc-9d35-fced273ff1f6
Slygoross/DSA-Codes
153. Find Minimum in Rotated Sorted Array.cpp
//Brute Force O(N) class Solution { public: int findMin(vector<int>& nums) { int n = nums.size(); int mini = INT_MAX; for(int i = 0; i < n; i++){ mini = min(mini,nums[i]); } return mini; } }; //Better (using binary search) O(logN) class Solution { public: ...
ALGO
0.999978
5.901118
e018e60f-0cb2-48ba-89d6-c20cda4120b6
Uday24122004/DAA
bellmanFord.cpp
#include <iostream> #include <limits.h> #include <stdlib.h> using namespace std; #define max 100 #define infinity INT_MAX #define nil -1 int n; int adj[max][max]; int predecessor[max]; int pathlength[max]; int ispresent_in_queue[max]; int front, rear; int queue[max]; void initialize_queue(); void insert_queue(int u)...
ALGO
0.999966
4.518273
fa7ceb3e-b811-483a-948a-46d2d86b4827
corretto/corretto-8
hotspot/src/os/posix/vm/os_posix.cpp
#include "utilities/globalDefinitions.hpp" #include "prims/jvm.h" #include "runtime/frame.inline.hpp" #include "runtime/os.hpp" #include "utilities/vmError.hpp" #include <signal.h> #include <unistd.h> #include <sys/resource.h> #include <sys/utsname.h> #include <pthread.h> #include <signal.h> PRAGMA_FORMAT_MUTE_WARNIN...
TOOL
0.957112
6.983858
92b4258a-69c6-4ff7-a895-e9241bcfad97
Andwerpz/Competitive-Programming-Practice
- cpp -/traininground2.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; const ll MOD = 1e9 + 7; //2024 ICPC NAC - M //first note that there is a naive dp solution like so: dp[i][j][k] = can visit or not where //i = number of problems considered //j = thinking skill //k = implementing skill //we c...
ALGO
0.999359
4.669822
9f778e8e-bd80-4c05-b186-e5296ebbc47d
aabhinavvvvvvv/CP_CF
Distance_Queries.cpp
/* * Competitive Programming Template * Author: Abhinav Gupta * GitHub: @aabhinavvvvvvv * MAHAKAL KI JAI */ #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using vi = vector<int>; using vll = vector<ll>; using pii = pair<int, int>; using...
ALGO
0.999955
4.858289
af88026b-acff-49ec-8e2b-31ea0803582b
FFMG/myoddweb.piger
myodd/boost/libs/signals2/example/custom_combiners.cpp
#include <iostream> #include <boost/signals2/signal.hpp> #include <vector> float product(float x, float y) { return x * y; } float quotient(float x, float y) { return x / y; } float sum(float x, float y) { return x + y; } float difference(float x, float y) { return x - y; } //[ custom_combiners_maximum_def_code_snipp...
ALGO
0.967388
6.991854
d8c68ca5-55c2-4647-91a9-7fc1b8f58d13
khusanbek/DSA_CAU24
week 5/Tree.cpp
#include<iostream> using namespace std; //structure to define a node in the binary tree struct TreeNode { int value; struct TreeNode* left; struct TreeNode* right; //constructor to initialize the node with a value TreeNode(int val) { value = val; left = NULL; right = NU...
ALGO
0.999993
6.531809
5edca054-2125-482a-9c5f-c83d244a0641
himanshuranjandixit/LeetCode-Solution
2364-longest-path-with-different-adjacent-characters/2364-longest-path-with-different-adjacent-characters.cpp
class Solution { public: int ans=1; int dfs(vector<vector<int>>& adj, int node, int par, string& s ){ int max1=0; int max2=0; for(auto &it: adj[node]){ if(it==par) continue; int childlen = dfs(adj,it,node,s); if(s[it]!=s[node]){ if(chil...
ALGO
0.999935
5.073284
b6661df9-4461-444e-b6f3-27423f4abe8d
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/Year2021/January/EncodedString_20210102132124.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999976
3.372551
8227f144-dc37-4dda-a583-378066fac14a
marcinz/libcxx-ranges
test/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp
// <algorithm> // template<ForwardIterator InIter, OutputIterator<auto, InIter::reference> OutIter> // OutIter // rotate_copy(InIter first, InIter middle, InIter last, OutIter result); #include <algorithm> #include <cassert> #include "test_iterators.h" template <class InIter, class OutIter> void test() { in...
TEST
0.99399
6.751694
b2969257-5ddd-453b-babc-7ed33fd0d27a
liuq901/code
LOJ/l_1116.cpp
#include <cstdio> typedef long long ll; int main() { int T; scanf("%d",&T); while (T--) { ll n; scanf("%lld",&n); static int id=0; printf("Case %d: ",++id); if (n%2==1) printf("Impossible\n"); else { ll ans=1; wh...
ALGO
0.998058
4.042966
4639eb0c-b68f-4fb7-93ff-87ca542ce0bb
Bungmint/competitiveprogramming
contest/codechef/LKDNGOLF.cpp
//#pragma GCC optimize("O3") //#pragma GCC target("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_...
ALGO
0.999883
4.693257
eceddbda-7389-47fe-8c2e-838cf864693f
Anil-Gaihre/split_graph
main.cpp
#include <iostream> #include "graph.h" #include <metis.h> #define original 1 #include <fstream> using namespace std; #include <set> #include <vector> #include <algorithm> #include <numeric> #define verify_split 1 // #define print_subgraphs 1 struct graph_t { long* begin_pos; long* csr; long vert_count; long edge_co...
ALGO
0.995896
3.805108