uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
cb809b46-e72b-4e12-afbc-38c47c179052
gpsnmeajp/VirtualMotionTracker
eigen-3.3.7/demos/mandelbrot/mandelbrot.cpp
#include "mandelbrot.h" #include <iostream> #include<QtGui/QPainter> #include<QtGui/QImage> #include<QtGui/QMouseEvent> #include<QtCore/QTime> void MandelbrotWidget::resizeEvent(QResizeEvent *) { if(size < width() * height()) { std::cout << "reallocate buffer" << std::endl; size = width() * height(); i...
ALGO
0.870949
5.796075
42c3c190-2f37-40ee-960b-c8da6b9ce5f1
jeongwoo-gobroad/Practical-Algorithms-24Q1
02_Longest_Collatz/main.cpp
// KNU CSE 2021114026 Jeongwoo Kim // AX2.6, Collatz Conjecture w/ advanced iterative counting #include <iostream> #include <vector> #include <algorithm> using namespace std; typedef unsigned long long ultLong; vector<ultLong> createCollatz(ultLong target, int& length) { vector<ultLong> trigger; while (targ...
ALGO
0.999919
4.847927
24f93349-0e54-46fe-bd85-f7dc29e6117b
wkqls0829/codingprac
baekjun/b2/quadrant.cpp
#include <iostream> using namespace std; int main(void){ int x, y; cin >> x >> y; cout << 2 + 2*(y < 0) - (x*y > 0); return 0; }
ALGO
0.999917
3.361933
5fe4933e-1438-4509-8e7b-8043da64c59a
manikanta2901/ubuntu
.history/SRM/DAA/Algorithms/Backtracking/Functions_20210526203654.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin >> a >> b >> c >> d; cout << max(max(a,b),max(c,d)) << e return 0; }
ALGO
0.999056
3.581928
b04b449f-9714-4e6a-adb7-659057f8280d
hollywoodcoin-project/HollyWoodCoin
src/zerocoin/Accumulator.cpp
/** * @file Accumulator.cpp * * @brief Accumulator and AccumulatorWitness classes for the Zerocoin library. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This project is...
TOOL
0.91686
6.519381
83119f17-b437-44b9-be16-91ff9e284457
robert2653/ITSA
2311.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; void solve() { int n; cin >> n; vector<string> ordered(n); map<string, ll> mp; for (int i = 0; i < n; i++) { string s; cin >> s; ordered[i] = s; mp[s]; } string out; while (cin >> out) { if (...
ALGO
0.999594
4.002933
0e24b2af-483a-4db1-8759-68a483bb6def
Vertexwahn/rules_embree
third_party/embree-3.13.0-with-tbb-sse42/kernels/subdiv/bspline_curve.cpp
#include "bspline_curve.h" namespace embree { PrecomputedBSplineBasis::PrecomputedBSplineBasis(int dj) { for (size_t i=1; i<=N; i++) { for (size_t j=0; j<=N; j++) { const float u = float(j+dj)/float(i); const Vec4f f = BSplineBasis::eval(u); c0[i][j] = f.x; c1[...
ALGO
0.928148
6.322546
67840f4e-0254-4eb3-97e8-b8f5081880a9
plskz/competitive-programming
Kattis/spavanac.cpp
#include <bits/stdc++.h> #define ll long long #define all(v) (v).begin(), (v).end() #define allr(v) (v).rbegin(), (v).rend() using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int h, m; cin >> h >> m; m -= 45; if (m < 0) { // at first i thought (m-45<0) would work, then...
ALGO
0.99984
5.525186
4c588a1f-d4db-476a-9e11-ecd7a25ca996
uncle-lu/surf-the-internet
luogu/6121.cpp
#include <cstdio> #include <vector> using namespace std; const int N = 2e5+10; vector<int>edge[N]; bool vis[N], ans[N]; int line[N]; int father[N]; int find_father(int x) { return father[x] == x ? x : father[x] = find_father(father[x]); } int main() { int n, m; scanf("%d %d", &n, &m); for(int i = 1; ...
ALGO
0.999994
4.231869
7d749ff9-885f-4a04-985c-0c6fb67cd46e
PhuocVinhLee/online_system_exam_quiz_programming
online_exam_system_backend/temp/oagqyjp.cpp
#include<stdio.h> int add(int a){ int sum; sum = a + a; return sum; } int main() { int a = 3; int test; test = add(a); printf("%d", test); return 0; }
ALGO
0.953761
3.530625
fcbd567c-05ce-4a27-a09e-0f7ed0db9d99
Renumber/algorithm
ch21.queue, deque/10866/10866.cpp
/* 정수를 저장하는 덱(Deque)를 구현한 다음, 입력으로 주어지는 명령을 처리하는 프로그램을 작성하시오. 명령은 총 여덟 가지이다. push_front X: 정수 X를 덱의 앞에 넣는다. push_back X: 정수 X를 덱의 뒤에 넣는다. pop_front: 덱의 가장 앞에 있는 수를 빼고, 그 수를 출력한다. 만약, 덱에 들어있는 정수가 없는 경우에는 -1을 출력한다. pop_back: 덱의 가장 뒤에 있는 수를 빼고, 그 수를 출력한다. 만약, 덱에 들어있는 정수가 없는 경우에는 -1을 출력한다. size: 덱에 들어있는 정수의 개수를 출력한다. emp...
ALGO
0.999171
4.605271
f5b56767-2f54-48ca-ba8b-bacbe84b312d
yooooozi0601/2025aaib
week14-1,2.cpp
//week14-1.cpp #include <stdio.h> int main() { int a[100]; int N,t=1; while( scanf("%d",&N) ==1){ int bad=0; for(int i=0;i<N;i++){ scanf("%d",&a[i]); if(i>0) if( a[i-1] >= a[i]) bad=1; } int table[20002] ={}; for(int i=0;i<N;i++){ for(int j=i;j<N;j++){ int now=a[i]+a[j]; if(table[now]>0)...
ALGO
0.988826
3.630436
11fd8a08-c06b-4cbf-b504-a478dcf147c0
raincross7/code-similarity
codes/train_code/problem289/problem289_424.cpp
#include <bits/stdc++.h> using namespace std; // XOR[0, 2^M)= (M==1) ? 1 // : 0; int main(){ int M,K; cin >> M >> K; int ub= 1<<M; if(K>=ub){ cout << -1 << endl; } else if(M==1){ if(K==0){ cout << 0 <<" "<< 0 <<" "<< 1 <<" "<< 1 << endl; } else{ cout << -1 <<...
ALGO
0.999855
3.480091
1a12b3fe-82c9-431e-ae42-ca7ebf2b2edd
Sudipta638/DSA
Tree/Bst/TwozSum.cpp
#include <bits/stdc++.h> using namespace std; class TreeNode { public: int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class BSTIterator { private: stack<TreeNode*> st; stack<TreeNode*>Revst; void helper1(TreeNode* root){ if(root==N...
ALGO
0.999997
5.755604
4172ee19-5f76-4473-8416-b3b9f62f952d
Shell-Wataru/AtCoder
ARC/ARC006/A.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <iomanip> #include <cmath> using namespace std; int main() { // 整数の入力 long long temp; vector<long long> Es; bool includesB = false; long long B; vector<long long> Ls; for (in...
ALGO
0.999814
3.42469
05d8d137-5be4-42d3-9cfc-b3a22008a662
YooBIK/Algorithms
BOJ/Solutions/#3.cpp
#include <iostream> #include <algorithm> using namespace std; int arr[100] = {0,}; int ans[100]={0,}; int n; int main(){ cin >> n; for(int i=0;i<n;i++){ cin >> arr[i]; } ans[0]= arr[0]; ans[1]= max(arr[0],arr[1]); for(int i=2;i<n;i++){ ans[i] = max(ans[i-1],ans[i-2]+arr[i]); ...
ALGO
0.999945
3.860622
11121d4a-abfe-4066-bc7d-0551442192ef
xxcpeter/CS290P_Project
test/main.cpp
// // Created by zhuangzm on 2021/12/20. // #include <iostream> #include "softHeap.h" using namespace std; int main() { int r; cin >> r; cout << "r = " << r << endl; Softheap sh = Softheap(r); int i = 1, iCount = 0, dCount = 0, pCount = 0; char op; while (cin >> op){ bool exit = fa...
ALGO
0.974143
3.979775
55b8d443-2a95-4107-a81f-3b074e96caa2
akgarhwal/Sports-Programming
Hacker-Rank/LCS-DP.cpp
// Longest Common Subsequence /* 5 6 1 2 3 4 1 3 4 1 2 1 3 Ans : 1 2 3 */ // author = "akgarhwal" #include <iostream> using namespace std; int n,m; int a[10001],b[1001]; int memo[1001][1001]; int LCS(int i,int j){ if(i<0 or j<0 ){ return 0; } if(memo[i][j]!=-1){ return memo[i][j]; } int ans=0; ans = max(LCS...
ALGO
0.999996
3.095865
31e69177-21b8-405c-9306-7ecb189778fc
SeireiA/Porting_loongarch_thunderbird78
intl/icu/source/i18n/uitercollationiterator.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION #include "unicode/uiter.h" #include "charstr.h" #include "cmemory.h" #include "collation.h" #include "collationdata.h" #include "collationfcd.h" #include "collationiterator.h" #include "normalizer2impl.h" #include "uassert.h" #include "uitercollationiterator.h" U...
TOOL
0.875067
6.621858
2c45a0dd-d429-439b-976f-c8ec7f759b02
sakshixjain/dsa-question-cpp
IMPORTANT-QUE/rat_maze.cpp
#include <iostream> #include<vector> using namespace std; bool isSafe(int x, int y, int row, int col, int rat[][4], vector<vector<bool> > &visited){ if(((x>=0 && x<row) &&(y>=0 && y<col)) && ( rat[x][y]==1) && ( visited[x][y]==false)){ return true; } else{ return false; } } void solvemaze(int ra...
ALGO
0.999927
4.320799
0c6f3c6c-4de3-4293-96f5-701fdefd6d60
nikunj22-cloud/Leet-Code
0084-largest-rectangle-in-histogram/0084-largest-rectangle-in-histogram.cpp
class Solution { public: vector<int>nextSmaller( vector<int>& heights , int n){ stack<int>s; vector<int>Ans(n); s.push(-1); for( int i = n-1 ; i>=0 ; i--){ int curr = heights[i]; while( s.top() != -1 && heights[s.top()]>= curr){ s.pop(); } Ans[i] = s.top()...
ALGO
0.999991
6.622697
84d2cb26-21a3-46a6-8349-6f0def120b67
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_3986_5.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; int F[6], k, q, x, y, i, j, mi[6]; long long f[N]; inline void conv(int w, int v, int c) { static long long nf[N]; static int q[N]; int he, ta, i, j; memcpy(nf, f, sizeof f); for (i = 0; i < v; ++i) { q[he = ta = 1] = 0; for (j = 1; ...
ALGO
0.999745
3.4135
41fd83e6-ba2d-4286-8396-299e49dc6768
Avergreen16/gravsim
complete save 7_19_2022/src/folder/voronoi_generator.cpp
#define _USE_MATH_DEFINES #include <SFML-2.5.1\include\SFML\Graphics.hpp> #include <cmath> #include <vector> #include <iostream> #include <ctime> #include <string> #include <stdio.h> #include <quadmath.h> struct RNG { double factor; double product; void set_seed(double p_seed, double p_factor) { f...
ALGO
0.997924
4.441683
12005bfb-fbfb-4936-8a31-62ef1778855c
amirullahizzan/gamekiso-School-
20240124/ゲームプログラム基礎_課題24_2302gp0001_アミルライザン/program/Hit.cpp
#include "Main.h" #include "Game.h" #include "Hit.h" //--------------------------------------------------------------------------------- // ~m̓蔻iW Float2 no[Wj //--------------------------------------------------------------------------------- bool CheckCircleHit( Float2 &center1, float radius1, Float2 &center2, float...
TOOL
0.983964
4.572065
54cc2fcf-132e-4468-b647-95e56525c2f0
Mohamed-Hossam/Problem-Solving
codeforces/606-D/606-D-14760008.cpp
//In the name of Allah #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<vector> #include<set> #include<map> #include<queue> #include<stack> #include<iterator> #include<cmath> #include<string> #include<sstream> #include<cstring> #include<ctype.h> #include<iomanip> #include<functional> #inc...
ALGO
0.99989
3.25313
89b7c710-f2d9-49b6-903e-2905769fcc9b
Jody-Lu/Array
404_Sum_of_Left_Leaves/sumOfLeftLeaves.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int sumOfLeftLeaves(TreeNode* root) { int res = 0; dfs(res, root); retu...
ALGO
0.999924
6.645061
883d67c3-10f7-4dd7-8e68-22f9c5837401
Mahekjain2706/DSA
dp/Dp on Partition/dp52_BooleanEvaluation.cpp
#include<bits/stdc++.h> using namespace std; // you are given an expression in the form of a string where operands will be :(True or False) , and operations will be :(and,or,xor) // now you have to find the number of ways we can parthesize the expression such that it will evaluate to TRUE. // ans with mod 1e9+7 // alt...
ALGO
0.999988
5.495846
5741b8d5-502c-4dec-a99e-5f1df0c35c1b
llvm-faultinjector/llvm-fault-injector
lib/Analysis/BlockFrequencyInfoImpl.cpp
#include "llvm/Analysis/BlockFrequencyInfoImpl.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/None.h" #include "llvm/ADT/SCCIterator.h" #include "llvm/Config/llvm-config.h" #include "llvm/IR/Function.h" #include "llvm/Support/BlockFrequency.h" #include...
TOOL
0.875448
7.806088
47817921-037c-4e87-b0ca-e44e735f0e5d
M-Ayushi/competitive-programming
codeforces/1951/A..cpp
#include <bits/stdc++.h> #define ll long long #define sz(x) (int)(x.size()) using namespace std; void solve() { int n; cin >> n; string s; cin >> s; int c = 0, f = -1, l = -2; for (int i = 0; i < n; ++i) { if (s[i] == '1') { ++c; if (f == -1) f = i; l = i; } } if (c % 2 || f == l-1) cout << "NO\n"...
ALGO
0.999919
4.491476
b55117b9-4988-4e0a-89b8-69454cecbace
soolabettu/cp
compete/gks_2021_d_final_exam.cpp
#include "bits/stdc++.h" using namespace std; using ll = long long; using vs = vector<string>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using pi = pair<int, int>; using pl = pair<ll, ll>; using vpi = vector<pair<int, int>>; using vpl = vector<pair<ll, ll>>; using ld = double; #define sz...
ALGO
0.999956
4.024521
209334bd-f80d-4163-91b9-2c7a57d151f3
zzhou292/JZ-projectlets
LeetDaily/0035_search_insert_position/sip.cpp
// Author: Jason Zhou #include "../general_include.h" using namespace std; class Solution { public: int searchInsert(vector<int>& nums, int target) { if(nums.size()==0) return 0; int l = 0; int r = nums.size()-1; int mid = l+(r-l)/2; while(l<=r){ mid = l+(r-l)/...
ALGO
0.999943
6.21384
2a75126b-ec67-44d8-a1c1-64112ad8ea7a
chvishalcs/Problem-solving-DSA-
64-minimum-path-sum/minimum-path-sum.cpp
class Solution { public: int minPathSum(vector<vector<int>>& grid) { int m = grid.size(); int n = grid[0].size(); for(int j = 1; j < n; ++j){ grid[0][j] += grid[0][j - 1]; } for(int i = 1; i < m; ++i){ grid[i][0] += grid[i - 1][0]; } ...
ALGO
0.999967
6.083613
5731283e-945e-4fbe-916b-c9a5d856ec09
flyheart/LeetCode
69_Sqrt-X/69_Sqrt-X/SqrtX.cpp
// SqrtX.cpp /** * Implement int sqrt(int x). * Compute and return the square root of x. */ #include <iostream> using namespace std; class Solution { public: int sqrt(int x) { if (0 == x) return 0; return __sqrt(x, 1, x); } private: int __sqrt(int x, int i, int j) { int mid = ...
ALGO
0.999914
5.394582
96254cdd-1030-439e-9c82-7d6e3dd61c67
BaylePark/tjssm.algoalgo
002-priority-queue/3rd/bayle-park.cpp
#include <iostream> #include <string> using namespace std; #define MAX_SIZE 100 template <typename T> struct MinHeap { public: T pop() { const T retval = pq[0]; if (count != 0) { count--; pq[0] = pq[count]; recursive_pop(0); } return retval; }...
ALGO
0.999733
4.059604
b21770f7-fec3-41cc-9217-57ae0c410b26
debanjandgt/Striver-Graph-Series
G-17-Bipartite Graph/bipartile.cpp
class Solution { public: bool bfsKarde(vector<int>adj[],vector<int>& color,int node){ color[node]=0; queue<int> q; q.push(node); while(!q.empty()) { int frontNode=q.front(); q.pop(); for(auto i:adj[frontNode]) ...
ALGO
0.99996
5.952816
b1b690a9-0b56-4c5d-a10e-13419e903328
guoyu07/HGBTool
Tool/HGBFileTool/CompressedFileTool/code/Unrar4iOS/framework/Unrar4iOS-frameWork/unrar/rarvm.cpp
#include "rar.hpp" #include "rarvmtbl.cpp" RarVM::RarVM() { Mem=NULL; } RarVM::~RarVM() { delete[] Mem; } void RarVM::Init() { if (Mem==NULL) Mem=new byte[VM_MEMSIZE+4]; } /********************************************************************* IS_VM_MEM macro checks if address belongs to VM memory pool (...
TOOL
0.853299
4.91679
e4257f95-6711-45a4-adde-6977f87202f5
huguangAOA/Mentu-Algorithm
50.补题课/4.Leetcode-2200.cpp
class Solution { public: vector<int> findKDistantIndices(vector<int>& nums, int key, int k) { int maxq = -k - 2, n = nums.size(); for (int i = 0; i <= k && i < n; i++) if (nums[i] == key) maxq = i; vector<int> ret; for (int i = 0; i < n; i++) { if (i + k < n && nums[i + k...
ALGO
0.999992
5.740343
4866d770-f2ae-4b84-bcb0-73a195f3c1ec
wangqiangcc/skia
src/pathops/SkAddIntersections.cpp
#include "src/pathops/SkAddIntersections.h" #include "include/core/SkPoint.h" #include "include/core/SkTypes.h" #include "include/private/base/SkDebug.h" #include "src/pathops/SkIntersectionHelper.h" #include "src/pathops/SkIntersections.h" #include "src/pathops/SkOpCoincidence.h" #include "src/pathops/SkOpContour.h" ...
ALGO
0.992855
6.286389
9b2dc6bf-2f52-4ee7-baf0-0d0a6ac96aba
muskankapoor/daily_coding
stack_related/parenthesis.cpp
// Given an expression string exp. Examine whether the pairs and the orders of {,},(,),[,] are correct in exp. // For example, the program should print 'balanced' for exp = [()]{}{[()()]()} and 'not balanced' for exp = [(]) #include <stack> #include <string> #include <iostream> using namespace std; void isBalanced(s...
ALGO
0.998975
5.802554
cc88d348-96a9-4383-a2d0-ee6e6009c67d
PrinceSah09/My_LeetCode-Solutions
0129-sum-root-to-leaf-numbers/0129-sum-root-to-leaf-numbers.cpp
class Solution { public: int mainsum=0; void solve(TreeNode*root, int sum){ if (root == NULL) return; sum = sum*10+root->val; if(root->left==NULL && root->right==NULL){ mainsum+=sum; return; } solve(root->left, sum); solve(root->right, ...
ALGO
0.99994
6.094267
c634aaa8-4366-49ba-9583-24bad07cdbb8
rraallvv/video-stabilization
videostab.cpp
/*---------------------------------------------- * Usage: * example_tracking_multitracker <video_name> [algorithm] * * example: * videostab Bolt/img/%04d.jpg * videostab faceocc2.webm KCF *--------------------------------------------------*/ #include <opencv2/core/utility.hpp> #include <opencv2/tracking.hpp> #i...
ALGO
0.998138
5.415876
badbc729-24a9-4a01-a8eb-e6da06c500fb
Kristen012/CtLab-25th-Project
tokenization/encode.cpp
#include <iostream> #include <fstream> #include <vector> #include <map> #include <string> #include <regex> #include <sstream> #include <iomanip> #include <utility> #include <stdexcept> class tokenizer_t { private: std::map<std::string, int> encoder; std::map<int, std::string> decoder; std::vector<std::pair...
ALGO
0.999176
6.439087
1a1182c3-60f5-450d-9875-453d0c122900
jack-margeson/cpp-projects
jotto.cpp/main.cpp
/* jotto.cpp Generates 5 letter words, plays a game of Jotto. Jack Margeson, 04/2019, 6th bell */ // cout << "\033[2J\033[1;1H"; // inclusions and namespace #include <iostream> #include <algorithm> #include <word.h> #include <topten.h> using namespace std; // main program int main(){ // declaration and init char...
TOOL
0.886125
4.955425
721f0a4f-53f9-4f82-8884-d8f8a11d1a22
Manya104/Assignment_BTech2026_2201920130098_DSA
1462-course-schedule-iv/1462-course-schedule-iv.cpp
class Solution { public: void dfs(int node, vector<vector<int>>& graph, vector<unordered_set<int>>& prerequisites, vector<int>& visit) { if (visit[node] == 1) return; visit[node] = 1; for (int neighbor : graph[node]) { dfs(neighbor, graph, prerequisites, visit); prere...
ALGO
0.999239
6.57774
a88d46fc-7ebd-4633-807f-2420ecb89ae6
TranAnhQuoc23521313/UIT_MATRIX
UIT_23521523_MaTrix/Bai110/Bai110.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; void Nhap(int[][500], int&, int&); int kt(int[][500], int, int); void LietKe(int[][500], int, int); int main() { int b[500][500]; int m, n; Nhap(b, m, n); LietKe(b, m, n); return 0; } void Nhap(int a[][500], int& m, int& n) { cout << ...
ALGO
0.999812
3.174462
f63c9a87-fcc9-47c8-be91-8f703a83abf4
ankitjosh78/algorithms
strings/keypad2.cpp
#include <iostream> #include <vector> using namespace std; vector<string> keys = {"", "NULL", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; void keyPad(int input, string output) { int currentDigit = input % 10; if (input == 0) { cout << output << endl; return; } ...
ALGO
0.99983
5.384422
f4f88a45-9643-4f65-9010-8d173073e515
Bear-Go/OJProgram
lib/t.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int maxn = 1e6+1; ll l, r; int prime[maxn], cnt, ans; bool vis[maxn]; void getPrimes() { for (int i = 2; i <= 50000; ++i) { if (!vis[i]) prime[++cnt]=i; for (int j = 1; i * prime[j] <= 50000; ++j) { vis[i*prime[j]...
ALGO
0.999865
3.966335
397d8428-243d-4295-a87d-a93c64c0b24c
Pandeyashoo/Codingrepo
CSES5.cpp
#include<bits/stdc++.h> using namespace std; void solution(int n){ if(n==3 ||n==2){ cout<<"NO SOLUTION"; return; } if(n==1){ cout<<n; return; } else{ for(int i=2; i<=n; i=i+2){ cout<<i<<" "; } for(int i=1; i<=n; i=i+2){ cout<<i<<" "; } ...
ALGO
0.999878
4.110555
900127dd-e969-44b1-b253-6c02b520fd59
ricky-aufvaa/DSA
practice/factorial.cpp
#include <iostream> using namespace std; int fact(int n) { // base case if (n == 0) return 1; if (n == 1) return 1; return n * fact(n - 1); } int main() { int n; cin >> n; int ans = fact(n); cout << ans; }
ALGO
0.999987
5.730269
8e29451c-bd20-40e3-b110-e61b10c6a722
Peterschuellermann/Model-Predictive-Control
src/Eigen-3.3/doc/examples/DenseBase_template_int_middleRows.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(1..3,:) =\n" << A.middleRows<3>(1) << endl; return 0; }
ALGO
0.876942
3.236517
f69972d9-0edd-4759-bd92-a303cdc1071d
atiabjobayer/Codes
OJ/URI/URI1041.cpp
/*************************************************************************** ** Atiab Jobayer ** ** CodeMarshal >> Toph >> CodeForces >> Hust >> URI >> UVa = atiabjobayer ** ** Amtali AK Model Pilot High School ** ** Amtali, Barguna. ** ** Founder & COO ** ...
ALGO
0.999947
3.744925
cf9bdd6e-28dc-47d8-a2c6-ad38eaf8ecf4
goodthebest/setup-digibyte-dgb-algo-Qubit-mining-pool
src/qt/rpcconsole.cpp
#if defined(HAVE_CONFIG_H) #include <config/digibyte-config.h> #endif #include <qt/rpcconsole.h> #include <qt/forms/ui_debugwindow.h> #include <qt/bantablemodel.h> #include <qt/clientmodel.h> #include <qt/platformstyle.h> #include <qt/walletmodel.h> #include <chainparams.h> #include <interfaces/node.h> #include <netb...
TOOL
0.950452
5.114838
8b1f6262-5761-48d4-b41e-a98e7627bd7c
ishandutta2007/codeforces
lqx2005/normal/1558/B.cpp
#include<bits/stdc++.h> #define sz(a) int((a).size()) #define x first #define y second #define pi pair<int, int> #define vi vector<int> #define db double #define i64 long long #define u64 unsigned long long using namespace std; const int N = 4e6 + 10; int n, m, dp[N], pd[N]; int main() { cin >> n >> m; dp[1] = 1, dp...
ALGO
0.999988
4.384587
1d63b696-e20d-4825-b260-e25cd2a40968
gordijb/SP2023
Laboratoriski/7_nedela/SrednaVrednostProsek.cpp
#include <iostream> using namespace std; int main() { int m, n, a[100][100], max,zbir=0; cin >> m >> n; for (int i = 0; i < m; ++i) { max = 0; for (int j = 0; j < n; ++j) { cin >> a[i][j]; if(max<a[i][j]){max=a[i][j];} } a[i][n-1]=max; } for...
ALGO
0.999945
3.485837
447333a6-454c-4a46-b1a4-8678551a4d51
goodstudyqaq/ACM
codeforces/1600-1699/1654/D.cpp
#include <bits/stdc++.h> using namespace std; template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p); template <typename A, typename B, typename C, typename D> string to_string(tuple<A, B, C, D> p); string to_string(const s...
ALGO
0.999552
5.329538
11560055-5256-41b9-bb89-96e9363aeffe
ishandutta2007/codeforces
archuser84/normal/1427/D.cpp
#define _USE_MATH_DEFINES #define FAST ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); #include <bits/stdc++.h> #define Loop(x, l, r) for(int x = l; x < r; ++x) #define LoopR(x, l, r) for(int x = r-1; x >= l; --x) #define all(x) x.begin(), x.end() #define Kill(x) return cout << x << '\n', 0 #define YN(flag) (flag? ...
ALGO
0.999979
3.328837
aece8803-ce88-4948-bcb5-22c25511f4ed
vo0922/algorithm
c++/알고리즘 과제/알고리즘 과제/원형 큐.cpp
#include <iostream> using namespace std; #define MAX 4 int rear = 0; int front = 0; int Q[MAX]; bool isFull(); bool isEmpty(); void enQueue(int item); int deQueue(); void enQueue(int item) { if (isFull()) { cout << "Queue is Full" << endl; exit(1); } else { rear = (rear + 1) % MAX; Q[rear] = item; } ...
ALGO
0.996139
3.970023
9ee54751-30cd-41f0-9bc4-91080aa4becd
jwitz54/Halide-HLS
apps/blur/halide_blur_generator.cpp
#include "Halide.h" namespace { enum class BlurGPUSchedule { Inline, // Fully inlining schedule. Cache, // Schedule caching intermedia result of blur_x. Slide, // Schedule enabling sliding window opt within each // work-item or cuda thread. SlideVectorize,...
ALGO
0.944596
7.648682
3a986be0-49e3-4ccc-bddf-a8f7b4933545
AjaySingh470/LeetCode-Questions
0div-idbig-omega-company-tagsdiv-idbig-omega-topbardiv-classcompanytagscontainer-styleoverflow-x-scroll-flex-wrap-nowrap-div-classcompanytagscontainer-tag-stylebackground-color-rgba0-10-32-005-darkreader-inline-bgcolor-rgba0-2-14-005-data-darkreader-inline-bgcolordivmicrosoft-divdiv-classcompanytagscontainer-tagoccuren...
class Solution { public: int solve(int i,int j,int n , int m,vector<vector<int>> &img) { int cnt = 0; int tot = 0; for(int p=-1;p<=1;p++) { for(int q=-1;q<=1;q++) { if((i+p)>=0 and (j+q)>=0 and (j+q)<m and (i+p)<n) ...
ALGO
0.999803
6.448356
92c1516a-3630-4cf8-bf8b-ad67a1cc1783
ValentynaKhomits/customSDRangel
plugins/channelrx/demodchirpchat/chirpchatdemodsink.cpp
#include <QTime> #include <QDebug> #include <stdio.h> #include "dsp/dsptypes.h" #include "dsp/basebandsamplesink.h" #include "dsp/dspengine.h" #include "dsp/fftfactory.h" #include "dsp/fftengine.h" #include "util/db.h" #include "chirpchatdemodmsg.h" #include "chirpchatdemodsink.h" ChirpChatDemodSink::ChirpChatDemodS...
ALGO
0.883745
6.002093
04c54388-e325-4c53-921a-67a22064e0c6
imans927/GitTutorial
sph_dec.cpp
#include <stdio.h> #include <math.h> #include <string.h> #include "pred_controller.h" void sph_dec (float V_Gen_a[9*Nh*Nh],float roh, float U_unc[3*Nh], float U_opt[3*Nh]){ // Initialize variables bool solution_found = false; // termination of while loop int level = 0; // current level of tre...
ALGO
0.999982
3.077563
ba06bf45-166c-4a37-b3ea-e1c8f65bccad
LSH3333/PS
programmers/JadenCasea문자열만들기.cpp
#include <iostream> #include <vector> using namespace std; string solution(string s) { bool afterBlank = true; for(int i = 0; i < s.size(); i++) { if(s[i] == ' ') { afterBlank = true; continue; } if(afterBlank) { s[i] = toupper(s...
ALGO
0.99483
5.410332
e5066897-4f96-44bc-8d43-c430eb99b3de
danielhO9/PS
CODEFORCES/2056E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 998244353; ll n, m; vector<pair<ll, ll>> v; ll fac[400001], ifac[4000001]; ll pow(ll a, ll b) { if (b == 0) return 1ll; ll half = pow(a, b / 2); half = (half * half) % MOD; if (b % 2) return (half * a) % MOD; else return half; } ...
ALGO
0.999953
4.656527
0fc0f147-78f4-48c1-9491-08242de98da2
Szaptor/aisd
grafy/graph_def.cpp
#include <iostream> #include <random> #include <vector> #define MaxMatrixSize 20000 using namespace std; void generate_dag(int arr[][MaxMatrixSize], int v, float saturation){ int row, col; // to generate random value from range random_device rd; mt19937 gen(rd()); for (int i=0; i<(v*(v-1)/2)*sat...
ALGO
0.999848
4.368304
4c3d2531-1f46-4b23-bae9-e4253b10c5c9
PoissonJ/notes
oldDatastructures/projects/assignment1/main.cpp
#include <stdlib.h> #include <string> #include <vector> #include "chain.cpp" using namespace std; int main() { // Instantiate new chain object chain<int>* nodeChain = new chain<int>(); string line; // Read in text file line by line while( getline( cin, line ) ) { stringstream linestre...
ALGO
0.995562
4.371425
e581c316-f119-4dc9-af6a-48266ada30bb
Anandharsh275/dsapractice
subsetusingbitmask.cpp
#include<bits/stdc++.h> using namespace std; vector<vector<int>>allsubsets(vector<int>&nums){ int n=nums.size(); int subset_cnt=(1<<n); vector<vector<int>>subsets; for(int mask=0; mask<subset_cnt; mask++){ vector<int>subset; for(int i=0 ;i<n; i++){ if(mask&(1<<i)) ...
ALGO
0.999926
5.007152
6dee5043-bd6d-4e11-9a40-89b203d95047
akashbkrish/LeetCodes
shortest-subarray-with-sum-at-least-k/shortest-subarray-with-sum-at-least-k.cpp
class Solution { public: int shortestSubarray(vector<int>& A, int K) { int N = A.size(), res = N + 1; deque<int> d; for (int i = 0; i < N; i++) { if (i > 0) A[i] += A[i - 1]; if (A[i] >= K) res = min(res, i + 1); while (d.si...
ALGO
0.99996
6.073215
3243886a-5cc8-4d53-abb9-92935e49d5c2
SaberDa/LeetCode
contest/contest195/5448-pathCrossing.cpp
#include <set> using namespace std; class Solution { public: bool isPathCrossing(string path) { // unordered_map<int, vector<int>> mp; // mp[0].push_back(0); // int x = 0, y = 0; // for (auto c : path) { // if (c == 'N') x++; // else if (c == 'S') x--; ...
ALGO
0.999871
5.674572
9a507515-15d9-48c4-8b59-95a8bf5088dc
raincross7/code-similarity
codes/train_code/problem469/problem469_165.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int map<int,int> m; int fun(int n) { int flag=0; m[n]--; for(int i=1; i<=sqrt(n); i++) { if(n%i==0) { int one=i; int two=n/i; //cout<<one<<" "<<two<<endl; if((m[one]>0)) ...
ALGO
0.999939
3.595035
068b776b-b64b-413d-936c-4ee933ea3922
givanaldo/codes-meca-2023
lista01/q5.cpp
#include <iostream> using namespace std; int main() { float preco, valor; int desconto; cout << "Preco: "; cin >> preco; cout << "Desconto: "; cin>> desconto; valor = preco - preco*desconto/100; cout << "Valor: " << valor; return 0; }
TOOL
0.991106
3.682408
9f8e3c8b-244b-4c5b-a923-e73681f0486f
dipayansaha2002/Gfg-solutions
Medium/Anti Diagonal Traversal of Matrix/anti-diagonal-traversal-of-matrix.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: vector<int> antiDiagonalPattern(vector<vector<int>>& matrix) { int n=matrix.size(), k=0, x=0; vector<int> arr(n*n); for(int i=0; i<n; i++) { k = 0; f...
ALGO
0.999878
6.050747
b39b0c5c-aa0a-4c96-8c7c-aa1961e4cd0f
sanjanap1703/leetcode
my-folder/problems/maximum_subarray/solution.cpp
class Solution { public: int maxSubArray(vector<int>& a) { int max_till=a[0],max1=a[0]; for(int i=1;i<a.size();i++) { max_till=max(max_till+a[i],a[i]); max1=max(max_till,max1); } return max1; } };
ALGO
0.999486
5.716712
212bc6f3-828a-40ae-a3ae-7d274e7c7969
TheSkyFucker/acm-icpc
contest/codeforces_normal/round_486/b.cpp
#include<bits/stdc++.h> using namespace std; typedef double db; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pii; #define fi first #define se second #define mp make_pair #define pb push_back #define pw(x) (1ll << (x)) #define sz(x) ((int)(x).size()) #define all(x) (x).begin(),(x).end() #define r...
ALGO
0.999933
3.425381
738b5b1f-4f20-4627-ae2f-2e7bf699095b
myheal000/newfox
mmdet/ops/nms/src/cuda/nms_cuda.cpp
#define CHECK_CUDA(x) TORCH_CHECK(x.device().is_cuda(), #x, " must be a CUDAtensor ") at::Tensor nms_cuda_forward(const at::Tensor boxes, float nms_overlap_thresh); at::Tensor nms_cuda(const at::Tensor& dets, const float threshold) { CHECK_CUDA(dets); if (dets.numel() == 0) return at::empty({0}, dets.options(...
TOOL
0.869446
6.67566
51e3740b-c11a-48b5-af6f-d74c3f61544e
Naapperas/feup-prog
p2/ex10.cpp
#include <iostream> #include <cmath> using namespace std; bool isPrime(long long unsigned num){ if (num < 2) return false; if (num == 2) return true; for (int i = 2; i < sqrt(num) + 1; i++) if (num % i == 0) return false; return true; } int main(){ int num; cout << "...
ALGO
0.999984
4.21541
78da4968-9010-4cab-9c2c-1682215435ac
Siva-Prasad-Reddy-G/DECS-Auto-Grading-Project
Asynchronous/server.cpp
#include <iostream> #include <fstream> #include <cstring> #include <thread> #include <filesystem> #include <vector> #include <queue> #include <mutex> #include <condition_variable> #include <unistd.h> #include <netinet/in.h> #include<queue> #include<pthread.h> #include "FileQueue.h" #include "utility.h" #include <chrono...
WEB
0.917691
5.788784
c2c9d5ad-698f-4de2-ba0b-be1540bf7127
DaAlG/code_studying
jeehyun/공통문제/프로그래머스/[1차] 프렌즈4블록.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; vector<pair<int, int>> possible(int m, int n, vector<string>& board) { vector<pair<int, int>> blocks; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (board[i][j] != '0') { char ch...
ALGO
0.999941
6.39851
5d888e2e-0125-430e-9046-777ee53f540c
javpalomino-zz/OnlineJudges
codeforces/Codeforces Round #157 (Div. 1)/A. Little Elephant and Bits.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string s, ans; cin >> s; bool founded = false; int sz = s.size(); int i; for(i = 0 ; i < sz ; ++i){ if(!founded && s[i] == '0'){ founded = true; continue; } ans+=s[i]; } i = 0; if(!founded)i++; sz = ans.size(); for( ; i < sz ; ++i...
ALGO
0.999888
4.153517
4944596f-1041-487d-a728-dcc859b70b8d
Sachinaswal29/Leetcode
0415-18-2965-find-missing-and-repeated-values/0415-18-2965-find-missing-and-repeated-values.cpp
class Solution { public: vector<int> findMissingAndRepeatedValues(vector<vector<int>>& grid) { int missing=0; int repeated=0; set<int>st; for(auto row:grid){ for(auto ele:row){ if(st.contains(ele)) repeated=ele; else st.insert(ele); ...
ALGO
0.999853
5.939139
e90991db-f9ec-421a-81d6-ad88406160f2
rverma510/Coding-Problems
13_Graphs/18_SCC.cpp
#include<bits/stdc++.h> using namespace std; void dfs(vector<int> *edges, int start, unordered_set<int> &visited, stack<int> &finishStack) { visited.insert(start); for (int i = 0; i < edges[start].size(); i++) { int next = edges[start][i]; if (visited.count(next) == 0) { dfs(edges, ...
ALGO
0.999989
4.778117
a0f729a5-6d25-4860-9eb2-3ab95a281a14
larryxiao/peloton
src/postgres/backend/utils/misc/sampling.cpp
#include "postgres.h" #include <math.h> #include "utils/sampling.h" /* * BlockSampler_Init -- prepare for random sampling of blocknumbers * * BlockSampler provides algorithm for block level sampling of a relation * as discussed on pgsql-hackers 2004-04-02 (subject "Large DB") * It selects a random sample of sam...
ALGO
0.998158
3.583898
8f0fbbd4-d864-4822-8449-8ca8c6cf63e3
seoo2001/C-workspace
boj/2023.11.26/f.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n, m; ll k; struct Edge { int s, e, l, r, idx; }; vector<Edge> v; int par[101010]; ll rm[202020]; bool vst[202020]; bool comp(Edge &a, Edge &b) { return a.r!=b.r ? a.r<b.r : a.l<b.l; } int find(int v) { if(v==par[v]) return v; r...
ALGO
0.999997
3.36694
174d7926-dbe2-467b-b757-2c03212abea3
manikanta2901/ubuntu
.history/practice/cpp/codeforces/puzzleFronFuture_20210124111017.cpp
#include <bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #include<queue> using namespace std; #define trav(dataType,DataStruct,name) for(dataType<DataStruct>::itt ip = name.bb(); ip != name.ee(); ip++) //Pre processors & typedefs ...
ALGO
0.999956
3.831557
0758f2be-1381-43e9-9b2d-25e0b115daad
aditya13902/Leetcode
1590-make-sum-divisible-by-p/1590-make-sum-divisible-by-p.cpp
class Solution { public: int minSubarray(vector<int>& nums, int p) { int rem=0; for(auto ele:nums){ rem=(rem+ele)%p; } if(rem==0) return 0; int curr=0; unordered_map<int,int>mp; mp[0]=-1; int res=INT_MAX; for(int i=0;i<nums.size();i...
ALGO
0.999977
5.637312
22dacd24-eca8-4f46-8abc-206c6b35749a
nyukhalov/CarND-Path-Planning-Project
src/Eigen-3.3/test/denseLM.cpp
#include <iostream> #include <fstream> #include <iomanip> #include "main.h" #include <Eigen/LevenbergMarquardt> using namespace std; using namespace Eigen; template<typename Scalar> struct DenseLM : DenseFunctor<Scalar> { typedef DenseFunctor<Scalar> Base; typedef typename Base::JacobianType JacobianType; typed...
TEST
0.985158
5.862647
9d706238-db5a-4935-aec0-e1467d263eb4
mprateek14/LeetCode-Solutions
2078-two-furthest-houses-with-different-colors/2078-two-furthest-houses-with-different-colors.cpp
class Solution { public: int maxDistance(vector<int>& colors) { int n = colors.size(); int start = 0; int end = n-1; while(colors[0] == colors[end]) end--; while(colors[n-1] == colors[start]) start++; return max(end, n-start-1); ...
ALGO
0.998853
5.841938
20826189-fbae-4ac3-a27f-4e236a3cf7dd
ansh-d23/Leet-Code
0945-minimum-increment-to-make-array-unique/0945-minimum-increment-to-make-array-unique.cpp
class Solution { public: int minIncrementForUnique(vector<int>& nums) { sort(nums.begin(),nums.end()); int ans=0; for(int i=1;i<nums.size();i++){ if(nums[i]<=nums[i-1]){ int temp = (nums[i-1]-nums[i]+1); nums[i]+= temp; ans+=temp...
ALGO
0.999993
6.150883
1256efca-9577-4a09-810a-d7c14e8bf019
siddhanttomar2003/CP
2860-happy-students/2860-happy-students.cpp
class Solution { public: int countWays(vector<int>& nums) { int count=0; int n=nums.size(); sort(nums.begin(),nums.end()); for(int i=0;i<n;i++){ if(i+1>nums[i] && i+1<n && nums[i+1]>i+1)count++; else if(i+1>nums[i] && i+1==n)count++; // else break;...
ALGO
0.999978
5.591884
a925110b-3621-4759-b404-6e6918d2361a
KY0415/CodeForces_problem_solutions
194Easy_Fibonacci.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int first = 0; int second = 1; if (n == 1) { cout << "0" << endl; } else { cout << first << " " << second; for (int i = 3; i <= n; i++) { int result = first + ...
ALGO
0.99999
3.520225
0f412ca9-aac8-476e-bbc7-831f617478fc
BLOC3AN/api_cameraAI
EasyOCR-1.6.2/easyocr/DBNet/assets/ops/dcn/src/deform_pool_cpu_kernel.cpp
/***************** Adapted by Charles Shang *********************/ // modify from https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetection/mmdet/ops/dcn/src/cuda/deform_psroi_pooling_cuda.cu /* Modified by Jaided AI Released Date: 31/08/2022 Description: Deformable convolution kernel for CPU. ...
DATA
0.859551
3.778985
5941266e-ff15-46cb-b2ac-8f1988d42130
bluewhitesheen/Leetcode
element-appearing-more-than-25-in-sorted-array/Accepted/12-12-2023, 1_28_53 PM/Solution.cpp
// https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array class Solution { public: int findSpecialInteger(vector<int>& arr) { int n = arr.size(); for(int i = 0; i < n - n / 4; i++){ if(arr[i] == arr[i+n/4]) return arr[i]; } return 0; } };
ALGO
0.999935
5.449187
a9ce0624-e94b-48dc-95bf-7aa138d3761f
mclear/Sesame
Credential/NFCRingCredentialProvider/sha1.cpp
#include "sha1.h" // big endian architectures need #define __BYTE_ORDER __BIG_ENDIAN #ifndef _MSC_VER #include <endian.h> #endif /// same as reset() SHA1::SHA1() { reset(); } /// restart void SHA1::reset() { m_numBytes = 0; m_bufferSize = 0; // according to RFC 1321 m_hash[0] = 0x67452301; m_hash[1] =...
ALGO
0.993435
6.993879
820d3974-7720-41b3-8029-89bd25a52251
Keybinhoainam/codecpp
ctdl/tinhtoangiatribieuthuctrungto.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long bool So(char c){ if(c>='0' && c<='9') { return true; } else return false; } bool Toantu(char c){ if(c=='+'||c=='-'||c=='*'||c=='/'||c=='^') { return true; } else return false; } ll res(ll a, ll b, char op){...
ALGO
0.999965
4.415956
04abbfb9-7737-49fa-a962-c7332cdaadc4
Kashi1311/DSA-in-C-language
tut111.cpp
// sum of all nodes in a binary tree. // #include<iostream> using namespace std; struct Node{ int data; struct Node* left; struct Node* right; Node (int val){ data = val; left = NULL; right = NULL; } }; int sumofallnodes(Node* root){ if(root == NULL){ return 0;...
ALGO
0.99993
5.631942
3dc0a7a9-5a00-44fb-a9eb-995d7a214640
spreadcoin-project/spreadcoin
src/hash.cpp
#include "hash.h" inline uint32_t ROTL32 ( uint32_t x, int8_t r ) { return (x << r) | (x >> (32 - r)); } unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash) { // The following is MurmurHash3 (x86_32), see http://code.google.com/p/smhasher/source/browse/trunk/MurmurH...
ALGO
0.987379
6.215198
08bcaa9f-0bfd-4e59-a607-5f3094409ca9
Hurleyworks/NewtonBlock
NewtonModule/physics/dgWorldDynamicUpdate.cpp
#include "dgPhysicsStdafx.h" #include "dgBody.h" #include "dgWorld.h" #include "dgBroadPhase.h" #include "dgConstraint.h" #include "dgDynamicBody.h" #include "dgCollisionInstance.h" #include "dgBilateralConstraint.h" #include "dgWorldDynamicUpdate.h" #include "dgCollisionDeformableMesh.h" #ifdef _NEWTON_AMP #include ...
ALGO
0.95157
4.779881
dc6a1da4-9043-48cc-93eb-272f192f82a5
cdsudheer1/UnitTestGen
src/Utils.cpp
/** ************************************************************************************ * * @file Utils.cpp * * @brief * * @version 1.0 * @date 27.05.2020 15:03:45 * * @author Sudheer Divakaran, Gadgeon Smart Systems Pvt. Ltd, Kochi, Kerala, INDIA. * * @copyright ...
TOOL
0.908354
5.409997
e88ce63f-5381-4005-8f76-f479a227572e
sinayra/Algorithms
part 1/Union find key/interview-questions/question 2/UF.cpp
#include "UF.hpp" UF::UF(int n) { connections.resize(n); amount.resize(n); for (int i = 0; i < n; i++) { connections[i] = i; amount[i] = 1; } } void UF::connect(int p, int q) { int size = connections.size(); int rootP, rootQ; if (p > size || q > size || p < 0 || q < 0)...
ALGO
0.941353
4.391076
0dc77b42-f6bd-438f-81e7-e3ad1b4aa687
raincross7/code-similarity
codes/train_code/problem258/problem258_169.cpp
/********************************************** * author : deepak nayan * file : e:/Solutions/atcoder/abc111_a.cpp * time : Fri May 1 02:04:42 2020 * quest : A - AtCoder Beginner Contest 999 *********************************************/ #include <iostream> #include <vector> #include <map> #include <algorith...
ALGO
0.999851
3.645925
6c25cf68-49f0-4cb5-8f05-405a02d268d6
mayankjain25/Dynamic-Programming-Codes
15-Palindrome-Partitioning-GFG.cpp
class Solution{ public: bool isPalindrome(string s, int i, int j){ while(i<=j){ if(s[i]!=s[j]) return false; i++; j--; } return true; } int solve(string str, int i, int j, vector<vector<int>>&dp){ if(i>=j) return 0; if(isPalindrome(...
ALGO
0.999998
6.245086