uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c34682ff-37fc-48a9-b6c3-fd2ac0f74ab1
Kunalgarg108/Cpp_Codes
DFS.cpp
#include<bits/stdc++.h> using namespace std; void Dfs(int i,int arr[7][7],int visited[]){ cout<<i; visited[i]=1; for(int j=0;j<7;j++){ if(arr[i][j]==1 && visited[j]==0){ Dfs(j,arr,visited); } } return; } int main() { int visited[7]={0,0,0,0,0,0,0}; int arr[7][7]={...
ALGO
0.999858
3.468562
b193121c-2641-4595-aeb3-f6bfc395bd34
n30phyte/SchoolDocuments
CMPUT274275/MorningProblems/hotpotato/soln/hotpotato.cpp
#include <iostream> #include <queue> // may or may not be useful using namespace std; int main() { unsigned long n; int q; cin >> n >> q; queue<unsigned long> students; for (unsigned long i = 0; i < n; i++) { students.emplace(i); } unsigned long last_removed = -1; while (students.size() > 1) ...
ALGO
0.999886
3.160647
0e1be25f-6045-4751-a1a2-e3c6079ff7ff
salwww/c-
четвертое задание/четвертое задание.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { setlocale(LC_ALL, "Russian"); const int months_in_year = 12; const int birth_interval = 4; const int births_per_year = months_in_year / birth_interval; const int average_offspring = 5; cout << "Пары\tПриплод за год\n"; ...
ALGO
0.970288
5.442137
2cebb365-3780-4fb1-893b-3845b1e38e97
MaulikGarg/personal-cpp-work
BjarneBook2ed/8/10.cpp
#include<iostream> #include<string> #include<vector> using namespace std; using vecint = vector<int>; int maxv(const vecint& vev){ int largest{vev[0]}; for(int i: vev){ if(i > largest) { largest = i; } } return largest; } int main() { vecint myVec{2,3,4}; cout << ma...
ALGO
0.998579
5.002842
a0a7ef88-2e73-4627-826e-49a3f1116fec
myattg12/lab-activity
lab3exer2.cpp
#include <iostream> #include <cmath> using namespace std; /*A person makes a deal with their boss. The boss says they will be paid a wage of $2 on their first day on the job, and then have their wage doubled every day after that. Use a loop to figure out how much the person would make using this method on their 20th da...
ALGO
0.996675
3.851407
b804fdd6-3881-4d41-973b-bf8c95bb68be
bala1144/ARAP---AS-RIGID-AS-POSSIBLE
libs/Eigen/bench/product_threshold.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #define END 9 template<int S> struct map_size { enum { ret = S }; }; template<> struct map_size<10> { enum { ret = 20 }; }; template<> struct map_size<11> { enum { ret = 50 }; }; template<> struct ...
TOOL
0.938417
5.102006
885c74f0-c721-4d8f-aa82-41258dd5f4bf
mfique/Restaurant-Mobile
flutter/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.9984
6.76073
01e83273-421b-4f2f-83f5-ae88f2d84399
FinalTheory/ACM_Code
HDU/HDU_1394.cpp
/** * @file HDU_1394.cpp * @brief ߶ԡ * ˼ǽȡֵΧΪ䣬ͿԿͳijȡֵΧжٸ * ˳ÿһӦӣȻͳƱжٸ * Ϊѯıһǰģ * óʼֱӵƾͿʣµģ¼һСֵͿˡ * Լεʣµԡ * @author FinalTheory * @version 0.1 * @date 2013-04-25 */ #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <cctype> #include <c...
ALGO
0.999786
3.633309
e6b6aea1-79b9-426a-898d-ccb8f1816769
PajarKharisma/TugasPraktikumAlgoritmaPemrograman
21 - Responsi Akhir/Code2.cpp
#include <iostream> #include <conio.h> #include <bits/stdc++.h> using namespace std; //STRUKTUR LINKEDLIST UNTUK STACK struct Node{ char data; Node *next; }; //STRUKTUR STACK struct Stack{ private: Node *list; public: //FUNGSI INITIALIZE SEPERTI CONSTRUCTOR void init(){ ...
ALGO
0.99944
4.941539
1ac0b153-6863-4d9c-9b36-02f92319f60a
VincentRagusa/EXP_multibrain
Genomic_Basis/MABE/Brain/LSTMBrain/LSTMBrain.cpp
#include "../LSTMBrain/LSTMBrain.h" std::shared_ptr<ParameterLink<std::string>> LSTMBrain::genomeNamePL = Parameters::register_parameter("BRAIN_LSTM_NAMES-genomeNameSpace", (std::string) "root::", "namespace used to set parameters for " ...
ALGO
0.869608
7.184881
6b58d6bd-5c35-49dd-8d21-daae0e1977bd
manikanta2901/ubuntu
.history/SRM/placementPractice/HackerRank/SearchingAlgorithm/MissingNumbers_20201022173731.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999949
3.229579
47b22905-98b5-41e4-9c72-a1014fe60d61
AllanVasc/Algorithms-and-Advanced-Data-Structures
01 - MinQueue.cpp
#include <bits/stdc++.h> using namespace std; #define int uint32_t mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); using ii = pair<int,int>; using iii = tuple<int,int,int>; using ll = long long; const int INF = 0x3f3f3f3f3f3f3f3f; const int A = 1664525; const int C = 1013904223; int GCL(int l...
ALGO
0.999595
3.584745
81b5db0a-9e01-449b-9ccf-a1e4991fee41
GeorgeJu95/LeetCode_algorithm
solutions/0007-reverse-integer/reverse-integer.cpp
// Given a 32-bit signed integer, reverse digits of an integer. // // Example 1: // // // Input: 123 // Output: 321 // // // Example 2: // // // Input: -123 // Output: -321 // // // Example 3: // // // Input: 120 // Output: 21 // // // Note: // Assume we are dealing with an environment which could only store integers w...
ALGO
0.999651
6.235901
e1310dd6-bac1-44f0-b4d2-5d686821ecca
ColtonOsterlund/Magenta_DDSP_VST_Clone
AudioPlugin/JUCE/modules/juce_gui_basics/native/juce_android_FileChooser.cpp
namespace juce { #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ METHOD (getItemCount, "getItemCount", "()I") \ METHOD (getItemAt, "getItemAt", "(I)Landroid/content/ClipData$Item;") DECLARE_JNI_CLASS (ClipData, "android/content/ClipData") #undef JNI_CLASS_MEMBERS #define JNI...
TOOL
0.927392
6.962863
d2e305fe-e2dc-4a40-8e29-b52bcc116920
JudithRomerCori/Practica_6
Ejericicio_05_06.cpp
// Materia: Programacin I, Paralelo 1 // Autor: Judith Marisol Romero Cori // Fecha creacin: 23/10/2023 // Fecha modificacin: 23/10/2023 // Nmero de ejericio: 5 // Problema planteado:Realizar un algoritmo recursivo para comparar si dos vectores son iguales. #include <iostream> #include <vector> using namespace s...
ALGO
0.999813
5.68471
903d1526-b371-49ba-90c0-2a8bbc7a4a40
baoilleach/openbabel-svn-mirror
src/charges/qeq.cpp
#if (defined(HAVE_EIGEN2)) #include "qeq.h" #include <openbabel/locale.h> using namespace std; #ifdef _MSC_VER // MSVC doesn't have error function erf, use local implementation #include <openbabel/math/erf.h> using temperf::erf; #endif namespace OpenBabel { ////////////////////////////////////////////////////////...
ALGO
0.89218
4.769614
2944ccaf-4285-4f38-8fa2-058321e93ffc
ishandutta2007/codeforces
kaitokid/normal/1241/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; long long n,p[200009],k,x,a,y,b,g; bool go(int h) { ll rr=k; int d1=(h/g); int d2=h/a-d1; int d3=h/b-d1; int j=n-1; while(j>n-1-d1) { rr-=(p[j]/100)*(x+y); if(rr<=0)return true; j--; } w...
ALGO
0.999757
3.293914
88ae7020-745c-45f1-91e6-3ffac7993e22
MinaProtocol/snark-challenge
reference-07-groth16-prover/depends/xbyak/sample/quantize.cpp
/* @author herumi JPEG quantize sample This program generates a quantization routine by using fast division algorithm in run-time. time(sec) quality 1(low) 10 50 100(high) VC2005 8.0 8.0 8.0 8.0 Xbyak 1.6 0.8 0.5 0.5 ; generated code at q = 100 push esi push edi...
ALGO
0.999437
4.37079
0a6af49b-06f9-4508-9a52-4395968d7c09
wangAlpha/leetcode
algorithms/0350.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> ans; unordered_map<int, int> num_counter; for (const auto& n: nums1) { ++num_counter[n]; } for (const auto& n: nums2) { auto &counter = num_counter[n];...
ALGO
0.999953
5.942703
10b35218-c1c9-44fe-a4f1-cee1241ba003
ishandutta2007/codeforces
davidlee1999wtk/normal/650/B.cpp
#include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<cmath> #include<vector> #include<queue> #include<map> #include<set> #include<stack> #include<cstdlib> #include<string> #include<bitset> #define INF 1000000000 #define N 500005 #define P 1000000007 #define fi first #define se second #defi...
ALGO
0.999943
3.419733
8b059e60-d046-4cd4-9351-d8e8ec166c75
studentwsb-nlu/WdP
cwiczenia04/cwiczenie4.7.cpp
/****************************************************************************** Zadanie 4.7 - Patryk Nowoszynski Ćwiczenie 4.7 Napisz funkcję escape(s,t), która przepisuje ciąg t do zmiennej s, konwertując znaki takie jak znak nowego wiersza i tabulator na sekwencje sterujące takie jak ...
TOOL
0.883193
3.793504
967055d8-8541-42e4-992f-af7c3ef11d5a
NitinSundar/Comp
codeforces/1054C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int lli; #define pb push_back #define mod 1000000007 #define inf 10000000007 #define ff first #define ss second #define endl "\n" #define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); const int N = 1e3 + 5; int l[N],r[N],a[N]; int main() { IO...
ALGO
0.999998
3.079224
5ce8c9bc-1931-4f0f-b739-cb0a96fcc223
LSH3333/PS
baekjoon/1904.cpp
#include <iostream> using namespace std; long long d[1000001]; long long pibo(int n) { // base if(n <= 1) return n; // memoization if(d[n] > 0) return d[n]; d[n] = (pibo(n-1) + pibo(n-2)) % 15746; return d[n]; } int main() { int n; cin >> n; cout << pibo(n+1) << '\n'; }
ALGO
0.999972
4.693011
93eb261d-da07-4f09-b76f-da5e1506609d
kunalbandooni/InterviewBit
Sudoku.cpp
bool check(vector<vector<char>> &board, int i, int j, char val) { for(int x=0; x<9; x++) if(board[x][j] == val) return false; for(int y=0; y<9; y++) if(board[i][y] == val) return false; int row = i - i%3, column = j - j%3; for(int x=0; x<3; x++) for(int...
ALGO
0.999166
5.773586
eafc910e-4c27-4d5f-89bf-b06eaf8cc765
Apurba94/10-Years-of_Competitive-Programming-Resources-Collection
Codeforces From 2011-2023/1684A-DigitMinimization.cpp
#include <cstdio> int main(){ long t; scanf("%ld", &t); while(t--){ long n; scanf("%ld", &n); if(n < 10){printf("%ld\n", n);} else if(n < 100){printf("%ld\n", n % 10);} else{ int res(10); while(n){int d = n % 10; res = (res < d ? res : d); n /= 10;} ...
ALGO
0.99963
4.075297
44280387-312d-477a-9562-7479a8fe9584
upesacm/21DaysOfCode-2025
DSA/Satyam_Jhinkwan_590012742/Day11/2.cpp
#include <iostream> #include <string> using namespace std; int main() { string s; cout << "Enter a string: "; getline(cin, s); int start = 0, maxLen = 1; int n = s.length(); for (int i = 0; i < n; i++) { int l = i, r = i; while (l >= 0 && r < n && s[l] == s[r]) { ...
ALGO
0.999675
4.101691
f0633bdc-040b-475b-ae43-99716ba34f15
sahilnap06/FlexPushdownDB-exp
fpdb-executor/src/physical/bloomfilter/BloomFilterUseKernel.cpp
// // Created by Yifei Yang on 3/17/22. // #include <fpdb/executor/physical/bloomfilter/BloomFilterUseKernel.h> #include <fpdb/tuple/ArrayHasher.h> #include <arrow/compute/api_vector.h> #include <fmt/format.h> namespace fpdb::executor::physical::bloomfilter { tl::expected<std::shared_ptr<TupleSet>, std::string> Bloo...
TOOL
0.892391
7.060872
d7b85aed-8d63-481b-a407-6228e9796983
Abdullah06444/My_Homeworks_and_Projects
c ve cpp alıştırmalar/c/067(const kavramı).cpp
/* Bir stringi, sabit olmayan bir deer iin sabit olmayan bir gsterici kullanarak byk harfe evirme */ #include <stdio.h> #include <ctype.h> void buyukHarfeCevir(char *); int main() { char string[ ]= "karakterler ve $32.98"; printf ("Cevrilmeden onceki string: %s", string); buyukHarfeCevir(string); printf("\nCevr...
ALGO
0.898735
4.330264
41435f0f-64e4-4603-9ddf-021050bd803f
GYPpro/ACM
1_Contests/CF905.3/D_In_Love.cpp
#define _USE_IOSTREAM_ #define _PRIV_TEST_ #ifndef _USE_IOSTREAM_ #define _USE_STDIO_ #endif #ifdef _USE_IOSTREAM_ #include <iostream> #endif #ifdef _USE_STDIO_ #include <stdio.h> #endif #include <stdlib.h> #include <math.h> #include <algorithm> #include <string> #include <string.h> #include <vector> #include <map> ...
ALGO
0.999967
4.528607
4403259b-6ea6-4712-9bb8-ebbbc78df83b
hauzanids/PraktikumSDA
Queue Linked List.cpp
#include <iostream> #define MAX 10 using namespace std; struct node { int data; node *next; }; node *n, *temp, *pre; node *head = NULL; node *tail = NULL; bool isEmpty(){ if(head == NULL){ return true; } else{ return false; } } bool isFull(){ int count; temp = head; while(temp != NULL){ count++; pre...
ALGO
0.993938
4.531848
90273d09-5411-44fd-aaee-9e768d3edea5
maxcccp/MagicalForest3D
dep/bullet/BulletDynamics/Dynamics/btDiscreteDynamicsWorldMt.cpp
#include "btDiscreteDynamicsWorldMt.h" //collision detection #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/CollisionShapes/btCollisi...
ALGO
0.994147
4.75574
599fccd1-e5dd-44a1-9946-f7a34275eeea
Ket2001/codecplus
STACKQUEUE007.cpp
#include<bits/stdc++.h> using namespace std; void DemDauNgoacNguocChieu() { string str; cin>>str; stack<char> st; int count =0; for(int i=0; i<str.length(); i++){ if(str[i]!= ')') st.push(str[i]); // cu moi lan lap gap ) ta xe xoa di 1 cap () neu str[i] khac ) s...
ALGO
0.996209
3.732368
1bd39fa6-e8fd-4270-8521-a1b4864eb39a
astrid-dm/Algorithms
Baekjoon/BJ_C++_1446.cpp
// The problem link : https://www.acmicpc.net/problem/1446 #include <iostream> #include <algorithm> #include <vector> #define MAX 987654321 using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,d,from,to,dis; cin >> n >> d; vector<int> map(d+1,MAX); ...
ALGO
0.999914
4.290167
005cc38c-4129-4036-a8b1-dac2457a9311
Girish1845/Leetcode-Solved
0100-same-tree/0100-same-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999971
6.363872
f70d5ffe-32e5-48e7-b6ad-d801a0998ef5
sanchit-sinha/CP
Random-Submissions/Random-Problems/1163D.cpp
#include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include "bits/stdc++.h" using namespace __gnu_pbds; using namespace std; #define f first #define s second #define pb push_back #define ll long long #define ld ...
ALGO
0.999587
4.401019
523cb3da-9441-4eee-bc1a-4f8f5bb6a49e
kangsw1025/TIL
SolveProblem/20/20.10/20_10_12/201012_10825_국영수.cpp
#include<iostream> #include<string> #include<algorithm> using namespace std; struct propil { string name; int kor; int eng; int math; }; propil arr[100001]; bool cmp(propil a, propil b) { if (a.kor > b.kor) return true; else if (a.kor < b.kor) return false; if (a.eng < b.eng) return true; else if (a.eng > b....
ALGO
0.999609
3.890598
b0470de8-55e8-42be-b8cd-753fce0be843
GunjanRajTiwari/leetcode
7.cpp
// Reverse Integer class Solution { public: int reverse(int x) { int ans = 0; while(x){ if(ans > INT_MAX/10 || ans < INT_MIN/10) return 0; ans = ans*10 + x%10; x /= 10; } return ans; } };
ALGO
0.999974
5.896236
1393e2a7-64d1-4590-a864-c35c0bd03413
XuepengShi/basic-algorithm
Graph/shortestpath/Dijk/hdu2544(2).cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <bitset> #include <vector> #include <list> #include <deque> #include <queue> #include <stack> #include <utility> #include <map> #include <set> #include <stdexcept> #include <cstdio> #include <cstring> #include <cmath> #include <ctime> ...
ALGO
0.999986
4.350908
8e770b5d-6363-4925-8738-69c1dc0f48c0
anuraggulati786/90_DAYS_OF_DSA_CHALLANGE
4Tower_of_hanoi.cpp
#include<iostream> using namespace std; void toh(int n,int a1,int a2,int a3); int main() { int x=1,y=2,z=3; int n; cout<<" enter the number of discs :"<<endl; cin>>n; toh(n,x,y,z); } void toh(int n,int a1,int a2,int a3) { if(n>=1) { toh(n-1,a1,a3,a2); cout<<a1<<" to "<<a3<<endl; toh(n-1...
ALGO
0.999736
4.096236
d6b8fbf7-fece-4a70-b18c-39024890fdfe
mint6421/kyopro
codeforces/1253/1253C.cpp
#include<bits/stdc++.h> using namespace std; #define inf INT_MAX #define INF LLONG_MAX #define ll long long #define ull unsigned long long #define M (int)(1e9+7) #define P pair<int,int> #define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++) #define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--) #define rep(i,n) FOR(i,0,n) #d...
ALGO
0.999968
3.199149
2958a2ee-7700-4a26-8f5a-49b896e9f7e3
Sumon-Ict/UVA-Problem-Solution
UVA solution file2/uva10499.cpp
#include<bits/stdc++.h> using namespace std; int main() { long int n; while(scanf("%d",&n)) { if(n<0) break; else { double r=ceil(1*100)/n; printf("%d%%\n",ceil(r)); } } }
ALGO
0.999747
3.190447
a5cbb67c-0ea5-4215-89ae-07d46e2c0448
TheKingAAV7/GFG-Potd
Difficulty: Hard/Split Array Largest Sum/split-array-largest-sum.cpp
class Solution { public: int splitArray(vector<int>& arr, int k) { int n=arr.size(); int lo=1,hi=accumulate(arr.begin(),arr.end(),0); int ans=hi; auto f=[&](int mid)->bool{ int sm=0; int cnt=1; for(int i=0;i<n;i++){ if(arr[i]>mid) ret...
ALGO
0.999965
5.246373
d5fa3663-caeb-4a75-9fa7-656608472c69
akshatrksingh/Data-Structures-and-Algorithms-Practice-CPP
Lintcode-920-MeetingRooms.cpp
/** * Definition of Interval: * class Interval { * public: * int start, end; * Interval(int start, int end) { * this->start = start; * this->end = end; * } * } */ class Solution { public: /** * @param intervals: an array of meeting time intervals * @ret...
ALGO
0.999988
6.187455
198686df-0e2b-4f50-9456-1af4bb69fc1f
lucamorando95/DDPG-Quadrorotor-Nav_Land
swarm_library/olfati_saber_flocking/src/olfati_saber_flocking.cpp
#include "olfati_saber_flocking/olfati_saber_flocking.h" #define PI 3.14159265358979323846 #define EPSILON 0.1 #define A 5 #define B 5 const double C = abs(A-B) / sqrt(4*A*B); #define H 0.2 #define D 10 #define R 12 #define C1 0.3 #define C2 0.3 double pm1=1,pm2=3,pm3=1; using namespace std; class NeighborHandle { ...
ALGO
0.999935
4.874007
ce48d3e2-78d3-46a1-968a-41e3e11a110a
momokazi/Programming-Fundamentals
PF/pf assignment/program 17.cpp
#include<iostream> using namespace std; int main() { float length, radius, angle; cout<<"Enter radius of arc : "; cin>>radius; cout<<"Enter angle of arc : "; cin>>angle; length = radius * angle; cout<<"Length of arc : "<<length<<endl; return 0; }
TOOL
0.919932
3.137417
f6a44fe5-e37b-447b-a884-6c1608db05f8
muhzii/CarND-Path-Planning-Project
src/Eigen-3.3/failtest/jacobisvd_int.cpp
#include "../Eigen/SVD" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { JacobiSVD<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
ALGO
0.915185
3.327923
36637294-1f70-4046-a5e6-b785fe67b340
Sanika301/Data
z.cpp
#include <iostream> #include <bits/stdc++.h> #include <fstream> #include <vector> #include <sstream> #include <limits> #include <stdexcept> using namespace std; vector<vector<string>> read_file(string &csv_file) { ifstream csv(csv_file); vector<vector<string>> vec; string line; while(getline(csv,line)...
DATA
0.911626
4.117965
0f55363d-2203-4f3b-b1e3-90df2f692756
ishandutta2007/codeforces
ormlis/normal/1610/C.cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep1(i, n) for (int i = 1; i < (n); ++i) #define rep1n(i, n) for (int i = 1; i <= (n); ++i) #define repr(i, n) for (int i = (n) - 1; i >= 0; --i) #define pb push_back #define eb emplace_back #define all(a) (a).begin(), (a).end() #define r...
ALGO
0.999883
4.52647
6fc0a900-869e-4f3d-a2a8-fb88b7a28c4b
Vamsi-jammugani/CSA5178-CNS
exp-6 des.cpp
#include <stdio.h> #include <string.h> int main() { DES_cblock key; DES_key_schedule schedule; char plaintext[] = "Hello, World!"; char ciphertext[32]; char decryptedtext[32]; DES_string_to_key("MySecret", &key); DES_set_key(&key, &schedule); DES_ecb_encrypt((DES_cblock *)plaintext, (...
ALGO
0.915276
4.099305
9f744b46-f6f9-42a5-8ff6-0953e50ecbd1
ishandutta2007/codeforces
burnoutag7/normal/1675/B.cpp
#include<bits/stdc++.h> using namespace std; void mian(){ int n; cin>>n; vector<int> a(n); for(int &x:a)cin>>x; int ans=0; for(int i=a.size()-2;i>=0;i--){ if(a[i+1]==0){ cout<<"-1\n"; return; } while(a[i]>=a[i+1]){ a[i]/=2; ...
ALGO
0.999818
4.430827
234fdde3-6e2e-4d73-9794-a8b2b7808937
Huanghu-H/MyCppProgram
伪质数.cpp
#include<iostream> #include<cmath> using namespace std; int zhi[100005]; int n,k; int main() { cin>>k>>n; int m=1; for(int i=2;i<=k;i++) { int flag=0; for(int j=2;j*j<=i;j++) { if(i%j==0) { flag=-1;break; } } if(flag==0) { zhi[m]=i;m++; } } //for(int i=1;i<m;i++)cout<<zhi[i]<<endl...
ALGO
0.999924
3.595155
a72641f2-6b94-4b0d-b5e6-7f7f3c0de732
amhiggin/RoadSignDetection
main.cpp
#include "opencv2/core.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include <stdio.h> #include "Utilities.h" #include <iostream> #include <fstream> using namespace std; using namespace cv; //GLOBALS Mat src, hsv, hue; //ground truth Mat img, hsvImg, hueImg;//sample image MatND backproj;//the bac...
ALGO
0.972789
5.246449
135d792d-d4c2-4676-833a-13ed2ca5c8ed
virajchandra51/LeetCode
Solved_Question_Set_1/2176-count-equal-and-divisible-pairs-in-an-array/2176-count-equal-and-divisible-pairs-in-an-array.cpp
class Solution { public: int countPairs(vector<int>& nums, int k) { int c=0; for(int i=0;i<nums.size();i++) { for(int j=i+1;j<nums.size();j++) { if(nums[i]==nums[j] && (i*j)%k==0) c++; } } return c; }...
ALGO
0.999845
5.648736
42d0d414-bd53-4ff6-b6e5-6ce5ca19460c
Revision24601/image-recognition-helper
modules/contrib/src/chowliutree.cpp
#include "precomp.hpp" #include "opencv2/contrib/openfabmap.hpp" namespace cv { namespace of2 { ChowLiuTree::ChowLiuTree() { } ChowLiuTree::~ChowLiuTree() { } void ChowLiuTree::add(const Mat& imgDescriptor) { CV_Assert(!imgDescriptor.empty()); if (!imgDescriptors.empty()) { CV_Assert(imgDescriptors...
ALGO
0.999573
6.500493
0b410c51-e3d1-4839-89ef-e6fe30f7a13e
bqmnhat/CompetitiveProgramming
BigOCoding/SudhanvaAndBooks/main.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int q; stack<int> BookShelf; void Solve() { for (int i=1; i<=q; i++) { int cmd;; cin >> cmd; if (cmd == 1) { int n; cin >> n; BookShelf.push(n); } else { if (!Bo...
ALGO
0.999053
4.035449
5c63b512-c89e-4a64-998d-0209e9fd4384
nachiketkanore/Codeforces-Solved-Problems
1497_D.cpp
/** * Author: Nachiket Kanore * Created: Monday 05 April 2021 06:21:59 PM IST **/ #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <cassert> #include <array> #include <string> #include <cstring> #define int int64_t #define pb push_back #define ...
ALGO
0.999942
4.726733
fa3f46f7-2994-4d49-aa08-8461b445f1c1
psynomorph/nsu-15124-vm
richardson.cpp
# include <iostream> # include <fstream> # include <cmath> # include "matrix.hpp" using namespace std; int main(int argc, char**) { ifstream in("input.txt"); // Размерность матрицы int n; // Считываем размерность матрицы in >> n; cout << n << endl; // Матрица системы Matrix A(n); ...
ALGO
0.999944
3.931429
89b4c858-5139-4341-b264-d96242407ee4
SonamShrivastava2002/Cplusplus_Questions
Others/check_sorted_rotated.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ vector<int> nums={3,4,5,1,2}; int n=nums.size(); int count=0; for(int i=1;i<n;i++){ if (nums[i-1]>nums[i]){ count++; } } if (nums[n-1]>nums[0]){ count++; } if (...
ALGO
0.999983
4.223701
57644dc3-2b1b-4af1-baf7-4ff96402799f
JunMaru/ios3
cocos2d/cocos/math/Mat4.cpp
#include "math/Mat4.h" #include "math/Quaternion.h" #include "math/MathUtil.h" #include "base/ccMacros.h" NS_CC_MATH_BEGIN Mat4::Mat4() { *this = IDENTITY; } Mat4::Mat4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m3...
TOOL
0.983405
7.266848
d5670bc2-d854-4430-a31e-a9af078f8673
MAZHARMIK/Interview_DS_Algo
strings/Backspace String Compare.cpp
/* MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=u6K3j3n3vbA Company Tags : GOOGLE Leetcode Link : https://leetcode.com/problems/backspace-string-compare/ */ /******************************************************** C++ ******************************************...
ALGO
0.999357
6.407732
935eac9f-a357-4cc5-b295-0c2d93c05307
anshikayadav29/Dsa-solution
KadanesAlgorithmArray/KadaneonBinary.cpp
#include<bits/stdc++.h> using namespace std; int main() { vector<int> a = {1, 0, 0, 1, 0}; for(auto &x : a) x = (x == 0) ? 1 : -1; int sum = 0, maxi = INT_MIN; for(int i : a){ sum += i; maxi = max(maxi, sum); if(sum < 0) sum = 0; } cout << maxi; }
ALGO
0.999994
4.013047
d4dd195c-a95e-40fa-aa5f-579b39bb8214
CuriousCI/codeforces
1187A.cpp
#include <iostream> #include <cstdint> #include <algorithm> using namespace std; int main() { ios_base::sync_with_stdio(NULL); cin.tie(NULL); uint16_t cases; uint64_t eggs, stickers, toys; cin >> cases; while (cases--) { cin >> eggs >> stickers >> toys; cout << max(eggs - stickers, eggs - toys) + 1 << en...
ALGO
0.999789
4.329627
83712ab5-7c71-4fbc-91a2-b862d110252e
priyanshuanandd/Code_Submissions
Different_Consecutive_Characters.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int len, c = 0; cin >> len; string str; cin>> str; for (int i = 0; i < len - 1; i++) { if (str[i] == str[i + 1]) { c+...
ALGO
0.99985
4.16138
0a26ce27-4b7d-40fd-a7ef-ef48eb695e4f
MrRun2020/UE426
Engine/Source/ThirdParty/CryptoPP/5.6.5/include/rc5.cpp
// rc5.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #include "rc5.h" #include "misc.h" #include "secblock.h" NAMESPACE_BEGIN(CryptoPP) void RC5::Base::UncheckedSetKey(const byte *k, unsigned int keylen, const NameValuePairs &params) { AssertValidKeyLength(keylen); r = GetRoundsAndThro...
ALGO
0.999219
7.508304
ce267a12-14d3-4d35-a148-1d7107699c5a
Ramid9/c_cpp_dsa
cpp programming/14. Recursion/Josephus_Problem_Opti.cpp
// find the winner #include<iostream> #include<vector> using namespace std; // see notes int winner(int n, int k){ if(n==1) return 0; return (winner(n-1,k)+k)%n; } int main(){ // game will start from first player and k th player will be killed int k , n; cout<<"Enter number of player:"...
ALGO
0.999958
3.65002
a5a097f6-d3dc-48b5-8dd7-c3928a587516
omkarlenka/leetcode
increasing_order_search_tree_lc897.cpp
#include <iostream> using namespace std; /** * 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, T...
ALGO
0.999991
6.462899
ac4d02c9-cd98-4151-8e31-de79de406b7d
sabkabaap1/competitive-programming
atcoder/abc170/a.cpp
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int i=0, n; while(i<5){ cin>>n; if(n==0){ cout<<i+1<<"\n"; break; } i+=1; } return 0; }
ALGO
0.99931
3.222323
2c3790b3-a341-4c19-ade7-1c783a15cddc
kylejwilliams/Project-Euler---Problem-1
main.cpp
/**************************************************************************** Project Euler - Problem 1 * * Description: If we list all the natural numbers below 10 that are * mul...
ALGO
0.999712
5.224391
a69b19ea-de32-4ce4-a281-ad13fa7822c7
shauryaCodesAndHosts/all_code
cd/exp-8-leading-trailing.cpp
#include<iostream> #include<string.h> using namespace std; int nt,t,top=0; char s[50],NT[10],T[10],st[50],l[10][10],tr[50][50]; int searchnt(char a) { int count=-1,i; for(i=0;i<nt;i++) { } return count; } if(NT[i]==a) return i; int searchter(char a) { int count=-1,i; for(i=0;i<t;i++) { } return count; } if(T[i]==a) ret...
ALGO
0.999891
3.609909
5c594884-9061-47f8-b272-405f11413b48
rilato/Baekjoon
cpp/Do_It/그래프/그래프의_표현/^2251(물통).cpp
// Queue 3 ־ ش. ߺ Ž ϱ ؼ Visit[][][] 3 迭 Ѵ. #include <iostream> #include <queue> #include <vector> #include <algorithm> using namespace std; int A, B, C; bool Visit[201][201][201]; vector<int> V; int main(void) { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> A >> B >> C; ...
ALGO
0.999991
3.47273
d4f3b6d8-09bf-4bd6-a469-6a190b4149c0
KazankinMaksim/StudyMake
example-3/Kazino-Royal.cpp
#include <iostream> #include <cstdlib> #include <ctime> #include <cctype> using namespace std; int main() { cout<<"Добро пожаловать в Казино-Роял\n"; cout<<"Сыграем в кости?\n"; cout<<"Ты загадываешь число - я бросаю кость.\n"; cout<<"Если ты угадал с трех попыток - ты выиграл\n"; cout<<"Нет - прои...
TOOL
0.874118
3.184974
9496a4a2-72cb-48a9-b677-28c103b417b4
joaotav/sorting-algorithms-cpp
quicksort.cpp
#include <iostream> #include <fstream> #include <cstdlib> #include <vector> /* Implemented by João Chervinski (2018) */ using namespace std; int partition(vector<int> &numbers, int start, int end){ int p = start, i = start + 1; for(int j = i; j <= end; j ++){ if (numbers[j] <= numbers[p]){ swap(numbers...
ALGO
0.9993
5.081824
e1b86f27-77d0-4277-80de-0579ee7e3d6b
Iwaide/AtCoder
abc377/c/main.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chmax(T& a, T b) { if (a < b) { ...
ALGO
0.99971
3.5109
c9761a19-cc87-4377-a1e3-81bcf176cf61
ParaSiF-Proof-of-Concept-Code-Structure/DualSPHysics
src_mphase/DSPH_v5.0_NNewtonian/source/JDsDamping.cpp
//HEAD_DSPH /// \file JDsDamping.cpp \brief Implements the class \ref JDsDamping. #include "JDsDamping.h" #include "JLog2.h" #include "JAppInfo.h" #include "JXml.h" #include "Functions.h" #include "FunGeo3d.h" #include "JVtkLib.h" #include <cfloat> #include <algorithm> using std::string; //#########################...
TOOL
0.976582
5.770995
6a6e73b0-4be9-4846-96f4-0ee62c31f82b
DrAndr/udemy_cpp_from_beginner_to_beyond
lesson_126__returning_pointers_from_functions/main.cpp
/** * Section 12 * Subject: Pointers and references * Lesson 126 [ Returning a pointer from a function ] */ #include <iostream> #include <array> using namespace std; int *largest_int(int *, int *); int *create_array(size_t, int); void display(const int *const, size_t); int main() { int a{5}; int b{10}; ...
TOOL
0.990936
4.804254
d7c420d5-639b-4143-957b-cbddc0baf8ba
Loki-chen/Compile_via_MLIR
third_party/llvm-project/lldb/examples/functions/main.cpp
#include <getopt.h> #include <stdint.h> #include <stdlib.h> #if defined(__APPLE__) #include <LLDB/LLDB.h> #else #include "LLDB/SBBlock.h" #include "LLDB/SBCompileUnit.h" #include "LLDB/SBDebugger.h" #include "LLDB/SBFunction.h" #include "LLDB/SBModule.h" #include "LLDB/SBProcess.h" #include "LLDB/SBStream.h" #include ...
TOOL
0.883713
6.408764
f1ee3dea-228f-48b5-aa1f-51edf153b302
ishandutta2007/codeforces
qwertypi/normal/1140/E.cpp
#include <bits/stdc++.h> #define int long long using namespace std; int mod = 998244353; int A[200002]; int n, k; int bp(int a, int b){ if(b == 0) return 1; return bp(a * a % mod, b / 2) * (b % 2 ? a : 1) % mod; } int mi(int a){ return bp(a, mod - 2); } int dp[200002][3]; int query(int l, int r, int c){ if(c...
ALGO
0.999989
4.367272
c29e84bd-0867-4934-baf7-66b5272f63f6
kudotoan/PTIT-THCS2
C01003.cpp
#include<stdio.h> main () { int n,t; scanf("%d",&t); while (t--) { scanf("%d",&n); printf("%lld\n",(long long)n*n); } }
ALGO
0.998424
3.604146
8780c893-7437-48d1-bbac-174a960b2403
rafisgithub/phitron
Algorithms/Weak-02(Graph Algorithms)/Module-07(Bellman Ford Algorithms)/bellman_ford_algo.cpp
#include <bits/stdc++.h> using namespace std; class Edge{ public: int u,v,c; Edge(int u,int v,int c){ this->u = u; this->v = v; this->c = c; } }; const int N = 1e5+5; int dis[N]; int main() { int n,e; cin>>n>>e; vector<Edge> edeList; while(e--) { ...
ALGO
0.999966
4.101042
0846b93d-03ee-40a6-bf72-ed9836457251
FanindraNayak/DSA
Linked List/Singly Linked List/Linked_list.cpp
#include <iostream> using namespace std; class link_list { public: int data; link_list *next; link_list(int data) { this->data = data; next = NULL; } }; void insert_at_beg(int data, link_list *&head) { link_list *ptr = new link_list(data); ptr->next = head; head = pt...
ALGO
0.999467
4.810933
7fd0d0ea-8885-4c69-95d6-d1bcad7a26b4
ishandutta2007/codeforces
roundgod/normal/737/B.cpp
#include<bits/stdc++.h> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int,int> P; int n,a,b,k; string str; int main() { scanf("%d%d%d%d",&n,&a,&b,&k); cin>>str; vector<int> ans; int cnt=0; for(int i=0;i<str...
ALGO
0.999885
3.219444
e51af07b-7192-4c42-82c4-17185f01b058
Coderich-Community/Hacktoberfest-2023
C++/bubbleSort.cpp
#include <iostream> using namespace std; void printArray(int*A, int n){ for (int i = 0; i < n; i++) { cout<<A[i]<<" "; } } void bubbleSort(int* A, int n){ int isSorted = 0; // for making function adaptive if this step is not done still code works for (int i = 0; i < n-1; i+...
ALGO
0.999904
4.901392
f9847653-08d9-47b0-95f0-7d32e3c77ccf
umsuchi/beecrowd-solution
1005.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { float a , b; cin >> a >> b; cout << "MEDIA = " << fixed << setprecision(5) << (a*3.5+b*7.5)/(3.5+7.5)<< endl; return 0; }
ALGO
0.999233
4.18269
3997ca82-1477-44bf-afe0-1967921e40e3
Ashleshk/Programming-Codes
DSA/CollegeProjects/polynomial.cpp
/********* **************ASHLESH KHAJABGE,ROLLNO-2508*********************************/ /*PROBLEM STATEMENT: POLYNOMIAL: write a c program for polynomial creation ,display, addition and multiplication (using array/linked list) ****************************************** ****************************************/ #inc...
ALGO
0.999117
3.161525
c2139aa0-1710-4f3c-aedf-c99741b4c6b5
dhruvchauhan2405/Daily_Problems
Count Digits - GFG/count-digits.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: int evenlyDivides(int n){ int N=n; int count=0; while(n>0){ int digit = n%10; if(digit!=0 && N%digit==0 ){ count++; } ...
ALGO
0.999531
6.20743
dca589e3-337e-49de-8cca-124c9e9bd16b
daecks/cpprefresh
db_merge_linked_lists.cpp
#include <iostream> #include <list> #include <cassert> std::list<int> merge_lists(const std::list<int> &one, const std::list<int> &two){ std::list<int> merged_list; auto one_it = begin(one); auto two_it = begin(two); while(one_it != end(one) || two_it != end(two)){ if(one_it != end(one) && *...
ALGO
0.995429
5.786625
db95e61e-9ae2-481b-ac4a-8cbaa7b8f10e
lishanxin/vlc
modules/demux/adaptive/playlist/SegmentList.cpp
#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "SegmentList.h" #include "Segment.h" #include "SegmentInformation.hpp" #include "SegmentTimeline.h" #include <limits> using namespace adaptive; using namespace adaptive::playlist; SegmentList::SegmentList( SegmentInformation *parent_ ): AbstractMultipleS...
TOOL
0.869677
6.412662
8ae2e3bc-d5ef-42fa-a97b-f54b3bb9e57d
fahim0huq/data-structure
12.cpp
// 12. Write a program to create a Binary Search Tree of n elements and then delete an element // from the tree. #include <bits/stdc++.h> using namespace std; struct Node { int data; Node* left; Node* right; Node(int value) : data(value), left(nullptr), right(nullptr) {} }; Node* insert(Node* root, ...
ALGO
0.999987
6.419788
242f7b90-11ac-41a9-9dde-e8980ac9e570
nfreq/whoopnet
src/perception/vins-mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp
#include "BRIEF.h" #include "../DUtils/DUtils.h" #include <boost/dynamic_bitset.hpp> #include <vector> using namespace std; using namespace DVision; // ---------------------------------------------------------------------------- BRIEF::BRIEF(int nbits, int patch_size, Type type): m_bit_length(nbits), m_patch_size(...
ALGO
0.989715
5.860719
5ba10cfc-dfbf-42ca-a2e3-417754c0c69d
qq378287007/BeginningCppThroughGameProgramming
09.game_lobby.cpp
#include <iostream> #include <string> using namespace std; class Player { public: Player(const string &name = ""); string GetName() const; Player *GetNext() const; void SetNext(Player *next); private: string m_Name; Player *m_pNext; // Pointer to next player in list }; Player::Player(const st...
TOOL
0.911984
4.639218
93166900-522b-4a77-9c6f-846ea19415dd
thiendinh1998/Java
PTIT Summer 2017 Round 2/A.cpp
#include<bits/stdc++.h> #define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i) #define FORD(i, a, b) for (int i = (a), _b = (b); i >= _b; --i) #define REP(i, a) for (int i = 0, _a = (a); i < _a; ++i) #define DEBUG(X) { cerr << #X << " = " << (X) << endl; } #define PR(A, n) { cerr << #A << " = "; FOR(_, 1, n) ...
ALGO
0.999923
3.12921
c58fcdaf-2208-499a-ac57-df863a8fca9c
mihirbshah/algorithms
src/buddy_strings.cpp
/* * buddy_strings.cpp * * Created on: Jul 8, 2018 * Author: mihir * * https://leetcode.com/problems/buddy-strings/description/ * * Given two strings A and B of lowercase letters, return true if and only if we can swap two letters in A so that the result equals B. * */ #include <iostream> #include <...
ALGO
0.999825
6.063727
3dff8479-1b68-4a8c-b80d-59b9e21a8c50
knazir/BFInterpreter
bf.cpp
#include <fstream> #include <iostream> #include <stack> #include <sstream> #define BUFFER_SIZE 30000 #define ERROR_STATUS 1 using namespace std; /* Globals */ static char *ptr = (char*)calloc(BUFFER_SIZE, sizeof(char)); static stack<int> loopIndices; void exitWithErrorMessage(std::string message) { cerr << mess...
ALGO
0.855041
5.753162
e57ddfcf-3279-443c-bde7-4b3846331d9a
Park52/Practice_Algorithm
CountingSorting/CountingSorting.cpp
#include <stdio.h> int main(void) { int temp; int count[5]; int array[30] = {1, 3, 2, 4, 3, 2, 5, 3, 1, 2, 3, 4, 4, 3, 5, 1, 2, 3, 5, 2, 3, 1, 4, 3, 5, 1, 2, 1, 1, 1}; for (int i = 0; i < 5; i++) { count[i] = 0; } for (int i = 0; i < 30; i++) { count[array[i] - 1]++; } for (int i = 0; i <...
ALGO
0.999827
3.168736
6999d6d4-eaa0-4720-bd43-a5f92bdd0722
ArinaKhrom/practice
2_19/2_19.cpp
#include <iostream> using namespace std; int main() { int n, s; cin >> n; for (int i = 1; i <= n; i++) { if (i % 3 == 0) { s -= i; } else { s += i; } } cout << s; return 0; }
ALGO
0.999928
3.96278
38616934-704d-4225-b5eb-c88d09fea7eb
yarravenkatasai/sai
max of three num.cpp
#include<stdio.h> main() { int a,b,c; printf("enter values of number"); scanf("%d% %d %d",&a,&b,&c); switch(a>b && a>c) { case '0': printf("the max number is %d",a); break; switch(b>a) case'1': printf("the max number is %d",b); break; switch(c>a) case'2': printf("the max number is %d",c); ...
ALGO
0.999796
3.336123
dee2855c-d6c5-40d3-97f4-66e0b6bac42f
nakatamaho/mplapack
mplapack/test/lin/common/Cpbt02.cpp
#include <mpblas.h> #include <mplapack.h> #include <fem.hpp> // Fortran EMulation library of fable module using namespace fem::major_types; using fem::common; #include <mplapack_matgen.h> #include <mplapack_lin.h> void Cpbt02(const char *uplo, INTEGER const n, INTEGER const kd, INTEGER const nrhs, COMPLEX *a, INTEGE...
ALGO
0.998759
4.005964
eef32d0d-0fd8-4716-a6ed-b6fbbb3bf910
toolingteam/typescript-utils
algorithms/dynamic.cpp
//Stack is a data structure based on a last in first out (LIFO) method //This code defines and implements stack's functions using linked list #include<stdio.h> #include<stdlib.h> void pop(); void push(); void display(); struct node{ int value; struct node *link; }*top=NULL; void main(){ int choice; do{ pr...
ALGO
0.999788
3.616072
6a41864c-90bc-4b41-afaa-3a690613ec64
sarvex/leetcode-elvish
solution/1000-1099/1071.Greatest Common Divisor of Strings/Solution.cpp
class Solution { public: string gcdOfStrings(string str1, string str2) { if (str1 + str2 != str2 + str1) return ""; int n = __gcd(str1.size(), str2.size()); return str1.substr(0, n); } };
ALGO
0.999869
6.167663
effe3dad-3f2e-4e53-80a0-3e84e42e1672
ishandutta2007/codeforces
als123/normal/858/F.cpp
#include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> using namespace std; struct node{ int x,y,next; }b[500010],a[500010];int len=0,last[200010]; struct ANS{ int x,y,z; }ans[1000010];int num=0; int Len=0,Last[200010]; bool vis[200010]; int n,m,f[200010]; int cd[200010]; int findfa(int x) { if(f[x...
ALGO
0.999987
3.736615