uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e20bb59d-f879-436f-b140-ed3294cb4314
marwan-abdellah/OpenCV-2.4.0
modules/imgproc/src/undistort.cpp
#include "precomp.hpp" cv::Mat cv::getDefaultNewCameraMatrix( InputArray _cameraMatrix, Size imgsize, bool centerPrincipalPoint ) { Mat cameraMatrix = _cameraMatrix.getMat(); if( !centerPrincipalPoint && cameraMatrix.type() == CV_64F ) return cameraMatrix; Mat ne...
ALGO
0.899957
6.785726
e52dcb5c-49cf-4be5-b444-db034892c1aa
BrittzXD/silvertree
utilities/names/namegen.cpp
#include <iostream> #include <sstream> #include <fstream> #include <cstdlib> #include <cmath> #include <ctime> #include "namegen.hpp" #ifdef VERBOSE const bool verbose = 1; #else const bool verbose = 0; #endif namespace namegen { float ranfu() { return rand()/(static_cast<float>(RAND_MAX)); } int raniu(int n) { ...
TOOL
0.880494
6.166795
3155a21a-d613-490d-b51f-bae012f3e2e9
tail-yuan/algorithm
algorithm_zuo/体系学习代码/使用辅助栈排序栈.cpp
#include<iostream> #include<stack> using namespace std; class StackSortStack { public: void stackSortStack(stack<int>& st) { stack<int>stHelper; while (!st.empty()) { int tmp = st.top(); st.pop(); if (stHelper.empty() || tmp <= stHelper.top()) { //stHelper.push(tmp); } else { //topС ...
ALGO
0.999937
4.889796
84a88a8a-00ae-49d1-a019-cc0278a1c555
mniamme/cp3-uva-solutions
543.cpp
#include <bits/stdc++.h> using namespace std; #define SZ(v) (int)v.size() #define ALL(v) v.begin(),v.end() #define ALLR(v) v.rbegin(),v.rend() #define FN(s,c) (int)s.find(c) #define FOR(i,e) for (int i = 0; i < e; i++) #define FORR(i,s) for (int i = s-1; i >= 0; i--) #define IT(it,v) for(it=v.begin();it!=v.end();it++...
ALGO
0.999764
3.766703
ba17057d-8bf4-4d19-a663-e8bfdb3334f9
origamimantis/SJTU_2019
shared/opencv3/modules/features2d/src/fast_score.cpp
/* The references are: * Machine learning for high-speed corner detection, E. Rosten and T. Drummond, ECCV 2006 * Faster and better: A machine learning approach to corner detection E. Rosten, R. Porter and T. Drummond, PAMI, 2009 */ #include "fast_score.hpp" #include "opencv2/core/hal/intrin.hpp" #define VERIF...
ALGO
0.999266
6.03112
ecdd38ba-5765-40f4-a4ca-34511be530f6
AndrewF001/Andrews_Program
AF_Program/AF_Program/MergeSort.cpp
#include "MergeSort.h" MergeSort::MergeSort(Menu1* parent, unsigned int arrsize) : SortingTemplateClass(parent, arrsize) { AlgrothimName = "Merge"; GFPTR = &Static_SGF::GraphicsMethod2; } MergeSort::~MergeSort() { } //merge sort done with iteration //this method needs to be split up to make it more readable void M...
ALGO
0.998665
4.295844
69c84747-aaf8-477c-8896-3eb58d9f540a
jokahara/amrex
amr_particles/amrex.cpp
#include "algorithm" #include "boost/array.hpp" #include "boost/lexical_cast.hpp" #include "cstdlib" #include "iomanip" #include "iostream" #include "string" #include "ctime" #include "mpi.h" #include "Src/Amr.h" #define NO_CHILD_LID -1 bool Cell::transfer_particles = false; using namespace std; using namespace boos...
ALGO
0.999034
4.085908
0a173ed9-0178-4e14-968c-0892b6f9bfde
silent-lovelyidiot/asdrv
source/um/lua_ext_functions.cpp
#include <Windows.h> #include <Sddl.h> #include <malloc.h> #include <crtdbg.h> #include "lua.hpp" #include "lua_ext_functions.h" #include "constexpr.h" #include "log.h" #ifdef DBG int lua_log(lua_State* L) { const char* str = lua_tostring(L, 1); OutputDebugStringA(str); return 0; } #endif // DBG int lua_init...
TOOL
0.950533
4.444888
d2493892-2296-4102-9791-c7675ae90332
raincross7/code-similarity
codes/train_code/problem287/problem287_197.cpp
#include "bits/stdc++.h" using namespace std; int main() { int N ; cin >> N; map<int,int>A; map<int,int>B; for (int n = 0;n<N;++n) { int num; cin >> num; if (0 == n%2) { A[num]++; } else { B[num]++; } } int A0 = 0; int a0 = 0; int A1 = 0; int a1 = 0; for (auto itr = A.begin(); itr != A.en...
ALGO
0.999974
3.656104
c6123842-b64f-407a-bde8-9354b3984a57
selinger/katahex
cpp/command/evalsgf.cpp
#include "../core/global.h" #include "../core/config_parser.h" #include "../core/timer.h" #include "../dataio/sgf.h" #include "../search/asyncbot.h" #include "../search/searchnode.h" #include "../program/setup.h" #include "../program/playutils.h" #include "../program/play.h" #include "../command/commandline.h" #include...
ALGO
0.99393
6.792093
7a010100-4369-4e79-ab9a-a92a1b948b2f
ishandutta2007/codeforces
batman/normal/340/D.cpp
////////////////////////////////////////////////////////////////// ////////////////// Sa1378 Platform Vesion 1.2 /////////////////// //////////////////////////////////////////////////////////////// // Yesterday is history... // Tomorrow is a mystery... // But Today is a GIFT. #include <bits/stdc++.h> using namespace ...
ALGO
0.999972
4.378055
ccfa463b-bf9d-496f-85e8-5e40c1ea2931
tridibsamanta/Codeforces_Solutions
327A.cpp
/* ~ Author : @tridib_2003 */ #include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define PI 3.1415926535897932384626 #define MOD 1000000007 #define vi vector<int> #define vvi ...
ALGO
0.999925
4.569705
13b793be-4b3c-40a9-9037-13f2a812c95c
Sy0307/Self_Practice_For_Algorithm
概率统计专题/取数游戏2.cpp
#include <bits/stdc++.h> using namespace std; using ui = unsigned int; using ull = unsigned long long; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; const int maxn = 1e5 + 10; const int mod = 1000000007; #define inl inline #define fr(i, a, b) for (int i = a; i <= b; i++) #define ford(i, a,...
ALGO
0.999913
4.170335
114f76e9-d9e3-409f-80d0-5fe38d4dd530
EmanueleMusumeci/RoboCup-Coach
Src/Modules/BehaviorControl/BehaviorControl/Cards/CodeRelease/ApproachAndKickCard.cpp
/** * @file ApproachAndKickCard.cpp * * This file implements a behavior to kick the ball to a specific location. * * @author Emanuele Musumeci */ #include "Representations/BehaviorControl/BehaviorStatus.h" #include "Representations/BehaviorControl/FieldBall.h" #include "Representations/Modeling/BallModel.h" #inc...
ALGO
0.988006
5.401281
e8730eaa-f537-4af3-9844-2ceda59041b7
ishandutta2007/codeforces
dreamoon_love_aa/normal/1554/C.cpp
/*{{{*/ #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<string> #include<iostream> #include<sstream> #include<set> #include<map> #include<queue> #include<bitset> #include<vector> #include<limits.h> #include<assert.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).be...
ALGO
0.99998
3.207772
78255d78-9569-468f-8a2c-03475ff76f2d
raincross7/code-similarity
codes/train_code/problem360/problem360_367.cpp
#include <bits/stdc++.h> #define REP(i,n) for (int i = 0; i < (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) {a = b;return true;}return false;} using namespace std; using ll = long long; using P = pair<in...
ALGO
0.999468
4.429633
3b7021c7-70df-49cd-816d-6e393bb77477
carlosmba/Cpp-Data-Structures
Listas/1-ListaEnlazada.cpp
#include<iostream> #include<stdlib.h> using namespace std; struct Node{ int date; Node *next; }; //Function prototype void menu(); void pop(Node *&,int); void show(Node *); void search(Node *,int); void deleteNode(Node *&,int); void deleteAll(Node *&,int &); Node *list = NULL; int main(){ menu(); return 0; } vo...
ALGO
0.995569
3.878236
80b69185-a7d6-441b-94f1-506435b3c5b3
tanishq0917t/Practice-CP-Problems
Learn to Code 25-02-2021/LTC05.cpp
#include<bits/stdc++.h> #define ll long long int #define ull unsigned long long int using namespace std; int main() { ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); int t; cin>>t; while(t--) { string a,b,c; cin>>a>>b>>c; sort(a.begin(),a.end()); sort(b.begin(),b.end()); sort(c.begin(),c.end()); ...
ALGO
0.999941
5.046569
f01ce5c3-011e-48c5-84af-c1977b3fb3ed
narekzamanyan97/Metacareers-Programming-Problems
Data Structures - Implementations/Red Black Tree/RedBlackTree.cpp
#ifndef RED_BLACK_TREE_CPP #define RED_BLACK_TREE_CPP #include "RedBlackTree.h" // default constructor RedBlackTree::RedBlackTree() { // set the root to be nullptr this->root = nullptr; } // a constructor to build a tree using the values in a given array // @parameters: // array_of_values = an array of int values...
ALGO
0.991082
5.060151
92a4edf1-256c-42b3-a8e6-ef69b1ba32d4
szymon-s292/LNU-odpowiedzi
C++/Poziom podstawowy/Instrukcje sterujące i pętle/Zasięg zmiennych w pętlach.cpp
#include <iostream> using namespace std; void zasieg( void ) { int x = 10; for ( int x = 0; x <= 0; x++ ) { for ( int x = 30; x <=30; x++) std::cout << "wartość zmiennej x w drugiej pętli for: " << x << endl; std::cout << "wartość zmiennej x w pierwszej pętli for: " << x <<...
TOOL
0.920607
3.945447
8a9f693c-e87d-4b30-b2b5-ac07ea151388
haru210/atcoder
ABC256/A.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int n; int sum = 1; cin >> n; rep(i, n) { sum *= 2; } cout << sum << endl; return 0; }
ALGO
0.9999
4.320753
93247c70-7495-421b-b4f7-7345111bf859
WattskiTian/frontend_simulator
BPU/dir_predictor/experimential_demo/utils.cpp
#include "utils.h" uint32_t bit_update(uint32_t data, bool is_inc, int len) { uint32_t ret; uint32_t data_max = (1 << len) - 1; if (is_inc) { if (data >= data_max) ret = data_max; else ret = data + 1; } else { if (data == 0) ret = 0; else ret = data - 1; } return re...
TOOL
0.989997
5.103091
9122b533-dad5-499c-bf17-6923ec2e4bcf
Magicdalonglong/algorithms
settt/settt/2heap.cpp
#include <iostream> #include <map> #include <set> #include <stack> #include <list> #include <vector> #include <queue> #include <unordered_set> #include <unordered_map> using namespace std; class Solution { public: unordered_map<int ,char> dict; Solution(){ dict[1] = 'I';dict[5] = 'V';dict[10] = 'X';dic...
ALGO
0.999887
4.834191
54a4a604-69d6-4161-81f2-6f44c49f4378
XifanYu/codeforces
843/843A.cpp
#include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <deque> #include <queue> #include <stack> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> #include <bitset> #include <cmath> #include <cstdlib> #include <ctime> #include <cs...
ALGO
0.999973
3.365381
e0d7d6f0-3907-4ad3-8aae-475a64a3d305
ishandutta2007/codeforces
hellkitsune/normal/65/D.cpp
#include <cstdio> #include <cmath> #include <cstring> #include <string> #include <sstream> #include <algorithm> #include <iostream> #include <iomanip> #include <map> #include <set> #include <list> #include <queue> #include <stack> #include <vector> #include <cassert> using namespace std; #define pb push_back #define ...
ALGO
0.999944
3.6893
e1b65d6b-61fb-40f9-a154-dc5f308c0aa4
contactonee/Olympiad
Working samples/bor.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int bor[15001][60],cnt; bool b[1000001]; void add_word(string s) { int n=s.size(),v=0; for(int i=0;i<n;i++) { int ch=s[i]-65; if(!bor[v][ch]) bor[v][ch]=++cnt; v=bor[v][ch]; } b[v]=true; } bool find_word(string s) { int n=s.siz...
ALGO
0.999744
4.311002
438efdd7-2d08-4b31-bb7b-e3f7d2df3816
intervalrain/Cpp
learn/floatCompare.cpp
#include <iostream> #include <cmath> using namespace std; /* imprecise comparison */ int main(){ for (int i = 0; i < 100; i++){ float f = sqrt(i); cout << f << " "; cout << f * f; if (abs(f * f - i) > 0.0001){ cout << "!!!"; } cout << endl; } return 0; }
ALGO
0.945866
3.27968
6cab40ba-96e5-41d3-ab5e-c93d2b6db5e8
NazerkeY/ADS
task1.cpp
#include <iostream> using namespace std; struct node{ int val; node *next; node *prev; node(int x){ val = x; next = NULL; prev = NULL; } }; struct queue{ int sz; node *head; node *tail; queue(){ sz = 0; head = NULL; tail = NULL; } void fron...
ALGO
0.984355
3.897991
e6b0aa37-b862-4ddf-a660-3b7dc44e183e
GabrielSpdf/CompetitiveProgramming
CodeForces/Rounds/Round903/A.cpp
//Accepted #include <bits/stdc++.h> using namespace std; int encontra_substring(string x, string s){ size_t found = x.find(s); if(found != std::string::npos) { return 1; } //encontrou else{ return 0; } } int main(){ int cases, n, m, qtd; string x, s; //x has length n and x has length m ...
ALGO
0.998488
3.905637
42236664-8afd-4dec-9ae6-c8b2165cbecb
OneBitPython/Codechef
Starters42/Divisible_by_3.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define all(c) c.begin(), c.end() #define endl "\n" const double PI=3.14159265358979323846264338327950288419716939937510582097494459230; void __print(int x) {cerr << x;} void __print(long x) {cerr << x;} void __print(unsigned x)...
ALGO
0.999885
4.417932
28dfa652-847c-44bd-be6c-7f28abe9612a
ishandutta2007/codeforces
als123/normal/959/F.cpp
#include<cstdio> #include<algorithm> #include<iostream> #include<cstring> using namespace std; const int MOD=1e9+7; const int N=100005; int n,q; int a[N]; struct qq { int x,l,id; }s[N]; bool cmp (qq x,qq y){return x.x<y.x;} int f[22]; int ans[N]; int Ans=1; void add (int x) { for (int u=20;u>=0;u--) if ((x&(1<<u))!...
ALGO
0.999954
3.644232
6c7efcce-234d-4f95-84a4-3aa252beb1a5
edge555/Online-Judge-Solves
Toph/Mystery of Fibonacci.cpp
#include <bits/stdc++.h> #define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define pf printf #define sc scanf #define sf(n) scanf("%d",&n) #define sff(n1,n2) scanf("%d %d",&n1,&n2) #define sfff(n1,n2,n3) scanf("%d %d %d",&n1,&n2,&n3) #define sl(n) scanf("%lld",&n) #define sll(n1,n2) scanf("%ll...
ALGO
0.999963
4.132195
66d9fb4d-5975-4e45-b276-f778f3f2f8a5
BogdanCiocea/PA
tema1/checker/oferta.cpp
#include <fstream> #include <vector> #include <algorithm> #include <iostream> #include <limits> #include <cmath> #include <iomanip> using namespace std; /** * INF este un numar foarte mare :) */ #define INF numeric_limits<unsigned long long>::max() /** * Functie care ia minimul dintr-un vector de la o pozitie la al...
ALGO
0.999835
3.827933
6c04786a-3cca-45f7-ae46-03a43d9a4446
ishandutta2007/codeforces
e869120/normal/1264/A.cpp
#include <iostream> #include <vector> using namespace std; #pragma warning (disable: 4996) int T, N, A[1 << 19]; int main() { cin >> T; for (int i = 1; i <= T; i++) { scanf("%d", &N); for (int j = 1; j <= N; j++) scanf("%d", &A[j]); vector<int> vec; int sb = -1; for (int j = 1; j <= N / 2; j++) { if (j ...
ALGO
0.999781
3.169229
221c409c-2813-4469-847e-d9b5318a72e1
adhoprsy/qsym
third_party/pin-2.14-71313-gcc.4.4.7-linux/source/tools/CacheClient/cache_simulator.cpp
// // ORIGINAL_AUTHOR: Kim Hazelwood // // This tool implements a custom code cache management policy // Sample usage: // pin -t cache_simulator -- /bin/ls #include "pin.H" #include "utils.H" #include "portability.H" #include <iostream> #include <fstream> using namespace std; /* ===============================...
TOOL
0.966428
5.815099
225fba63-30da-4812-95b5-ca777c277d01
prafullpandey614/SDE-Sheet
Q02Pascaltriangle.cpp
class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> ans(numRows); for(int i=0;i<numRows ;++i){ ans[i].resize(i+1); ans[i][0] = ans[i][i] = 1; for(int j=1;j<i;++j){ ans[i][j] = ans[i-1][j-1]+ans[i-1][j]; ...
ALGO
0.999954
5.502401
4f950443-c652-477b-89c3-0ac8ad5e241a
ubAI6689/CodeForces
Practise/900/src/A_Doggo_Recoloring.cpp
//https://codeforces.com/problemset/problem/1025/A #include <iostream> #include <string> #include <set> void solve(int n, std::string color) { std::set<char> letter; for (int i = 0; i < n; i++) letter.insert(color[i]); if (letter.size() == n && n > 1) std::cout<<"No\n"; else std::cout<<"Yes\n"; } int ...
ALGO
0.999935
4.511658
35626e9e-7318-48d2-9842-d91bf6d8e344
Saty248/dsa-sheet
dsaSheet/dp/matricChain.cpp
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define endl "\n" using namespace std; int solve(int n,int arr[],int i,int j){ if(i==j){ return 0; } int ans=INT_MAX; for(int k=i;k<j;k++){ ans=min(ans,solve(n,arr,i,k)+solve(n,arr,k+1,j...
ALGO
0.999895
3.910267
c4a419e4-136c-4224-a722-6cfc96cfd5e5
ANKITSANJYAL/CPP
C++/patterns/palindromic_pattern.cpp
#include<iostream> using namespace std; //Palindromic pattern triangle int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ int j; for(j=1;j<=n-i;j++){ cout<<" "; } int k=i; for(;j<=n;j++){ cout<<k--<<" "; } k=2; for(;j<...
ALGO
0.999972
3.765084
9f113d4b-6363-435e-b119-446d89d402ec
s0umyajeet/Competitive-Programming
Codechef/Contests/CodeEnsemble/B.cpp
#include <bits/stdc++.h> #define int long long #define endl "\n" using namespace std; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t = 1; cin >> t; while (t--) { string s; cin >> s; int x1, y1; cin >> x1 >> y1; int...
ALGO
0.999816
4.180275
264726f0-38d4-44f4-a8c5-5b4dff00d828
aranjany/warm_up
btree_all.cpp
//convert integer to character. #include <iostream> #include <exception> #include <string.h> #include <vector> #include <map> #include <set> #include <time.h> #include <fstream> #include <deque> using namespace std; class node { public: int data; node* left; node* right; node() { data=0; left=NULL; right=...
ALGO
0.999868
3.903424
a59b701f-8605-4b24-b359-a963c2c0e9c5
jwbecalm/cplusplus_study_code
09 c++ STL/04 map.cpp
// https://www.geeksforgeeks.org/map-find-function-in-c-stl/ #include <iostream> #include <map> using namespace std; int main() { // Initialize container map<int, int> mp; // Insert elements in random order mp.insert({ 2, 30 }); mp.insert({ 1, 40 }); mp.insert({ 3, 20 }); mp.insert({ 4...
ALGO
0.982485
4.457006
05f93318-3f64-4511-9950-6cb004805769
tzupengwang/PECaveros
contest/opencup/XV/CEurope/k.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long long LL; #define N 202020 int n , x[ N ] , y[ N ]; vector< pair<int,int> > e[ N ] , vv; bool vst[ N ]; typedef pair<LL,LL> dat; priority_queue<dat, vector<dat>, greater<dat>> heap; int main(){ scanf( "%d" , &n ); for( int i = 1 ; ...
ALGO
0.999816
3.683882
12797302-4239-4c21-93d2-f06309cc0e8a
elhamAm/faceMorphing
libigl/include/igl/copyleft/cgal/wire_mesh.cpp
#include "wire_mesh.h" #include "../../list_to_matrix.h" #include "../../slice.h" #include "../../PI.h" #include "convex_hull.h" #include "mesh_boolean.h" #include <Eigen/Geometry> #include <vector> template < typename DerivedWV, typename DerivedWE, typename DerivedV, typename DerivedF, typename DerivedJ> I...
ALGO
0.936798
6.297409
3a56809e-64b9-474c-b2a8-b3fd528d9177
BruceXcluding/Vitis_Libraries
codec/L2/demos/pikEnc/kernel/kernel3/build_table_encode_histo.cpp
#include "kernel3/build_table_encode_histo.hpp" inline void hls_SmallestIncrement(int count, int& inc) { int bits = (count == 0) ? -1 : (31 ^ __builtin_clz((uint32_t)count)); // logcount int drop_bits = bits - ((bits + 1) >> 1); // GetPopulationCountPrecision(bits); inc = (1 << ...
ALGO
0.999726
4.366403
51b884f1-fd59-476e-8620-3fe2f5b13fdc
invariantfields/Active_particles-LAMMPS
src/RIGID/fix_rigid_nh.cpp
/* ---------------------------------------------------------------------- Contributing author: Tony Sheh (U Michigan), Trung Dac Nguyen (U Michigan) references: Kamberaj et al., J. Chem. Phys. 122, 224114 (2005) Miller et al., J Chem Phys. 116, 8649-8659 (2002) -------------------------------------...
ALGO
0.951484
6.556782
35d3129f-6bde-4fa7-9ef3-8cbab3c78237
osirisQdt2810/algorithms
src/leetcode/cheatsheet/solution/1800-1899/1814.Count Nice Pairs in an Array/Solution2.cpp
class Solution { public: int countNicePairs(vector<int>& nums) { auto rev = [](int x) { int y = 0; for (; x > 0; x /= 10) { y = y * 10 + x % 10; } return y; }; unordered_map<int, int> cnt; int ans = 0; const int ...
ALGO
0.999925
6.421105
8505834f-e072-456e-a0d6-c2a03a991669
harsh-narayan-nishad/Leetcode
0283-move-zeroes/0283-move-zeroes.cpp
class Solution { public: void moveZeroes(vector<int>& nums) { int j=0; for(int i =0; i<nums.size(); i++){ if(nums[i]!= 0){ swap(nums[j], nums[i]); j++; } } } };
ALGO
0.999958
6.126891
dc87b8f2-04f5-4b39-a2af-5266a6de6d0b
DiogoP98/Problem-Solving
CodeForces/Round#521(Div.3)/c.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int main() { int n; cin >> n; vector<int> v(n+5); vector<int> t(2*10e5+5,0); long long int sum = 0; for(int i = 0; i < n; i++){ cin >> v[i]; t[v[i]] +=1; sum += v[i]; } //cout << sum << endl; vector<int>...
ALGO
0.999986
3.493101
1dd02476-a640-4af2-80b9-0142f2197100
Pankhuri0824/CSES-Problems
Range Queries/staticRangeSumQueries.cpp
#include <iostream> #include <algorithm> #include <string> #include <set> #include<vector> #include <map> #include <unordered_map> #include <climits> using namespace std; int main(){ long long int n; //number of array long long int q; //number of queries cin>>n>>q; vector<long long int> v(n); v...
ALGO
0.999833
4.048226
507af08c-3f74-4dfd-9331-91fb5ceed884
ccchaigordon/USM-CS-Junior-Edition
CPT 111/Tutorials/Week 13/q11.cpp
#include <iostream> using namespace std; // The doSomething function int doSomething(int *x, int *y) { int temp = *x; *x = *y * 10; *y = temp * 10; return *x + *y; } int main() { int x = 1, y = 2, result = 0; result = doSomething(&x, &y); cout << result; return 0; }
ALGO
0.998151
5.236567
ae135715-b2c5-4d1e-a615-b9e17d86aa6b
Chikzz2001/CSES-trees
Tree_Distances_I.cpp
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; //#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> using namespace std; #define int long long int #define fio ios_base::sync_with_std...
ALGO
0.999912
4.368215
dba705fb-2e93-4e94-9b7c-6832971ea497
dernDren161/DataStructuresAndAlgorithms
Facebook-Leet/Top79/TreesAndGraphs/ConvertBSTtoCDLL.cpp
// Problem Link: https://leetcode.com/explore/interview/card/facebook/52/trees-and-graphs/544/ /* // Definition for a Node. class Node { public: int val; Node* left; Node* right; Node() {} Node(int _val) { val = _val; left = NULL; right = NULL; } Node(int _val, N...
ALGO
0.999972
6.092858
8b4504e5-d4c0-41a2-918c-ba8f345eb11a
Iwaide/AtCoder
abc390/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.999937
4.672284
c297f7cc-a0eb-4c3f-9e60-92ed54485bb8
ryudo87/CPP
githubLeetcode/Yi Zhang sourcecode/linked list/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 *fast(head), *slow(head); while(fast&&slow){ if(!fast->next){ r...
ALGO
0.999946
5.705667
e175cea1-1674-4bfd-89d1-6541299ac49e
Z1y4dd/CPP
9 Functions/2_Recursion/0Recursion_Types/5Nested_Recursion.cpp
#include<bits/stdc++.h> using namespace std; /* Nested Recursion: In this recursion, a recursive function will pass the parameter as a recursive call. That means “recursion inside recursion”. Let see the example to understand this recursion. */ int fun(int n) { if (n > 100) return n - 10; // A recursive functio...
ALGO
0.999803
4.168011
e93ed9eb-27ed-4d8d-9c76-30f536f21dc2
JianpingZeng/llvm-java
tools/clang/lib/Tooling/FileMatchTrie.cpp
#include "clang/Tooling/FileMatchTrie.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include <sstream> namespace clang { namespace tooling { /// \brief Default \c PathComparator using \c llvm::sys::fs::equivalent(). struct ...
TOOL
0.980625
7.761525
9e7dce43-4dc3-439d-b20c-76c6de22cb6e
Narudayo/backjoon
cpp/ClimberSnail.cpp
// // Created by HOTIPPO on 2022-01-02. // 백준 2869번 달팽이는 올라가고 싶다. #include <iostream> using namespace std; int main(){ // 낮에는 a 미터, 밤에는 b미터 미끄러진다. // 높이는 v인 나무이다. int a,b,v; cin>>a>>b>>v; // day => 올라가는데 걸린 최종 기간. // oneDayV => 낮, 밤이 지나서 하루 올라가는 높이 // min => v에 상응하는 day의 최소값 int one...
ALGO
0.998425
3.77069
23c68121-d140-4acb-94c5-1fd6f537ddbb
porvaznikmichal/ETH-ACM-Lab
Week 7 - Greedy/travel costs/travel_cost.cpp
#include <iostream> #include <vector> #include <cmath> #include <iomanip> using namespace std; void testcase() { int t, n; cin >> t >> n; // cout << "t = " << t << ", n = " << n << endl; // read in the stations vector< pair<int, int> > stations; int d, c; for (int i = 0; i < n; i++) { cin >> d >> c; stat...
ALGO
0.998803
3.995207
d7bafa1b-1cf6-4227-8e18-bd1fff6d8946
functionjs/hello-world
lchamber.cpp
#include <iostream> #include <stack> #include <vector> #include <cstdlib> #include <algorithm> #include <ctime> #include <random> using namespace std; using Coord = pair<int, int>; using Vi = vector<int>; using VVi = vector<Vi>; const int n = 8; VVi maze; int Dir[4][2] = { {+1, 0}, {-1, 0}, {0, +1}, {0, -1} }; ...
ALGO
0.998913
3.806043
0cc7df78-62c1-4efa-84f5-b4c510b8d168
aniketyd/leetcode_solution
3483-alternating-groups-ii/alternating-groups-ii.cpp
class Solution { public: int numberOfAlternatingGroups(vector<int>& colors, int k) { int n=colors.size(); int cnt=0,ans=0; for(int i=1;i<k;i++){ if(colors[i]==colors[i-1]) cnt++; } if(cnt==0)ans++; for(int i=1;i<n;i++){ int j=i+k-1;...
ALGO
0.999938
5.84329
8a5bbe8e-6634-46a3-b38b-0d1e4b25797e
kangsw1025/TIL
SolveProblem/20/20.06/20_06_09/200609_1251_단어 나누기.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; int main() { vector<string> v; string w; cin >> w; for (int i = 2; i < w.length(); i++) { for (int j = 1; j < i; j++) { string word; for (int f = j-1; f >= 0; f--) word += w[f]; for (int f = i-1; f >= j; f--)...
ALGO
0.999988
3.51525
d14f7659-43a5-4bbe-a735-3b56b3e82970
thepratholic/Competitive-Programming
Codeforces/practice problems/A_Even_Odds.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define f(i, n) for (ll i = 0; i < n; i++) #define ia(a, n) \ ll a[n]; \ f(i, n) cin >> a[i] #define iv(v, n) \ vector<ll> v(n); \ f(i, n) cin >> v[i] #define MOD (1000000007) #define INF 1000000000000000000LL // Infinity for ll #d...
ALGO
0.999913
3.768933
a66841bc-e3a3-4492-83c8-f25a6b2396bc
mrigank-iitkgp/leetcode
LC2208_medium.cpp
/* Author: Mrigank Science is what we understand well enough to explain to a computer, Art is everything else we do - Donald E. Knuth Problem Link : https://leetcode.com/problems/minimum-operations-to-halve-array-sum/ */ class Solution { public: typedef long long int ll; int halveArray(vector<int>& nums) ...
ALGO
0.999441
5.55453
b9b72730-b96a-464b-875e-271e2ffa9302
hojelse/aps
03-dynamic_programming/knapsack.cpp
#include "../header.hpp" #include <sstream> void knapsack(mi& cache, vi& vs, vi& ws, ll N, ll W) { for (ll i = 1; i <= N; i++) for (ll w = 0; w <= W; w++) cache[i][w] = (w < ws[i-1]) ? cache[i-1][w] : max(cache[i-1][w], vs[i-1] + cache[i-1][w-ws[i-1]]); } int main() { ll W, N; while (cin >> W >> N) { ve...
ALGO
0.999971
4.191002
abe4661f-81d3-4177-bc8e-4e1c3b757aba
DDH2808/Data_Structures_and_Algorithms_Code_PTIT
CON6_29 - SẮP XẾP NỔI BỌT.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n, b = 1; cin >> n; int a[n]; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n - 1; i++) { bool k = false; for (int j = 0; j < n - i - 1; j++) { if (a[j] > a[j + 1]) { swap(a[j], a[j + 1])...
ALGO
0.999751
3.83869
257d46c4-9f7b-46ae-b93f-af1f7fd1fcec
miven/nlp4
一些nlp常用的库包看看/mosesdecoder/moses2/TranslationModel/ProbingPT.cpp
/* * ProbingPT.cpp * * Created on: 3 Nov 2015 * Author: hieu */ #include <boost/foreach.hpp> #include "ProbingPT.h" #include "probingpt/querying.h" #include "probingpt/probing_hash_utils.h" #include "util/exception.hh" #include "../System.h" #include "../Scores.h" #include "../Phrase.h" #include "../legacy/I...
ALGO
0.863479
5.468799
4ffefc61-9bda-45c8-986a-1dbe416b3017
Randowlh/Project_ACM_2021
code/competition/11.27_cf/1.cpp
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; long long ans=0; int main(){ int n; cin>>n; int a,b; for(int i=0;i<n;i++){ ans=0; cin>>a>>b; if(b<=a){ cout<<b<<endl; continue; } if(b%a==0){ cout<<...
ALGO
0.999968
3.053519
237d5426-1f9a-479d-8624-108178104073
md1894/competitive-coding
coding-blocks/STL/set.cpp
#include <set> #include <iostream> using namespace std; /* set --> contains distinct set of values */ /* multiset --> contains set of values (have repitition) */ /* multimap --> more than one value can be mapped to a same key */ typedef multiset<int>::iterator IT; /* output--> 10 47 47 55 70 70 70 70 70 97 97 97 105 ...
ALGO
0.996637
3.820579
dfb500fe-c5eb-4695-8a2f-c0beaf77b0ac
CDoberstein/ExitWaveReconstruction
Src/modules/aol/bandMatrix.cpp
#include <bandMatrix.h> namespace aol { template < typename _DataType > GenBandMatrix<_DataType>::GenBandMatrix ( const int Rows, const int Cols, const aol::Vector<int> &Offsets ) : aol::Matrix<_DataType> ( Rows, Cols ), _startApply ( 0 ), _endApply ( 0 ), _globalToLocal ( 0 ), _localToGlobal ( 0 ), _pData...
TOOL
0.916467
6.341008
8d6bd9c8-b4ab-44e6-8d10-98823adb68c6
jaiswalsahil844/CPP-Master-LaunchPad
Graph/bfsSnakesLadders_SSSP.cpp
#include <iostream> #include <map> #include <list> #include <queue> #include <algorithm> using namespace std; template <typename T> class Graph{ map <T, list <T> > adjList; public: Graph(){ } void addEdge(T u, T v, bool bidir = true){ adjList[u].push_back(v); if(bidir){ ...
ALGO
0.99989
4.595143
88175345-28cf-4dda-b7e8-5bc300323cc6
iamzaidsoomro/Robert-Lafore-Exercises
Ch 2 C++ Basics/Task 6.cpp
/* Robert lafore chapter 2 Task 6(CURRENCY converter) by Zameer Ali(20SW046) */ #include "iostream" using namespace std; int main(){ float dollar,pound,franc,german,yen; cout<<"ENTER CURRENCY IN $"; cin>>dollar; pound=dollar/1.487; franc=dollar/0.172; german=dollar/0.584; yen=dollar/0.0095; cout<<"currency in USA D...
ALGO
0.890051
4.300038
0dc182c6-3ab0-4d8b-9e33-99fa5264f0d4
geminy/ex-algo
ex/c++/sort/shellsort.cpp
#include <iostream> #include "sort.h" using namespace std; void ShellSortInsert(int *data, int size, int inc) { cout << inc << endl; for (int i = inc; i < size; ++i) { if (data[i] < data[i - inc]) { int j = i - inc; int t = data[i]; while (j >=0 && t < data[j]) { ...
ALGO
0.999778
4.367357
4edc7f1d-c25f-4020-98a7-b0135e2709c0
Orca0917/Algorithm
BaekjoonOnlineJudge/28278.cpp
#include <bits/stdc++.h> #define pii pair<int, int> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; stack<int> st; while (n--) { int op; cin >> op; if (op == 1) { in...
ALGO
0.999097
4.776969
30e0c0a5-c1a0-46bb-8b99-dd85a9609e37
HPC-AI-Team/lammps-fugaku-threadpool-sc23
lib/gpu/lal_born_coul_long_cs_ext.cpp
/*************************************************************************** born_coul_long_cs_ext.cpp ------------------- Trung Dac Nguyen (ORNL) Functions for LAMMPS access to born/coul/long/cs acceleration routines. _____________...
TOOL
0.926829
5.487437
819ea369-b0f2-408b-bcfc-432f1e7f0482
andersx/ls1-mardyn
src/molecules/Molecule.cpp
#include "Molecule.h" #include <cassert> #include <cmath> #include <fstream> #include "utils/Logger.h" using namespace std; using Log::global_log; Molecule::Molecule(unsigned long id, Component *component, double rx, double ry, double rz, double vx, double vy, double vz, ...
TOOL
0.961359
5.614602
7144d8b3-2748-451c-a7cb-dafc6715a7c8
ksamaarora/LeetCode
0001-two-sum/0001-two-sum.cpp
class Solution{ public: vector<int> twoSum(vector<int>& nums, int target) { int n=nums.size(); vector<int> ans; for(int i=0; i<n; i++){ for(int j=i+1; j<n; j++){ if(nums[i]+nums[j]==target){ ans.push_back(i); ans.push_back(j); ...
ALGO
0.999875
6.133286
3833bb9b-4ab3-44d6-833f-39617211bae0
Nagar203/Leetcode
1910. Remove All Occurrences of a Substring/Approach01.cpp
class Solution { public: string removeOccurrences(string inputStr, string targetStr) { while (true) { size_t index = inputStr.find(targetStr); if (index != string::npos) { inputStr.erase(index, targetStr.length()); } else { break; ...
ALGO
0.993242
6.571068
6ba0a767-cdae-4d61-aba9-1936ef4a6876
Livie53/TAMK-Livie
advanced-programming/wk3/ratkaisu_vko3_teht4.cpp
#include <stdio.h> const int MIN_NUM_TO_CHECK = 1; const int MAX_NUM_TO_CHECK = 10000; enum PRIME_METHOD: int { Efficient = 3, SquareRoot = 2, Half = 1, All = 0 }; bool isPrime(int x, PRIME_METHOD method = Efficient) { if (x < 2) { // Specification didn't mention whether or not we conside...
ALGO
0.997579
6.540545
c5bbbaa8-ef51-4b0f-be6e-35b5352550af
oscar10408/Grace-Hash-Join-GHJ
starter_code/Record.cpp
#include "Record.hpp" #include <iostream> using namespace std; #define MODULAR 1000000 Record::Record(string _key, string _data) { key = std::move(_key); data = std::move(_data); } Record::Record(const Record& other) { key = other.key; data = other.data; } /* h1 used at partition stage */ uint Record::partiti...
ALGO
0.986436
4.563153
ab8f6c91-5a3a-4b38-a3c0-8eff2b66fc00
Beichen-Wang/HPCTest
SystemOptimizer/ExpressionTemplate/main.cpp
#include <iostream> #include "Matrix.hpp" int main(){ Matrix<double, 4> a; Matrix<double, 4> b; Matrix<double, 4> c; Matrix<double, 4> d; for(int i = 0; i < 4; i++){ a[i] = i; b[i] = i; c[i] = i + 2; } d = a + b - c; for(int i = 0; i < 4; i++){ std::cout ...
ALGO
0.985337
3.691586
dc38858b-3f28-4cf3-b82d-e1ad8cb23d05
andrewsanthosh/Andy-lite-wifi-OSC
ndk/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp
// <vector> // vector<bool> // template <class Iter> // iterator insert(const_iterator position, Iter first, Iter last); #include <vector> #include <cassert> #include "test_iterators.h" #include "min_allocator.h" int main() { { std::vector<bool> v(100); bool a[] = {1, 0, 0, 1, 1}; const...
TEST
0.925528
5.00632
ac8030de-d290-4d9d-aa5b-c19df4e7d926
alexandraback/datacollection
solutions_5640146288377856_1/C++/ACalvin/gcjPA.cpp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int txt = 1; void solve(){ int r,c,w; scanf("%d%d%d",&r,&c,&w); int res = 0; res += (r - 1) * c / w; while(c >= 2 * w) c -= w,res ++; res += min(w + 1,c); printf("Case #%d: %d\n",txt ++,res); } int main() { freop...
ALGO
0.999777
4.168824
29742f99-820c-4c41-a07a-8390de1d360d
mijanurm21/Leetcode-Solutions
1297-maximum-number-of-balloons/maximum-number-of-balloons.cpp
class Solution { public: int maxNumberOfBalloons(string text) { vector<int>v(5,0); // b = 0, a = 1, l = 2, o = 3, n = 4, for(int i = 0;i<text.size(); i++){ if(text[i] == 'b'){ v[0]++; } else if(text[i] == 'a'){ v[1]++; ...
ALGO
0.999766
5.678021
53e4df1f-0e3d-499d-9c11-fbd4acfb558c
Adit0717/Programming_Challenges
Leetcode/#42.cpp
class Solution { public: int trapBruteForce(vector<int>& height) { int n = height.size(); int totalWater = 0; for (int i = 0; i < n; i++) { int maxLeft = 0, maxRight = 0; // Scan left of i for (int j = 0; j <= i; j++) { maxLeft = max(maxL...
ALGO
0.999991
6.934507
c808348b-2b61-4825-8303-c89a125503c7
sameernerd/My-Library
Data Structure/Linked List/DoublyLinkedList.cpp
#include<iostream> using namespace std; class LinkedList{ public: class Node{ public: int data; Node *next; Node *prev; }; Node *root; LinkedList(){ root=NULL; } //Inserting at the last of Linked List void insertLast(int data){ Node *temp; temp=root; if(root==NULL){ root=new Node()...
ALGO
0.999684
4.293939
f07c8837-712d-4ad5-87d6-c226b9d37342
jvansomeren/scaffcc
llvm/lib/CodeGen/LiveIntervalUnion.cpp
#define DEBUG_TYPE "regalloc" #include "LiveIntervalUnion.h" #include "llvm/ADT/SparseBitVector.h" #include "llvm/CodeGen/MachineLoopRanges.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetRegisterInfo.h" #include <algorithm> using namespace llvm; // Merge a LiveIn...
ALGO
0.97608
6.981394
f1632876-c481-4b1d-b62b-8daaa810dde8
bw98/SillyCodeCollection
heapify.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <array> #include <list> #include <forward_list> #include <queue> #include <stack> #include <algorithm> #include <numeric> #include <iterator> #include <map> #include <unordered_map> #include <set> #include <unordered_...
ALGO
0.999176
4.323018
3184ef45-1eb3-49c5-8f65-f1c3cc6506f8
Yelloooowww/evaluation
catkin_ws/src/door_detector_sim/src/lidar_crop_v2.cpp
#include <stdio.h> #include <iostream> #include <cmath> #include <ros/ros.h> #include <tf/tf.h> #include <tf/transform_listener.h> #include <sensor_msgs/PointCloud2.h> #include <message_filters/sync_policies/approximate_time.h> #include <message_filters/subscriber.h> #include <message_filters/time_synchronizer.h> #incl...
DATA
0.953739
4.622198
9427791c-c395-4803-9a24-e4319559ef0e
Limur125/BMSTU-ALL
asm/lab9/AsmLab9/float_time.cpp
#include "float_time.h" constexpr auto N = 100000; using namespace std; void sum_float_c(float a, float b) { float res; res = a + b; } void mult_float_c(float a, float b) { float res; res = a * b; } void sum_float_a(float a, float b) { float res; __asm { fld b fadd a fstp res } } void mult_float_a(f...
TEST
0.873337
4.572482
3cc53000-f78d-4047-b285-dbcaf2658ff5
amilali/codespaces-blank
PPT CODES/Day-3/flipping_image.cpp
#include<bits/stdc++.h> using namespace std; vector<vector<int>> flippping_image_horizontal(vector<vector<int>> &arr){ for(int i=0; i<arr.size(); i++) { int j=0; int k=arr[i].size()-1; while(j<k) { swap(arr[i][j++], arr[i][k--]); } for(int j=0; j<arr[i].size();j++) { arr...
ALGO
0.999951
4.882861
5e6aaf7e-1bf4-433f-85f7-38ff6e38c324
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4238_5.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2010; int dp[N][10][10][10][10]; int a[N], b[N]; int n; bool update(int &x, int y) { if (y == -1) return false; if (x == -1 || x > y) { x = y; return true; } return false; } struct point { int p, x, y, z, f, dis; point() {} point(int p, i...
ALGO
0.999947
3.438223
09775e0e-8c99-4cb2-8af4-ab903355b252
ArchitKumar1/LeetCode-Submissions
house-robber/Runtime Error/1-17-2019, 1:45:12 AM/Solution.cpp
// https://leetcode.com/problems/house-robber class Solution { public: int rob(vector<int>& nums) { int n=nums.size(); int dp[n]; dp[0]=nums[0]; dp[1]=nums[1]; for(int i=2;i<nums.size();i++) dp[i]=max(dp[i-1],dp[i-2]+nums[i]); return dp[n-1]; } };
ALGO
0.999919
5.991827
fe3fb9f2-a9bc-4749-9bb3-87cd8a23bb3f
PirateNetwork/pirate
src/crypto/sha1.cpp
#include "crypto/sha1.h" #include "crypto/common.h" #include <string.h> // Internal implementation code. namespace { /// Internal SHA-1 implementation. namespace sha1 { /** One round of SHA-1. */ void inline Round(uint32_t a, uint32_t& b, uint32_t c, uint32_t d, uint32_t& e, uint32_t f, uint32_t k, uint32_t w) { ...
ALGO
0.998394
7.492003
19590ecf-cbc2-452c-af4f-41bccfac0099
DeKal/algorithm
code-signal/interview-practice/sudoku2.cpp
bool sudoku2(std::vector<std::vector<char>> grid) { int row = grid.size(); int col = grid[0].size(); for (int i=0; i<row; ++i){ bool a[10] = {0}; for (int j=0; j<col; ++j){ if (grid[i][j] != '.'){ if (a[grid[i][j] - '0']) return false; ...
ALGO
0.992893
4.779405
f5c64e6d-5ab1-4590-80cb-aedd12689966
xiaowangKong/hash_grouping
MyHash.cpp
// // Created by kxw on 1/15/17. // #include "MyHash.h" #include "murmurhash.h" #include <fstream> #include <vector> MyHash::MyHash(uint64_t bin_num, uint64_t sub_file_num, uint64_t buffer_size_B,int EveFileBufferNum) { this->buffer_size_B = buffer_size_B;/////????如何在一个类里创建另一个类的对象作为成员,并且调用构造函数 this->current_si...
TOOL
0.906278
3.176723
40c98f1c-0355-4338-857e-2275f75b5bd5
GPUPeople/ParallelBatchRCM
src/simple_peripheral.cpp
#include "simple_peripheral.h" #include <queue> #include <tuple> #include <chrono> #include <iostream> #include <iomanip> #include <limits> #include "workqueue.h" namespace SimplePeripheral { template<typename T> void findMaxDistance(const Graph<T>& graph, unsigned start_node, std::vector<uint32_t>& nodes, std::ve...
ALGO
0.996825
5.269501
95427728-f18c-408e-883d-c89940d6d060
uaOpenKore/uOK210
script-launcher/core.cpp
#include <vector> #include "utils.h" using namespace std; #define DEFAULT_ACTIVEPERL_BIN_PATH "C:\\Perl\\bin" static const char *launchers[] = { "start.exe", "wxstart.exe", "korebin.exe", NULL }; /** * Find Perl in one of the directories in the PATH * environment variable. This function guarantees that * it ...
TOOL
0.93699
6.018726
bdc2c894-6fee-4c6c-8291-cc9b10254866
RohitBishla/LeetCode_Practice
0046-permutations/0046-permutations.cpp
class Solution { public: void solve(vector<vector<int>>&ans,vector<int>&nums,int index){ //base case if(index>=nums.size()){ ans.push_back(nums); return; } for(int i=index;i<nums.size();i++){ swap(nums[index],nums[i]); solve(ans,nums,in...
ALGO
0.999997
6.196265
9c35774f-632c-4613-868b-da11fdab3d10
paboAYUSHI/90daysOfCODE
recursion8.cpp
// C++ program to count number of ways // to express x as sum of n-th power of unique natural numbers. #include <iostream> #include<math.h> using namespace std; int counting(int x, int no, int number) { int val = (x - pow(number, no)); if (val == 0) return 1; if (val < 0) return 0; return counting(val, no, ...
ALGO
0.999974
5.531726