uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
b8e27a7d-4220-4543-aa52-b0d4b79f87ed
ChinmaiVignyaKolli/OOAD
Extras/lab 1/cutvertex.cpp
// A C++ program to find articulation points in an undirected graph #include<iostream> #include<list> #include<fstream> #define NIL -1 using namespace std; #include<stdlib.h> // A class that represents an undirected graph class Graph { int V; // No. of vertices list<int> *adj; // A dynamic array of adj...
ALGO
0.99938
5.374539
159f3d66-7b7f-491d-b413-4b9f64e2875a
raincross7/code-similarity
codes/train_code/problem028/problem028_183.cpp
#include <bits/stdc++.h> using namespace std; const int Maxn=200005; int n,a[Maxn]; bool check(int lim){ map<int,int>Map; for(int i=2;i<=n;i++){ if(a[i]<=a[i-1]){ while(Map.size()&&Map.rbegin()->first>a[i]) Map.erase(prev(Map.end())); for(int j=a[i];;j--){ ...
ALGO
0.999985
3.684812
a6ff4d56-92a1-4a05-8511-c4ee14b9c67f
kshitij5/code-solutions
CODECHEF/UNSOLVED/MVALUE.cpp
//Question link: https://www.codechef.com/START1C/problems/MVALUE //Complexiety = O(n) #include <bits/stdc++.h> using namespace std; typedef long long int lli; int main(){ int t; //no of test cases cin >> t; while (t--){ int n; cin >> n; lli a[n]; for (int i=0; i<n; i+...
ALGO
0.999911
4.888476
3a420895-ce7c-48fd-9226-cfe445803f67
Yif1999/MiniEngine
engine/thirdparty/oidn/mkl-dnn/tests/benchdnn/shuffle/ref_shuffle.cpp
#include "shuffle/shuffle.hpp" #include "tests/test_thread.hpp" namespace shuffle { void compute_shuffle(const prb_t *prb, const dnn_mem_t &src, dnn_mem_t &dst) { const int axis = prb->axis; const int64_t group_size = prb->group; const int64_t axis_size = prb->dims[axis]; int64_t inner_size = 1, outer...
ALGO
0.995852
6.446448
0c4a2e0e-6802-4690-8067-56c09cb3f385
mp9weff/lab3.3
lab3.33/lab3.33.cpp
// Lab_03_3.cpp // < > // 3.3 // , . // 13 #include <iostream> #include <cmath> using namespace std; int main() { double x; // double R; // double y; // cout << "R = "; cin >> R; cout << "x = "; cin >> x; // if (x<= -R) y = x+R; else if (-R < x <= 0 ) y = sqrt(R * R - x * x); els...
ALGO
0.998146
3.752076
5ae07ba1-34d7-46fb-b418-96073fbaa86e
veerLakshya/codeforcesPractice
D_Balanced_Round.cpp
// Lakshya Veer Singh /*~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-*/ #include <bits/stdc++.h> using namespace std; //Speed #define siuu() ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); //Typedef typedef long long ll; typedef pair<int, int> pi; typedef ...
ALGO
0.999865
4.503879
8bf91304-11e6-461e-8656-205c00b33488
AzmakThaumeilGoneryLonterios/JustMyOJCode
Luogu/P5074EattheTrees.cpp
#include<iostream> #include<cstring> using namespace std; //DD constexpr int MAXN = 15; constexpr int MAX_CONNECTION = 15; constexpr int HASH = 9973; constexpr int MAX_STAT = 1e5; struct HashTable{ int head[HASH], next[MAX_STAT], pointer = 0; long long int stats[MAX_STAT]; long long int num[MAX_STAT]; ...
ALGO
0.999918
4.792898
cb1c105d-2f28-43b2-9105-2768658fc5f5
CERN-PH-CMG/cmg-cmssw
ElectroWeakAnalysis/ZMuMu/test/errorMatrix.cpp
#include <iostream> #include <fstream> #include <cmath> #include <string> #include <vector> #include <algorithm> using namespace std; struct cov { cov(unsigned int _ix, unsigned int _iy, double _cxy, double _rho) : ix(_ix), iy(_iy), cxy(_cxy), rho(_rho) { } unsigned int ix, iy; double cxy, rho; }; double o...
ALGO
0.996219
3.546749
cecd4ecd-f22c-4187-9c27-1707678d63ec
meichengzhong/libfuzzer
llvm/lib/CodeGen/LiveRangeEdit.cpp
#include "llvm/CodeGen/LiveRangeEdit.h" #include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/CalcSpillWeights.h" #include "llvm/CodeGen/LiveIntervals.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/CodeGen/VirtRegMap.h" #include "llvm/Support/Debug.h" #include...
TOOL
0.972414
7.867006
17ba1ebb-d5ef-49c1-9b48-5e2e242d7312
khaledatia25/cp-problems-solutions
spoj/RACETIME.cpp
/* Buggy Code Written By Khaled Waleed ^_^ */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <iostream> #define KHALED_WALEED_ATTIA ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define space " " #define endl '\n' #define all(v) v.begin(), v.e...
ALGO
0.999813
5.008431
db3ab42b-a649-407f-a818-5a076b4333a1
AmritMalla/hackerrank-solution
ProblemSolving/Algorithms/SherlockAndTheBeast.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); // Complete the decentNumber function below. void decentNumber(int n) { int x=0, y = 0,a; bool consist = false; while(n>=y*5){ a = n - y*5; if(a%3 == 0){ x = a/3; c...
ALGO
0.9999
5.489415
f6532da9-c91e-4497-a825-83ff1309a996
mikhaeljonathan/online-judges
TLX/Courses/FloordanCeiling.cpp
#include <iostream> #include <cmath> using namespace std; int main (){ double n; cin >> n; long long int f, c; f = floor(n); c = ceil(n); cout << f << " " << c << endl; return 0; }
ALGO
0.999316
4.511391
efcf88f9-512f-4ff4-9ca4-a6592b4940e0
m1rcus/PZ-C-pp
pz3.cpp
#include <iostream> #include <cstdlib> #include <ctime> int main() { const int N = 14; // можна змінити на бажану кількість елементів float* arr = new float[N]; // створюємо масив int count_pos = 0, count_neg = 0; // кількість додатніх та від'ємних чисел // заповнюємо масив випадковими значеннями ...
ALGO
0.993356
4.615589
9b3baba7-5573-4a30-81df-b8255ab20957
utkarshavardhana/october-leetcoding-challenge
Week-1/Day-02-combinationSum.cpp
class Solution { public: void traverse(vector<int> candidates, int pos, int sum, int target, vector<int> temp, set<vector<int>>& res) { if(sum >= target) { if(sum == target) res.insert(temp); return; } for(int i=pos; i<candidates.size(); i++) { temp.push...
ALGO
0.999993
6.45824
7844a6d5-4c62-4301-ac1b-dfc63391bd8b
gosth/MyLeetcodeOpen
offer2.102.DP.AC.cpp
class Solution { public: int findTargetSumWays(vector<int>& nums, int target) { int sum = 0; for (int i = 0; i < nums.size(); i++) { sum += nums[i]; } // 绝对值范围超过了sum的绝对值范围则无法得到 if (std::abs(target) > std::abs(sum)) return 0; int len = nums.size(); ...
ALGO
0.999994
5.736019
715f606b-ba37-402e-ad35-4e40464a1a94
Hisham-Tariq/SpendWise
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.9988
6.76073
b56cfe79-03dc-4aec-9bce-f22e8cc1452c
Master-Helix/LeetCode_Practice
142-linked-list-cycle-ii/142-linked-list-cycle-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *detectCycle(ListNode *head) { ListNode *slow=head,*fast=head; int flag=0; while(fast!=NULL && fast->...
ALGO
0.999928
5.630332
e08dc02a-687b-46d5-a4e4-fcdc8bd8d3af
shobhit-glitch/gfg
Easy/Nth Fibonacci Number/nth-fibonacci-number.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: int nthFibonacci(int n){ // code here vector<int> v; v.push_back(0); v.push_back(1); f...
ALGO
0.999875
5.986962
4f6cdb19-172b-4ad3-9e08-865e049da6ea
HariPasapuleti/Leetcode-Problems
1927-maximum-ascending-subarray-sum/1927-maximum-ascending-subarray-sum.cpp
class Solution { public: int maxAscendingSum(vector<int>& nums) { int maxSum = nums[0], sum = nums[0]; for (int i = 1; i < nums.size(); i++) { if (nums[i - 1] < nums[i]) { sum += nums[i]; } else { sum = nums[i]; } maxSum...
ALGO
0.999952
6.582767
d0b43172-b953-401c-9e2b-4023c35e6d41
pratik6644/-6Companies30days
Intuit/Question11.cpp
/* // Definition for a QuadTree node. class Node { public: bool val; bool isLeaf; Node* topLeft; Node* topRight; Node* bottomLeft; Node* bottomRight; Node() { val = false; isLeaf = false; topLeft = NULL; topRight = NULL; bottomLeft = NULL; ...
ALGO
0.999537
6.107092
f11c5810-66bb-4dad-87cb-0063e9e7748d
pranjul23/NASA
libdai/examples/example_varset.cpp
#include <dai/varset.h> #include <dai/index.h> #include <iostream> using namespace std; using namespace dai; int main() { Var x0(0, 2); // Define binary variable x0 (with label 0) Var x1(1, 3); // Define ternary variable x1 (with label 1) // Define set X = {x0, x1} VarSet X; // empty X |= x1;...
ALGO
0.876103
5.772357
9725bf68-1609-4238-875e-7fb1fda9cb81
Dipankar-Kumar-Singh/Codeforces
D_Empty_Graph.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define TestCases int TOTALTC ; cin >> TOTALTC ; for(_case = 1 ; _case <= TOTALTC ; _case++) #define FAST ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); #define all(x) (x).begin() , (x).end() #define nl "\n" int _case = 1 ; int dis(i...
ALGO
0.999906
4.596077
ea031408-a049-49fb-97f0-828b05514b05
alstnkim/PPS_24-1
2주차/C033.cpp
#include <bits/stdc++.h> using namespace std; int main(){ double x,y; int N; cin >> x >> y >> N; double a,b; double min = x/y; double price; for(int i=0; i<N; i++){ cin >> a >> b; if(min > a/b){ min = a/b; } } price = min *1000; cout<<fixed;...
ALGO
0.999442
3.86013
cf1b282e-aed8-49fc-8ba4-0fc6f7b71fe4
garimasingh128/CP-DSA-Cpp-C
Linear DS(CodeChef DSA week2)/ZCO12002.cpp
//https://www.codechef.com/LRNDSA02/problems/ZCO12002 #include <bits/stdc++.h> using namespace std; #define mod 1000000007 typedef long long ll; int main(){ ll n,x,y; cin >> n >> x >> y; set < ll > v; set < ll > w; set < ll >::iterator itr; int contest[n][2]; for(ll i=0; i<n; i++) cin >> contest[i][0] >> ...
ALGO
0.999982
3.678313
693f3ac4-0848-4a0b-89de-341bc5c8af2e
vaibhav484848/c-programs
stringmaxvalue.cpp
#include<iostream> #include<vector> #include<sstream> using namespace std; int main(){ vector<string> v; string s; for(int i=0;i<6;i++){ cin>>s; v.push_back(s); } // int n; // cin>>n; // int i=0; // vector<string> v; // while(i<n){ // string s; // getline(cin,...
ALGO
0.997985
3.227671
cd9e7846-bea1-4aa6-957d-77ea5baafdbd
solorzaa/Team-B-MRSD
PROJECT FILES/Software/pr12/eigen-eigen-10219c95fe65/doc/examples/class_CwiseUnaryOp.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define a custom template unary functor template<typename Scalar> struct CwiseClampOp { CwiseClampOp(const Scalar& inf, const Scalar& sup) : m_inf(inf), m_sup(sup) {} const Scalar operator()(const Scalar& x) const { return x<m_...
ALGO
0.928234
6.417363
e1a0f4ca-aed7-4fd4-b3c7-92f61a36b4ab
BunnyByee/Code-study
프로그래머스/1/12947. 하샤드 수/하샤드 수.cpp
#include <string> #include <vector> #include <iostream> using namespace std; bool solution(int x) { int sum = 0; // int num = x; // while(num > 0){ // sum += num % 10; // num /= 10; // } // return (x % sum == 0) ? true : false; // 문자열 개수만큼 자릿수의 값을 합하기 string str = to_string(x...
ALGO
0.999501
5.644353
43658782-36a9-4717-8fd2-5a19a8d808a0
RomanovAG/uni_labs.OOP
lab3/binary3.cpp
#include "binary3.h" #include <cstring> //#include <iostream> //using namespace std; void Binary3::toBinary(const long number) { this->bin_num = new char[2]; this->bin_num[0] = this->bin_num[1] = 0; this->bin_num_len = 2; long temp = labs(number); this->bin_num[1] = temp % 2; temp /= 2; wh...
ALGO
0.995468
4.618253
75f87a71-5df2-43a6-82f1-1f29cac2ee2d
geez6572/leetcode
cpp/medium/RemoveKdigits.cpp
#include <iostream> #include <string> using namespace std; string removeKdigits(string num, int k) { if (num.size() <= k) return "0"; string rs; int index = 0; while (index < num.size()) { while (!rs.empty() && rs.back() > num[index] && k) { rs.pop_back(); k--; } rs.push_back(num[in...
ALGO
0.999812
5.926462
d1e57bbe-ab02-4c73-a298-926eaffd1c2b
alexandrelpgillet/Linguagem-C-plus
VETORES/selecao_vetores.cpp
#include <iostream> #include <iomanip> using namespace std; int main(){ int i; float list[100]={} ; i=0; for(i ; i<100 ; i++){ cin>>list[i]; if(list[i] <=10){ cout<<fixed<<setprecision(1); cout<<"A["<<i<<"] = "<<list[i]<<endl; } } }
ALGO
0.989241
3.216415
3d85eeab-dfab-4b0e-88a0-2baa11e21e60
whanyu1212/cpp-notes
src/youtube_courses/const.cpp
#include <iostream> using namespace std; int main() { // const is a keyword in C++ to define constants. Constants are expressions with a fixed value. // Constants are immutable, meaning that their value cannot be changed after initialization. // They are read-only variables. // Constants are uppercase ...
TOOL
0.911007
5.185321
79a84478-6ff0-4800-a082-9de22342852f
Elysium-Studios/godot-fork
godot/editor/editor_atlas_packer.cpp
/*************************************************************************/ /* editor_atlas_packer.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
ALGO
0.958674
5.719732
22b2e919-37eb-46cb-ac0e-873f981f487b
raincross7/code-similarity
codes/train_code/problem006/problem006_431.cpp
#include<iostream> #include<string> #include<queue> #include <utility> #include <functional> //#include<> using namespace std; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; //#define int long long; signed main(){ int w, h; while(cin >> w >> h, w){ int cnt{}; vector<string> v(h); for(int i = 0; ...
ALGO
0.9996
3.73184
d962de4f-3482-4907-8e3c-ba8930405b68
ishandutta2007/codeforces
_ss/normal/1097/A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pii pair<ll,ll> #define fi first #define se second #define pb push_back #define arr vector<ll> const ll maxn=1e5+1,msiz=2,mod=1e9+7,inf=1e18; int main() { //freopen("ss.inp","r",stdin); ios::sync_with_stdio(false)...
ALGO
0.999978
3.553167
bf8e0618-388b-48f6-8466-760ba90c3ed5
johnjim0816/f1car
simulator/src/car_sim/src/CarDynamics.cpp
/*! * \file CarDynamics.cpp * * @todo Brief file description * * Created on: Mar 22, 2013 * Author: Mark Cutler * Contact: <EMAIL> * */ #include <math.h> #include "CarDynamics.hpp" //4W---------------------------------------4W---------------------------------------4W---------------- namespace acl { ...
ALGO
0.983798
4.887058
5ef7be14-8fd8-4d0a-9696-3f932f80d30c
Skywt2003/codes
LUOGU/P1568/toy.cpp
#include<cstdio> #include<cstring> #include<iostream> using namespace std; const int maxn=100005; int n,m; struct ToysData{ int face; //face=0:inside,l--r++; face=1:outside,l++r--. string name; }a[maxn]; inline int read(){ int ret=0,f=1;char ch=getchar(); while (ch<'0'||ch>'9') {if (ch=='-') f=-1;ch=getchar();} w...
ALGO
0.999989
3.698852
371a73a6-4878-4805-8197-0512a574f2f6
AmanL02/GFG-Practice
Difficulty: Medium/Replace elements by its rank in the array/replace-elements-by-its-rank-in-the-array.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: vector<int> replaceWithRank(vector<int> &arr, int N){ set<int> temp; for(int i=0;i<N;i++){ temp.insert(arr[i]);...
ALGO
0.999981
5.727322
3aa5e030-fa89-48f3-af62-649e039a97f2
zhangluoyang/luoyang
src/lapjv.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "lapjv.h" /** 列简化和简化转移,用于稠密代价矩阵. * 这是JV算法的第一步,通过列简化来寻找初始解 * \param n 问题规模(矩阵大小) * \param cost 代价矩阵 * \param free_rows 返回未分配的行索引 * \param x 行分配结果数组 * \param y 列分配结果数组 * \param v 列最小值数组 * \return 未分配的行数 */ int_t _ccrrt_dense(const uint...
ALGO
0.999882
4.741038
b0863852-28b8-4cb7-bce2-4ffc74f5fc88
NeitherPNorG/cpp_primer5
ch04/ex33.cpp
/* * c++ primer ch04 ex33 * increment and decrement have the highest precedence * which makes me wonder if those are actually evaluated first * though they would cancel out * * oh, these results are kind of weird * let's just ignore that increment and decrement have precedence * conditional > assignment > comma so * (...
ALGO
0.999558
5.306349
2593c28e-de44-417c-a7fc-4a724d9ca0f2
sayanbiswas023/Competitive_programming
Codeforces/A/Brain's Photos.cpp
#include <bits/stdc++.h> #define f(a,b,c) for(int a=b;a<c;a++) #define pb push_back #define mp make_pair #define ll long long int #define ld long double #define vec vector using namespace std; int n,m; void solve(){ cin>>n>>m; int flag=0; char x; f(i,0,n){ f(j,0,m){ cin>>x; if(x!='W' && x!='B' && x!='...
ALGO
0.999008
3.88777
c4816b4f-2ef9-4c4f-aced-2c567c993e0e
dltxio/trustwallet-stacks
src/PrivateKey.cpp
#include "PrivateKey.h" #include "PublicKey.h" #include <TrezorCrypto/bignum.h> #include <TrezorCrypto/curves.h> #include <TrezorCrypto/ecdsa.h> #include <TrezorCrypto/ed25519-donna/ed25519-blake2b.h> #include <TrezorCrypto/memzero.h> #include <TrezorCrypto/nist256p1.h> #include <TrezorCrypto/rand.h> #include <Trezor...
TOOL
0.861611
7.316514
c9101855-4c48-4e32-8228-13aa615ad9c8
ishandutta2007/codeforces
atoiz/normal/1030/E.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; long long a[n+2]; a[0] = 0; int even = 1, odd = 0, tmp = 0; for (int i = 1; i <= n; ++i) { cin >> a[i]; a[i] = __builtin_popcountll(a[i]); tm...
ALGO
0.99996
3.760622
a72f19f3-93ea-4e1f-9771-fe4718a2215a
cesar-avalos3/GEM5_ECE56500_FALL23
src/systemc/tests/systemc/misc/user_guide/chpt4.1/stage3.cpp
/***************************************************************************** stage3.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*****************************************************************************...
ALGO
0.999584
4.191345
984f152e-2bf7-4294-82cc-5e2fbfac9919
divanshu31/Leetcode
3225-length-of-longest-subarray-with-at-most-k-frequency/length-of-longest-subarray-with-at-most-k-frequency.cpp
class Solution { public: int maxSubarrayLength(vector<int>& nums, int k) { int ans=0; unordered_map<int,int>mp; int n=size(nums); for(int l=0,r=0;r<n;r++){ mp[nums[r]]++; //inserting value in window from right //if newly inserted element exceed frequencey poped ...
ALGO
0.999956
6.210455
8d585836-a07b-41ec-9a68-fee389290c7a
ravikjha7/StriverSDESheet
Day 8 Greedy Algorithm/6 Maximum Activities/Solution.cpp
#include <bits/stdc++.h> struct myComp { bool operator() (const pair<pair<int,int>,int> &a,const pair<pair<int,int>,int> &b) const { if(a.first.second < b.first.second) return 1; if(a.first.second > b.first.second) return 0; if(a.second < b.second) return 1; return 0; } }; int maximumActi...
ALGO
0.999905
4.45294
6c985e4f-5ae3-45a2-ac32-8c0d0f240791
mQfZ/competitive-programming
src/usaco/2019/dec/plat/2/main.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include <debug.h> #else #define dbg(...) 0 #define dbgn(...) 0 #endif void set_io(string s) { #ifndef LOCAL freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); #endif } // https://www.open-std.org/jtc1/sc22/wg21/doc...
ALGO
0.999844
4.963586
111293cd-33ae-4c51-b4c2-5745028e8448
Pranto2003/Codeforces
GoodKid.cpp
// https://codeforces.com/problemset/problem/1873/B #include <iostream> #include <vector> using namespace std; int main() { int t; cin >> t; vector<int> results; while (t--) { int n; cin >> n; vector<int> arr(n); for (int i = 0; i < n; i++) { ci...
ALGO
0.999921
5.236517
f7dcea2d-82d0-447b-bc91-678f00217302
Rohittty/leetcode
3330-find-the-original-typed-string-i/3330-find-the-original-typed-string-i.cpp
class Solution { public: int possibleStringCount(string word) { int count=0; for(int i=1;i<word.size();i++){ if(word[i-1]==word[i])count++; } return count+1; } };
ALGO
0.999932
5.874778
ce211bde-6700-495d-8735-e03a0a04bb18
Anemois/Codeforces
918_4-F.cpp
//2023/12/28 #include <bits/stdc++.h> #define HAS_T true #define INT #define Anemoi ios_base::sync_with_stdio(false);cin.tie(0); #define int long long using namespace std; struct SegmentTree{ vector<vector<int>> tree; int n; void build(vector<int>& a, int l, int r, int p){ if(l == r) ...
ALGO
0.999958
3.815583
5ac9be8a-72fa-42db-9214-6c9d2d82fc4b
ana-maria-petre/AoC2024
AoC3/AoC3/AoC3_1_2.cpp
#include <iostream> #include <fstream> #include <regex> #include <string> using namespace std; int part1(const string& data) { regex pattern(R"(mul\((\d{1,3}),(\d{1,3})\))"); smatch matches; int result = 0; string::const_iterator src_start(data.cbegin()); while (regex_search(src_start, data.cend...
ALGO
0.999603
4.870724
ab483cd3-286a-4862-b2f1-8a2bfb124f3f
VishakhaParmarM/CPlus_Prac
Power.cpp
//1st type #include <iostream> #include <cmath> using namespace std; int power (int x, int y){ if (y == 0) return 1; else return x*power(x, y-1); } int main() { int a,b; cout << "Enter the base: " << endl; cin >> a; cout << "Enter the exp.: " << endl; cin >> b; int c = power(a,b...
ALGO
0.997493
4.237895
db335a2f-81c0-4f3d-bc2a-8521b2b9e3a4
farhad-mahmud/Competitive-Programming
CP 2025/chef_gcd_1.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define nl "\n" #define yes cout << "YES\n"; #define no cout << "NO\n"; #define all(x) x.begin(),x.end() #define allr(x) x.rbegin() ,x.rend() #define dbug(x) cerr << (#x) << " is " << (x) << nl; #define output(a) for(auto &it: a) cerr<<...
ALGO
0.999854
3.835857
79ae420d-a6dc-4ab6-a9ab-08dc64eece81
Naman21-web/CrackYourInternship
DynamicProgramming/MaximalRectangle.cpp
class Solution { public: int largestRectangleArea(vector<int>& heights) { stack<int> st; int maxa=0,n=heights.size(); for(int i=0;i<=n;i++){ while(!st.empty() && (i==n || heights[st.top()]>heights[i])){ int height = heights[st.top()]; st.pop(); ...
ALGO
0.999971
6.437424
34f7b818-907f-4741-9c10-03eff08cb499
kuzudb/kuzu
src/processor/operator/intersect/intersect.cpp
#include "processor/operator/intersect/intersect.h" #include <algorithm> #include "function/hash/hash_functions.h" #include "processor/result/factorized_table.h" using namespace kuzu::common; namespace kuzu { namespace processor { std::string IntersectPrintInfo::toString() const { std::string result = "Key: ";...
ALGO
0.981207
6.559874
72aa82cb-23f0-49f5-9f6e-c49913a7b12b
ederjuniorparapaino/introduccion
actividad eder.cpp
#include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> #include <sstream> #include <algorithm> //es especialmente til cuando necesitas asignar memoria o trabajar con estructuras de datos y deseas asegurarte del espacio que estn ocupando en la memoria. using namespace std; // Estructuras para repre...
TOOL
0.950041
5.132468
93e30203-5c68-432d-9648-e22a9a620fd6
luosch/leetcode
cpp/Sort List.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* sortList(ListNode* head) { if (head == NULL) { return head; } int count = 0; ...
ALGO
0.999995
5.590083
79680828-ed4a-4dd8-bfe6-bc65d8e0a957
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_6157_12.cpp
#include <bits/stdc++.h> using namespace std; long long x, y, n, xmove[1000001], ymove[1000001]; char s[1000001]; inline long long dist(long long x1, long long y1, long long x2, long long y2) { return llabs(x1 - x2) + llabs(y1 - y2); } inline bool chec(long long mid, long long i) { return dist(xmove[i] + xmove[n] *...
ALGO
0.999977
3.998366
4aa36256-b400-40ba-99c3-44287bdd99d9
bqmnhat/CompetitiveProgramming
VnoiAndSpoj/NKREZ/main.cpp
#include <iostream> #include <bits/stdc++.h> #define MaxN 10000 #define MaxTime 30000 using namespace std; typedef long long ll; typedef pair<int, int> pii; int n; pii rent[MaxN+5]; vector<pii> RentFinAt[MaxTime+5]; ll dp[MaxTime+5]; void ReadData() { for (int i=1; i<=n; i++) { cin >> rent[i].first >> rent...
ALGO
0.995085
3.72366
762eba94-1a57-42bd-95d3-7ddf4cec4223
Bombberman1/CPP-Back
http.cpp
#include "http.h" int get_binary_file(char* &buff, const char *file_name) { std::ifstream file(file_name, std::ios::binary); if(!file) return -1; file.seekg(0, std::ios::end); int size = file.tellg(); file.seekg(0, std::ios::beg); buff = new char[size + 1]; file.read(buff, size); fil...
WEB
0.91063
3.801915
82594c24-7585-495b-9ce7-aade7d7c65e4
andrsd/gmsh
src/numeric/polynomialBasis.cpp
#include <stdlib.h> #include <cmath> #include "GmshDefines.h" #include "GmshMessage.h" #include "polynomialBasis.h" #include "GaussIntegration.h" #include "pointsGenerators.h" #include "Numeric.h" #include <limits> namespace { fullMatrix<double> generateLagrangeMonomialCoefficients(const fullMatrix<double> &monomi...
ALGO
0.961903
5.505296
9ce9c673-0cd9-4f6b-b84c-6deaa5cbc044
DennissimOS/platform_frameworks_av
media/libstagefright/codecs/amrwb/src/preemph_amrwb_dec.cpp
/* ------------------------------------------------------------------------------ Filename: preemph_amrwb_dec.cpp Date: 12/10/2004 ------------------------------------------------------------------------------ REVISION HISTORY Description: -------------------------------------------------------------------...
ALGO
0.999932
5.475962
06e3676b-622f-44b1-a173-4e9707df68f1
nadimmorol890/XPSC
Week 14/Day 2/N_Same_Differences.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); ll t; cin >> t; while (t--) { ll n; cin >> n; map <ll, ll> cnt; for (ll i = 1; i <= n; i++) { ll x; cin >> x; ...
ALGO
0.999579
4.061123
a835b6af-20d8-4567-9d30-b06a308e89f1
thegamer1907/Code_Analysis
Codes/AC/3969.cpp
#include <set> #include <map> #include <queue> #include <stack> #include <cmath> #include <bitset> #include <cstdio> #include <string> #include <vector> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long LL; typedef pair<LL, LL> pLL; typ...
ALGO
0.999991
3.503385
3387ee2f-f070-41a8-bf35-e826e4f18785
nehasangeetajha/c-ds-and-algo
tripletsum.cpp
#include <iostream> using namespace std; // arr - input array // size - size of array // x - sum of triplets void FindTriplet(int arr[], int size, int x) { /* Don't write main(). * Don't read input, it is passed as function argument. * Print output and don't return it. * Taking input is handled auto...
ALGO
0.999781
4.147013
86e97f78-7e09-40d2-800e-ad3772f3ed99
maopu2001/Codeforces
1843B.cpp
#include <bits/stdc++.h> using namespace std; #define nl endl typedef long long ll; const int MOD = 1e9 + 7; void solve(int T) { ll n, sum = 0, ct = 0; cin >> n; vector<ll> a(n); for (ll &x : a) cin >> x; bool open = 0; for (ll x : a) { sum += abs(x); if (x < 0 && !open) { open = 1; ...
ALGO
0.99891
4.006522
6761b426-e6e1-4f28-a57e-debba78d9331
Duynnuit/24520388-BTTH4
CDathuc.cpp
#include "CDathuc.h" void CDathuc::Nhap() { cout << "Nhap bac cua da thuc: "; cin >> bac; heSo.resize(bac + 1); for (int i = bac; i >= 0; i--) { cout << "Nhap he so cua bac " << i << ": "; cin >> heSo[i]; } } void CDathuc::Xuat() const { bool firstTerm = true; for (int i = bac; i >= 0; i--) { ...
ALGO
0.987995
3.352708
96bb3ee0-7530-477e-ad16-8a146e845fc7
Enhmunh-E/codeforces-solutions
996A.cpp
#include <iostream> #include <vector> using namespace std; int main () { long long n; cin >> n; vector<long> a; a.push_back(100); a.push_back(20); a.push_back(10); a.push_back(5); a.push_back(1); long bill = 0; for(long i = 0; i < a.size(); i++){ bill = bill + (n / a[...
ALGO
0.99983
3.431038
7381ab53-8cbb-4bf8-b0e9-b64e4671a87d
louie140/openCV
samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
/** * @function cornerDetector_Demo.cpp * @brief Demo code for detecting corners using OpenCV built-in functions * @author OpenCV team */ #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <iostream> using namespace cv; using namespace std; /// Global variables Mat src, src_gray; Mat myHarris...
ALGO
0.998313
7.049457
b6249b89-3cdc-4768-a695-ffd17cac609e
sudosurootdev/external_skia
experimental/Intersection/CubicIntersection.cpp
#include "CubicUtilities.h" #include "CurveIntersection.h" #include "Intersections.h" #include "IntersectionUtilities.h" #include "LineIntersection.h" #include "LineUtilities.h" #include "QuadraticUtilities.h" #include "TSearch.h" #if 0 #undef ONE_OFF_DEBUG #define ONE_OFF_DEBUG 0 #endif #if ONE_OFF_DEBUG static cons...
ALGO
0.998889
6.792791
05afe8c8-06f0-430f-ab26-3a79d1437e6d
shiroul/tubes-mobile
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.998756
6.772262
3ba1699a-4ee2-4534-abc1-c506b310917e
njain204/LEET_CODE1
1431-kids-with-the-greatest-number-of-candies/1431-kids-with-the-greatest-number-of-candies.cpp
class Solution { public: vector<bool> kidsWithCandies(vector<int>& candies, int ec) { int max =INT_MIN; vector<bool>ans; for(int i=0;i<candies.size();i++) { if(candies[i]>max) max=candies[i]; } for(int i=0;i<candies.size();i++) { ...
ALGO
0.999969
5.804456
fa9f24eb-3021-4ee8-8f22-3c943caa4a71
NerdPotatoo/Problem-Solving
Codeforces/A_Laptops.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define fastIO ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int32_t main() { fastIO; // CODE HERE int n; cin>>n; vector<pair<int,int>> v; for(int i = 0; i<n; i++) { int x, y; ...
ALGO
0.999878
3.702228
7b0d630d-6edb-469e-a9f4-2d01699d79ed
jagadeeshbarla/leetcode
1381-design-a-stack-with-increment-operation/1381-design-a-stack-with-increment-operation.cpp
class CustomStack { int max_s; stack<int>s; public: CustomStack(int maxSize) { max_s = maxSize; } void push(int x) { if(s.size() < max_s){ s.push(x); } } int pop() { if(s.empty()){ return -1; } ...
ALGO
0.999729
5.625964
ca9b5fec-458c-48cc-a520-8e6ec6bcc0b6
vigneshsnaik/leetcode-solutions
1315-sum-of-nodes-with-even-valued-grandparent/1315-sum-of-nodes-with-even-valued-grandparent.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.999982
5.508563
cdbb328c-a40c-4ddf-aebe-868be235ef91
Bhagyashri-Parhi/DYNAMIC-PROGRAMMING
MCM pattern qs/matrixchainmultiplication.cpp
Given a sequence of matrices, find the most efficient way to multiply these matrices together. The efficient way is the one that involves the least number of multiplications. The dimensions of the matrices are given in an array arr[] of size N (such that N = number of matrices + 1) where the ith matrix has the dimensi...
ALGO
0.999998
5.600976
d3b1067c-a16d-4cbc-bab0-aba1caf9201d
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_9727_4.cpp
#include <bits/stdc++.h> using namespace std; int num[1005][1005]; int mod; int memo[1005][1005]; int ncr(int n, int r) { if (n == r) return 1; else if (r == 0) return 1; else if (memo[n][r] != -1) return memo[n][r]; return memo[n][r] = (0LL + ncr(n - 1, r) + ncr(n - 1, r - 1)) % mod; } int main() {...
ALGO
0.999978
4.060779
c1ac97a4-7906-4658-9e27-91df1d63b915
ustcadsl/GraphWalker
apps/rwdomination.cpp
#include <string> #include <fstream> #include <cmath> #include <fstream> #include "api/graphwalker_basic_includes.hpp" #include "walks/randomwalkwithjump.hpp" #include "util/toplist.hpp" #include "util/comperror.hpp" typedef unsigned VertexDataType; class RandomWalkDomination : public RandomWalkwithJump{ public: ...
ALGO
0.999371
3.063388
31ae5403-67e1-4974-a903-c6984756b9d6
phmhp/Baekjoon
프로그래머스/0/181904. 세로 읽기/세로 읽기.cpp
#include <string> #include <vector> using namespace std; string solution(string my_string, int m, int c) { string answer = ""; for (int i =0; i<my_string.size();i+=m){ answer.push_back(my_string[i+c-1]); } return answer; }
ALGO
0.999526
4.405807
89ac1d8b-fc8f-45b5-bce6-ca5e2de5bb81
dmkz/competitive-programming
mirea/cources/beginner/2024/2024-03-03/c.cpp
#include <bits/stdc++.h> using namespace std; const int inf = (int)1e9+7; void solve() { int n, s; cin >> n >> s; vector<int> a(n); for (auto &it : a) cin >> it; // нужно найти отрезок из 0 и 1 такой что сумма на нём равна s // воспользуемся методом двух указателей, поддерживая сумму на отре...
ALGO
0.999805
4.656426
e2a09a33-94bc-403b-99c4-17372b3d5222
GeneLiuXe/University-Subject-Library
Data-Structure/Experiment/Ex5-Matrix/Matrix.cpp
#include <iostream> #include "LinearList.h" using namespace std; template <class T> struct matrixTerm{ int row,col; T element; matrixTerm() {} matrixTerm(int a,int b,T c) { row = a, col = b, element = c; } matrixTerm<T>& operator = (const matrixTerm<T>& x) { this->row = x.row, this->col = x.col, this->eleme...
ALGO
0.998381
3.295062
71650611-b715-4e7d-a059-a1ade35254a9
ishandutta2007/codeforces
_h_/normal/983/A.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i = (a); i < (b); ++i) #define rrep(i,a,b) for(int i = (b); i --> (a);) #define all(v) (v).begin(),(v).end() #define trav(x,v) for(auto &x : v) #define sz(v) int(v.size()) typedef vector<int> vi; typedef long long ll; typedef pair<int,int> pii; l...
ALGO
0.999764
4.381655
4bc404c6-37c1-499c-8bca-128f18719f03
hayleyson/leet-code
array-string/1768-merge-strings-alternately/1768-merge-strings-alternately.cpp
class Solution { public: string mergeAlternately(string word1, string word2) { // std::string res (""); // int i = 0, j = 0; // while (i < word1.length()){ // res = res + word1[i]; // i ++; // while (j < word2.length()){ // res = r...
ALGO
0.999941
5.734425
42d3d158-519f-44ee-aebd-183f9c00cfc5
Karan02204/GFG-Problems
Difficulty: Basic/Sum of Binary Tree/sum-of-binary-tree.cpp
/* A binary tree node has data, pointer to left child and a pointer to right child struct Node { int data; struct Node* left; struct Node* right; Node(int x){ data = x; left = right = NULL; } }; */ // Function to return a list containing the level order traversal in spiral form....
ALGO
0.999975
5.974411
47783bcd-74c8-4c07-9c7e-41bb30373d9e
md8-habibullah/Data-Structure
07 Assignment/01.cpp
#include <iostream> using namespace std; int kajerFactorial(int x) { if (x == 0) return 1; return x * kajerFactorial(x - 1); } int main() { int amarNumber = 5; cout << amarNumber << "! = " << kajerFactorial(amarNumber) << endl; return 0; }
ALGO
0.999237
4.540618
4ff60739-715a-43fb-93dc-1ac093f86cb8
nwjs/node
deps/icu-small/source/i18n/double-conversion-bignum-dtoa.cpp
// ICU PATCH: ifdef around UCONFIG_NO_FORMATTING #include "unicode/utypes.h" #if !UCONFIG_NO_FORMATTING #include <cmath> // ICU PATCH: Customize header file paths for ICU. #include "double-conversion-bignum-dtoa.h" #include "double-conversion-bignum.h" #include "double-conversion-ieee.h" // ICU PATCH: Wrap in ICU ...
TOOL
0.982667
7.584215
083a2a6f-51d3-462b-812b-4b2e65decbde
ishandutta2007/codeforces
emthrm/normal/1161/C.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #define _USE_MATH_DEFINES #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <iterator> #include <map> #include <queue> #include <random> ...
ALGO
0.999995
4.610297
14150af8-5b3c-4555-aa37-058748487a04
conan1005/DSA-Questions
Leetcode/10-graphs/medium/1905-count-sub-islands.cpp
/******************************************************************* *******************************************************************/ #include<iostream> #include<bits/stdc++.h> using namespace std; class Solution { vector<int> dx = {0, 0, -1, 1}; vector<int> dy = {-1, 1, 0, 0}; public: bool in...
ALGO
0.999936
6.031801
9a17b684-342d-4222-ada9-23d84ad3589d
rtama/6.837
pset2/starter2/3rd_party/nanogui/ext/eigen/bench/sparse_product.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.991027
4.164869
6f315547-a262-4dc6-a2b5-30b4f30c6d5c
Moinkhan21/CPPDemoPractice
Practice38.cpp
#include <iostream> #include <vector> using namespace std; /** * Function: lastOcc * ------------------ * Uses binary search to find the last (rightmost) occurrence of a target value in a sorted vector. * * Parameters: * - v: The input vector of integers (must be sorted) * - target: The value to find * * Re...
ALGO
0.999973
7.276491
1949d63a-da99-4348-9505-7c510fabe761
mahirkabir/leetcode-solves
random-solves/Third Maximum Number_86214723.cpp
class Solution { public: int thirdMax(vector<int>& nums) { int n = nums.size(); int MIN_INT = -2147483648; long long first = MIN_INT, second = MIN_INT, third = MIN_INT, org = MIN_INT; first--, second--, third--, org--; bool f = false, s = false, t = false; for(int i =...
ALGO
0.999908
5.481754
4a550352-3077-4298-aa88-d3fee53f28af
raincross7/code-similarity
codes/train_code/problem391/problem391_464.cpp
#include <iostream> #include <vector> #include <string> #include <cmath> using namespace std; int M, Nmin, Nmax, P[200]; int main(){ while(1){ cin >> M >> Nmin >> Nmax; if (M == 0 && Nmin == 0 && Nmax == 0) break; for (int i = 0; i < M; ++i) cin >> P[i]; i...
ALGO
0.999983
3.764935
72ad1888-c881-4f3a-81e4-6544a935957f
glebd/leetcode
0098_validate_binary_search_tree/src/binary_tree.cpp
#include "binary_tree.h" #include <memory> #include <vector> namespace binary_tree { static auto value2node(const int value) { return std::make_unique<TreeNode>(value); } auto values2nodes(const std::vector<int>& values) -> std::vector<std::vector<std::unique_ptr<TreeNode>>> { std::vector<std::vector<std::un...
ALGO
0.999495
6.450131
adb93e46-e1e3-4350-8b1a-e00f750bfaea
adamap/code-test2
290wordpattern.cpp
// // //Given a pattern and a string str, find if str follows the same pattern. // //Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. // //Examples: // //1.pattern = "abba", str = "dog cat cat dog" should return true. //2.pattern = "abba", str = "d...
ALGO
0.997513
6.411437
d49a8496-ad9a-49c7-8dfd-f5c65aa7c92d
MichalWitczakmw/UAR
Main_Projektu.cpp
#include "Main_Projektu.h" #ifdef MAINPROJEKTU #include "Generator_Sygnalow.h" #include "Regulator_PID.h" #include "Model_ARX.h" #include "Sprzerzenie_Zwrotne.h" int main() { double wartoscZadana; cout << "Podaj wartosc zadana: "; cin >> wartoscZadana; deque<double> A{ 0.4}; deque<double> B{ 0.6...
ALGO
0.998012
5.023139
de659844-c68e-4917-95f9-48870707c19b
hyobim/NoshibalKeepGoing
자구실습족보w2.cpp
#include <iostream> using namespace std; class Node { public: int data; Node* next; Node() { data = 0; next = NULL; } }; class LinkedList { public: Node * start; Node* tail; int size; LinkedList() { start = NULL; tail = NULL; size = 0; } int sizee() { return size; } void insert(int num) { f...
ALGO
0.9996
3.004031
8101ef9e-9b56-4ced-af47-88a629448ced
Naezan/we-are-algorithm
gaboza12/Week19/14938.cpp
#include <bits/stdc++.h> using namespace std; int n, m, r; int item[105]; int dist[105][105]; int ans = 0; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m >> r; for (int i = 1; i <= n; i++) { cin >> item[i]; } for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j...
ALGO
0.999962
4.281473
4372e27a-cab2-4545-8318-61f67ad17cc7
AlmondLee/llvm_build
libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
// <vector> // template <class InputIter> vector(InputIter first, InputIter last, // const allocator_type& a); #include <vector> #include <cassert> #include <cstddef> #include "test_macros.h" #include "test_iterators.h" #include "test_allocator.h" #include "min_allocator.h" #include...
TEST
0.912986
7.072237
e8b77601-852f-49ee-a7a9-f82739e148df
baoxuezhao/crack
chapter11/quicksort.cpp
#include <iostream> #include <cstdio> using namespace std; //take the middle element as pivot int partition1(int array[], int left, int right) { int pivot = array[(left+right)/2]; while(left <= right) { while(array[left] < pivot) left++; while(array[right] > pivot) right--; //swap elements, and move left ...
ALGO
0.999948
4.514768
760721fc-97ad-4af9-bbe9-9dbfcc14b585
Sel68/pe-snippets
sieve.cpp
#include <bits/stdc++.h> using namespace std; #define sz(a) a.size() #define ll long long #define pb push_back #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define fli(i,fc,n) for(int i=fc;i<n;i++) #define nl "\n" #define ff first #define ss second vector<int>* sieve(int mx){ vector<int>...
ALGO
0.998595
3.173571
10141b69-54e9-4222-9abc-45f02ab86d6f
patflick/psac
src/dss.cpp
/** * @file dss.cpp * @author Patrick Flick <<EMAIL>> * @brief Executes and times the suffix array construction using * libdivsufsort. */ // C++ includes #include <fstream> #include <iostream> #include <string> // using TCLAP for command line parsing #include <tclap/CmdLine.h> // libdivsufsort wr...
ALGO
0.944408
6.036307