uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
6b8003a1-622a-450e-ac9a-8075c6ef963e
mr-ilin/oop
oop_exercise_03/figure.cpp
// // figure.cpp // oop_exercise_03 // // Created by Илья Ильин on 16.10.2020. // #include <vector> #include <iostream> #include <stdio.h> #define _USE_MATH_DEFINES #include <cmath> struct Point // Структура для хранения координат точек на плоскости { double X = 0; double Y = 0; }; inline std::ostream& op...
ALGO
0.974763
5.346007
8bd3b0f1-2866-4a20-87fa-5cd9ae089a2b
ishandutta2007/codeforces
irkstepanov/normal/614/A.cpp
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define sz(a) static_cast<int>((a).size()) #define all(a) (a).begin(), (a).end() #define forn(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long ll; int main() { //ifstream cin("input.txt"); //ofstream cout("correct.tx...
ALGO
0.99994
3.111749
a4b4ea95-5098-4540-8f53-393c16d1b6fa
WeiChienHsu/CS165
week4/Person/stdDev.cpp
/********************************************************************* ** Author: Wei-Chien Hsu ** Date: 04/24/18 ** Description: stdDev function that takes two parameters - an array of Person objects and the size of the array and returns the standard deviation of al...
ALGO
0.999278
5.223921
3457763f-7813-4354-8fbb-9b266282b1da
prabhsimar100/Backup-for-Codes-Competitive-Programming-
tricky permutations.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define P pair<int,int> #define pb push_back vector<string> ans; void permute(string a,int l, int r) { if(l==r) {ans.pb(a); return;} for (int j=l; j<=r; j++) // if(a[l]!=a[j] || j==l) { swap(a[l],a[j]); permute(a,l+1,r); swa...
ALGO
0.99993
5.117997
0294be93-5cc1-4518-a27b-d377e645cd0e
MTDau/Leet_Code
27_Remove_Element.cpp
//Use std library class Solution { public: int removeElement(vector<int>& nums, int val) { int c{}; for (int i{}; i < nums.size(); i++) { if (nums[i] != val) { c++; } } std::remove(nums.begin(), nums.end(), val); return c; } }; //...
ALGO
0.999663
6.28029
b87ec9c4-4a82-41b8-8902-a8c932de94ed
gregorburger/SAGA-GIS
src/modules_lectures/lectures/lectures_introduction/Exercise_04.cpp
//--------------------------------------------------------- /////////////////////////////////////////////////////////// // // // // // // /////////////////////////////////////////////////////////// //--------------------------------------------------------- #include "Exercise...
ALGO
0.99986
5.189369
215f86a3-f2c3-4d63-9982-eca4335cae3a
0xYashwanth/dsa-learning
strings/isSubSeq.cpp
#include<bits/stdc++.h> using namespace std; bool isSubSeq(string s1,string s2,int m,int n) { int j=0; if(m<n) return false; for(int i=0;i<m&&j<n;i++) { if(s1[i]==s2[j]) j++; } return (j==n); } int main() { return 0; }
ALGO
0.99996
3.142225
2e8ce57e-96b2-4872-bbc5-0127aa3665d5
OurLokmanHossen/Competitive_Programming
P_03_Way_Too_Long_Words.cpp
#include <iostream> using namespace std; int main() { int n ; cin >> n; while(n--) { string s; cin >> s; if(s.length()>10) cout << s[0] << s.length()-2 << s.back() << endl; else cout << s << endl; } return 0; }
ALGO
0.996893
3.408038
0c4c51b2-4799-44a8-ba3e-35e40b40e92c
Jagrit2703/Questions-Solved
intersection-of-two-arrays-ii/intersection-of-two-arrays-ii.cpp
class Solution { public: vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { vector<int>vec; unordered_map<int,int>nm1,nm2; for(int i:nums1){ nm1[i]++; } for(int i:nums2){ nm2[i]++; } for (int i : nums2) { if (nm1.count(i) && nm1[i] > 0) { ...
ALGO
0.999953
5.682338
0e16ba3f-6e2a-47d3-bd68-ee779739ec82
k0c0h/KERLLY_2024
ESTRUCTURA DE DATOS/DEBERES/PRIMER_PARCIAL/DEBER4 - Recursividad/SIMPLE/main.cpp
#include <iostream> #include "Suma.h" using namespace std; int main() { int N; cout << "Introduce un numero: "; cin >> N; Suma sum; cout << "Suma de los primeros " << N << " numeros es: " << sum.compute(N) << endl; return 0; }
ALGO
0.977847
4.074674
bc883371-c5d1-42fe-b798-e674bde0c47e
lsp-plugins/lsp-dsp-units
src/main/dynamics/Expander.cpp
#include <lsp-plug.in/dsp-units/dynamics/Expander.h> #include <lsp-plug.in/dsp-units/misc/interpolation.h> #include <lsp-plug.in/stdlib/math.h> #include <lsp-plug.in/dsp/dsp.h> #include <lsp-plug.in/dsp-units/units.h> namespace lsp { namespace dspu { static constexpr float MINIMUM_TILT = 0.001f...
ALGO
0.990385
6.145326
272e4679-eb77-460b-9ab7-df3a869da206
vfolunin/archives-solutions
LeetCode/1766.cpp
class Solution { void rec(vector<vector<int>> &graph, int v, int p, vector<int> &values, int depth, vector<vector<pair<int, int>>> &ancestors, vector<int> &res) { int ancestor, minDist = 1e9; for (int i = 1; i < ancestors.size(); i++) { if (!ancestors[i].empty() && ...
ALGO
0.999986
5.409583
231ffb87-8276-4ca3-a3b1-6cd7685886d0
SUMITRA021/DSA
Arrays/PrintPair.cpp
#include<iostream> using namespace std; void PrintPair(int arr[],int size) { for (int i = 0; i < size;i++) { for (int j = 0; j < size;j++) { cout << arr[i] <<", "<< arr[j] <<endl; } } // cout << "---------other-------------------" << endl; // for (int i = 0; i ...
ALGO
0.92289
3.878292
d00adcc7-f4cb-4ec9-9800-4f4a4d003aa5
pailiuliu/Operating-Systems
LAB02/LAB02/Source.cpp
#include <sys/types.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #define P2_READ 0 // Parent reads from this node #define CH_WRITE 1 // Child writes on this node #define CH_READ 2 // Child reads from this node #define P2_WRITE 3 // Parent writes to this n...
ALGO
0.933516
4.255048
ff3a482e-a194-4955-aa22-ca433f0658bf
arshuroshan/Programming-Workouts
1631-number-of-sub-arrays-with-odd-sum/1631-number-of-sub-arrays-with-odd-sum.cpp
class Solution { public: int numOfSubarrays(vector<int>& arr) { const int mod = 1e9 + 7; int odd = 0, even = 1; int sum = 0, ans = 0; for (int x : arr) { sum += x; if (sum % 2 == 0) { ans = (ans + odd) % mod; even++; ...
ALGO
0.999994
6.018136
af2dfce1-5cdb-478a-8537-b090a7f847dd
ritesh-raushan/problem-solving
codeforces/contests/round-964-div4/A_A_B_Again.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' void solve() { int n; cin >> n; int sum = (n / 10) + (n % 10); cout << sum << endl; } signed main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while(t--) { solve(); ...
ALGO
0.999754
5.9118
401a8319-5ba0-42c6-91b4-23a18b089cff
ganghe74/algo
baekjoon/2252_줄 세우기.cpp
#include <bits/stdc++.h> using namespace std; vector<int> a[32001]; int ind[32001]; int main() { int N, M; scanf("%d%d", &N, &M); while (M--) { int u, v; scanf("%d%d", &u, &v); a[u].push_back(v); ind[v]++; } queue<int> q; for (int i=1;i<=N;++i) if (!ind[i]...
ALGO
0.999997
4.47472
1fc2a74f-c110-4980-8de9-4e6b68c08c8c
vsumanbabu/SelfDrivingCar-PathPlanning
src/Eigen-3.3/doc/examples/class_CwiseUnaryOp_ptrfun.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define function to be applied coefficient-wise double ramp(double x) { if (x > 0) return x; else return 0; } int main(int, char**) { Matrix4d m1 = Matrix4d::Random(); cout << m1 << endl << "becomes: " << endl << ...
ALGO
0.963992
4.120226
d869ab17-ae70-4cbf-b101-e1dc29490df1
SaiSabaresh1673/C-DSA
slidingwindow/firstnegative.cpp
#include<iostream> #include<algorithm> #include<limits.h> using namespace std; int main(){ int arr[]={2,3,4,4,-7,-1,4,-2,6}; int n=sizeof(arr)/sizeof(arr[0]); int k=4; int p=-1; int ans[n-k+1]; for(int i=0;i<k;i++){ if(arr[i]<0){ p=i; break; } } ...
ALGO
0.999946
3.345097
441f72ec-6167-4205-83ca-7977954ab601
Ayush-Vish/DSA-CP-Codes
specialist/B_Omkar_and_Last_Class_of_Math.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int void solve(){ int n ; cin >> n ; if(n % 2 == 0 ) { cout << n/2 << " " << n/2 << endl; return; } int i=3; for(i=3;i *i <=n ;i ++) { if(n % i ==0 ) { c...
ALGO
0.999944
4.653659
edf9ce51-977d-4c52-80e4-4824dff8b02d
MohammadElsharqawy/CompetitiveProgramming
codeforces/1433/D.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=200005; int arr[300005]; bool done[300005]; set<int>s1; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int t;cin>>t; while(t--){ s1.clear(); memset(done,0,sizeof done); int n;cin>>n; ...
ALGO
0.999187
3.436965
73d4957a-b214-4a68-a73e-709b59729152
mayank9804/Prelude-to-CP
Geeks4Geeks DS/Stacks/Largest Rectangular Area in a Histogram.cpp
#include <bits/stdc++.h> using namespace std; int maximumAreaOfRectangle(vector<int> &arr){ arr.push_back(0); int area = 0; int maxarea = area; stack<int>st; int i=0; while(i<arr.size()){ if(st.empty()){ cout<<"Initialized empty stack by "<<arr[i]<<"\n"; st.push(...
ALGO
0.999741
5.396186
7f725156-9ae5-4773-a9e9-016f90350090
Rhithick02/C-code
Google/Kickstart/2020/RoundE/A.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization ("unroll-loops") #include<bits/stdc++.h> using namespace std; #define lli long long #define For(i,a,n) for(int i=(a);i<n;i++) #define asc(x) x.begin(),x.end() #define des(x) x.rbegin(),x.rend() #define pb push_back #define fi firs...
ALGO
0.999386
4.046895
acb73d3a-c96e-40a7-a270-a2fd1de47957
Anurag340/BST
ValidateBST-INORDER.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.999996
6.805582
d2ffd198-d765-43b5-bf93-87832b265567
sahilgupta0607/Data-Structures-Algorithms
Revision/Week 5 Arrays I/Q1.cpp
//Calculate the product of all the elements in the given array. #include<iostream> using namespace std; int main(){ int n; cout<<"Enter the size of the array: "; cin>>n; int arr[n]; cout<<"Enter the elements of the arrray: "; for(int i=0; i<n; i++) cin>>arr[i]; int product = 1; for(...
ALGO
0.999546
3.920551
eb579e06-2cc1-4b29-8d99-333cfbd1e4f2
thisisfaizanali/Strivers-SDE-Sheet
Arrays-1/kadane-algo-max-subarray.cpp
class Solution { public: int maxSubArray(vector<int> &nums) { long long sum = 0; long long maxi = LONG_MIN; int n = nums.size(); for (int i = 0; i < n; ++i) { sum += nums[i]; if (sum > maxi) { maxi = sum; } ...
ALGO
0.999948
5.873234
83679361-ef16-44ca-92cc-69d8b81cd512
omar-diab-3rd/news_app
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
e6db8941-ed28-4bf1-bb82-0a8826cf47ed
theodore/olympiads
USACO/Latin.cpp
/* PROB: latin LANG: C++ */ #pragma warning(disable: 4996) #include <iostream> //#define OUTPUT //#define OUT using namespace std; int n, num[10][10]; long long ans; bool hor[10][10], ver[10][10]; const int fact[] = {1, 1, 2, 6, 24, 120, 720}; #if defined (OUT) || defined (OUTPUT) void output(){ for (int i=0; i<n;...
ALGO
0.999809
3.279836
9425c182-7a3a-472e-bfe7-f34e3bdf53b4
vkozareva/Analogizer
src/run_nmf.cpp
#include "debug.h" #include <RcppArmadillo.h> // [[Rcpp::depends("RcppArmadillo")]] using namespace Rcpp; using namespace arma; using std::cout; using std::endl; DenseMatrix r_to_cpp(const NumericMatrix& A) { int n = A.nrow(); int m = A.ncol(); DenseMatrix X = DenseMatrix(n,m); for(int i = 0; i < n; ++i) { f...
ALGO
0.999384
5.753693
7c0fc87e-5d22-4417-ba5a-e248b42a6f8f
RMD663/C-Aula-2
Numeros impares while/cd.cpp
#include <iostream> #include <locale.h> using namespace std; int main(){ int resto, numero, soma, vezes, impar; cout<<"Insira um numero: "; cin>>numero; vezes = 0; impar = 1; while(vezes <= numero){ cout<<"\n"<<impar; impar = impar + 2; vezes++; } return 0; }
ALGO
0.997305
3.349632
15aa2863-7c5a-4db8-ba8a-7d8d8db3b756
hitarth-gg/CP
CodeForces/archive/1675B - Make It Increasing.cpp
// clang-format off #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace chrono; using namespace __gnu_pbds; /* ------------------------ debug ----------------------- */ #define trace1(x) cerr<<#x<<": "<<x<<endl #def...
ALGO
0.99988
4.863537
4c87e0a8-e1df-4ac1-ac81-ebae87515b49
ishandutta2007/codeforces
ei133333/normal/1279/F.cpp
#include <bits/stdc++.h> using namespace std; using int64 = long long; //const int mod = 1e9 + 7; const int mod = 998244353; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10)...
ALGO
0.999974
4.457455
27790b32-6f42-4282-ba86-e0df27f2be68
Anonymous4test/GORAM
aby3/aby3-GORAM-Core/BoolBasic.cpp
#include <aby3/Circuit/CircuitLibrary.h> #include <aby3/sh3/Sh3BinaryEvaluator.h> #include <bitset> #include <fstream> #include <iostream> #include <random> #include <string> #include <cmath> #include "../aby3-RTR/debug.h" #include "../aby3-RTR/BuildingBlocks.h" #include "Basics.h" #define DEBUG_BASIC using namespa...
ALGO
0.996285
5.854088
c59f464f-9d65-4c9b-9a47-b5a3083f73c4
Sivernial/DsaCourse
Jelousy.cpp
#include <iostream> using namespace std; void swap(int *a, int *b) { int t = *a; *a = *b; *b = t; } int partition(int arr[], int low, int high) { int pivot = arr[high]; int i = (low - 1); for (int j = low; j <= high - 1; j++) { if (arr[j] < pivot) { i++; ...
ALGO
0.999965
4.488181
c3ec6468-32ad-47a9-a5a4-b47da4823357
gustisalsatin/KOMGRAF4704
HW 6/Rotasi.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; void rotasi(int &x, int &y, double theta) { double x_double = x; double y_double = y; x = static_cast<int>(x_double * cos(theta) - y_double * sin(theta)); y = static_cast<int>(x_double * sin(theta) + y_double * cos(theta)); ...
ALGO
0.999862
5.012116
abc8cc13-5ce2-4799-b7f3-2f4d43b3f6e2
suntt2019/noiOJ
1.7_string/01.cpp
#include <stdio.h> int main(){ char str[256]={'\0'}; int cnt=0; fgets(str,256,stdin); for(int i=0;i<256;i++){ if(str[i]>='0'&&str[i]<='9')cnt++; } printf("%d\n",cnt); return 0; }
ALGO
0.989311
3.047963
5626f0ac-11dd-43dc-8afa-407bdf969e4a
nmhienbn/Competitive-Programming
Mr.Minh/$History/20210812200633927_063764481828348[BNMINHHIEN][maugiao].cpp
#include <bits/stdc++.h> #define fi(i, a, b) for(int i = a; i <= b; i++) #define fid(i, a, b) for(int i = a; i >= b; i--) #define pii pair<int,int> #define pb push_back #define ll long long #define faster ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); #define Seraphine "maugiao" const int maxn = 25; usin...
ALGO
0.999962
3.286854
58a1969b-9983-4e56-8193-1b63e16d9bca
Robin005cr/Professional_CPP
Virtual_and_Pure_Virtual/PureVirtualFunction.cpp
/* * project : https://github.com/Robin005cr/Professional_CPP * file name : PureVirtualFunction.cpp * author : Robin CR * mail id : <EMAIL> * LinkedIn : https://www.linkedin.com/in/robin-cr/ * portfolio : https://robin005cr.github.io/ * * Note : If any mistakes, errors, or inconsistencies are found in the code,...
TOOL
0.884318
6.371224
0fbc69e0-39be-45e7-87cf-25083775910b
Linuxydable/Godot_STL
thirdparty/assimp/code/PostProcessing/ImproveCacheLocality.cpp
/** @file Implementation of the post processing step to improve the cache locality of a mesh. * <br> * The algorithm is roughly basing on this paper: * http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf * .. although overdraw reduction isn't implemented yet ... */ // internal headers #include "Pos...
ALGO
0.99426
6.310197
bae78c1e-6326-45dc-83f5-909f539117ed
kidclone3/CP
OnlineJudge/uCode.vn/Sumeven2.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define vi vector<int> #define ll long long #define all(x) x.begin(), x.end() #define F_OR(i, a, b, step) for (int i = (a); (step) > 0 ? i < (b) : i > (b); i += (step)) #define EACH(x, a) for (auto &x : a) #define BUG(x) \ { ...
ALGO
0.999687
3.498468
c612b2e1-c699-4f28-bf6b-2d03fe3c329d
doocs/leetcode
solution/0300-0399/0340.Longest Substring with At Most K Distinct Characters/Solution.cpp
class Solution { public: int lengthOfLongestSubstringKDistinct(string s, int k) { unordered_map<char, int> cnt; int l = 0; for (char& c : s) { ++cnt[c]; if (cnt.size() > k) { if (--cnt[s[l]] == 0) { cnt.erase(s[l]); ...
ALGO
0.999978
6.381851
d25a9c59-4bd7-4ca8-818c-476bbe693061
bestswifter/LeetCode
Projects/第十一题/第十一题/main.cpp
#include <iostream> #include <vector> using namespace std; int maxArea(vector<int>& height); int main(int argc, const char * argv[]) { std::vector<int> array1 = {1,2,2,1}; std::vector<int> array2 = {1,2,3,5,8,6,4,2}; std::vector<int> array3 = {1,0,0,5,8,4,12,5,0,6,3,2,17,4}; std::vector<int> arra...
ALGO
0.999584
5.96571
025c3ac7-dc20-4f1a-a107-fc2c756b6a3f
AlternatingCurrent/TrafficSimulator
increasespeedmedium.cpp
#include "increasespeedmedium.h" IncreaseSpeedMedium::IncreaseSpeedMedium() { } void IncreaseSpeedMedium :: decision(vector<Vehicle*> vehicles, Vehicle * currentVehicle){ bool collidesWithItemInFront = false; for(int i =0; i< vehicles.size(); i++){ if(currentVehicle->area->collidesWithItem(vehicle...
ALGO
0.927035
5.542554
efdeeecd-7452-4ccd-ba31-0e494f8f281d
pinak/lib-algo-ds
leetcode-august/goat_latin.cpp
#include <sstream> #include <vector> #include <string> #include <unordered_set> using namespace std; class Solution { private: unordered_set<char> const _vowels{'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'}; string const _suffix ="ma"; vector<string> tokenize(string const& s) { stringstre...
ALGO
0.994028
7.153189
49b5e454-118c-43f5-a369-fc083b6cc784
IngyoKim/Baekjoon_Cpp
10000~10999/10818.cpp
#include <iostream> using namespace std; int main() { int a, arr[1000000],min = 1000000, max = -1000000; cin >> a; for (int i = 0; i < a; i++) { cin >> arr[i]; } for (int i = 0; i < a; i++) { if (max < arr[i]) { max = arr[i]; } if (min > arr[i]) { min = arr[i]; } } cout << min << " "...
ALGO
0.999955
3.827689
629331a4-29e7-4a04-bc29-a4b57e029ec5
MichalSara99/lss
pde_solvers/experimental/3d/heat_type/splitting_method/lss_heat_douglas_rachford_method_3d.cpp
#include "lss_heat_douglas_rachford_method_3d.hpp" #include "../../../../../common/lss_macros.hpp" #include "../../../../../discretization/lss_grid.hpp" namespace lss_pde_solvers { using lss_grids::grid_3d; namespace three_dimensional { void implicit_hhw_scheme::rhs_intermed_1(hhw_implicit_coefficients_ptr const &...
ALGO
0.99984
5.080246
1311b76e-34f9-4f6b-a5c5-4f6c4ab6c753
EricWenyi/Eric_recent_work
C_Workspace/SubTree/main.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class TreeNode { public: int val; TreeNode *left, *right; TreeNode(int val) { this->val = val; this->left = this->right = NULL; } }; class Solution { public: /** * @param T1, T2: The roots of bi...
ALGO
0.999944
5.608907
f584bf6e-093a-46cd-8d90-9d025a0cd75a
joydip10/UVA
uva11364.cpp
#include<iostream> #include<algorithm> using namespace std; int main() { int a[20]; int tc; cin>>tc; while(tc--) { int n; cin>>n; for(int i = 0;i<n;i++) { cin>>a[i]; } sort(a,a+n); cout<<2*(a[n-1]-a[0])<<endl; } return 0; }
ALGO
0.996274
3.549839
fb4a7d30-9d91-4ccd-bb8d-bf07f6aeb7ef
atu-guda/qontrol
elems/tcorralalysis.cpp
#include <cmath> #include "miscfun.h" #include "tcorralalysis.h" const char* TCorrAnalysis::helpstr = "<H1>TCorrAnalysis</H1>\n" "Correlational analysis for x=u0; y = u1: <br>\n" "Unstable: Information about parameters see in info."; STD_CLASSINFO(TCorrAnalysis,clpElem ); CTOR(TCorrAnalysis,TMiso) { } void TCorrA...
ALGO
0.990171
5.832872
47135aa9-b26c-4ca6-b8b8-cd5c6596f15c
kevinh091/Http1.0-Server
myhttpd.cpp
#define BUF_LEN 8192 #include <fstream> #include <unordered_set> #include <sys/stat.h> #include <sstream> #include <sys/time.h> #include <errno.h> #include <dirent.h> #include <iomanip> // for put_time #include "debug.h" #include "semaphore.h" #include "myhttpd.h" #define ACCEPTMESSAGE "You are now logged in to the ...
WEB
0.87986
3.263552
60122356-375a-4ebc-b601-e2d651743fa3
PetrovIliya/OOP
lw1/crypt/crypt.cpp
#include <iostream> #include <string> #include <exception> #include <fstream> using namespace std; const string CRYPT_EXECUTION_MODE = "crypt"; const string DECRIPT_EXCECUTION_MODE = "decrypt"; enum ExecutionMode { CRYPT, DECRYPT }; struct Args { string inputFileName; string outputFileName; Executi...
TOOL
0.997207
5.613018
994f133d-f5ff-4ce3-9a91-d26463ca15da
charanhu/Data_StuctureWith_CPlusPlus
LinkedList.cpp
#include<iostream> using namespace std; struct Node { int data; struct Node* next; }; struct Node * head=NULL; void InsertAtBegining(int data){ struct Node * newNode= (struct Node*)malloc(sizeof(struct Node)); newNode->data=data; if(head==NULL){ head=newNode; newNode->next=NULL; ...
ALGO
0.997761
3.926682
c8ce0cdb-4a28-4427-8d1f-6186a3fdd8a7
aiiselo/HSE-software-engineering
2nd course/Algorithms and Data Structures/Searching Algorithms/binary_search.cpp
#include <iostream> using namespace std; void printArray(int arr[], int n){ for (int i = 0 ; i < n ; i++) cout << arr[i] << " "; cout<<"\n"; } void binarySearch(int arr[], int n, int arg){ int l_w = 0, r_w = n-1, mid; while (l_w <= r_w){ mid = (r_w + l_w)/2; cout << arr[mid] << " "; ...
ALGO
0.999885
5.32536
15890cbd-d169-4de0-b195-ea7ad32d8f48
cyjdlhy/DreamInit
Pool_LucidDreamer/submodules/diff-gaussian-rasterization/third_party/glm/test/core/core_func_integer_find_msb.cpp
#include <glm/glm.hpp> #include <cstdio> #include <cstdlib> // To define "exit", req'd by XLC. #include <ctime> #define LE 1 // 1 for little-endian, 0 for big-endian. int pop(unsigned x) { x = x - ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0...
ALGO
0.998631
3.60046
864a3698-c80a-417b-a905-d1e65ff06fa1
sb2356-iiitr/Graphics-and-Opengl
graphics/02_09/MidPoint_Circle/Midpoint_2019UGCS028R.cpp
#include <iostream> #include <conio.h> #include <graphics.h> #include <stdio.h> #include <cmath> #include <math.h> using namespace std; void midpoint(int x, int y, int r) { int xk = r; int yk = 0; int err = 0; while (xk >= yk) { putpixel(x+xk, y+yk, YELLOW); putpixel(x+yk, y+xk, Y...
ALGO
0.982157
4.472402
da52b407-a448-4b0e-8ac4-75374266ff18
akastoras/spic
src/sparse_system.cpp
#include <iomanip> #include <iostream> #include <vector> #include <Eigen/Core> #include <Eigen/Dense> #include "netlist.h" #include "sparse_system.h" namespace spic { /* Implemantation of the Sparse MNA System */ MNASparseSystem::MNASparseSystem(Netlist &netlist, int total_nodes) : MNASparseSystem(netlist, tota...
ALGO
0.995883
4.683958
88d3e62d-2965-45da-9619-eb86eb66a929
eren-mikasa/Leetcode-Parctice
Leetcode Daily Challenge/October-2020/16. Search a 2D Matrix.cpp
/* Search a 2D Matrix ================== Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right. The first integer of each row is greater than the last integer of the previous row. Example 1: Input: matri...
ALGO
0.999947
6.894308
45ba45f1-c3ea-46e5-8297-9f682028a4f4
NAMYUNWOO/ProblemSolving
N1915.cpp
# include<cstdio> # include<vector> # include<algorithm> using namespace std; vector<vector<int> >T; int getAns(int,int); int ans = 0; int n,m; int main(){ scanf("%d %d",&n,&m); T.assign(n+1,vector<int>(m+1,0)); for(int i = 1;i<=n;i++){ for (int j = 1;j<=m;j++){ scanf("%1d", &T[i][j]); ...
ALGO
0.999887
3.211527
5b36909d-1581-435b-bd84-df7bf232c676
littleCub224/CodingTest
DFS/DFS_1_Dimension/DFS_1_Dimension.cpp
#include <iostream> #include <vector> using namespace std; const int n = 6; vector<int> adj[n]; int visited[n]; void DFS(int here) { visited[here] = 1; cout << here << "\n"; for (int there : adj[here]) { if (visited[there] == 0) { DFS(there); } } cout << here << "로부터 시작된 함수 종료\n"; return; } int main...
ALGO
0.999544
5.158126
c20f2238-d721-4cdb-ba13-7d17f84c2f2c
RomanKalkreuth/boolean-benchmark-builder
functions/logical/OR.cpp
/* * Implements bitwise OR * * Author: Roman Kalkreuth, * https://orcid.org/0000-0003-1449-5131, * https://www.researchgate.net/profile/Roman-Kalkreuth, * https://twitter.com/RomanKalkreuth */ #include "../../functions/logical/OR.h" int OR::execute(int* ops) { int result = 0; res...
TOOL
0.992199
5.320518
576d16cf-c40f-4bff-81e1-cbd2ad0c2f28
pdet/cqc
2020/Nov/19-nov/solution.cpp
/// MERGE K LISTS /// // You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. // Merge all the linked-lists into one sorted linked-list and return it. /* Input: [ 1->4->5, 1->3->4, 2->6 ] Output: [1->1->2->3->4->4->5->6] Input: lists = [] Output: [] Input: lists = [[]...
ALGO
0.999924
5.988266
9194aa37-6867-4bae-833a-1051b944627a
sanzceb/think-like-a-programmer
exercises/ch04/04/main.cpp
# include <iostream> using std::cout; typedef char * arrayString; int length(arrayString s) { return s[0] - '0'; } void output(arrayString s) { int sLen = length(s); for (int i = 1; i <= sLen; i++) { cout << s[i]; } } char characterAt(arrayString s, int position) { int sLen = length(s);...
TOOL
0.852334
3.463744
2735d2db-06df-4eac-93de-9fb7da13dd81
zzangss/algorithm
2024/17266_어두운굴다리.cpp
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); //Է int n, m; cin >> n >> m; int num = 0, temp = 0; int result = -1; for (int i = 0; i < m; i++) { cin >> num; if (i == 0) { result = max(result, n...
ALGO
0.999984
4.062178
5f0c487a-0b2b-4dfe-a594-34c03e52895e
Freenove/Freenove_Omni_Wheel_Car_Kit_for_Raspberry_Pi_Pico
Three-Wheel/Sketch/Sketch_12.1_Manual_Control/Encoder.cpp
#include "Arduino.h" #include "Encoder.h" const int encoderA1Pin = 6; // Encoder1 A pin const int encoderB1Pin = 7; // Encoder1 B pin const int encoderA2Pin = 10;// Encoder2 A pin const int encoderB2Pin = 11;// Encoder2 B pin const int encoderA3Pin = 16;// Encoder3 A pin const int encoderB3Pin = 17;// Encoder3 B pin...
TOOL
0.897788
4.338873
4a0a5b24-fc7e-4e22-a4a3-903d26972816
Stefan28BU/CSI1440_IntroToComputerScience2_Programs
lab10/main.cpp
#include <iostream> using namespace std; struct ListNode { public: string data; ListNode *next; }; ListNode *insert(ListNode *ptr, string val) { ListNode *temp = new ListNode; temp->next = ptr; temp->data = val; ptr = temp; return ptr; } void insert(ListNode **ptr, string val) { List...
ALGO
0.999179
5.177335
8861754a-9251-4e45-b0f5-c662821cd074
Breakdown08/GeekBrainsUe4Learning1
HardLesson1/main.cpp
#include "pch.h" #include <gtest/gtest.h> #include <iostream> #include <clocale> #include <optional> #include <fstream> #include <vector> #include <string> #include <sstream> // для stringstream #include <iomanip> #include <algorithm> struct Person { std::string LastName; std::string FirstName; std::opti...
TEST
0.951561
4.971106
4dd1d962-5e64-4657-b61c-779fc6b5f88a
salaadas/acm-notebook
probe/linear-prime-sieve.cpp
#include <iostream> #include <vector> using namespace std; typedef vector<int> vi; // idea: // for every number from 2 to N // check if that number if prime, // if it is, then store it in // the prime list // afterwards, // for every prime number j <= to the smallest // prime factor p of i: // mark all number...
ALGO
0.999234
4.438914
df485e28-a2fb-4db3-97a9-0e19db5e8470
sarvex/leetcode-assembly
solution/1000-1099/1023.Camelcase Matching/Solution.cpp
class Solution { public: vector<bool> camelMatch(vector<string>& queries, string pattern) { vector<bool> ans; auto check = [](string& s, string& t) { int m = s.size(), n = t.size(); int i = 0, j = 0; for (; j < n; ++i, ++j) { while (i < m && s[i] !...
ALGO
0.999825
6.305568
60bcf751-862b-4c5c-b6f8-b42ef00ac627
prakharsinghch/dsa-practice
1325-path-with-maximum-probability/1325-path-with-maximum-probability.cpp
class Solution { public: double maxProbability(int n, vector<vector<int>>& edges, vector<double>& succProb, int start, int end) { vector<vector<pair<int,double>>> v(n); for(int i=0;i<edges.size();i++){ v[edges[i][0]].push_back({edges[i][1], succProb[i]}); v[edges[i][1]].push_...
ALGO
0.99995
5.519975
02834e5f-4f1d-4cbd-b676-08d6ffcf9b77
Dhruv1573/Data-Structure-Algorithm
codeforces/Divide and conquer/Painting Fence.cpp
#include<bits/stdc++.h> using namespace std; int paint(int m,int l,int r) { } int main() { int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; } cout<<paint(0,n+1) }
ALGO
0.999161
3.287065
5ed05df5-e21e-4ae5-8c8a-160576a36627
HellicarAndLewis/Triptych
addons/ofxBox2d/libs/Box2D/Dynamics/Contacts/b2TOISolver.cpp
#include "b2TOISolver.h" #include "b2Contact.h" #include "b2Body.h" #include "b2Fixture.h" #include "b2StackAllocator.h" struct b2TOIConstraint { b2Vec2 localPoints[b2_maxManifoldPoints]; b2Vec2 localNormal; b2Vec2 localPoint; b2Manifold::Type type; float32 radius; int32 pointCount; b2Body* bodyA; b2Body* body...
ALGO
0.999701
6.447149
1d87da84-dd60-4396-9ce2-7e9abf072c52
sanyam-taneja/frameworks_av
media/libstagefright/codecs/amrnb/common/src/sqrt_l.cpp
/* Pathname: ./audio/gsm-amr/c/src/sqrt_l.c ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template. Changed function interface to pass in a pointer to overflow flag into the function instead of using a global flag. ...
ALGO
0.999962
5.857356
11ae417f-ae38-420e-95b1-aae0c1944d81
Jackarain/avhttp
boost/libs/coroutine/example/symmetric/merge_arrays.cpp
#include <boost/coroutine/all.hpp> #include <cstdlib> #include <cstddef> #include <iostream> #include <vector> #include <boost/bind.hpp> #include <boost/foreach.hpp> typedef boost::coroutines::symmetric_coroutine< void > coro_t; class merger { private: std::size_t max_; std::vector< int > ...
ALGO
0.999563
4.954992
f492c88b-86d5-4979-8cb1-bfd52fd418b8
IntelLabs/iHRC
compiler/src/llvm-3.3/tools/gold/gold-plugin.cpp
#include "llvm/Config/config.h" // plugin-api.h requires HAVE_STDINT_H #include "plugin-api.h" #include "llvm-c/lto.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/Support/Errno.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" #include "llvm/Support/ToolOutput...
TOOL
0.857226
5.343491
08e278e8-8f24-4911-9c36-b7756b505383
KushagraTomar/Code-Library
83.RotateDequeByK.cpp
// Rest of the code is already given in driver code void left_Rotate_Deq_ByK(deque<int> &deq, int n, int k) { k = k%n; for(int i=1; i<=k; i++) { int val = deq.front(); deq.pop_front(); deq.push_back(val); } } void right_Rotate_Deq_ByK(deque<int> &deq, int n, int k) { k=k%n; ...
ALGO
0.9999
4.786913
a82b0176-1eae-461b-ba85-0b781d637e5a
jk-jung/problem-solving
codeforces/Codeforces Round 54x/R540_div3_A.cpp
#include <cstring> #include <cstdio> #include <cmath> #include <cassert> #include <set> #include <map> #include <array> #include <stack> #include <queue> #include <vector> #include <numeric> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef vector<i...
ALGO
0.999852
4.108523
0e600729-6185-4a7c-9335-71363c488288
HexHive/EPOXY-llvm
lib/Transforms/Scalar/Sink.cpp
#include "llvm/Transforms/Scalar.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/CFG.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/IntrinsicInst.h" #include "...
ALGO
0.99729
7.964675
04c7aa51-f8db-4ef4-a97d-f94eccfb5512
rawatrs/rawatrs.github.io
cpp/prob1_2.cpp
#include <iostream> #include <sstream> using namespace std; int main(int argc, char **argv) { int total = 0; if (argc == 1) { total = 1000; } else if (argc >= 2) { istringstream iss(argv[1]); if (!(iss >> total)) { std::cout << "Invalid number, assuming total 1000" << std::endl; total = 1000; } ...
ALGO
0.999446
3.935229
dceaa0b8-83d3-419b-9000-65e0acd9948a
longathelstan/learncplusplus
ONHSG9/BUOI22/ASUMFULL.cpp
#include <bits/stdc++.h> using namespace std; int main(){ sort(a, a + n + 1); long long dem = 0; j = 0; for (int i = 0; i <= n; i++) { while(j <= n && a[j] - a[i] <= k) j++; if (j > n) break; dem += (n-j+1); } cout << dem; }
ALGO
0.99978
3.667461
8ba1a450-d792-4a46-8dc3-265408fd56b4
ishandutta2007/codeforces
wiwiho/normal/1189/A.cpp
#include <bits/stdc++.h> #define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define iter(a) a.begin(), a.end() #define riter(a) a.rbegin(), a.rend() #define lsort(a) sort(iter(a)) #define gsort(a) sort(riter(a)) #define mp(a, b) make_pair(a, b) #define pb(a) push_back(a) #define printv(...
ALGO
0.999931
3.419314
a6993dbd-b5af-4fd1-b2b1-7c3a322dcd60
ARUN-apu/CPP
Basic Programming/find_power_of_any_no.cpp
// #include<iostream> // using namespace std; // int main(){ // int num1; // int num2; // cout<<"Enter number1: "; // cin>>num1; // cout<<"Enter number2: "; // cin>>num2; // int power = 1; // if(num2 == 0){ // power = 1; // } // else // { // for(int i = 1; i<=num2; i++){...
ALGO
0.999116
5.115952
94f8ff58-6785-481a-bf0f-b8cf7eef761a
shub39/C-Cpp
Coding-Platform-Problems/reverseFirstKElements.cpp
class Solution { public: queue<int> modifyQueue(queue<int> q, int k) { stack<int> s; for (int i = 0; i < k; i++) { s.push(q.front()); q.pop(); } while (!s.empty()) { q.push(s.top()); s.pop(); } int a = q.size() - k; while (a--) { q.push(q.front()); q.pop...
ALGO
0.999689
5.090787
f622f237-d57b-44a2-9d08-95f59055d738
catsudon/TOI-prep
passed/sms.cpp
#include<bits/stdc++.h> #define f first #define s second using namespace std; using pii = pair<int,int>; string sms[3][3] = { {"","ABC","DEF"}, {"GHI","JKL","MNO"}, {"PQRS","TUV","WXYZ"} }; int main() { ios_base::sync_with_s...
ALGO
0.999852
3.743608
e4e80d17-07e7-4b57-98d6-e660de58863e
developers8085/leetcode-solutions
Binary number to decimal number - GFG/binary-number-to-decimal-number.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int binary_to_decimal(string str) { int ans = 0; int mult = 1; int n = str.size(); while(n>0){ ans = ans + (str[n-1]-'0')*mult; mult = mult*2...
ALGO
0.999766
6.691072
b85ba9be-19b4-4227-9545-6d62aa320375
Alaxe/noi2-ranking
2020/solutions/B/YRV-Pleven/YRV/brackets.cpp
#include<iostream> #include<algorithm> #include<cmath> #include<cstdio> #include<iomanip> #include<string> #include<vector> #include<stack> #include<queue> #include<stack> #include<map> #include<set> #include<list> using namespace std; long long fl[200005],d,i,a[200005],flp,l; stack < pair<char,long long> > st; pair <c...
ALGO
0.999992
3.60782
2cf6d8f9-5180-4f28-8ad8-96bff684d37f
abahad7921/dsa-practice
problems/sort_strings.cpp
/* Sample Input ------------ 3 92 022 82 12 77 13 2 false numeric Sample Output ------------- 82 12 77 13 92 022 */ #include <bits/stdc++.h> using namespace std; string extractStringAtKey(string str,int key){ //string tokeniser // hello how are you char *s = strtok( (char *)str.c_str(), " "); //as strtok takes ...
ALGO
0.999298
4.701178
08559f2d-fa22-492f-a57d-101b8bc10d62
aex-tmp/platform_packages_apps_AEXOTA
jni/boost_1_57_0/libs/graph_parallel/test/algorithm_performance.cpp
// Authors: Nick Edmonds // Andrew Lumsdaine // #define PBGL_ACCOUNTING #include <boost/graph/use_mpi.hpp> #include <boost/graph/distributed/compressed_sparse_row_graph.hpp> #include <boost/graph/distributed/adjacency_list.hpp> #include <boost/graph/distributed/mpi_process_group.hpp> #include <boost/tes...
TEST
0.97718
6.521132
a39603f8-3155-459b-be4d-6d774b12194f
WindBlaze1/6Companies30Days
Walmart/Q3.cpp
class Solution { public: bool winnerOfGame(string colors) { int alice = 0,bob = 0; int i = 0; while(i < colors.size()) { int countA = 0,countB = 0; if(colors[i] == 'A')while(colors[i] == 'A' and i < colors.size()){countA++;i++;} else while(col...
ALGO
0.99986
5.99012
91e029db-bd7e-4445-be1d-f855dcf08dd3
HMRUHUL/CP
.history/lc/155. Min Stack_20230914224145.cpp
#include<bits/stdc++.h> using namespace std; class MinStack { public: MinStack() { } void push(int val) { } void pop() { } int top() { } int getMin() { } }; /** * Your MinStack object will be instantiated and ...
ALGO
0.999928
6.15591
06f833c0-f356-4a5b-bf0d-1580eedb1980
JunBinLiang/IO-Workbook
CF/Round-966(div3)/A(800).cpp
#include<iostream> #include<algorithm> #include<vector> #include<set> #include<unordered_set> #include<map> #include<string> #include <string.h> #include <bitset> #include <queue> using namespace std; void solve() { int n; cin >> n; string s = to_string(n); if(s.size() < 3) { cout << "NO" << e...
ALGO
0.999926
4.35471
8130f977-71e4-4c34-ba6b-46fe6bba0122
rpuntaie/c-examples
cpp/algorithm_ranges_for_each.cpp
/* g++ --std=c++20 -pthread -o ../_build/cpp/algorithm_ranges_for_each.exe ./cpp/algorithm_ranges_for_each.cpp && (cd ../_build/cpp/;./algorithm_ranges_for_each.exe) https://en.cppreference.com/w/cpp/algorithm/ranges/for_each */ #include <algorithm> #include <cassert> #include <iostream> #include <string> #include <uti...
TOOL
0.988449
6.750455
18119615-6cd7-4b72-9f3a-61f9f813a286
Sanket-Mathur/100-days-of-code
Data Structures and Algorithms/DoublyLinkedList.cpp
#include <iostream> using namespace std; class Node { public: int value; Node* prev; Node* next; Node() { value = -1; prev = nullptr; next = nullptr; } Node(int val) { value = val; prev = nullptr; next = nullptr; } }; void insertEnd(Node *he...
ALGO
0.999901
5.082263
c1306b14-d2ee-44e9-9622-b3ec1fe2a12a
AbhayDixitDev/cpp-cybrom
1 july 2024/string_compare.cpp
#include<iostream> using namespace std; int main() { string str1= "Abc",str2="ABC",str3="",str4="Banana",str5="B"; cout<<str2.compare(str3)<<endl; cout<<str3.compare(str2)<<endl; cout<<str1.compare(str2)<<endl; cout<<str2.compare(str1)<<endl; cout<<str4.compare(str5)<<endl; cout<<str5.compare...
ALGO
0.997563
3.520788
253c3393-2424-47e5-b688-6345d1d9633c
minhchien1703/FPT-Aptech
ProjectsC/MaxMinInArray.cpp
#include <stdio.h> int main() { int arrayRange; int n[arrayRange]; printf("enter array range: "); scanf("%d", &arrayRange); int i = 0; printf("\nenter integer number %d: ", i); scanf("%d", &n[i]); int max, min; max = n[i]; min = n[i]; i++; for (; i < arrayRange; i++) { printf("enter integer number ...
ALGO
0.999584
3.471308
75222d62-a133-48dc-92b9-aa994aeb6a2a
skb1129/cpp-programs
cpplab.cpp
#include<iostream> using namespace std; class B; class A{ friend class B; int x; public: void get(){ cin >> x; } void show(){ cout << x; } }; class B{ int y; public: void get(){ cin >> y; } void show(){ cout << y; } void swap(A &a){ int temp = a.x; a.x=y; y=temp; } }; int m...
ALGO
0.952204
3.233492
820015a4-d857-4ed6-be89-31a1085d6f6b
Ibrahim-898/Solved_problem
A_Perfect_Permutation.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long #define ld long double #define ios() ios_base:: sync_with_stdio(0);cin.tie(0); bool cmp(const pair<int,int> &a,const pair<int,int> &b){ if(a.first!=b.first) return (a.first<b.first); else return (a.second>b.second); } ...
ALGO
0.999844
4.49716
44d3b21a-3c8f-465e-83e2-ca715d746fa5
mrkeshav-05/c---Striver
Pattern/que7.cpp
#include <iostream> using namespace std; int main() { int n; cin>>n; for(int i=0; i<n; i++){ for(int j=0; j<n-1-i; j++){ printf(" "); } for(int j=1;j<=i*2+1;j++){ printf("*"); } for(int j=0; j<n-1-i; j++){ printf(" "); } printf("\n"); } return 0; }
ALGO
0.999873
3.776417
6e3db01b-ae19-4934-bd31-31528fc3c4f1
Micronet-Ltd/android9_system
extras/simpleperf/runtest/function_indirect_recursive.cpp
constexpr int LOOP_COUNT = 5000000; void FunctionRecursiveTwo(int loop); void FunctionRecursiveOne(int loop) { for (volatile int i = 0; i < LOOP_COUNT; ++i) { } if (loop >= 0) { FunctionRecursiveTwo(loop); } } void FunctionRecursiveTwo(int loop) { for (volatile int i = 0; i < LOOP_COUNT; ++i) { } i...
ALGO
0.995784
6.274714
15982828-5fc5-40db-a6d1-f77d05fc04e5
serzaxlucifer/Leetcode
Binary Tree/331. Verify Preorder Serialization of a Binary Tree.cpp
class Solution { int parseString(string& preorder, int& start) { if(preorder[start] == '#') { start++; return -1; } while(start < preorder.length() && preorder[start] != ',') { start++; } return 1; } public: bo...
ALGO
0.999824
5.69062
a3d91f2d-c11b-4990-a359-28f0d5341a42
muhammadhasan01/cp
Library/Others/Kadane_Algorithm.cpp
#include<bits/stdc++.h> #define mp make_pair #define pb push_back #define ff first #define ss second #define inf INT_MAX #define MOD 1000000007 #define form(i,n) for(int i=0;i<(int)n;i++) #define forn(i,n) for(int i=1;i<=(int)n;i++) #define formn(i,n) for(int i=0;i<=(int)n;i++) #define debug1(i) printf("debug => %ld\n"...
ALGO
0.999884
4.605894