uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
cc757f33-1d81-48b7-a775-9a331fc41e17
jkjan/Baekjoon
1157.cpp
#include <iostream> #include <string> #include <vector> using namespace std; int main() { string str; cin >> str; int letterCount[26] = {0, }; for (int i = 0; i < str.length(); i++) { if (str[i] > 'Z') { letterCount[str[i] - 'a']++; } else { letterCount[str[i] - 'A']++; } } int maxCnt = -1; in...
ALGO
0.999958
4.162306
b641ac3d-1c1f-4d38-8a95-a5a5388867e2
jamtebo/Alc
Dijkstra.cpp
#include <iostream> #include <string> #include "Dijkstra.h" Dijkstra::Dijkstra(int nS, int nT) : nStart(nS), nEnd(nT) { memset(nDis, inf, sizeof(nDis)); memset(bVisit, false, sizeof(bVisit)); graph.nodeValue[0] = ""; graph.nodeValue[1] = "Ƭ"; graph.nodeValue[2] = ""; graph.nodeValue[3] = "...
ALGO
0.998337
4.081374
b7602a73-c7ff-4d23-9701-f690d2c26983
VivekRatan-Shakya/C-
New_programs_in C++/grater_number.cpp
#include<iostream> using namespace std; class A { public: void grater() { int a,b,c; cout<<"Enter any Three Numbers:"<<endl; cin>>a>>b>>c; if(a>b&&a>c) { cout<<"is a Grater Numbers:"<<a; } else if(b>a&&b>c) { cout<<"is a Grater Numbers:"<<b; } else if (c>a&&c>b) { ...
ALGO
0.991218
3.451393
340f8346-a4cc-4eb6-a83f-59468701e098
ACM-Obsidian/Obsidian
2013-08-08/1006.cpp
#include <cstdio> #include <cmath> #include <cassert> #include <algorithm> #define pi 3.14159265358979324 struct point { double x, y; } a[1000]; struct rec { double arc; int id; } b[1000]; int n, m, id[1000][1000], succ[1000000], u[1000000]; int cmp(rec a, rec b) { return a.arc < b.arc; } double dist(double a, doub...
ALGO
0.999686
3.904999
66a578d0-32cb-4835-ac91-8287f12e1b68
makarand-20/CPP
005_Bitwise/004_Prime.cpp
// Prime number #include <iostream> using namespace std; int main(){ int n; cin>>n; bool flag = 0; for(int i = 2; i < n; i++){ if(n % i == 0){ flag = 1; break; } } if(flag == 0){ cout<<"Prime 🔥"; } else{ cout<<"Not Prime 😢"; ...
ALGO
0.999708
4.734236
5347fd74-98f3-47aa-ab47-2d07f96e49a6
FPMManagers/VTK-9.3.0
ThirdParty/libproj/vtklibproj/src/conversions/unitconvert.cpp
#define PJ_LIB__ #include <errno.h> #include <math.h> #include <string.h> #include <time.h> #include "proj_internal.h" #include <math.h> PROJ_HEAD(unitconvert, "Unit conversion"); typedef double (*tconvert)(double); namespace { // anonymous namespace struct TIME_UNITS { const char *id; /* units keyword...
TOOL
0.911823
3.122652
5ff50a0b-e412-41bf-9b22-a7faf20b89f7
ishandutta2007/codeforces
doped.silicon/normal/818/B.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,fma,abm,mmx,avx,tune=native") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> #include <functional> // for less #include <iostream> using namespace __gnu_pbds;...
ALGO
0.999994
3.668582
c0aaba9a-0b49-4d8f-ba67-2e984d5b7ec4
montaserja/EXTProjects
complexity-vector-vs-linked-list-montaserja/linked_and_vector.cpp
#include<iostream> #include<vector> #include <stdio.h> /* printf, scanf, puts, NULL */ #include <stdlib.h> /* srand, rand */ #include <ctime> #define num 100000 using std::cout; using std::endl; using std::vector; #include<string.h> struct node { int data; node *next; }; vector<int> insertToVec(int * ...
ALGO
0.99939
4.246223
eea1254e-289f-4c7d-b354-7ef999002d90
YashSaroha/DSA---Love-Babbar
Phase 2/Stacks/Questions/reverseString.cpp
#include<iostream> #include<stack> using namespace std; // not a good approach...normal 2 pointer approach is better // because that takes space complexity O(1) and stack take O(n) int main() { string str; cin >> str; stack<char> s; for(int i=0 ; i<str.length() ; i++) { char ch = st...
ALGO
0.999859
5.320255
341809e5-1b92-4ebd-8c2f-42544c128702
goel-aadhaar/Competitive-Coding
StockSpanProblem.cpp
#include <bits/stdc++.h> using namespace std; #define f(i, start, end) for (int i = start; i < end; i++) #define fs(i, start, end, step) for (int i = start; i < end; i = i + step) #define fr(i, start, end) for (int i = start; i > end; i--) #define all(arr) arr.begin(), arr.end() #define vi vector<int> #define vvi vec...
ALGO
0.99999
4.840109
262ffc2c-55d3-4e69-98b0-6c95e7bdc6df
DSUBrinda14/List-1
PRO18.CPP
#include<iostream.h> #include<conio.h> int cal_power(int n) { return n*n; } void main() { int num; clrscr(); cout<<"Enter the Number to print :: "; cin>>num; cout<<"Power of Given Number is :: "<<cal_power(num)<<endl; getch(); }
TOOL
0.949331
4.101096
bd3b8c66-701c-4f4c-a486-96e3fe5c4911
udacity/nd013-c5-planning-starter
project/starter_files/eigen-3.3.7/doc/examples/TutorialLinAlgSetThreshold.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2d A; A << 2, 1, 2, 0.9999999999; FullPivLU<Matrix2d> lu(A); cout << "By default, the rank of A is found to be " << lu.rank() << endl; lu.setThreshold(1e-5); cout << "With threshold 1e-5...
ALGO
0.999874
4.090376
52852ab6-5b90-4cbb-923b-5af88eac5ec2
canhung/homework
Bai 2/B11.cpp
#include <iostream> // dap an la c.9 = 5 + 3 + 1 using namespace std; int main() { int num = 5, sum = 0; while (num > 0) { if (num %2 !=0) sum+=num; --num; } cout << "The sum is " << sum << endl; }
ALGO
0.999886
3.171669
96d791e3-fa73-41fc-bee0-8a75dcebf613
ishandutta2007/codeforces
redant/normal/1472/C.cpp
#include <bits/stdc++.h> #include <iomanip> using namespace std; typedef long long LL; #define FOR(i,a,b) for(int _n(b),i(a);i<_n;i++) #define REP(i,n) FOR(i,0,n) void setIO() { ios_base::sync_with_stdio(0); cin.tie(0); } const int MX = 200005; LL a[MX]; int n; LL solve() { LL r = 0; for (int i = ...
ALGO
0.999872
4.20724
b51e327d-f569-4a20-b3ef-158215f29635
cmin764/cmiN
projects/C++/cli/spoj/javac.cpp
#include <cstdio> #include <cstring> #include <cctype> char buffer[128], output[128]; int identify() { bool java, cpp; java = cpp = 0; if (buffer[0] == '_' || buffer[strlen(buffer) - 1] == '_' || isupper(buffer[0])) { return 3; } for (char* pch = buffer; *pch && !(java && cpp); pch++) { ...
ALGO
0.998133
3.65222
96a34b79-433e-4b8f-8d34-71da9ff475e8
raincross7/code-similarity
codes/train_code/problem100/problem100_115.cpp
#include <bits/stdc++.h> using namespace std; int main() { vector<vector<int>> A(3, vector<int>(3)); int N; vector<int> b(N); for (int i=0; i<3; i++) { for (int j=0; j<3; j++) { cin >> A.at(i).at(j); } } cin >> N; for (int i=0; i<N; i++) { cin >> b.at(i); for (int j=0; j<3; j++) { ...
ALGO
0.999912
3.715797
7e90ae1f-fa87-4297-a3cc-142d59e57f3f
Exadios/Bayes-
PV/PV.cpp
/* * Example of using Bayesian Filter Class to solve a simple problem. * The example implements a Position and Velocity Filter with a Position observation. * The motion model is the so called IOU Integrated Ornstein-Uhlenbeck Process Ref[1] * Velocity is Brownian with a trend towards zero proportional to the v...
ALGO
0.999686
7.641684
c393606a-b70d-4bb9-9ac7-5fcb0b3fe8ee
sravya273/DataStructures
BST/searchBST.cpp
#include <bits/stdc++.h> using namespace std; struct bnode { int data; struct bnode *left; struct bnode *right; }; bnode* newNode(int k) { struct bnode *temp = new bnode(); temp->data =k; temp->left =NULL; temp->right = NULL; return temp; } struct bnode* insertBST(struct bnode *r...
ALGO
0.999917
4.467947
3704fe0a-31e5-4af4-8ce2-0fa25ded1645
ChristophBurgmer/magiclink
cpp_20/013_string_ends_with.cpp
#include<string> #include<iostream> using namespace std; int startsWith(string s, string sub){ return s.find(sub)==0?1:0; } int endsWith(string s,string sub){ return s.rfind(sub)==(s.length()-sub.length())?1:0; } int main(){ string str = "helloWorld"; string preStr = "he"; str...
ALGO
0.979138
3.574158
c44ccdf9-42cb-4f16-9e7f-881ccc989a00
Quartet404/CrossPlatformProgramming
Лаб2/web_courier_courier/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.999068
6.76775
a750e2c8-bf7b-4a02-b75e-2e8a5f9b655a
LiunxPaisley/LeetCode
120. Triangle/120. Triangle/120. Triangle.cpp
#include <iostream> #include <fstream> #include <sstream> #include <array> #include <vector> #include <string> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <stack> #include <queue> #include <list> #include <deque> #include <tuple> #include <algorithm> #include <utility> #in...
ALGO
0.999964
4.965465
2e3626b2-441b-4157-8f8f-174a47a14339
iamdeepakdass/GFG-Practice
Medium/Triplet Sum in Array/triplet-sum-in-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Function to find if there exists a triplet in the //array A[] which sums up to X. bool find3Numbers(int A[], int n, int X) { bool ans = false; sort(A, A+n);...
ALGO
0.999786
5.585355
361ba86b-109a-4b2c-8d4b-8356af9276fe
Avnish-Dewan/ADI
Sorting/QuickSortIterative.cpp
#include <bits/stdc++.h> using namespace std; void swap(int* a, int* b) { int t = *a; *a = *b; *b = t; } int partition(int *arr, int l, int h) { int x = arr[h]; int i = (l - 1); for (int j = l; j <= h - 1; j++) { if (arr[j] <= x) { i++; swap(&arr[i], &arr[j]); } } swap(&arr[i + 1...
ALGO
0.999989
4.827713
a49a4913-c530-4e5e-b312-a473be7889c4
NoelMacwan/system_core
libpixelflinger/codeflinger/Arm64Disassembler.cpp
#include <stdio.h> #include <inttypes.h> #include <string.h> struct disasm_table_entry_t { uint32_t mask; uint32_t value; const char* instr_template; }; static disasm_table_entry_t disasm_table[] = { {0xff000000, 0x91000000, "add <xd|sp>, <xn|sp>, #<imm1>, <shift1>"}, {0xff000000, 0...
TOOL
0.872755
3.76088
d369131a-ab71-4f9b-beeb-f32c5abe05ac
joshualass/CP
Solutions/Contests/CodeForces/CF1369/B1369.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; const ll MOD = 998244353; void solve() { int n; cin >> n; string s; cin >> s; string pre = "", suf = ""; while(s.size() && s.back() == '1') { suf.push_back(s.back()); s.pop_back(); } re...
ALGO
0.999994
5.327778
ec71c0e7-2b5f-42c7-ab08-7f68622db36a
SanthoshBala/protein-modules
lib/cgal/examples/Alpha_shapes_3/ex_periodic_alpha_shapes_3.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Periodic_3_triangulation_traits_3.h> #include <CGAL/Periodic_3_Delaunay_triangulation_3.h> #include <CGAL/Alpha_shape_3.h> #include <CGAL/Random.h> #include <CGAL/point_generators_3.h> // Traits typedef CGAL::Exact_predicates_inexact_const...
ALGO
0.995178
7.683671
5b98e96b-ddf8-4349-8fc0-3cb5494c440a
Lchuxian/SLAM-Environment
OpenCV3_and_OpenCV4_coexist/opencv-3.4.6-build/modules/cudaoptflow/src/tvl1flow.cpp
#include "precomp.hpp" #if !defined HAVE_CUDA || defined(CUDA_DISABLER) cv::Ptr<cv::cuda::OpticalFlowDual_TVL1> cv::cuda::OpticalFlowDual_TVL1::create(double, double, double, int, int, double, int, double, double, bool) { throw_no_cuda(); return Ptr<cv::cuda::OpticalFlowDual_TVL1>(); } #else using namespace...
ALGO
0.991714
6.259012
82a1dd3f-9518-4762-9982-d686e613e552
Ghnzh/Matkul-Pemdas
Pratikum-3/150_Prak3_1.cpp
#include <iostream> using namespace std; int main() { int kandang; int total_binatang = 0; cout << "Berapa kandang: " << endl; cin >> kandang; cout << "Berapa Hewan Setiap Kandang = " << endl; for (int input = 0; input < kandang; input++) { int jumlah_hewan; cin >> jumlah_hewa...
ALGO
0.998178
5.223804
a5b3e99d-3a46-46fd-9659-20a33cc8bf9d
songminkyu/CPP_TEST_UNTIL_17
Study8/Study8_5.cpp
#include "stdafx.h" #include <iostream> #include <vector> template<class Container> class _Inserter { Container& c_; public: _Inserter(Container & c) : c_{ c } {} template<class V2> auto& operator, (V2 v) { c_.push_back(v); return *this; } }; template< class... Args, class V2> auto operator+=(std::vector<A...
TOOL
0.956425
4.618145
1ff7746e-831c-4a63-ac39-9ede1024018f
Aeroraven/Stargazer
ComputerGraphics/Iris/src/Core/Structure/IrisTrie.cpp
#include "../../../include/Core/Structure/IrisTrie.h" using namespace Iris::Core::Structure; IrisTrie::IrisTrie() { root = new IrisTrieNode(); root->key = ' '; root->next = new IrisTrieNode*[128]; for (int i = 0; i < 128; i++) { root->next[i] = nullptr; } root->value = 0; root->val...
ALGO
0.998461
4.472806
a7843b10-abd5-4436-bfb8-ede309ce2b3f
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_1315_3.cpp
#include <bits/stdc++.h> using namespace std; int now[5 * 100010], after[5 * 100010], mx[5 * 100010]; int lft[5 * 100010], rgt[5 * 100010], vi[5 * 100010], timer = 0, comp = 0; long long Add[5 * 100010]; vector<int> g[5 * 100010]; stack<int> stk; inline void dfs(int c, int p) { vi[c] = 1; now[c] = after[c] = ++time...
ALGO
0.999746
4.419406
742d7458-69a8-4645-b9fd-1d3f984bf998
Allen-C-Guan/Leetcode-Answer
Cpp_part/Leetcode/Leetcode/DP/583. 两个字符串的删除操作/solution(exceed time).cpp
#include <iostream> #include <string> #include <unordered_set> using namespace std; //暴力法! 严重超时 DFS就是阶乘的复杂度!!就很大! //这题思路应该是最长公共字串的问题!!! class Solution { private: void DFS(const string& word, int begin, unordered_set<string>& substr_set, string& path){ if (begin >= word.size()) return; ...
ALGO
0.99997
4.980163
eb1daa3d-9bdf-4e6b-976d-a92bacc5f0fd
Jengdeuk/Algorithm
Baekjoon/2.Greedy/2.Gold/7570.cpp
#include <iostream> #include <algorithm> using namespace std; int dp[1000001]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; for (int i = 0; i < n; ++i) { int num; cin >> num; dp[num] = dp[num - 1] + 1; } cout << n - *max_element(dp + 1, dp + n + 1); }
ALGO
0.999708
3.68887
8f094acc-2ea2-4587-92e5-609b04cd59d6
ulkumeteriz/Ray-Tracer-for-CPU
geometry/triangle.cpp
#include "../geometry.hpp" #include <iostream> using namespace std; Position3 Triangle::getVertex(int vertexId) const { if(vertexId < 3) return *(this->vertex[vertexId]); else return Position3(-1.0f, -1.0f, -1.0f); } Vector3 Triangle::getNormal() const { return this->normal; } Vector3 Tr...
ALGO
0.987612
6.068401
ed59b96a-e810-46e8-ae8c-a47d7d6fb38a
HajimeHitoshiHideo/CompProgCodes
OCI/CampOCI2025/CampOci2025_8_G_recur.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n, c; vector<int> vc; vector<int> iso; vector<vector<int>> memo; ll solve(int i, int Vc) { if(i == n) { return 0; } if(memo[i][Vc] != -1) { return memo[i][Vc]; } if(Vc > c) { return 0; ...
ALGO
0.999965
3.84956
8f53f4c9-b1b8-41d4-ac4d-926ccc87e52f
harsh-quare/LeetRoad
0332-reconstruct-itinerary/0332-reconstruct-itinerary.cpp
class Solution { public: // Euler's path finding problem // start point is given // all edges must be traversed // all edges must be visited exactly once vector<string> findItinerary(vector<vector<string>>& tickets) { //Heirholzer's algo // build adjacency // build indegree a...
ALGO
0.999983
6.291639
76ac9f2d-26a8-40f1-8ebe-ebec65ddcfb1
JohnsonHsiao/Numerical-Method-in-Finance
Program/L6/BTTDB/BTTDB.cpp
#include<stdio.h> #include<stdlib.h> #include<sys/types.h> //#include<sys/time.h> #include<sys/timeb.h> #include<math.h> #include<time.h> #define MAX_PERIOD 100000 #define SugPeriod 60 double r,T,n,v,S,X,H,L,q,x,val,h,l,p,u,d,t; double pow(double,double); double ceil(double); double floor(double); double log(double); d...
ALGO
0.999969
3.851866
98ebb707-1f4d-458e-adea-ad3759073013
darraghmcgee/android_frameworks_av
media/libstagefright/codecs/m4v_h263/dec/src/vlc_decode.cpp
/***********************************************************HeaderBegin******* * * File: vlc_dec.c * * Author: Paulo Nunes (IST) - <EMAIL> * Created: 1-Mar-96 * * Description: This file contains the VLC functions needed to decode a * bitstream. * * Notes: * The functions contained in this file were adapt...
ALGO
0.98912
4.133549
27315557-dfc6-4679-88d9-8e6b2df2c03c
yymin1022/Algorithm_Study
BOJ/1525.cpp
#include <bits/stdc++.h> using namespace std; int main(){ cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); string current; string result = "123456780"; for(int i = 0; i < 9; i++){ char input; cin >> input; current.push_back(input); } queue<pair...
ALGO
0.999937
4.130895
a01f51ea-89ee-4177-9b68-b3eb8e94f776
Pratham2312/DSA-practice-c-
accenture kadane.cpp
// accenture kadane.cpp #include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int arr[]={-2,1,-3,4,-1,2,1,-5,4}; int sum=0; int maxi=0; for(int i=0;i<7;i++){ sum=sum+arr[i]; maxi=max(sum,maxi); if(sum<0){ sum=0; } } ...
ALGO
0.999939
3.830103
b0bcd793-14ab-4195-87e1-5492b8fe6bb2
thisarsh/Leetcode_Soln
Solutions/189-rotate-array/rotate-array.cpp
class Solution { public: void rotate(vector<int>& nums, int k) { int n=nums.size();k=k%n; // rotate(nums.begin(),nums.end()-k,nums.end()); reverse(nums.begin(),nums.end()); reverse(nums.begin(),nums.begin()+k); reverse(nums.begin()+k,nums.end()); } };
ALGO
0.999985
5.820611
528f7824-9938-49b0-be16-5d3f8dd8c32d
manish-tech-git/SdeSheetChallenge
Kth Smallest and Largest Element of Array.cpp
#include<bits/stdc++.h> vector<int> kthSmallLarge(vector<int> &arr, int n, int k) { sort(arr.begin(), arr.end()); vector <int> v; int maxi = arr[k-1]; int mini = arr[n-k]; v.push_back(maxi); v.push_back(mini); return v; }
ALGO
0.999959
4.433417
de491339-2f4a-43ce-ab11-64ea224a2f73
Srivastava/Hello-World
CodeForces/616D.cpp
#include <iostream> #include <vector> #include <cmath> #include <stdio.h> #include <algorithm> #include <iterator> #include <climits> #include <numeric> #include <queue> #include <unordered_map> typedef long long ll; typedef unsigned long long ull; const ll MOD = 1000000007; typedef std::vector<ll> vll; typedef std:...
ALGO
0.999987
4.275576
0233cb59-d7e0-4e00-9331-a9c72bc05971
wmyw96/code-for-oi
BZOJ/[JLOI2012]树/[JLOI2012]树.cpp
/************************************************************** Problem: 2783 User: wmyw96 Language: C++ Result: Accepted Time:264 ms Memory:101840 kb ****************************************************************/ #include<iostream> #include<cstdio> #include<cstring> #include<cma...
ALGO
0.999965
3.540075
57b8df10-b03f-4baa-8d98-e609e60e897c
Sekakou/OIsrc
data_structure/decompose/3313travel.cpp
#include <bits/stdc++.h> using namespace std; constexpr int N = 1e5 + 5; int n, q, w[N], c[N]; vector<int> g[N]; namespace hld { int fa[N], dep[N], siz[N], son[N]; void dfs1(int u, int p) { fa[u] = p, dep[u] = dep[p] + 1, siz[u] = 1; for (int v : g[u]) if (v != p) {...
ALGO
0.999914
4.601618
1083c289-48e3-4081-8536-d0c219b37af3
shivanshsanoria1/LeetcodeSolutions
CPP [501-1000]/979.distribute_coins_in_binary_tree [2].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.999985
6.362919
a2a32065-3635-4a76-872b-510912855ef0
camil0palacios/Competitive-programming
solutions/codeforce/Hello 2019/A/solution.cpp
#include <bits/stdc++.h> using namespace std; int main(){ string s; while(cin >> s){ vector<string> v(5); for(auto &i : v)cin >> i; bool flag = 0; for(auto & i : v){ if(i[0] == s[0] || i[1] == s[1]) flag = true; } if(flag)cout << "YES"...
ALGO
0.999684
3.532037
c264cf08-2cfd-4982-a1e5-5d673807589c
shivam910/DSA
Stack/LC:Next Greater Element II.cpp
class Solution { public: vector<int> nextGreaterElements(vector<int>& nums) { int n= nums.size(); vector <int> v(n,-1); stack <int> st; for(int i= 2*n-1; i>=0; i--) { while(!st.empty() && st.top()<= nums[i%n]) { st.pop(); } ...
ALGO
0.999974
5.363715
5a1573eb-6a6b-47be-aae9-aa766d1d6e94
raincross7/code-similarity
codes/train_code/problem342/problem342_383.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int solve(){ string s; cin >> s; int l = s.size(); for(int i = 0; i < l - 1; i++){ if(s[i] == s[i + 1]){ return cout << i + 1 << " " << i + 2 << "\n", 0; } } for(int i = 0; i < l - 2; i++){ ...
ALGO
0.999801
3.685963
15a10c47-80fd-404e-a235-28d75f843dc4
aw-junaid/Computer-Science
Programming Fundamentals/Cplusplus/C-Plus-Plus-Algorithms/sorting/strand_sort.cpp
/** * @file strand_sort.cpp * @brief Implementation of [Strand Sort](https://en.wikipedia.org/wiki/Strand_sort) algorithm. * * @details * Strand Sort is a sorting algorithm that works in \f$O(n)\f$ time if list is already sorted and works in \f$O(n^2)\f$ in worst case. * * It is passed over the array to be sort...
ALGO
0.999985
6.234199
2bc50dad-e923-4bb1-acb6-bc16188965da
Rabbi01521/Example-cpp
do while loop.cpp
#include<iostream> using namespace std; int main() { int num=10; do{ cout<<"\nvalue of number :\t"<<num; num=num+1; if(num>15) { break; } }while(num<20); return 0; }
ALGO
0.995442
3.03009
3ca3b609-3c4a-492f-a270-38236569029e
ajayprgmr/Striver-A-to-Z-DSA
JS/3.3-Array--hard/Find the Repeating and Missing Numbers.cpp
/* Problem Statement: You are given a read-only array of N integers with values also in the range [1, N] both inclusive. Each integer appears exactly once except A which appears twice and B which is missing. The task is to find the repeating and missing numbers A and B where A repeats twice and B is missing. Example ...
ALGO
0.999398
5.816898
94ef3757-5e1f-4d29-85b5-a028be7cd79a
RoyalBosS-Ayush/100-Days-OF-DSA-CPP
Day46/01.cpp
#include <iostream> #include <queue> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int d) { data = d; left = NULL; right = NULL; } }; void levelOrderTraversal(Node *root) { queue<Node *> q; q.push(root); q.push(NULL); ...
ALGO
0.99975
4.525281
dd9b7f4b-7735-4e0b-9361-7970e47e654d
aniruddh-joshi/LeetCode
0263-ugly-number/0263-ugly-number.cpp
class Solution { public: bool isUgly(int n) { if(n<=0) return 0; while(n%2==0) n/=2; while(n%3==0) n/=3; while(n%5==0) n/=5; return n==1; } };
ALGO
0.999964
5.791194
c67e3e73-94f8-4072-b01a-745e9225a618
MatzeB/llvm
tools/llvm-xray/xray-converter.cpp
#include "trie-node.h" #include "xray-registry.h" #include "llvm/DebugInfo/Symbolize/Symbolize.h" #include "llvm/Support/EndianStream.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/JSON.h" #include "llvm/Support/ScopedPrinter.h" #include "llvm/Support/YAMLTraits....
TOOL
0.949423
7.399131
cc09f3dd-cba3-4005-98a1-fe204c312a59
makio93/competitive-atcoder
ahc015/ahc015_a/main0-1-t.cpp
// #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; #define rep(i, n) for (int i=0; i<(int)(n); ++(i)) #define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i)) #define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i)) #define rep3r(i, m, n) for (in...
ALGO
0.999838
3.753636
19c196ab-cbdb-4e90-ae23-5c0d3d3e749d
upul/CarND-PID-Control-Project
src/PID.cpp
#include "PID.h" #include <iostream> using namespace std; /* * TODO: Complete the PID class. */ PID::PID() {} PID::~PID() {} void PID::Init(double Kp_coefficient, double Ki_coefficient, double Kd_coefficient) { Kp = Kp_coefficient; Ki = Ki_coefficient; Kd = Kd_coefficient; p_error = 1.0; i_err...
ALGO
0.854238
5.584486
e865e147-9dbd-41c9-b847-00832856765a
sky8c9/Prac
AtCoder/ABC/246/D.cpp
#include <iostream> #include <algorithm> using namespace std; using ll = long long; ll compute(ll a, ll b) { return a*a*a + a*a*b + b*b*a + b*b*b; } void task() { ll n; cin >> n; ll ans = 5e18; for(int a = 0; a <= 1e6; a++) { ll lo = 0; ll hi = 1e6; while(lo < hi) { ll mid = lo + (hi - lo) / 2; ll...
ALGO
0.999623
5.029727
58c4ea35-0c55-4000-b015-76b1a241eaa3
Lamiiine/Competitive-Programming-1
Solutions/UVA/00544.cpp
#include<stdio.h> #include<vector> #include<algorithm> #include<string.h> #include<map> #include<string> #define MAX 205 #define MAXX 19905 using namespace std; int from[MAXX]; int to[MAXX]; int cost[MAXX]; int en; int n, r; int source, target; void addEdge(const int x, const int y, const int z){ from[en] = x; to[en]...
ALGO
0.999674
3.748262
96768986-af08-4f87-87e8-04cf1f7702f4
Rayhan-Ahmed108/Number-Theory
B_Longest_Divisors_Interval.cpp
// ALLAH IS ALMIGHTY // NEVER GIVE UP JEYAM // TRY TRY & TRY #include <bits/stdc++.h> #include <map> #include <set> using namespace std; #define ll long long int #define yes cout << "Yes\n"; #define no cout << "No\n"; #define pb push_back; #define FAST_IO \ { ...
ALGO
0.999176
4.702392
d80ccd09-ed1d-4599-9cfd-6f4fc0700aee
YSW0630/TOI_beginner
Zone.cpp
#pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #include <bits/stdc++.h> #define ll long long #define pii pair<int, int> using namespace std; struct Lucky_seven { int original, after_rem; }; bool flag_changer(bool f) { if (f == 1) return 0; else return 1; } void...
ALGO
0.993911
4.319955
9fa0f73c-5f4d-4735-bd7d-6cf13d349294
perqin/sicily
1293.cpp
using std::cin; using std::cout; using std::endl; int chainLength(int n) { int length = 1; while (n != 1) { if (n % 2) { n = 3 * n + 1; } else { n /= 2; } length++; } return length; } int main() { int i, j; int max = 0; cin >> i >> j; for (int n = i; n <= j; n++) { int ...
ALGO
0.99994
4.616973
f9e75b2a-dbad-408d-b26a-c9f0dd389e56
rishabh9260/My-Practice-Programs-And-Projects
C++ Projects/ITC17/MatChainMult.cpp
#include<bits/stdc++.h> using namespace std; void printParenthesis(int i, int j, vector<vector<int>> kMat, char &name); int matChain(int n, int order[]) { int dp[n+1][n+1]; vector<vector<int>> kMat(n+1, vector<int>(n+1)); for(int i=1;i<=n;i++) { dp[i][i] = 0; } for(int range=2;range...
ALGO
0.999983
4.210423
df3ee0f3-7e0a-4584-b750-386edc7f63b4
inf0craw1/algorithm
problems/1011/main.cpp
#include <bits/stdc++.h> #define debug if constexpr (local) std::cout #define endl '\n' #define fi first #define se second #define INF 0x7fffffff #define LINF 0x7fffffffffffffff #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() using namespace std; #ifdef LOCAL constexpr bool local = true; #else ...
ALGO
0.998743
4.055993
f8399ab9-de68-4e11-bb6c-a0959c16857d
fucc456/fucc
cocos2d/cocos/base/ccUtils.cpp
#include "base/ccUtils.h" #include <stdlib.h> #include "base/CCDirector.h" #include "base/CCAsyncTaskPool.h" #include "base/CCEventDispatcher.h" #include "base/base64.h" #include "renderer/CCCustomCommand.h" #include "renderer/CCRenderer.h" #include "platform/CCImage.h" #include "platform/CCFileUtils.h" #include "2d/...
TOOL
0.918312
6.041673
250ab3e0-dc52-4854-ae6b-af886a5523f2
bitnows/bitnow
src/sync.cpp
#include "sync.h" #include "util.h" #include "utilstrencodings.h" #include <stdio.h> #include <boost/foreach.hpp> #include <boost/thread.hpp> #ifdef DEBUG_LOCKCONTENTION void PrintLockContention(const char* pszName, const char* pszFile, int nLine) { LogPrintf("LOCKCONTENTION: %s\n", pszName); LogPrintf("Loc...
TOOL
0.962596
5.936528
5865ca42-b2b1-4dd2-8bf7-c30cd267b8fc
vaibhav9859/VD_DsAlgo_Code
GraphStriver/adjList_representation.cpp
#include <iostream> using namespace std; int main() { //n is number of vertices //e is number of edges int n, e; cin>>n>>e; //below is implementation of a graph via adj list vector<int> adj[n+1]; //Taking inputs and putting it into an adj list for(int i=0; i<e; i++){ int u, v;...
ALGO
0.999687
4.190755
8bc2a99a-b2bb-455b-ad7f-9b49547edd3f
danieltrt/SBFL
results/py/SCHEDULE_JOBS_SERVER_GETS_EQUAL_LOAD.cpp
int f_filled ( int * a , int * b , int n ) { int s = 0 ; for ( int i = 0 ; i != n ; i ++ ) s += a [ i ] + b [ i ] ; if ( n == 1 ) return a [ 0 ] + b [ 0 ] ; if ( s % n != 0 ) return - 1 ; int x = s / n ; foriinrange ( 0 , n ) { if ( ifa [ i ] > x ) return - 1 ; if ( ifi > 0 ) { a [ i ] += ...
ALGO
0.99973
3.112675
c9f56146-5516-41f6-ad64-68e16f70879a
ding-yt/CM
Lattices.cpp
#include "Lattices.h" #include <fstream> #include <sstream> #include "randgen.hpp" #include "Topology.h" #define PI 3.141592653 using namespace std; Lattices::Lattices(int xStep, int yStep, int initialCellNumber): root_normal(new GenealogyNode()), root_tumor(new GenealogyNode()), _xStep(xStep), _yStep(yStep), _cente...
ALGO
0.995324
4.016573
3b508970-2363-44a7-a9a6-ed397bbfe5d3
AzertP/VNOI_SPOJ
VCOWFLIX.cpp
#include <bits/stdc++.h> using namespace std; const int N = 20; int c, n, res; int w[N]; void choose(int a, int cost) { if (cost > c) return; if (a > n) { res = max(res, cost); return; } for (int i = 0; i < 2; i++) choose(a + 1, cost + w[a] * i); } int main() { scanf("%d%d", &c,...
ALGO
0.999961
3.652056
8e80d40e-b752-4a56-a295-b2aab96e9de1
shrig1/quantum-circuit-sim
eigen-3.4.0/doc/examples/QuickStart_example2_fixed.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { Matrix3d m = Matrix3d::Random(); m = (m + Matrix3d::Constant(1.2)) * 50; cout << "m =" << endl << m << endl; Vector3d v(1,2,3); cout << "m * v =" << endl << m * v << endl; }
ALGO
0.995042
3.375595
804d4c7d-e0c6-43e2-912d-e6d654638b3a
LuckFXY/Job
CPP/Leetcode/largest_num.cpp
// // Created by Administrator on 2018/8/25. // #include <iostream> #include <string> #include <vector> using namespace std; inline string num2str(unsigned num){ string s; char tmp; unsigned n, i=0; while(num){ int tmp = num % 10; s.push_back(tmp + 48); num = num / 10; } ...
ALGO
0.999857
5.385684
4dea02d9-48c6-407e-83da-4f098fa4c9a1
lamux04/practicas-DA
practica0/sesion2/Fibonacci/prueba-2.cpp
#include <iostream> #include "natural.hpp" #include "cronometro.hpp" natural f(natural n); // Genera la tabla de tiempos frente a n. int main() { cronometro c; for (natural n = 0; n <= 50; ++n) { const int r = 1000; c.activar(); for (int i = 0; i < r; ++i) f(n); c.parar(); std::cout << ...
ALGO
0.94419
4.899304
4f6f345e-ba14-400f-9cef-08573fe4b3a5
toxicparanoid/kurs_Cplusplus
2 блок/дз 2.4/2.cpp
#include <iostream> #include <fstream> #include <string> #include <algorithm> #include <windows.h> using namespace std; class Address { private: std::string city; std::string street; int houseNumber; int apartmentNumber; public: Address(const std::string& city, const std::string& street, int house...
ALGO
0.988709
5.086509
cde9ef0e-0ab2-4ee1-be2d-42067b9cc298
mohitsethia/competitive-programming
ladder_C/IceSkating.cpp
#include<iostream> #include<algorithm> #include<cstdio> #include<vector> using namespace std; #define int long long void dfs(vector<int>& x, vector<int>& y, int i, vector<int>& f, int& n){ f[i] = 1; for(int j = 1; j <= n; j++){ if(f[j] != 1 && (x[i] == x[j] || y[i] == y[j])){ dfs(x, y, j, ...
ALGO
0.999877
4.090967
ab859381-4b64-4e21-bab3-0e8978115a9b
tsawke/OI
AtCoder/ABC/ABC27X/ABC277D.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #define PI M_PI #define E M_E #define npt nullptr #define SON i->to #define OPNEW void* operator new(size_t) #define ROPNEW void* Edge::operator new(size_t){static Edge* P = ed; return P++;} #define ROPNEW_NODE void* Node::operator new(size_t){static Node* P = nd; ret...
ALGO
0.999973
3.656999
b3c6d5bb-c29c-4701-ad1f-b2206df27786
Ashish9717/Dsa-C-
Lecture4-Patterns/Third.cpp
#include<iostream> using namespace std; int main(){ int n=3; int num=1; for(int i=0;i<n;i++){ for (int j=0;j<n;j++){ cout<<num<<" "; num++; } cout<<endl; ...
ALGO
0.999943
3.488036
e3971d11-f4a5-431d-9cd2-443dd5d33d88
5h4kt1/DSA
Leetcode/2024/March/9.cpp
class Solution { public: int getCommon(vector<int>& nums1, vector<int>& nums2) { int i=0, j=0; while( i<nums1.size() and j<nums2.size()){ if(nums1[i]==nums2[j]) return nums1[i]; else if(nums1[i]<nums2[j]) i++; else ...
ALGO
0.999964
5.499462
df8f9b06-677b-4702-aba1-da720d3c57f2
AliHanyA/problem-solving
HackerRan/C++/ForLoop.cpp
#include <iostream> #include <cstdio> using namespace std; string numberToWords(int n) { switch (n) { case 1: return "one"; case 2: return "two"; case 3: return "three"; case 4: return "four"; case 5: return "five"; case 6: return "six"; case 7: return "seven"...
ALGO
0.999769
3.868775
efb2bf5c-0e6b-40a8-9823-275c422448b8
EddyHu71/Fundamental-Repository
Submission Challenge/Hackerearth/Divisibility.cpp
#include <iostream> using namespace std; int main() { int N = 0; string ans = "No"; cin>>N; long data[N]; for(auto i=0; i<N; i++) { cin>>data[i]; } if (data[N - 1] % 10 != 0) { ans = "No"; } else { ans = "Yes"; } cout<<ans; ...
ALGO
0.99954
3.898552
04049e37-868c-4f6e-9958-cb4dd8c16104
EasySocHacks/ITMO-AlgoLabs
Term_3-4/lab2/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int LEN = 1e4 + 9; const int K = 109; const ll INF = 1e18; int n, m, k, s; vector <pair<int, int>> g[LEN]; ll d[K][LEN]; int main() { cin >> n >> m >> k >> s; s--; int v, u, w; for (int i = 0; i < m; i++) { cin >> v ...
ALGO
0.999934
4.028135
da51ae79-36a2-4a19-81ab-1610a0c9b409
203420/app_gps_detection
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.998841
6.783336
8f9645a8-5b38-4e2b-aa51-2527cf0db468
ankita-vc/CPP_ProgramsLB
Program206.cpp
/* Take two numbers from user and return largest number by using object orientation: */ #include<iostream> using namespace std; class Number { public: int iNo1; int iNo2; int Maximum() { if(iNo1 > iNo2) { return iNo1; } else { return iNo2; } }...
ALGO
0.995845
4.306059
887c0338-d789-495a-9ad8-4ef50da477f6
wahyuandhikarizaldi/Struktur-Data-B
Pertemuan 12_Graph Traversals/Tugas 2.cpp
#include <iostream> #include <iterator> #include <list> #include <queue> using namespace std; class Graph { protected: int v; list<int> adj[100]; int pred[100]; int dist[100]; public: Graph(int len) { v = len; } void addEdge(int u, int v){ ...
ALGO
0.999694
4.707173
d7a67ce1-eed8-4cdb-aeb0-98456fd12235
luckoo1/algorithm
CPP/programmers_R1/PROG_44_1.입국심사.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; long long solution(int n, vector<int> times) { long long answer = 0; if(times.size()==1) { return n*times[0]; } sort(times.begin(),times.end()); long long start = 1; long long end = n * (long long)times[t...
ALGO
0.999954
5.428946
51d2db90-9cb3-46b5-bd6f-0f5af6cda35c
ymg5218/CodingTest_C
CodingTest_C/백준/브론즈/별 찍기 - 8.cpp
// 2445 #include <iostream> using namespace std; int main(void) { int N; cin >> N; for (int i = 1; i <= N; i++) { for (int j = 1; j <= i; j++) { cout << "*"; } for (int k = 1; k <= N - i; k++) { cout << " "; } for (int k = 1; k <= N - i; k++) { cout << " "; } for (int j = 1; j <= i; j++) { ...
ALGO
0.999944
3.836566
ae88302b-4fa9-4710-8bf6-a6e54e038c2a
taranjeet/programs
codechef/ren2013a.cpp
#include "bits/stdc++.h" using namespace std; int convert(int n,int base,int c) { int s=0,r; for(int i=0;i<c;i++) { r=n%10; s+=r*pow(base,i); n/=10; } /*cout<<s<<endl;*/ return s; } int findbase(int n) { int m=-1,c=0,a=n,r; while(n!=0) { r=n%10; if(r>m)m=r; n/=10;c++; } /*cout<<m<<endl;*/ return...
ALGO
0.999631
4.334434
6332f04d-13a8-47da-9b6b-51f35c421f68
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_12132_79.cpp
#include <bits/stdc++.h> using namespace std; int main() { int b; cin >> b; cout << b % 2; return 0; }
ALGO
0.999782
3.441921
5a5e176c-0ed8-4cef-8613-14440f5c4bc6
ishandutta2007/codeforces
emiso/normal/1375/B.cpp
#include <bits/stdc++.h> #define MN 1001000 using namespace std; typedef long long ll; ll n, t, m, lixo; int main() { scanf("%lld", &t); st: scanf("%lld %lld", &n, &m); int can = 1; for(int i = 0; i < n; i++) { for(int j = 0; j < m; j++) { scanf("%lld", &lixo); ...
ALGO
0.9998
3.450071
82820c37-1221-4a6b-964e-0abcd898b7ae
thipham0502/Trau
Project1/Khi.cpp
//#include <iostream> //#include <iomanip> //#include <stdlib.h> //#include <math.h> //using namespace std; // //int* findMaxMin(double num[], int n) { // int i, result[2], max, min; // // max = num[0]; // min = num[0]; // for (i = 1; i < n; i++) // { // if (max < num[i]) // max = num[i]; // if (min > num[i]) // ...
ALGO
0.999952
4.106535
3ea70309-9e19-4621-9842-d558b7334c52
girishofficial/Weather_ops
frontend/venv/lib/python3.12/site-packages/sklearn/svm/src/liblinear/tron.cpp
#include <math.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include "tron.h" #ifndef min template <class T> static inline T min(T x,T y) { return (x<y)?x:y; } #endif #ifndef max template <class T> static inline T max(T x,T y) { return (x>y)?x:y; } #endif static void default_print(const char *buf) {...
ALGO
0.999671
5.845381
95917552-16ed-4078-87f8-2aefa85a36c6
mendoncagary/self-driving-car
project_10_MPC_control/src/Eigen-3.3/unsupported/doc/examples/MatrixFunction.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; std::complex<double> expfn(std::complex<double> x, int) { return std::exp(x); } int main() { const double pi = std::acos(-1.0); MatrixXd A(3,3); A << 0, -pi/4, 0, pi/4, 0, 0, 0, 0, 0; std::...
ALGO
0.999154
4.353816
793d0749-4d8b-4c23-8301-07888ae196d5
FangYang970206/Leetcode
Difficulty/Medium/[210] Course Schedule II/solution.cpp
/* * @lc app=leetcode id=210 lang=cpp * * [210] Course Schedule II */ // @lc code=start class Solution { public: vector<int> findOrder(int numCourses, vector<vector<int>>& prerequisites) { vector<int> degrees(numCourses, 0); vector<vector<int>> graph(numCourses); vector<int> coursesOrde...
ALGO
0.999988
6.81098
62b33c9c-08ce-48af-be49-5f51fccef7b6
YaroslavDrovolskyi/pi_programming_2021
lab_2b_14/Main.cpp
#include <iostream> #include <cassert> //using namespace std; enum Program_Mode { Exit, Interactive, Demonstrative }; template <typename DataType> struct ListNode { ListNode<DataType>* next; DataType data; int priority; ListNode<DataType>(DataType data, int priority, ListNode* next = nullptr) { this->data = ...
TOOL
0.938064
4.802219
8c2ddc13-34c6-4057-a484-60e250125cf5
wldfngrs/Cpp-Crash-Course-exercises-solutions
9-Functions/9-2 main.cpp
#include <cstdint> #include <cstdio> int main(int argc, char** argv) { size_t index{}; int count{}; for (int i = 1; i <= argc; i++) { while(argv[i][index]){ ++count; ++index; } printf("Argument #%d: ", i); for (int k = 0; k < count; k++) { printf("*"); } printf("\n"); } }
TOOL
0.947718
4.111005
4ef38726-8fcc-4737-ba8e-e4abc1318b59
jailsonevora/yandex-cpp-for-competitive-programming
Yandex 4.7/D.CounttheWordsandtheLines.cpp
#include <iostream> #include <string> #include <sstream> #include <fstream> #include <algorithm> using namespace std; int countLines(){ string line; int countNoEmptyLine = 0; ifstream MyReadFile("C:/Competitive Programming/yandex-cpp-for-competitive-programming/Yandex 4.7/inputD.txt"); while(!getli...
ALGO
0.966026
4.739726
6e7ec156-fbe9-44ab-868d-9f26b3ef9ca0
Dilyannn/Mersenne-numbers
main.cpp
#include<iostream> #include <cmath> #include "mersenne.h" using namespace std; int main() { int number; do { cout << "Enter a number from 1 to 10: " << endl; cout << "(Enter 0 to terminate the program) " << endl; cin >> number; switch (number) { case 1: cou...
ALGO
0.988678
3.968652
5feedb7b-0e70-4b9d-9544-ee48a0a11279
skift-org/vaev
src/vaev-engine/layout/positioned.cpp
module; #include <karm-math/au.h> export module Vaev.Engine:layout.positioned; import :values; import :layout.layout; import :layout.values; namespace Vaev::Layout { Vec2Au _resolveOrigin(Vec2Au fragPosition, Vec2Au containingBlockOrigin, Position position) { if (position == Position::RELATIVE) { retur...
TOOL
0.90441
7.298239
fd0a0d48-f4e8-405f-8a29-19e4965f2530
violetdoroshko/algorithm_theory
Recurrent relations/z6/main.cpp
#include<iostream> #include<fstream> using namespace std; int upper_bound(long* arr, int n, long number, int l, int r) { int k; while (l < r) { k = (l + r) / 2; if (number >= arr[k]) { l = k + 1; } else { r = k; } } return r; } int longestIncreasingSubsequenceLength(long* numbers, int n) { if (...
ALGO
0.99984
4.657895
b537aee8-f9f8-47fc-b7de-96c27c9a0f4b
princy1103/DSA-CPP
FINAL_EXAM/practical1/linkedList.cpp
//Linked List #include<iostream> using namespace std; class node { public: int data; node *next; node(int data) { this->data=data; this->next=NULL; } }; class linkedlist { public: node *head; linkedlist() { this->head=NULL; } void insertAtHead(int...
ALGO
0.996827
4.535707