uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
2561df63-f1fe-4e24-8f12-b25a784e6410
xlnwel/Leetcode
leetcode/0103.cpp
#include <vector> #include <stack> using namespace std; 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), left(l...
ALGO
0.999999
6.337259
aefb5fac-0528-4e09-ad9a-a70ad1135f13
ishandutta2007/codeforces
darkkcyan/normal/609/C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.tie(0)->sync_with_stdio(0); int n; cin >> n; vector<int> a(n); for (auto& i: a) cin >> i; sort(a.begin(), a.end()); ll sum = accumulate(a.begin(), a.end(), 0ll); ll rem = n - sum % n; ll ans =...
ALGO
0.999924
4.070564
92a312df-afc9-4d62-972b-91384c69756c
VictorNisa/Pinball-2
Physics2_class4 - handout/Box2D/Box2D/Dynamics/Joints/b2GearJoint.cpp
#include <Box2D/Dynamics/Joints/b2GearJoint.h> #include <Box2D/Dynamics/Joints/b2RevoluteJoint.h> #include <Box2D/Dynamics/Joints/b2PrismaticJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // Gear Joint: // C0 = (coordinate1 + ratio * coordinate2)_initial // C = (coordinate1 + ratio ...
ALGO
0.937321
6.952128
cadd0cb3-a0b1-468e-b9b1-84ade1cf0186
tervelgstoyanov/fmi-kn-4-up-2024-2025
Practicum/Week_03/solutions/task1.cpp
#include <iostream> using namespace std; int main(){ char c; cin>>c; if(c >= '0' && c<='9'){ cout<<"digit"<<endl; } else if(c >= 'a' && c<='z'){ cout<<"lower case letter"<<endl; } else if(c >= 'A' && c<='Z'){ cout<<"uppercase case letter"<<endl; } else{ ...
ALGO
0.964752
3.190895
19abc084-535e-4206-a238-6a216e795bca
rajeevranjancom/Leetcode_Cpp
560. Subarray Sum Equals K.cpp
class Solution { public: int subarraySum(vector<int>& nums, int k) { int count = 0; unordered_map<int, int>m; int sum = 0; for(auto x: nums){ m[sum]++; sum += x; if(m.count(sum - k) > 0) count += m[sum - k]; } return count; } };...
ALGO
0.999913
6.133698
d63f0e86-91cd-4e01-a7b6-677c8f3d6169
civodlu/arraym
array/cuda-blas-wrapper.cpp
#include "forward.h" #include "wrapper-cublas.h" #include "cublas-common.h" #ifdef WITH_CUDA DECLARE_NAMESPACE_NLL namespace blas { template <> ARRAY_API BlasReal nrm2<BlasReal>(const BlasInt N, const cuda_ptr<BlasReal> X, const BlasInt incX) { BlasReal result = 0; INIT_AND_CHECK_CUDA(cublasSnrm2(detail::confi...
TOOL
0.985594
7.452934
aa61c7b6-3e43-49f2-af2c-a5165ce57c24
pralinkhaira/Leet-Code-Solutions
2803-modify-graph-edge-weights/modify-graph-edge-weights.cpp
class Solution { public: vector<vector<int>> modifiedGraphEdges(int n, vector<vector<int>>& edges, int source, int destination, int target) { vector<vector<pair<int, int>>> adjacencyList(n); for (int i = 0; i < edges.size(); i++) { int nodeA = edges[i][0], nodeB = edges[i][1]; ...
ALGO
0.999945
6.396661
6ceafd37-7588-4f6c-b0d9-10862dd3aed0
aayushirajsingh/C-CPP-codes
12TH/CNSTRC_1.CPP
#include<iostream.h> #include<conio.h> class complex { float x,y; public: complex() {} complex(float a) { x=y=a; } complex(float real,float imag) { x=real; y=imag; } friend complex sum(complex,complex); friend void show(complex); }; complex sum(complex c1,complex c2) { complex c3; c3.x=c1.x+c2.x; c...
ALGO
0.850153
3.815661
7698e4a7-a801-4ba6-a809-8a6c3f0c61a6
allenge007/my_cpp_code
training/2024Training3/b.cpp
#include <bits/stdc++.h> using namespace std; #define fir first #define sec second const int maxn = 2e5 + 5; inline int read() { int w = 0, f = 1; char ch = getchar(); while(ch < '0' || ch > '9') {if(ch == '-') f = -f; ch = getchar();} while(ch >= '0' && ch <= '9') w = w * 10 + ch - '0', ch = getchar(); ...
ALGO
0.999977
4.580417
67331ef7-ecac-40b2-8e11-c84493f71df9
helloobaby/llvm_msvc
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
#include "llvm/Analysis/ModuleSummaryAnalysis.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llv...
TOOL
0.966888
3.004401
9ae1c960-0225-43e4-a34d-e2490df82dd8
qoinz/qoinzcoin
src/script/interpreter.cpp
#include "interpreter.h" #include "primitives/transaction.h" #include "crypto/ripemd160.h" #include "crypto/sha1.h" #include "crypto/sha256.h" #include "eccryptoverify.h" #include "pubkey.h" #include "script/script.h" #include "uint256.h" using namespace std; typedef vector<unsigned char> valtype; namespace { inli...
ALGO
0.858861
4.57371
6059346a-5bc7-4532-b775-5497ea608af3
Aditya01jain/100dayscode
300-longest-increasing-subsequence/longest-increasing-subsequence.cpp
class Solution { public: int lengthOfLIS(vector<int>& nums) { vector<int> temp; temp.push_back(nums[0]); for(int i=1;i<nums.size();i++){ if(nums[i]>temp.back()) temp.push_back(nums[i]); else{ int in = lower_bound(temp.begin(),temp.end(),nums[i])-temp.b...
ALGO
0.999991
6.077847
31cbb0f4-f825-4aac-8c43-9209c81026a5
breaker250611/GFG-LEET-codes
2653-sliding-subarray-beauty/2653-sliding-subarray-beauty.cpp
class Solution { public: vector<int> getSubarrayBeauty(vector<int>& nums, int k, int x) { int n = nums.size(); vector<int> freq(51, 0), ans; for(int i = 0, j = 0; i < n; i++) { // count freq of negative numbers in current sliding windows if(nums[i] < 0) freq[...
ALGO
0.999993
5.484662
1d0c22bf-0129-4a11-8639-644b8aaeeb06
lostsquirrel/cpp_learning
src/01_basic/add_sample.cpp
# include <iostream> using namespace std; int main() { int a, b, sum; cout << "请输入第一个加数:"; cin >> a; cout << "请输入第二个加数:"; cin >> b; cout << a << " + " << b << " = " << a + b <<endl; return 0; }
TOOL
0.900887
4.042708
7fe8ce45-3ca1-4bc1-a0bf-acd52a84b766
raghav161/Leetcode
2291-maximum-and-sum-of-array/2291-maximum-and-sum-of-array.cpp
class Solution { public: int f(vector<int>& ar, int cur, int n, int k, vector<int>& vis, map<vector<int>, int>& mp) { if(cur >= n) return 0; if(mp.count(vis)) return mp[vis]; int mx = -1; for(int i = 1; i <= k; i++) { if(vis[i] < 2) ...
ALGO
0.999976
5.869053
ed3d36fc-4493-4ebc-a748-d1977183c25b
ishandutta2007/codeforces
hitonanode/normal/961/B.cpp
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <deque> #include <forward_list> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iostream> #include <limits> #include <list> #include <map> #inclu...
ALGO
0.999948
3.921224
791b513f-1a68-4d0b-89bb-d00e58d58e35
niumeng07/code-dev
leetcode/test/ut_0056_merge_intervals.cpp
#include <string> #include <vector> #include "gtest/gtest.h" #include "0056_merge_intervals/merge_intervals.h" TEST(merge_intervals0, test0) { vector<vector<int>> intervals({{1, 3}, {2, 6}, {8, 10}, {15, 18}}); EXPECT_EQ(Solution().merge(intervals), vector<vector<int>>({{1, 6}, {8, 10}, {15, 18}}...
ALGO
0.998785
6.125924
de86fea8-6ada-47d5-8c73-6aecb6316685
dvander/libaddrz
mapping.cpp
#include "mapping.h" #include <assert.h> #include <algorithm> namespace am { void SortAndCoalesceMaps(std::vector<Mapping>& maps) { std::sort(maps.begin(), maps.end()); size_t cursor = 0; for (size_t i = 1; i < maps.size(); i++) { if (maps[i].start == maps[cursor].end()) { maps[curs...
ALGO
0.98196
6.961425
c9561815-dcd3-4630-adb4-929f106dd60f
ishandutta2007/codeforces
dotorya/normal/852/I.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory.h> #include <math.h> #include <assert.h> #include <queue> #include <map> #include <set> #include <string> #include <algorithm> #include <iostream> #include <functional> #include <unordered_map> #include <unordered_set> #include <list> #include ...
ALGO
0.999809
3.862365
f3484475-e447-4ac2-be4f-7e34fa157343
subimpact/xmrig
src/base/tools/cryptonote/Signatures.cpp
#include "base/crypto/keccak.h" #include "base/tools/cryptonote/Signatures.h" extern "C" { #include "base/tools/cryptonote/crypto-ops.h" } #include "base/tools/Cvt.h" #ifdef XMRIG_PROXY_PROJECT #define PROFILE_SCOPE(x) #else #include "crypto/rx/Profiler.h" #endif struct ec_scalar { char data[32]; }; struct hash {...
ALGO
0.994704
6.97851
50ec2773-deb6-464b-9e48-2ede74e81615
natasya848/final-blok-2
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.998733
6.76775
a22a0ee2-f00f-4d15-a3dc-ab1191c84c58
Macw07/Macw07
Test&Exams/分班测试/05.cpp
#include <iostream> #include <algorithm> #include <cmath> using namespace std; int t; int total; string convert(int t){ string a; while(t){ a += (t % 10) + '0'; t /= 10; } reverse(a.begin(), a.end()); return a; } int main(){ cin >> t; while(t--){ string str; ...
ALGO
0.999827
3.87161
2b3d6c67-6dd0-458d-ab67-4c5d6eff7f64
RaduBogdan99/Laborator5SO
main.cpp
#include <iostream> #include <windows.h> #define SHARED_MEMORY_NAME L"SharedMemory" #define SEMAPHORE_NAME L"Semaphore" int main() { HANDLE hMapFile; HANDLE hSemaphore; int* pData; int num; hMapFile = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(int), SHARED_MEMORY_NAME...
TOOL
0.984243
4.830095
71506818-11e9-453f-877d-14f4d91605f5
9759176595/LeetCodeQuestion
Array Nesting.cpp
class Solution { public: map<int,int>visited; int ans=0; int c=0; void dfs(vector<int>&v,int i) { c++; visited[i]=1; int item=v[i]; if(visited[item]==0) { dfs(v,item); } ans=max(ans,c); } int arrayNesting(vector<int>& nums) ...
ALGO
0.999993
6.552615
57795e09-69e2-404d-8e93-632005a7b426
neoVincent/LeetCodePlayground
Lint_1380_Log_Sorting.cpp
Lint_1380_Log_Sorting.cpp class Node { public: string val; string id; string content; bool isAlpha; Node(string logs) { content = logs; int pos = logs.find(" "); id = logs.substr(0,pos); val = logs.substr(pos+1); isAlpha = false; for(auto& ch ...
ALGO
0.999762
5.765002
a7529874-3f97-4b85-962c-d6bfea41ccf0
nexbitproject/nexbit
src/key.cpp
#include <openssl/bn.h> #include <openssl/ecdsa.h> #include <openssl/rand.h> #include <openssl/obj_mac.h> #include "key.h" // anonymous namespace with local implementation code (OpenSSL interaction) namespace { // Generate a private key from just the secret parameter int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *...
TOOL
0.987344
7.316195
e681a752-3697-413d-8c2b-e159ee284e4c
marcmendez/Prince-Of-Persia
libs/glm/test/core/core_func_integer_find_lsb.cpp
/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentatio...
ALGO
0.997205
5.219802
fa9640cb-04cb-4fd2-862a-a232c3a76f9e
utk3995/web-scraping-lightoj-old
converted_cpp/1159.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int,int> #define vi vector<int> #define vii vector < pii > #define si set<int> #define ll long long int #define pb push_back #define mp make_pair #define fr first #define se second #define MOD 1000003 #define MAX 10100 int dp[55][55][55]; int main () { ...
ALGO
0.999935
4.625829
84f6c763-853a-4b1c-bdfd-a44cda7e0423
Amrita2222/C-
02_function.cpp
#include<iostream> using namespace std; // Call By Reference usign pointer void swap(int* a, int* b){ int temp = *a; *a= *b; *b= temp; } int main(){ int x=5, y=4; cout << "The value of X :" << x << "the value of Y: " << y << endl; swap(&x,&y); cout << "The value of X :" << x << "the value of ...
TOOL
0.998968
4.984419
46fdf654-f3c3-43cf-b0ba-70db0577eff5
devtamtam/sklC
pr11/bat実行タイプ/練習11.cpp
#include <stdio.h> #include <math.h> double f(double t, double y){ return -sin(t); } int main(){ double t,t0,t1,y,k1,k2,k3,k4,k,dt,dt2; dt=0.01; dt2=dt*0.5; t0=0.; y=1.; t1=8.0; printf(" t \t y \n"); printf(" %8.3f\t %8.3f\n",t0,y); int i=0; for(t=t0;t<t1;t+=dt){ k1=f(t,y); ...
ALGO
0.999716
3.764692
24e01cc7-3fec-46ca-8180-6e87cf4856bf
11yashpratapsingh/Leetcode-GeeksforGeeks
0001-two-sum/0001-two-sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { unordered_map<int,int> mp; for(int i=0;i<nums.size();i++){ if(mp.count(target-nums[i])) return {mp[target-nums[i]],i}; mp[nums[i]] = i; } return {}; } };
ALGO
0.999834
6.232554
0ec9b9b4-b953-4ed8-bfc7-cd53aeee39a0
sarvex/leetcode-typescript
solution/1500-1599/1585.Check If String Is Transformable With Substring Sort Operations/Solution.cpp
class Solution { public: bool isTransformable(string s, string t) { queue<int> pos[10]; for (int i = 0; i < s.size(); ++i) { pos[s[i] - '0'].push(i); } for (char& c : t) { int x = c - '0'; if (pos[x].empty()) { return false; ...
ALGO
0.999987
6.572646
936fac9d-9563-4b60-999e-cba5fda6a475
arbaaz1999/DSA_Using_CPP
05-Strings/Q1-is_palindrome.cpp
#include <bits/stdc++.h> using namespace std; bool isPalindrome(string s) { int i = 0, j = s.size() - 1; while (i <= j) { if (!isalnum(s[i])) { i++; continue; }; if (!isalnum(s[j])) { j--; continue; }; i...
ALGO
0.999676
4.240701
f104a6ff-7ca0-4b40-bbbb-f1e9f483e3b0
mhjmbs/competitive-programming
solutions/CSES/Dynamic Programming/Money Sums.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define fastio ios::sync_with_stdio(0), cin.tie(nullptr) using ll = long long; using ull = unsigned long long; using pii = pair<int,int>; using pll = pair<ll,ll>; us...
ALGO
0.999948
3.9163
fcc13685-c51e-45d1-bb6f-cbbd9c1275f5
AL-ETERNITY/DSA_Striver_Sheet
Linked List/q23.cpp
// function to solve the problem of adding one to a linked list representing a number #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node* next; Node(int x){ data = x; next = NULL; } }; class Solution { private: Node* reverse(Node* head){ Nod...
ALGO
0.99994
5.928471
4dd60eee-ac63-4d72-9afa-38881ce929c8
TechTutorialHub/AlgorithmCodes
Module1/sample5.cpp
//palindrome #include <iostream> using namespace std; bool isPalindrome(char str[]) { int start = 0; int end = strlen(str) - 1; while (start < end) { cout << "Iteration: Comparing " << str[start] << " and " << str[end] << endl; if (str[start] != str[end]) { return false; // No...
ALGO
0.998857
5.769001
962b99a0-e39f-42c2-b698-db0eb33df5e8
VikrantSingh16/DSA
Array/Day-7-Arrays/majorityElementArrayBruteForce.cpp
//element should be present more than sizeofarray/2 to called majority element in that array #include<iostream> using namespace std; int maxEleInArray(int a[],int size){ int maxCount = 0; int currCount = 0; int maxNum=0; for(int i=0;i<size;i++){ for(int j=1;j<size;j++){ if(a[i]==a[j]){ ...
ALGO
0.99988
3.741775
ebb42f44-2fb0-4d55-8caf-66e682b9a128
NoviScl/Coursera
AlgorithmsUCSD/DataStructure/Week1/brackets.cpp
#include <iostream> using namespace std; typedef pair<int, int> p; int main(){ string buffer; cin>>buffer; p stack[100050]; int top=-1; for(int i=0; i<buffer.length(); i++){ if(buffer[i]== '(' || buffer[i]=='[' || buffer[i]=='{'){ top++; stack[top].second ...
ALGO
0.998304
3.98586
b996ff08-64af-4f63-82d2-0ddbdb412866
p1kalys/Leetcode-DSA-Vault
71-simplify-path/simplify-path.cpp
class Solution { public: string simplifyPath(string path) { stack<string> st; string res; for(int i = 0; i < path.size(); i++){ if(path[i] == '/'){ continue; } string temp; while (i < path.size() && path[i] != '/'){ ...
ALGO
0.99986
5.955852
f8039658-e125-4827-976f-00ecc67edee7
Shivam-Vishwakarma-123/DSA-Codes
Binary Search Tree/clas11.cpp
#include<iostream> #include<queue> using namespace std; class Node{ public: int data ; Node*left; Node*right; Node(int data){ this->data=data; this->left=NULL; this->right=NULL; } }; void inordertraversal(Node *root) { if (root == NULL) { return; } // LNR inorde...
ALGO
0.999882
3.990967
9f681f4a-0d13-4e1b-a47c-f0975f7a0f9e
martabacc/one-submission-daily
SPOJ/SPOJ-Flowers.cpp
#include<stdio.h> #define lli long long int lli pots, moduler,result; #define arrsz 4 lli arr[arrsz]; #define setAll() for(int x=0;x<arrsz;x++) arr[x]=0 void fn(lli x){ //make it fly arr[x%4]=((x+1)*arr[(x-1)%4]-(x-2)*arr[(x-2)%4]-(x-5)*arr[(x-3)%4]+(x-3)*arr[(x-4)%4])%moduler ; if(x<pots) fn(x+1); else { ...
ALGO
0.999977
3.457583
aa853353-033a-49b6-85c7-644309cbf2ac
Kaustubh22327/CFsols
C_Where_s_the_Bishop.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ vector<string>vt(8); for(int i=0;i<8;i++){ cin>>vt[i]; } bool flag=false; for(int i=1;i<7 &&!flag;i++){ for(int j=1;j<7 &&!flag;j++){ if(vt[i][j]=='#' && vt[i-...
ALGO
0.999824
3.133696
e3421e14-a9da-41dd-b9f7-2dc91dd1e416
ChangWinde/Algorithm
company/huawei/等差数列.cpp
// 等差数列 // 功能:等差数列 2,5,8,11,14。。。。 // 输入:正整数N >0 // 输出:求等差数列前N项和 // 返回:转换成功返回 0 ,非法输入与异常返回-1 // https://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f?tpId=37&tqId=21323&tPage=5&rp=&ru=%2Fta%2Fhuawei&qru=%2Fta%2Fhuawei%2Fquestion-ranking #include<iostream> using namespace std; int main(){ int nu...
ALGO
0.999852
4.113929
e19047d8-ab62-4e4d-96d1-2c07e56b8b69
Estiyak-rubs/codeforce
bit++ c++.cpp
#include<iostream> #include<string> using namespace std; int main() { int t,x(0); cin>>t; string a; while(t--) { cin>>a; if (a[1]=='+') { ++x; } else { --x; } } cout<<x<<endl; return 0; }
ALGO
0.999528
3.907457
f9ae3614-6581-4699-8847-dd57790d929e
elvircrn/ccppcodes
z-prave (2).cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> using namespace std; struct dupli { long long int prvi, drugi; dupli () {} dupli (long long int _prvi, long long int _drugi) {prvi = _prvi; drugi = _drugi;} }; vector <dupli> garden; int x, y, so...
ALGO
0.999833
4.048571
30289106-4f5b-46f5-9b6b-3e37673f2116
zee-bit/Competitive-Programming-codes-CPP
Copy-paste.cpp
#include <bits/stdc++.h> using namespace std; using namespace std::chrono; typedef long long ll; typedef long double ld; struct custom_hash; #define ff first #define I insert #define ss second #define maxN 300002 #define inf INT_MAX #define ninf INT_MIN #define pb push_back #define popb pop_back #define pf push_front #...
ALGO
0.99991
4.025739
9d7a7474-41db-42b8-9348-cabedd1431a1
Arsh-ak7/Algo
rotateLL.cpp
ListNode* rotateRight(ListNode* head, int k) { if(!head || !head->next) return head; ListNode* curr=head , *fast=head,*slow=head; int cnt=0; while(curr) cnt++,curr=curr->next; k=k%cnt; if(k==0) return head; while(k--) fast=fast->next; ...
ALGO
0.999958
5.261445
435354f4-d226-4249-8173-587ed1279075
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_7955_6.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> inline bool cmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; } template <typename T> inline bool cmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; } int main() { int n, i; scanf("%d", &n); if (n == 5) { puts("1 2 3"); puts("1...
ALGO
0.999957
3.106681
845f8d18-e554-4d98-9dd3-6110f03c110b
pkoi5088/ProblemSolve
baekjoon/cpp/2011.cpp
#include <iostream> #include <string> #include <vector> #define MOD 1000000 using namespace std; int solve() { vector<int> dp; string s; cin >> s; if (s[0] == '0') return 0; dp.resize(s.size() + 1, 0); dp[0] = dp[1] = 1; for (int i = 2; i < s.size() + 1; i++) { int num = (s[i - 2] - '0') * 10 + (s[i - 1] -...
ALGO
0.999966
4.844025
73f2bb88-2624-4ae8-ac0b-73dbe1aa520c
zee-bit/Competitive-Programming-codes-CPP
testFile.cpp
#include <bits/stdc++.h> using namespace std; using namespace std::chrono; typedef long long ll; // unhackable custom hash for unordered_map // Credits : neil struct custom_hash { size_t operator()(uint64_t x) const { static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();...
ALGO
0.99989
4.333588
034eb371-d27d-4ba2-9474-fb5b071b933c
yukristina/amazon-clone
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.998693
6.797273
9fddc355-b5f7-4f6e-9957-3f6f0398721d
gsouvik07/Cpp-07
pattern.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; int i=1; while (i<=n) { int j=i; while (j<=n) { cout<<1; j=j+1; } cout<<endl; i=i+1; } return 0; }
ALGO
0.999863
3.431286
7daac5ab-3856-486a-9248-04b9797ecfe9
Mulab11/cntt2016-hw1
TC-SRM-593-div1-450/lx.cpp
#include <bits/stdc++.h> #define rep(i, x, y) for (int i = (x), _ = (y); i <= _; ++i) #define down(i, x, y) for (int i = (x), _ = (y); i >= _; --i) #define x first #define y second #define mp make_pair #define pb push_back #define bin(x) (1<<(x)) #define LX_JUDGE using namespace std; typedef long long LL; typedef pai...
ALGO
0.999825
4.109279
acaed12f-c8d3-46ec-883a-2a4f8b01cf28
dyed-eye/cpp-and-unix
lab_02/src/main.cpp
#include <iostream> #include <chrono> #include <random> #include "functions.h" using namespace std; int main() { char i = 'y'; while (tolower(i) == 'y') { int n; cout << "Define the number of iterations: "; if (!(cin >> n) || n <= 0) { cerr << "Zero or NaN value encountered"; return 4; ...
ALGO
0.949885
5.57514
b3c6caac-98e6-4c0e-b67c-8927381a3b6c
stefanos1316/Rosetta-Code-Research
Scripts/Task/leap-year/c++/leap-year.cpp
#include <iostream> bool is_leap_year(int year) { return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); } int main() { for (auto year : {1900, 1994, 1996, 1997, 2000}) { std::cout << year << (is_leap_year(year) ? " is" : " is not") << " a leap year.\n"; } }
ALGO
0.965402
4.612985
52e1247b-4b19-4858-be6a-49fa3854259b
ebarylko/cpp-exercises
word-count/word_count.cpp
#include "word_count.h" #include <algorithm> #include <regex> using namespace std; namespace word_count { const map<string, int> words(const string &str) { string lower; transform(str.begin(), str.end(), back_inserter(lower), ::tolower); const regex words_regex("\\w+([\\w']*\\w+)?"); sregex_iterator...
ALGO
0.986725
5.671503
9d9f8d0f-903f-4d37-967c-96223bbccc84
gaoxifeng/Feature-Preserving-Octree-Hex-Meshing
extern/libigl/python/py_igl/py_min_quad_with_fixed.cpp
// Wrap the data class, no properties are exposed since it is not necessary py::class_<igl::min_quad_with_fixed_data<double> > min_quad_with_fixed_data(m, "min_quad_with_fixed_data"); min_quad_with_fixed_data .def(py::init<>()); m.def("min_quad_with_fixed_precompute", [] ( const Eigen::SparseMatrix<double>& A, c...
ALGO
0.981699
5.478536
97eb900d-f63e-4314-b0d2-875ada00bf4f
ishandutta2007/codeforces
icecuber/normal/1184/B1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); int ns, nb; cin >> ns >> nb; vector<int> a(ns); for (int i = 0; i < ns; i++) cin >> a[i]; vector<pair<int,int>> dg(++nb,{0,0}); for (int i = 0; i < nb; i++) cin >> dg[i].first >> ...
ALGO
0.999949
3.100858
659558ca-417e-428d-921b-f6bcc6c7061f
ishandutta2007/codeforces
deemo/normal/508/A.cpp
#include<vector> #include<iostream> #include<algorithm> #include<cmath> #include<queue> #include<string> #include<utility> #include<map> #include<stack> using namespace std; int n , m , k; const int max_n = 1000 + 10; bool jadval[max_n][max_n]; bool check(int a , int b){ if ( jadval[a - 1][b - 1] == 1 && jadval[...
ALGO
0.999974
3.636132
60518869-3553-4428-8356-2bdb64d81050
Arshita-k/DSA_C_plus_plus
Dynamic_Programming/FrogJump.cpp
#include <bits/stdc++.h> using namespace std; int FrogJump(int n,vector<int>&arr,vector<int>&dp) { if(n==0) return 0; if(dp[n]!=-1) return dp[n]; int jumpTwo=INT_MAX; int jumpOne=FrogJump(n-1,arr,dp)+abs(arr[n]-arr[n-1]); if(n>1); jumpTwo=FrogJump(n-2,arr,dp)+abs(arr[n]-arr[n-2]); ...
ALGO
0.999972
4.833461
19db9b90-1cb9-4b1c-9f25-b92772d02d0b
Kaarti22/Solutions_DSA_CP
Contests/Codeforces_Round_996_Div.2/A_Two_Frogs.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define vi vector<int> #define vvi vector<vector<int>> #define MOD 1000000007 #define pb push_back #define popb pop_back #define rep(i,a,b) for(int i=a; i<b; i++) #define all(v) v.begin(),v.end() void inparr(int arr[], int n){ for(int i=0;i<n;i++...
ALGO
0.999794
4.156569
474d60c8-9a97-4867-a697-9daeb16e58bb
hemanggs/Comptetitive-Programming
BLACK BOX/Anand Oza ( best for black box)/algo-lib-master/test/data_structures/union_find_rewindable/connect_and_disconnect/connect_and_disconnect.cpp
// Problem: https://codeforces.com/gym/100551/problem/A #ifdef ONLINE_JUDGE #include <fstream> std::ifstream cin("connect.in"); std::ofstream cout("connect.out"); #else #include <iostream> #endif using namespace std; // {{{ data_structures/union_find_rewindable }}} int main() { int N, K; cin...
ALGO
0.999885
4.685309
5e3f6a31-bef0-4ce0-8681-baa161cd4a85
lychihuy/C-
New folder/ktragk/ham nhap xuat mang.cpp
#include <iostream> using namespace std; void nhapmang (int a[], int n) { for (int i=0;i<n;i++){ cout<<"nhap phan tu thu a["<<i<<"]: "; cin>>a[i];} } void xuatmang (int a[],int n) { for(int i=0;i<n;i++) cout <<a[i] <<" "; } int timkiem(int a[],int n,int x) { int vt=0; while (vt < n && a[vt] != x) vt++;...
ALGO
0.999255
3.690028
e85a4978-e5fd-4bf1-80d0-00d0de272b30
sagar1024/not-mycppjourney
CP/Codeforces/2. First 100 problems/63. Bachgold problem.cpp
// A. Bachgold Problem // time limit per test1 second // memory limit per test256 megabytes // inputstandard input // outputstandard output // Bachgold problem is very easy to formulate. Given a positive integer n represent it as a sum of maximum possible number of prime numbers. One can prove that such representatio...
ALGO
0.999933
4.782292
b0923d2a-83ef-4423-8912-4929ea382297
MakinoRuki/Codeforces
GlobalRound13/1491B.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <map> #include <set> #include <unordered_set> #include <unordered_map> #include <deque> #include <cmath> #include <queue> #define eps 1e-7 #define M 21 #define N 100005 #define SZ 200000002 using namespace std; type...
ALGO
0.999705
4.495312
531cdac9-3558-4686-b32b-6d2cde6ca65f
hjiang13/LLMs-in-IR
POJ-104/64/2758.cpp
#include <iostream> using namespace std; int main(){ int n,c,a,b,i,o,p,k; double e; cin >> "%d",&n); double jl[n][n]; int x[n],y[n],z[n]; k=n*(n-1)/2; for(i=0; i<n; i++){ cin >> "%d%d%d",&x[i],&y[i],&z[i]); } for(a=0; a<n; a++){ b=a+1; while(b<n){ jl[a][b]=sqrt((x[a]-x[b])*(x[a]-x[b])+(y[a]-y[b])*(y[a]-y[b])+(z[a]-z[b]...
ALGO
0.999681
3.462474
7d53c2d7-3e82-461b-a1ac-c28f87ba0af8
a7med7amed7/Problem-Solving
CP/CF_ROUND19_B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define f(i, a, n) for (int i = (a); i <= (n); i++) #define ff first #define ss second int findMEX(int num) { bool temp[103] = {0}; if (num > 102) ...
ALGO
0.999673
5.068611
98d3648f-1d22-4f5a-8986-378d37f80a33
PerfectLifeG/Algorithm-Competition
PracticeMakesPerfect/PTA/2024天梯赛/未命名6.cpp
#include<bits/stdc++.h> using namespace std; #define all(x) x.begin(),x.end() #define endl '\n' #define PII pair<int,int> #define x first #define y second const int N=101; int dir[4][2]={1,0,0,1,-1,0,0,-1}; PII ed; int book[N][N]; int main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n,m;cin>>n>>m; int ...
ALGO
0.999882
4.357644
9196f676-5e1b-458d-b3fd-a15041507c65
esl-epfl/xheep_matrix_spec
llvm-project/libc/src/math/generic/log10f.cpp
#include "src/math/log10f.h" #include "common_constants.h" // Lookup table for (1/f) #include "src/__support/FPUtil/FEnvImpl.h" #include "src/__support/FPUtil/FMA.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/FPUtil/PolyEval.h" #include "src/__support/FPUtil/except_value_utils.h" #include "src/__s...
ALGO
0.996345
7.035101
48f35c9c-77dc-4f74-bd58-4fed1e0ca420
Saksham2371/DSA
Arrays/Merge2sortedArray.cpp
#include "iostream" #include "vector" using namespace std; int merge(int arr1[], int size1, int arr2[], int size2, int arr3[]) { int i = 0, j = 0, k = 0; while (i < size1 && j < size2) { if (arr1[i] < arr2[j]) { arr3[k] = arr1[i]; //{ k++; // arr3[k+...
ALGO
0.999939
4.784032
d531e362-616a-4499-b0af-0b78c59537be
kmr-rohit/CpCodeBase
codeforces/231/A.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double lld; const ll mod=1e9+7; #define endl "\n" #define ff first #define ss second #define pb push_back #define lb lower_bound #define ub upper_bound #define print(a) for(auto i:a)cout<<i<<" ";cout<<endl; #define fast ios_base::syn...
ALGO
0.999887
3.809382
2ff74482-ed53-4416-a28e-bb6fe64d644e
paras-13/DSA
CPP/Array/binary_search.cpp
// Search an element using binary search /* Binary Search is defined as a searching algorithm used in a sorted array by repeatedly dividing the search interval in half. -> Best case Time Complexity :- O[1]; -> Average caase Time Complexity :- O[logn]; -> Worst caase Time Complexity :- O[logn]; -> Auxiliary spa...
ALGO
0.999675
6.777185
3f2d74b0-26f4-4038-b146-e1c66d883523
AhJo53589/leetcode-cn
problems/maximum-number-of-occurrences-of-a-substring/SOLUTION.cpp
////////////////////////////////////////////////////////////////////////// //int maxFreq(string s, int maxLetters, int minSize, int maxSize) //{ // int ans = 0; // unordered_map<string, int> cnts; // vector<int> chars(26, 0); // vector<int> tmpChars(26, 0); // int curLetters = 0; // string curStr = ""; // // for (si...
ALGO
0.999896
5.821505
54849c47-02eb-498c-bdf7-8b90b6135ae4
mollah2022/code
longest_segment.cpp
//Bismillahir Rahmanir Rahim #include<bits/stdc++.h> using namespace std; #define ll long long #define FAST ios_base::sync_with_stdio(0); cin.tie(0); #define tst int t; cin >> t; while(t--) #define yes cout << "YES\n"; #define no cout << "NO\n"; int32_t main(){ FAST int n; cin >> n; ...
ALGO
0.999824
3.987417
18bac8d8-810c-4743-8d44-3695f3dc3551
KartikSareen18/Data-Structures
Priority Queue/HeapSort.cpp
#include <iostream> using namespace std; void removeMin(int input[],int n); void inplaceHeapSort(int input[], int n){ for(int i=1;i<n;i++) { int childIndex=i; while(childIndex>0) { int parentIndex=(childIndex-1)/2; if(input[parentIndex]>input[childIndex]) ...
ALGO
0.999957
4.006375
4ae32ddf-b92a-4bc1-8fa4-5c9ec5eda4ad
abhisheknaiidu/dsa
Other/Codechef/Long Challenges/August 20/Return of the Jedi.cpp
/****************************************** * AUTHOR : Abhishek Naidu * * NICK : abhisheknaiidu * ******************************************/ #pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <cstdlib> #include <exception> #include <fstream> #include <fun...
ALGO
0.99997
3.519431
5bf05f42-f2f4-498a-aae0-3dedd4d90000
JARG199919/Ejercicios-y-ejemplos
Ejercicios-semana-9/Arboles-ABB.cpp
#include <iostream> using namespace std; struct Nodo { int dato; struct Nodo *izquierdo; struct Nodo *derecho; struct Nodo *padre; }; struct Nodo *Crear(int n, struct Nodo *padre); void InsertarArbolABB(struct Nodo *&arbol, int n, struct Nodo *padre); void Inorden(struct Nodo *arbol); void Preorden(s...
ALGO
0.998918
5.007681
4b9eb6b1-d72b-43c9-9fce-cee323e94c62
erickeneves/Code-C
Número é perfeito ou não perfeito.cpp
#include <stdio.h> main() { int num, d, soma=0; printf("Digite um numero:"); scanf("%d", &num); for (d = 1; d <= num/2; d++) if (num % d == 0) soma += d; if (soma==num) printf("\nO total de %d e perfeito", num); else printf("\nO numero %d nao e perfeito!", num); }
ALGO
0.998639
3.470597
ed342d3b-bb55-4fd1-9063-6c4d497305d9
aziz0x00/mysolvings
Competitive Programming/CSES Problem Set/intro/bit_strings.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); ll n, s = 1; cin >> n; while (n--) s = (s << 1) % 1000000007; cout << s << "\n"; }
ALGO
0.99996
4.230519
c8ccae19-203e-4272-8b87-9543829f6700
tKrul/Thuat-toan-NITC
4_3.cpp
#include <bits/stdc++.h> using namespace std; int n,k,stop=0,a[100]; void khoitao(){ for(int i=1;i<=k;i++){ a[i]=i; } } void xuat(){ for(int i=1;i<=k;i++){ cout<<a[i]<<" "; } cout<<endl; } void sinh(){ int i=k; while(a[i]==n-k+i)i--; if(i==0){ stop=1; } e...
ALGO
0.999956
3.417338
fb8702ae-b641-4de4-abb4-440a5f22dc2e
Satyam-79/Cpp
Learning/floyd_triangle_OR_continuous_number_triangle.cpp
#include <iostream> using namespace std; int main() { int temp = 1; for (int i = 1; i <= 5; i++) { for (int j = 1; j <= i; j++) { cout << temp << " "; temp++; } cout << endl; } return 0; }
ALGO
0.999858
3.61132
e0e55dde-e002-4055-aa6c-4b2a3ab79da0
SpartanJ/eepp
src/tools/ecode/keybindingshelper.cpp
#include "keybindingshelper.hpp" namespace ecode { void KeybindingsHelper::updateKeybindings( IniFile& ini, const std::string& group, Input* input, std::unordered_map<std::string, std::string>& keybindings, const std::unordered_map<std::string, std::string>& defKeybindings, bool forceRebind, const std::map<std::s...
TOOL
0.92219
7.688481
0326afbb-4707-4617-a700-e281154513e9
Anshika91/leetcode_problems
0136-single-number/0136-single-number.cpp
class Solution { public: int singleNumber(vector<int>& nums) { map<int, int> mymap; for(int num : nums){ if(mymap.find(num)==mymap.end()){ mymap[num] = 1; }else{ mymap[num] += 1; } } for(map<int, in...
ALGO
0.999989
5.613628
91ddb86d-1e52-4220-8f83-fce1588df715
RutanshSantoki/C-Self
ex2code3a.cpp
#include<iostream> using namespace std; inline int fact(int x); int main() { int n,ans; cout<<"Enter The Number You Want A Factorial Of: "; cin>>n; ans=fact(n); cout<<"Factorial of Given Number Is= "<<ans; return 0; } inline int fact(int x) { if(x==1) return 1; retu...
ALGO
0.998878
3.598413
ae9b7ae7-80e4-4f17-a7f7-6c1cdc3de1a8
alamgir65/Week-01
B_ICPC_Balloons.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n; cin>>n; string s; cin>>s; int frq[26]={0}; for(int i=0;i<n;i++){ if(frq[s[i]-'A']>0){ frq[s[i]-'A']++; } else{ frq[s[...
ALGO
0.999881
4.057019
fb9a88fa-d572-4428-bf8f-3aff480d90ef
devanshV18/DSA
BinarySearch/peakElement.cpp
#include<vector> #include<iostream> using namespace std; int findPeak(vector<int> &v){ int n = v.size(); if( n == 1 ){ return 0; } //handling extremee peaks if(v[0] > v[1]){ return 0; } if(v[n-1] > v[n-2]){ return n-1; } int low = 1; high = n-2; whil...
ALGO
0.999949
4.793974
e8be61ca-99b4-4c93-bd41-d13ee77f8a3d
yashthakur16/DSA-Patterns
Pattern 4 Merge Intervals/Merge Intervals.cpp
class Solution { public: vector<vector<int>> merge(vector<vector<int>>& intervals) { vector<vector<int>> ans; sort(intervals.begin(),intervals.end()); ans.push_back(intervals[0]); for(int i=1;i<intervals.size();i++) { ...
ALGO
0.999998
6.081538
b3e50f3e-9126-4f13-bd72-b565d09c8fe8
KhoaText/Khoa-s-CODESTORAGE
codeforces/50A.cpp
#include <bits/stdc++.h> using namespace std; #define MOD (ll)(1e9+7) #define pb push_back #define fi first #define se second #define FOR(i,l,r) for(ll i=(l),_r=(r);i<=_r;i++) #define FOR_NGUOC(i,r,l) for(ll i=(r),_l=(l);i>=_l;i--) #define print(a) cout<<(a)<<"\n"; typedef long long ll; typedef long double ld; #define ...
ALGO
0.998649
3.093927
e0f4cb4e-99ec-4eb8-8f4a-8b8997172073
gamereward/cocos2dx_sdk
Classes/BigDecimal.cpp
#define _ASSERT(cond) ((!(cond)) ? _assert(#cond,__FILE__,__LINE__) : _noassert()) #include "BigDecimal.h" #include <string.h> #include <stdlib.h> #include <iostream> #include <stdio.h> static int _scale = 100; static const std::string ONE ("1"); static const std::string ZERO ("0"); static const std::string TEN("10")...
TOOL
0.98967
4.878762
23706c63-33e5-4213-a0cd-e04d9ecb37d6
fractal-platform/fractal-cdt
tools/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
#include "clang/StaticAnalyzer/Core/PathSensitive/SimpleConstraintManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" namespace clang { namespace ento { SimpleConst...
TOOL
0.880627
7.320325
d0f3aefa-96ac-4de0-be66-5ca79d751371
PauloDavi/aac_projeto_final
open_mpi.cpp
#include <bits/stdc++.h> #include <mpi.h> #include "data.hpp" uint8_t rand_num(int min = 1, int max = n_cities) { return (uint8_t)(min + rand() % (max - min)); } int calc_path_length(uint8_t *stops) { int length = 0; for (int i = 0; i < n_cities; i++) length += distances[stops[i]][stops[i + 1]]; return l...
ALGO
0.999988
4.56544
361a5c7c-f6dc-4bc1-ace9-08b152aed928
Mixficsol/Daily
CCW4a.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <string.h> #include <string> #include <queue> using namespace std; int t, n, c, m; char a[51]; int mark[1100000]; struct fin { int num; int len; string psw; }; void bfs() { queue<fin> q; fin x, y; x.num = 0; x.len = 0; x.psw = ""; mark[x....
ALGO
0.999686
3.301689
724f0a46-1b45-47d6-87da-0fdbe1716894
nicolasllerenas/programacion-3
s12/main-1.cpp
#include <iostream> #include <stack> #include <queue> #include <sstream> using namespace std; // Precedencia de los operadores int precedencia(char operador) { if (operador == '+' || operador == '-') return 1; if (operador == '*' || operador == '/') return 2; return 0; } // Función para convertir expresi...
ALGO
0.999954
5.919407
e6a1c49f-b904-4e29-8e0f-967c833ab56e
ztwater/LeetCode
Solutions/BiWeeklyContest10/1215 Stepping Numbers/01.cpp
//1215 Stepping Numbers class Solution { public: /* bool step(int a) { if (a <= 10) return true; int last; int lab = 0; while (a > 0) { if (lab == 0) { lab = 1; last = a % 10; a /= 10; } else { ...
ALGO
0.999568
5.192519
4ad4320d-51ca-4e52-9de9-fb796eeb4db9
mattocallaghan/PNS
PNS-2/ass2.cpp
/* ============================================================================ Practical Numerical Simulations Assignment 1 Question 2 Matthew O'Callaghan: 16317515 ============================================================================ */ #include<iostream> #include<vector> #include<ioma...
ALGO
0.999863
3.89972
262e7b2b-b716-4818-9a17-b50fa80d38a4
chongin12/Problem_Solving
acmicpc.net/old/1939.cpp
#include <bits/stdc++.h> using namespace std; const int INF=1987654321; vector<pair<int, int> > G[10001]; int visited[10001]; int main(){ ios::sync_with_stdio(0); cin.tie(0); int N, M; cin>>N>>M; for(int i=0; i<M; ++i){ int u, v, w; cin>>u>>v>>w; G[u].push_back({v,w}); G[v].push_back...
ALGO
0.999989
4.955038
afb3e208-3a5c-4036-9df1-faee2783785b
WhatTheMUCK/LeetCode
0036-valid-sudoku/valid-sudoku.cpp
class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { vector<int> check(10, 0); for (int i = 0; i < board.size(); i++){ check.assign(check.size(), 0); for (int j = 0; j < board[0].size(); j++){ if (board[i][j] != '.'){ ...
ALGO
0.999523
6.632622
73f31884-4e8c-4622-8e2b-9119d62618f3
gaurav1620/Competitive-Coding
Codechef/kmp.cpp
#include<bits/stdc++.h> /* * author : Gaurav Khairnar * github : github.com/gaurav1620 * codechef : gaurav_1620 * codeforces : gaurav1620 * # Dont compare yourself with anyone in this world.If you do so, you are insulting youreself . */ #define Ninja ios::sync_with_stdio(false);cin.tie(NULL); #define fo...
ALGO
0.999953
3.940816
6f527e37-ab37-4cce-8259-971eeae694a5
sigma390/DSA-Codes-Complete
TCS NQT prep/bizotic/coding set 0/pageTurns.cpp
// QUESTION 3 // Problem Statement:- Hobo’s Drawing teacher asks his class to open their books to a page number. Hobo can // either start turning pages from the front of the book or from the back of the book. He always turns pages one at a // time. When she opens the book, page 1 is always on the right side: When he fl...
ALGO
0.999876
4.334547
00300f15-9e47-4c7c-8388-e2b67ba8dff9
vicvlzqz/data_structures
driver.cpp
#include <iostream> #include <string> #include "btree.h" using namespace std; void test_btree_search(); void test_btree_insert(); void test_btree_delete(); void misc_btree_test(); void let_user_test_btree(); int main() { //These are tests we created to test search insert and delete //Uncomment let_user_test_btree() t...
TEST
0.982015
4.608289