uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c344b2c3-5dcb-454e-8609-fc6f8a9f9f9c
excess-demogroup/vlee
src/Box2D/Collision/Shapes/b2PolygonShape.cpp
#include <Box2D/Collision/Shapes/b2PolygonShape.h> #include <new> b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(b2PolygonShape)); b2PolygonShape* clone = new (mem) b2PolygonShape; *clone = *this; return clone; } void b2PolygonShape::SetAsBox(float32 hx,...
ALGO
0.98863
7.92611
3b1a7233-a5a8-441c-a290-d3da29e814cd
petermoomaw/Xenharmonic-Keyboard
cpp/eigen/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); MatrixXf n(2,2); MatrixXf result(2,2); m << 1,2, 3,4; n << 5,6, 7,8; result = m * n; cout << "-- Matrix m*n: --" << endl << result << endl << endl; result = m.array() * ...
ALGO
0.997805
4.306757
9419c087-deab-4ffe-a83b-34491ebfbff5
ibsson/Program
BKJN/구현/20250206_bkjn_14499(주사위 굴리기).cpp
#include <iostream> using namespace std; #define MAX 21 int N, M, K, x, y, chk; int map[MAX][MAX]; int order[1001]; int dice[6]; int tmp[6]; void getResult(int idx) { chk = 0; for (int i = 0; i < 6; i++) { tmp[i] = dice[i]; } switch (order[idx]) { case 1: if (y + 1 == M) { chk = 1; return; } y++...
ALGO
0.999966
4.524101
01bcb3ea-3069-4e64-a5ff-e9996dc2d1de
devjwsong/algorithm-study
leetcode/838.cpp
#include <iostream> using namespace std; /* Two pointers. (+ some tricks) Since multiple dominoes do not add any additional force, we only consider the 3 cases 1. A vertical dominoe meets right falling dominoe on its left and left falling dominoe on its right. 2. A vertical dominoe meets only right falling dominoe o...
ALGO
0.999966
5.57405
cbae1db7-83fb-4337-ad13-bab27e820932
swapnilhota/interviewBit
Tree Data Structure/Inorder Traversal.cpp
/* Given a binary tree, return the inorder traversal of its nodes’ values. Example : Given binary tree 1 \ 2 / 3 return [1,3,2]. Using recursion is not allowed. */ /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNod...
ALGO
0.999999
6.403682
d9acc6b5-124c-4b13-885d-23f8ab6c232a
AmmarHamim/IWT-Lab
Practice/deletehead.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node *next; public: Node( int value){ data=value; next=nullptr; } }; void Print(Node *head){ Node* temp; temp=head; while(temp!=nullptr){ cout<<temp->data<<" "; temp=temp->next; } } ...
ALGO
0.999916
3.731055
f74d8dc9-14d7-41dc-8b47-47e756faae05
Sakshamchawla19/DSA
3_StartingWithProg3/ChallangesGSWP3/9CountDigits.cpp
// Count Digits #include <iostream> using namespace std; int main() { int n,rem,count=0; cin >> n; int digit; cin >> digit; while(n!=0) { rem = n%10; n = n/10; if(rem == digit){ count++; } } cout << count << endl; return 0; ...
ALGO
0.99986
4.84964
412c1e30-3caa-4d6e-b5f6-724b3418c38f
prashant5878-shukla/-CrackYourInternship
Arrays/Remove_duplicates.cpp
class Solution { public: int removeDuplicates(vector<int>& nums) { if(nums.size() == 0)return 0; int start = 0, count = 1; for(int i = 0;i<nums.size();i++){ if(nums[start] != nums[i]){ start++, swap(nums[start],nums[i]), count++; } }; ...
ALGO
0.999941
6.062994
dfbaafee-12bf-4783-a006-dddd994cac82
devmahmood/Programming-Exercise
8-basic-multiply-two-floating-num.cpp
#include<bits/stdc++.h> using namespace std; int main() { float a, b; cin >> a >> b; float product = a * b; cout<<"Multiplication Of two floating point number is :" <<setprecision(2)<<fixed<<product; return 0; }
ALGO
0.998868
3.983625
ad8f2df1-c851-45e7-8ca0-6e6d735330a1
Ruhanyat-994/CoDe-BoX
Clayninjas_Code/0112330178-Assignment 2/Problem 16.cpp
#include <stdio.h> int main() { int n; printf("Enter the number of rows : "); scanf("%d", &n); getchar(); if (n == 0) { printf("Not an odd number! Try again"); main(); } else { for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) ...
ALGO
0.999256
4.27774
2daea502-bc9e-4560-8b5a-734a41b4977d
FalconOscuro/Master-Mind
MasterMind/Main.cpp
#include <iostream> #include <random> #include <time.h> #include <vector> #include <math.h> using namespace std; // A list of every singlge possible code, eliminated codes are set to { -1 } vector<vector<int>> S; pair<int, int> CheckGuess(vector<int>, vector<int>); vector<int> GetNextGuess(vector<int>, pair<int, int...
ALGO
0.999406
3.691715
214e00cb-694a-49c7-a630-4dba6b3b9c5c
nsslofficial/VRF
catkin_ws/src/fast_gicp/thirdparty/Eigen/bench/benchGeometry.cpp
#include <iostream> #include <iomanip> #include <Eigen/Core> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #ifndef REPEAT #define REPEAT 1000000 #endif enum func_opt { TV, TMATV, TMATVMAT, }; template <class res, class arg1, class arg2, int opt> stru...
TEST
0.86572
6.062908
907ef893-ffcb-4bd3-b02e-3b59fc7905e7
MR-Geri/shell
src/parser.cpp
#include <string> #include <vector> #include "parser.h" using namespace std; bool isParen(string s){ for(auto i : s){ if (i == ')' or i == '('){ return true; } } return false; } int isConnector(string s){ vector<string> POSSIBLE_CONNECTORS{ ";", "||", "&&"} ; //If a...
TOOL
0.952339
3.431328
828a93e4-9bb6-4bed-bde0-b6215de49431
shiv96055/All-CPP-Code
lecture 74/heap.cpp
#include<iostream> #include<bits/stdc++.h> #include<queue> using namespace std ; class heap{ public: int arr[100]; int size = 0; heap(){ size = 0; arr[0] = -1; } // insertion take log(N) time complexcity void insert(int val){ ...
ALGO
0.999863
4.236832
07f5d07a-d533-41de-adc4-121e4ab05845
kino-3/private_atcoder
atcoder/other/typical90/054.cpp
#include <bits/stdc++.h> #define REP(var, n) for (decltype(n) var = 0; var < (n); var++) #define REP_R(var, n) \ for (auto var = (n)-1; var != static_cast<decltype(var)>(-1); var--) #define FOR(var, a, b) for (auto var = (a); var < (b); var++) #define FOR_R(var, a, b) for (auto var = (b - 1); var > (a - 1); var--) ...
ALGO
0.99997
4.373322
53ba65b0-cbf0-494e-9820-07de5bc5f930
ishandutta2007/codeforces
he_ren/normal/622/A.cpp
#include<cstdio> #include<iostream> typedef long long ll; using namespace std; int main(void) { ll n; cin>>n; for(ll i=1; i<n; ++i) n-=i; cout<<n; return 0; }
ALGO
0.999805
3.03796
d6314122-17dd-41d3-be54-38016fed6922
honeyspoon/flutter-ffi-test-sox
android/.cxx/cmake/debug/x86/third/sox/src/amr/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/inv_sqrt_tbl.cpp
/* Filename: inv_sqrt_tbl.cpp ------------------------------------------------------------------------------ MODULE DESCRIPTION This file contains the declaration for table[] used by the inv_sqrt function. ------------------------------------------------------------------------------ */ /*----------------------...
ALGO
0.999166
3.698339
a63be6e4-cae8-4901-b495-7927bf64d0c1
ishandutta2007/codeforces
-is-this-fft-/normal/819/E.cpp
#include <iostream> #include <vector> using namespace std; int main () { int n; cin >> n; vector<vector<int>> ans; if (n % 2 == 1) { ans.push_back({1, 2, 3}); ans.push_back({1, 2, 3}); } else { ans.push_back({1, 2, 3}); ans.push_back({1, 2, 4}); ans.push_back({1, 3, 4}); ans.push_b...
ALGO
0.999932
3.578674
22de1f40-ea0f-4ae6-85f7-a233972f2e83
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Mixtral/top0-100/best-time-to-buy-and-sell-stock-iv-Solution.maxProfit/177823_Exec_Code_Overflow.cpp
BufCompressedFill (BufFilePtr f) { CompressedFile *file; register char_type *stackp, *de_stack; register char_type finchar; register code_int code, oldcode, incode; BufChar *buf, *bufend; file = (CompressedFile *) f->private; buf = f->buffer; bufend = buf + BUFFILESIZE; stackp...
ALGO
0.997259
4.577843
aebeb749-ce03-4ae9-b59c-c0664ddd4bc0
paul2705/OI
contact/usaco/2019.02.22-25/A.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const double M=1e6; const int MAXN=1e6+6; double f[MAXN][3],g[MAXN]; int n; double p[MAXN]; int main(){ scanf("%d",&n); for (int i=1;i<=n;i++) scanf("%lf",&p[i]),p[i]/=M; for (int i=1;i<=n;i++){ f[i][0]=max(f[i-1][0],f[i...
ALGO
0.999949
3.448578
51d7c4f6-d7db-44c3-a39a-5e0ba9e6a03f
Nicolas-EM/advent-of-code-2021
Day-7/C++/2-cpp.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> using namespace std; int fuel(const vector<int> &v, const int sum) { int mean = sum / v.size(), cost = 0; cout << "Mean: " << mean << "\n"; for(int i = 0; i < v.size(); i++) { int n; if (v[i] > mean) n = (v[i] - mean...
ALGO
0.999395
5.001874
2d5c6625-9fa6-4670-838c-a2cff2291eef
coral-learning/mysql-coderead
extra/yassl/taocrypt/src/aestables.cpp
/* based on Wei Dai's aestables.cpp from CryptoPP */ #include "runtime.hpp" #include "aes.hpp" namespace TaoCrypt { const word32 AES::rcon_[] = { 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael ne...
ALGO
0.858353
4.301126
917ac69a-a207-4234-8ac7-87b03843004f
chrisasim/Unityprojects
Examples_C++/Chapter_1_1_2_6_example_1_3.cpp
//library module that streams input data and output in operating systems #include <iostream> using namespace std; template<class T> T Sum(T a[], int n) { //Return sum of numbers a[0:n-1]; T tsum=0; //for while loop that iterates n times starting from 0 to n-1 and the step increases by 1. for (int i=0; i<n; i++) {...
ALGO
0.987835
4.647716
831338de-b156-4628-a60b-c57425d7bc5c
areian13/PS_BOJ
1. Bronze/Bronze 2/[B2] 04998 저금.cpp
#include <iostream> #include <cmath> #define FastIO ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr) using namespace std; int main() { FastIO; while (true) { double n, b, m; cin >> n >> b >> m; if (cin.eof()) break; int result = ceil(log...
ALGO
0.998241
3.46188
9077b0fc-1f58-419d-bc05-2c6fc5b8abc1
santi3223/PreseleccionIOI
Codeforces/Problemas/Otros/Ahahahahahahahaha.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int>a(n), ans; int cnt0 = 0; for (int i = 0; i < n; i++) { cin >> a[i]; if (!a[i]) cnt0++; } int cnt1 = n - cnt0;...
ALGO
0.999954
4.277668
7feaf26c-da4a-4911-93ba-2951d5e46aaf
GRJRTHATH/listview_scrollview
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
f51e4699-d0b5-4c07-b404-3b399d5099f1
armanhossen-dev/Algorithms-Tracker-Spring-2025-section-N
Hackerland_Radio_Transmitters.cpp
//https://www.hackerrank.com/challenges/hackerland-radio-transmitters/problem #include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int n, k, r; //cout << "Enter n and k : "; cin >> n >> k; vector <int> arr(n); vector <int> rev(n); //cout << "Enter elements :...
ALGO
0.999945
4.280042
2f432ce9-690e-4c4e-9b39-9cbf6f568f5c
harshit0571/DSA
leetcode_questions/medium/first_and_last_position.cpp
class Solution { public: vector<int> searchRange(vector<int>& nums, int t) { int start,end,mid; start=0; end=nums.size()-1; vector<int> ans(2,-1); while(start<=end){ mid=start+(end-start)/2; if(t==nums[mid]){ end=mid-1; ...
ALGO
0.999962
6.547396
7ec9d541-08ae-43b3-aa1e-8b0151c34b95
ishandutta2007/codeforces
ksun48/normal/1673/C.cpp
#include <bits/stdc++.h> using namespace std; template <int MOD_> struct modnum { static constexpr int MOD = MOD_; static_assert(MOD_ > 0, "MOD must be positive"); private: using ll = long long; int v; static int minv(int a, int m) { a %= m; assert(a); return a == 1 ? 1 : int(m - ll(minv(m, a)) * ll(m) /...
ALGO
0.999906
5.11201
b48a8bfa-e256-41a8-b47f-70a7785800de
peterith/epi
chapter_4_primitive_types/is_palindrone_number.cpp
#include <cmath> #include <iostream> // n = number of input digits // time: O(n), space: O(1) // check and remove msd and lsd bool is_palindrone_number(int x) { if (x < 0) { return false; } int digits = std::log10(x) + 1; int msd = std::pow(10, digits - 1); for (int i = 0; i < (digits / 2); ++i) { i...
ALGO
0.999204
6.106693
0cb41936-8aa9-4fe7-9187-61cede02ef8c
karim-aboelazm/All_CodeForces_CPPTasks_Solutions
1207C/gas-pipeline.cpp
#include <bits/stdc++.h> #define INF (long long) 1e18 using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { long long n, a, b; cin >> n >> a >> b; string s; cin >> s; long long memo[n + 1][2]; for (int i = 0; i < n + 1; i++) { ...
ALGO
0.998393
3.996675
a605e9df-2f17-4315-b97f-0fa66401b9b5
lukasp-dev/DSA
1023-time-based-key-value-store/1023-time-based-key-value-store.cpp
class TimeMap { public: map<string, vector<pair<int, string>>> mp; TimeMap() { } void set(string key, string value, int timestamp) { mp[key].push_back({timestamp, value}); } string get(string key, int timestamp) { if(mp.find(key) == mp.end()) return ""; else{ ...
ALGO
0.999065
7.178768
10937a6a-c703-44bd-a93e-ed6226958612
hyunynim/18_2_MultimediaProgramming
OpenCV/Week1/18_2_Project/BlobLabeling.cpp
#include "BlobLabeling.h" #define _DEF_MAX_BLOBS 10000 #define _DEF_MAX_LABEL 100 CBlobLabeling::CBlobLabeling(void) // //̺ ʱⰪ //Ӱ谪 0 // 10000 //̹ //̺ { m_nThreshold = 0; m_nBlobs = _DEF_MAX_BLOBS; m_Image = NULL; m_recBlobs = NULL; m_vPoint = NULL; } CBlobLabeling::~CBlobLabeling(void) //ı //޸𸮸 ش. ...
ALGO
0.991395
3.353084
48207453-4b6e-48db-bb29-da12360325ce
vikasmalik22/MPC
src/Eigen-3.3/unsupported/doc/examples/MatrixPower_optimal.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { Matrix4cd A = Matrix4cd::Random(); MatrixPower<Matrix4cd> Apow(A); std::cout << "The matrix A is:\n" << A << "\n\n" "A^3.1 is:\n" << Apow(3.1) << "\n\n" "A^3.3 is:\n" << Apow(3.3) << "\n\n" ...
ALGO
0.99659
3.396939
68be7482-7cb3-465a-937f-3c57642e6bdd
happyZYM/OI-source
7.2480.cpp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long LL; const int maxn=65536; int p[maxn],v[maxn],ph[maxn],cnt; LL n,res; inline int phi(int x) { LL res=x; for(LL i=2;i*i<=x;i++) if(x%i==0) { res=res/i*(i-1); while(x%i==0) x/=i; } if(x>1) res=res/x*(x-1); return res; ...
ALGO
0.999979
4.260549
3a0239b0-7b1e-4fbb-b897-bd509b26ea75
hjiang13/LLMs-in-IR
POJ-104/16/1392.cpp
#include <iostream> using namespace std; int main() { int n,a[5]; cin>>n; for(int i=0; i<5; i++) { a[i]=n%10; n=n/10; cout<<a[i]; if(n==0) break; } return 0; }
ALGO
0.999756
3.321616
1597affa-166b-4cb9-8c85-80de111c5e8c
ManojKumarKomirisetti/ByteCode
TakeYouForward/CallByValue.cpp
#include<bits/stdc++.h> using namespace std; void ByValue(int Age) { Age += 5; cout<<"Age in ByValue Method is: "<<Age<<endl; } int main() { int Age; cout<<"Enter Age:"<<endl; cin >> Age; ByValue(Age); cout<<"Age in Main Method is: "<<Age; return 0; }
ALGO
0.981146
4.580479
601462d9-f1aa-4b40-9967-f1d832790875
ZYZMZM/Coding-Interviews
Math/面试题44:数字序列中某一位的数字/DigitsInSequence.cpp
// 44ijһλ // Ŀ0123456789101112131415ĸʽлһַС // У5λ0ʼ513λ119λ4ȵȡдһ // λӦ֡ #include <stdio.h> #include <math.h> int countOfIntegers(int digits); int digitAtIndex(int index, int digits); int beginNumber(int digits); int digitAtIndex(int index) { if (index < 0) { return 0; } int digit = 1; while (true) { int n...
ALGO
0.999603
4.382346
15726666-b2f9-42dd-adbf-245dcabebe19
OpenXRay/xray-15
cs/engine/xrGame/wallmark_manager.cpp
#include "stdafx.h" #include "wallmark_manager.h" #include "Level.h" #include "xrEngine/GameMtlLib.h" #include "CalculateTriangle.h" #include "profiler.h" #ifdef DEBUG #include "phdebug.h" #endif CWalmarkManager::CWalmarkManager() { } CWalmarkManager::~CWalmarkManager() { Clear(); } void CWalmarkManager::Clear() { m...
TOOL
0.909892
3.136685
0cec178f-b001-4623-8d9d-8feef02fdeba
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_9205_732.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; cout << a + b << endl; return 0; }
ALGO
0.996045
3.680648
53544934-696a-45ff-9b75-6d6ff07225f6
hhchoksi/CP-Solution
CODEFORCES/Square.cpp
#include <bits/stdc++.h> using namespace std; int main() { int T; cin>>T; while(T--){ int a1,b1,a2,b2; cin>>a1>>b1>>a2>>b2; if((max(a1,b1)==max(a2,b2))&&((min(a1,b1)+min(a2,b2)==max(a1,b1)))){ cout<<"Yes"<<endl; } else{ cout<<"No"<<e...
ALGO
0.999417
3.632649
30d966e2-efe8-4172-860a-94e118001768
gopal-chaudhary/DSA
TREE/implimentation/main.cpp
#include<iostream> #include<queue> using namespace std; class node{ public: node* left; node* right; int data; node(int data){ left = nullptr; right = nullptr; this->data = data; } }; node* buildTree(node* &root){ int data; cin>>da...
ALGO
0.999774
4.264131
2d25391e-316f-4747-9be0-4bccf9023c21
randbatch-md/lammps-rbe
src/SPIN/pair_spin_dipole_long.cpp
// clang-format off /* ------------------------------------------------------------------------ Contributing authors: Julien Tranchida (SNL) Stan Moore (SNL) ------------------------------------------------------------------------- */ #include "pair_spin_dipole_long.h" #include "atom.h" #...
ALGO
0.992188
5.488097
7615e3a7-0123-4348-b9c6-dec7b788a308
Altu-Bitu/Altu-Bitu_
11월 9일 - 동적 계획법과 최단 거리 역추적/1719.cpp
#include <iostream> #include <vector> using namespace std; const int INF = 1e5 * 2; //최대 n-1개의 간선을 지나게 됨 void floydWarshall(int n, vector<vector<int>>& graph, vector<vector<int>>& table) { //플로이드-워셜 for (int k = 1; k <= n; k++) {//중간 n개 for (int i = 1; i <= n; i++) { //n개의 for (int j = 1; j <=...
ALGO
0.999963
4.742633
b96d902a-97da-4be6-8df7-6a3207c041d4
nezumimusume/GamePG_2_2018
tkEngine/bulletPhysics/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp
#include "btManifoldResult.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h" ///This is to allow MaterialCombiner/Custom Friction/Restitution values ContactAd...
ALGO
0.981773
6.488036
ddebdbf4-acc5-49e0-8b87-8144d0722764
wowoto9772/Hungry-Algorithm
CodeForces/div.2/368/D.cpp
#include <stdio.h> #include <vector> using namespace std; vector < vector <int> > lnk; bool b[1003][1003]; int inv[100003]; int op[100003]; pair <int, int> invt[100003]; int ans[100003], tot, n, m, q; bool vst[100003]; void dfs(int c) { if (vst[c])return; vst[c] = true; bool eff = true; int x, y; if (op[c...
ALGO
0.999644
4.330284
3c9876cc-79b1-4a10-a94c-aca4cdd873a1
XIEXINYAN/new_nppi_yolo_hrnet
src/front_alg/cfrontcameraalg.cpp
#include "cfrontcameraalg.h" #include "../common/ccameraparam.h" #include "distance/ccdisfromlidar.h" #include "distance/cdisfromheight.h" #include <cmath> CFrontCameraAlg::CFrontCameraAlg() { m_frame_ptr.reset(new CFrontFrame()); m_detect_ptr=new CameraDetect(CCameraParam::m_short_flag+CCameraParam::m_long_fl...
ALGO
0.997954
4.238432
ae80d3b3-e193-4f9b-830f-cd6ca12734d9
pkunjam/HackerRank-Solutions
Algorithms/Diagonal difference.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); /* * Complete the 'diagonalDifference' function below. * * The function is expected to return an INTEGER. * The function accepts 2D_INTEGER_ARRAY arr as parameter. */ ...
ALGO
0.99999
5.810901
97ed0a42-28eb-42ec-a889-c8ae483adb5f
AlgorithmGosu/2022-05-challenge
chapter10_Graph/4_josueyeon.cpp
#include <queue> #include <vector> #include <iostream> #include <algorithm> using namespace std; // 모든 노드에 대한 진입 차수를 0으로 초기화 int indegree[501]; // 강의 시간 int courseTime[501]; // 각 노드에 연결된 간선 정보를 담기 위한 연결 리스트 vector<int> graph[501]; void TopologySort(int N) { vector<int> result(501); queue<int> q; for(...
ALGO
0.999981
4.687185
c52dc612-da2a-4a47-a6c8-f8f674e6f83d
anuradham002/GDSC_IPC
Longest_substring.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; int n = s.length(); int maxLength = 0; unordered_set<char> charSet; int left = 0; for (int right = 0; right < n; right++) { if (charSet.count(s[right]) == 0) { ...
ALGO
0.999892
4.074206
a388833f-1d0c-43d2-b614-8ae361f04e22
darion-yaphet/ClickHouse-25.5.3.75-stable
src/Storages/MergeTree/MergeTreeIndexMinMax.cpp
#include <Storages/MergeTree/MergeTreeIndexMinMax.h> #include <Interpreters/ExpressionAnalyzer.h> #include <Common/FieldAccurateComparison.h> #include <Common/quoteString.h> #include <Columns/ColumnNullable.h> #include <IO/ReadHelpers.h> namespace DB { namespace ErrorCodes { extern const int LOGICAL_ERROR; ...
TOOL
0.983827
7.795232
ef85f170-fecd-4e54-86df-fc107d5958d9
ksood2004/gfg-solution
Difficulty: Basic/Print 1 to n without using loops/print-1-to-n-without-using-loops.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: void printTillN(int N) { if(N==0){ return; } printTillN(N-1); cout<<N<<" "; } }; //{ Driver Code Starts. int mai...
ALGO
0.994562
6.34379
19d77059-c483-4d10-8b60-63d18804a538
fholzi8/NetworkAnalysis
ntopng/src/FlowHash.cpp
#include "ntop_includes.h" /* ************************************ */ FlowHash::FlowHash(NetworkInterface *_iface, u_int _num_hashes, u_int _max_hash_size) : GenericHash(_iface, _num_hashes, _max_hash_size, "FlowHash") { ; }; /* ************************************ */ static u_int16_t max_num_loops = 0; Flow*...
ALGO
0.939755
5.246475
5195ed61-eb95-4dd8-bbfe-f2dbc0e0dd2d
melvinraj12/Kattis-C-
MagicTrick/MagicTrick.cpp
#include <iostream> #include <string> using namespace std; int main() { string a; cin >> a; int flag = 0; for (int i = 0; i < a.length(); i++) { char b = a[i]; for (int j = 0; j < a.length(); j++) { if (b == a[j]) { flag += 1; ...
ALGO
0.999906
3.775006
91102c9e-c2fa-453d-b285-dbca8d0f2b6d
minkimgyu/TIL
프로그래머스/0/120815. 피자 나눠 먹기 (2)/피자 나눠 먹기 (2).cpp
#include <string> #include <vector> using namespace std; int solution(int n) { int answer = 0; answer = 1; while(1) { int multi = (6 * answer) % n; if(multi > 0) answer += 1; else break; } return answer; }
ALGO
0.99988
4.394184
c07a8bca-9ae1-4ecb-80e7-6075b9924a05
MakinoRuki/TopCoder
SRM844Div1Easy.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <map> #include <set> #include <unordered_set> #include <unordered_map> #include <deque> #include <cmath> #include <queue> #define eps 1e-10 #define N 105 #define M 10005 #define SZ 200000002 using namespace std; typ...
ALGO
0.999841
3.576199
c87e258a-c8d8-4832-bc0e-9e6735efe9f4
AlphaPixel/3DNature
WCS-VNS/GeoLib/gvnspfor.cpp
/******************************************************************************* NAME GENERAL VERTICAL NEAR-SIDE PERSPECTIVE PURPOSE: Transforms input longitude and latitude to Easting and Northing for the General Vertical Near-Side Perspective projection. The l...
ALGO
0.999058
7.12219
37ea902a-68da-4565-bd7a-a42a3d1b9aea
Ksenia-Bogdanova/mm_lr_2
ММ. ЛР2/main.cpp
#include "integrator.h" #include "custom.h" #include "ephaccess.h" #include "pattern.h" #include<iostream> #include <iomanip> using namespace std; double measure_julian_date(double year, double month, double day, double hour, double minute, double second) { //double year = 2023, month = 3, day = 21, hour = 0, minute...
ALGO
0.990868
3.323975
3285e16f-49ab-4cf0-9e46-2656d36535c3
haruton3301/atcoder
abc391/a/main.cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; int main() { string d; cin >> d; map<string, string> m = { {"N", "S"}, {"E", "W"}, {"W", "E"}, {"S", "N"}, {"NE", "SW"}, {"NW", "SE"}, {"SE", "NW"}, {"SW", "NE"}, }; cout << m[...
ALGO
0.999988
4.612082
24b8533f-cb14-4cbc-9106-734f54048063
mdalauddin45/Competitive
Div 4 Problems/C_Odd_Even_Increments.cpp
#include<bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int, int> p; typedef long long ll; typedef long long int lli; const int N=1e5+7; int nums[N]; #define cn(n) int n;cin>>n; #define w(t) int t;cin>>t;while(t--) #define Alauddin ios_base::sync_with_stdio(fals...
ALGO
0.999786
3.633042
e6bba56b-8425-4ede-8b84-206f71898f9b
dusty-agent/dusty-chat-agent
frontend/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.998303
6.76775
4424b7e8-3663-4612-ac77-a038c414dd24
sbtiffanykim/PS_cpp
boj/3273.cpp
// 3273_두 수의 합 // https://www.acmicpc.net/problem/3273 #include <bits/stdc++.h> using namespace std; int occur[2000001] = {}; // 입력받은 숫자 기록 int main() { ios::sync_with_stdio(0); cin.tie(0); int n, x, ans = 0; cin >> n; for (int i = 0; i < n; ++i) { int tmp; cin >> tmp; oc...
ALGO
0.999968
4.990768
cbdc9d7f-a131-447d-8ba4-f1effeb27942
nalt/pcl
surface/src/3rdparty/opennurbs/opennurbs_optimize.cpp
/* $NoKeywords: $ */ #include "pcl/surface/3rdparty/opennurbs/opennurbs.h" int ON_FindLocalMinimum( int (*f)(void*,double,double*,double*), void* farg, double ax, double bx, double cx, double rel_stepsize_tol, double abs_stepsize_tol, int max_it, double...
ALGO
0.999999
6.117443
0493a9d5-6427-48a1-aa46-929083f2bcca
championballer/coding-ninjas-ds
Codes/Linked List/nodeUse.cpp
#include<iostream> #include"node.cpp" using namespace std; node<int>* takeInput() { int data; cout<<"Please enter data for head:"; cin>>data; node<int>* head=NULL; node<int> * current = head; while(data!=-1) { node<int> * front = new node<int>(data); if(head==NULL) { head = front; current = head...
ALGO
0.999861
4.081917
a3095b1c-af8c-4eb2-b3dd-9fd0615e78cb
ishandutta2007/codeforces
anz/normal/1382/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; ll gcd(ll a, ll b) { for (; b; a %= b, swap(a, b)); return a; } int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int t; cin >> t; while (t--) { int n; cin >> n; int ans =...
ALGO
0.999989
4.97682
a383ba92-ee1b-4b58-b1ac-f7b21703c6dc
yindaz/pbrs
mitsuba-af602c6fd98a/src/libcore/aabb.cpp
#include <mitsuba/core/aabb.h> MTS_NAMESPACE_BEGIN Point AABB::getCorner(uint8_t corner) const { return Point(corner & 1 ? max.x : min.x, corner & 2 ? max.y : min.y, corner & 4 ? max.z : min.z); } bool AABB::overlaps(const BSphere &sphere) const { Float distance = 0; for (int i=0; i<3; ++i) { if (sphere.c...
ALGO
0.907958
6.707334
b1a033f8-9216-4b2e-ac7d-eba4e6768a55
wrobcio789/leetcode-problems
0386-lexicographical-numbers.cpp
#include <iostream> #include <vector> #include <algorithm> class Solution { public: std::vector<int> lexicalOrder(int n) { std::vector<int> result; result.reserve(n); search(result, n, 1); return result; } void search(std::vector<int>& nums, int n, int base) { std:...
ALGO
0.999384
6.457264
e97e16eb-042b-4e68-8089-bee15b9e985c
fe1w0/VulnInfoSearch
DataSet/MethodSet/VulnSet/C++/CWE-190/CVE-2022-21733/Compute.cpp
void Compute(tensorflow::OpKernelContext* context) { for (int ngram_width : ngram_widths_) { OP_REQUIRES( context, ngram_width > 0, errors::InvalidArgument("ngram_widths must contain positive values")); } const tensorflow::Tensor* data; OP_REQUIRES_OK(context, context->inpu...
ALGO
0.98333
7.821793
8cfc842e-bd88-47e0-ac46-6d2cc78c6862
113bommy/PathRepair
variable_trace/cpp/cpp_code/cpp_correct/cpp_correct_test_105_3.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; long long n, a[N], b[N], m[N], cur_a[N], cur_b[N], mn[N], mx[N]; int solve(vector<int> &v) { int res = 0; vector<pair<pair<int, int>, int> > seg; for (auto idx : v) { seg.push_back({{mx[idx], mn[idx]}, idx}); } sort(seg.begin(), seg.end(...
ALGO
0.999864
3.590059
12783493-dab9-4e65-8e99-0ea30b438481
BooooobZhao/Fundamental-of-Algorithm
hw1/q1.cpp
//Xuebao Zhao //002108354 #include<iostream> using namespace std; //Swap the values of two integer variables using pass‐by‐point void SwapP(int *a, int *b); //Swap the values of two integer variables using pass‐by‐reference void SwapR(int& a, int& b); int main() { int a = 4; int b = 7; //Output the orig...
ALGO
0.993661
4.292794
3541f76a-52fd-465a-9070-e09a3c539af1
rachellehmbs/key-recovery-tool
tool/Solver.cpp
#include <functional> #include <set> #include "Solver.hpp" using namespace std; Solver::Solver() : PC (true), time_on (cipher.getNpairs()), time_off (0.), memory (0.), nbsols (time_on), node1 (nullptr), node2 (nullptr) { dst = 3; } Solver::Solver (unsigned sb, bool fromP, bool in) : PC (false), time_on (0.), memor...
ALGO
0.999839
4.193622
53261b4d-5742-4749-95ef-059775d29b7e
fjahr/signet2
src/base58.cpp
#include <base58.h> #include <hash.h> #include <uint256.h> #include <util/strencodings.h> #include <assert.h> #include <string.h> /** All alphanumeric characters except for "0", "I", "O", and "l" */ static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; static const int8_t mapBa...
TOOL
0.917525
6.951943
7f4d5b8b-02c9-46e5-8a39-fa84e96a7c42
omangaj/c-language
all/Q8.CPP
#include<stdio.h> #include<conio.h> void main(){ clrscr(); int n,m,sum=0; printf("Enter limit:"); scanf("%d",&m); n=1; while(m>=n) { if(n%2==1) { printf("%d\t",n); sum=sum+n; } n++; } printf("\nSum of odd numbers:%d",sum); getch(); }
ALGO
0.999551
3.308215
e783cfff-e926-409a-ac2b-8b5fe9ce3a59
lucamartignonUnipd/AssignmentColloquioRaceup
main.cpp
#include <iostream> #include <fstream> #include "MazeSolver.h" int main(){ std::ifstream mazeInput("MazeInput.txt"); std::string line; std::vector<std::string> mazeVec; while (getline(mazeInput, line)){ mazeVec.push_back(line); } MazeSolver mazeSolver(mazeVec); mazeSolver.findPath(); mazeInput.close(); ...
ALGO
0.983599
4.648378
e466ad5a-9b9f-456b-8bce-ede21a4b81df
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10364_8.cpp
#include <bits/stdc++.h> using namespace std; int n, l, vb, vp, k; double mid; bool check(double t) { double bus_share, gap, grps, bus_time, back_time; bus_share = (1.0 * (l - vp * t)) / (vb - vp); if (bus_share <= 0) return true; grps = (n + k - 1) / k; gap = bus_share * (vb - vp); back_time = gap / (vb + ...
ALGO
0.999902
3.856543
d19682e7-f9bf-49f0-8328-6246957c85e6
moonfraction/compilers_A6-CS39003
codegen.cpp
#include "y.tab.c" #include "lex.yy.c" #include <algorithm> #include <iostream> #include <vector> #include <iomanip> using namespace std; typedef struct _TargetQuad { string op; string arg1; string arg2; string result; } TargetQuad; TargetQuad T[1000]; // target code quads int nextTargetQuad = 1; // n...
TOOL
0.94027
3.090332
dc7f2d54-d4fc-47cb-8fe4-08d29c72e582
OleksiiLeizerovich/KSU-C-homeworks
Lesson 7/HT2/Leizerovich_O_2.cpp
/* : Sn = 1-(2/1!)+(4/2!)+....+((-2)^n/n!) */ #include <iostream> #include <cmath> #include <iomanip> using namespace std; double factorial(int); double Sn(int); double factorial(int n) { if (n == 0) { return 1.0; } else { return n * factorial(n - 1); } } double Sn(int n) { ...
ALGO
0.999803
3.899
04d433d2-c8d7-488d-be26-293179ef78ec
SMiles02/CompetitiveProgramming
Codeforces/CF 1100 - 1199/CF1157/CF1157B.cpp
#include <bits/stdc++.h> #define ll long long #define sz(x) (int)(x).size() using namespace std; int binpow(int a, int b) { if (b == 0) { return 1; } ll res = binpow(a, b / 2); res*=res; if (b % 2) { return res * a; } return res; } ll gcd(ll a,ll b) { if (b==0) ...
ALGO
0.999879
3.602538
62aa0221-1265-4656-9a7c-74ba4e8bf3d7
Jackarain/avhttp
boost/libs/polygon/example/gtl_custom_polygon_set.cpp
#include <boost/polygon/polygon.hpp> #include <list> #include <time.h> #include <cassert> #include <deque> #include <iostream> namespace gtl = boost::polygon; using namespace boost::polygon::operators; //once again we make our usage of the library generic //and parameterize it on the polygon set type template <typenam...
ALGO
0.935234
7.807999
bb7ab609-0ce4-4fb2-ad4b-a3f45759d72f
Duhikim/CodingTestCPP
baekjoon/bj5086_factor_or_multiple/소스.cpp
#include <iostream> using namespace std; int main() { while (true) { int A, B; cin >> A >> B; if (A == 0 && B == 0) return 0; if (B % A == 0) { cout << "factor" << '\n'; } else if (A % B == 0) { cout << "multiple" << '\n'; } else { cout << "neither" << '\n'; } } return 0; }
ALGO
0.999742
4.814636
b07484d2-9844-4e32-aa32-d087de018462
adetaylor/android-frameworks-base-with-remote-control-service
core/jni/android/opengl/util.cpp
#include "jni.h" #include "JNIHelp.h" #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <dlfcn.h> #include <GLES/gl.h> #include <ETC1/etc1.h> #include <core/SkBitmap.h> #include "android_runtime/AndroidRuntime.h" #undef LOG_TAG #define LOG_TAG "OpenGLUtil" #i...
TOOL
0.954035
6.151347
2776bbcc-20f2-48d2-81f7-fe808f025826
dermawannnn99/UTS-ALPROG-2024-DERMAWAN
SOAL UTS 4.cpp
#include <iostream> using namespace std; int main() { int angka; cout << "================================================" << endl; cout << "SELAMAT DATANG DI PROGRAM ANGKA GENAP DAN GANJIL" << endl; cout << "================================================" << endl; cout << "Masukkan Angka: "; ...
ALGO
0.98122
5.131327
f6f6224b-b1b2-4957-a527-da1666865ff8
bobsomers/flexrender
src/shared/utils/cmdline.cpp
#include "utils/cmdline.hpp" #include <algorithm> using std::string; using std::find; namespace fr { string FlagValue(int argc, char* argv[], const string& flag_short, const string& flag_long) { char **begin = argv; char **end = argv + argc; char **iter = nullptr; // Look for short flag value. ...
TOOL
0.939759
6.121974
50ce3cd5-e3de-4cca-a0db-9896db7979ca
defauth98/exs-cpp
secao_05/ex16.cpp
#include <iostream> using namespace std; int main(){ int num; cout << "Numero: "; cin >> num; switch(num){ case 1: cout << "Janeiro" << endl; break; case 2: cout << "Fevereiro" << endl; break; case 3: cout << "Março"...
TOOL
0.993892
4.034905
6d5633f7-77f6-4633-aff9-ca210f193f29
orijoon98/Algorithm_Study
C++/baekjoon/단지번호붙이기_2667.cpp
#include <bits/stdc++.h> #define endl '\n' #define MAX 26 using namespace std; int N, ans, cnt; int board[MAX][MAX]; bool vis[MAX][MAX]; int dx[4] = { 1, 0, -1, 0 }; int dy[4] = { 0, 1, 0, -1 }; vector<int> v; void BFS() { for (int i = 1; i <= N; i++) { for (int j = 1; j <= N; j++) { if (board[i][j] == 0 || vis...
ALGO
0.999974
4.396811
86d59e49-83b4-4fb9-830c-c2396e697c93
paragdudeja/leetcode-practice
2023-number-of-pairs-of-strings-with-concatenation-equal-to-target/2023-number-of-pairs-of-strings-with-concatenation-equal-to-target.cpp
class Solution { public: int numOfPairs(vector<string>& nums, string target) { unordered_map<string, int> mp; for(auto &n: nums) { if(n.size() < target.size()) mp[n]++; } int ans = 0; for(auto it: mp) { string s = it.first; int fr...
ALGO
0.999971
6.232543
e265d1c0-9bb3-4661-b662-06f51115930b
Teemo6/UPS_Semestralka
c_src/ConfigParser.cpp
#include "ConfigParser.hpp" #include "Constants.hpp" #include "Logger.hpp" #include <iostream> #include <sstream> #include <string> #include <unordered_map> #include <arpa/inet.h> bool ConfigParser::load_config(std::unordered_map<std::string, std::string> &config){ std::string raw_line, line, type, value; st...
CONFIG
0.957147
5.641869
3ec1a72e-b49a-42da-a997-89d5d315213b
vikasbhalla05/DSA-2023
0. Basics of C++/1. Build Up Logical Thinking - Patterns/Pattern 11.cpp
#include <iostream> using namespace std; int main() { int n; cout << "Enter row\n"; cin >> n; for (int i = 0; i < n; i++) { // For printing the stars in each row for (int j = 0; j<i + 1; j++) { int s = (i+j)%2? false:true; cout << s <<" "; } cout << "\n"; } } // 1 //...
ALGO
0.999926
4.330054
7cd61dc7-0008-4809-b093-22ec6e6485ef
Flare-k/Algorithm
동적프로그래밍/돌게임_DP_9655.cpp
#include <iostream> #include <algorithm> using namespace std; // DP로 풀이 int N; int dp[1001]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin >> N; dp[1] = 1; dp[2] = 2; dp[3] = 1; for (int i = 4; i <= N; i++) { dp[i] = min(dp[i-3] + 1, dp[i-1] + 1); } if (...
ALGO
0.999764
3.619583
1516c2d4-a39e-4ca4-bb77-f7c4f3f6564b
cwhuang1937/CP
contest/practice/dp/Maximum Sum Increasing Subsequence/main.cpp
#include<bits/stdc++.h> #define ll long long #define ld long double using namespace std; int a[8] = {0}; int dp[8] = {0}; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; for(int i = 1 ; i <= n; ++i) cin >> a[i]; for(int i = 1; i <= n; ++i) { dp[i] = a[i...
ALGO
0.999942
3.697344
10a00314-ec39-474c-89c7-3e0ea108018f
RajanPatel0/DSA
Recursion/p3.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; void printSs(vector<int> &arr, vector<int> &ans, int i){ //recursion tree(via inclusion & exclusion) if(i==arr.size()){ //Base Case for(int val:ans){ cout<<val<<" "; } cout<<endl; return; ...
ALGO
0.999794
5.157939
1b3304ce-a384-4767-b0a1-8a9f04c3a754
daomanh4t2002/Code-PTIT-ManhDD-B20CN421
Code C++/cpp0154.cpp
#include<iostream> using namespace std; main(){ int t, n; long long k; cin>> t; while (t--){ cin>> n>> k; if (n*(n+1)/2==k) cout<< 1<< endl; else cout<< 0<< endl; } }
ALGO
0.999902
4.248652
18da31e0-2bdc-4c57-9c3f-970cbcf16309
XuShaohua/leetcode-rs
src/1195.fizz-buzz-multithreaded/main.cpp
#include <cassert> #include <cstdio> #include <condition_variable> #include <functional> #include <mutex> #include <thread> class FizzBuzz { public: FizzBuzz(int n): n_(n) { } // printFizz() outputs "fizz". void fizz(std::function<void()> printFizz) { while (this->current_ <= this->n_) { std::unique...
TOOL
0.963543
7.076854
e1cbddaf-32dd-4218-bbf0-a5fc3ae14b6e
Vasudeva-bit/Leet-Code-Solutions
Hard/745. Prefix and Suffix Search.cpp
class WordFilter { public: unordered_map<string, int> umap; WordFilter(vector<string>& words) { for(int i=0;i<words.size();i++){ string const& word = words[i]; int const len = words[i].size(); for(int j=1;j<=len;j++){ string some = word.substr(0, j); ...
ALGO
0.998651
5.771252
f4bca551-cbbe-4028-894c-61f2b7a4fa4b
iammarajul/competitive_programming
Codeforecs/1186B.cpp
#include<bits/stdc++.h> using namespace std; int sc1() {int x; scanf("%d", &x); return x;} long long sc2() {long long x; scanf("%lld", &x); return x;} #define gcd(a,b) __gcd(a,b) #define lcm(a,b) (a*b)/gcd(a,b) #define Int sc1() #define LL sc2() #define For(n) ...
ALGO
0.999956
3.349545
8d35403f-3864-4b1e-a833-dba1c1a37b9c
Akayazuka/AayushmanChandra-DAA2022-31-
Practical/Week2/Ques3.cpp
#include<iostream> using namespace std; int main() { int t; cin>>t; while(t!=0) { int n,key; cout<<"Enter the size of array: "; cin>>n; int arr[n]; cout<<"Enter the size of array: "; for(int i=0 ;i<n ;i++) cin>>arr[i]; cout<<"Enter the key: "; cin>>key; for...
ALGO
0.999216
3.271378
feaac8c8-a9fd-43b3-abcf-afdce2675aa2
heesooyaam/AlgoTemplates
Graphs/Flows/MCMF/List/JhonsonPotentialsInteger.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; #define eb emplace_back #define pb push_back #define pf push_front #define ppb pop_back #define ppf pop_front #define ss second #define ff first #define mp make_pair #define all(x) (x).begin(),(x)...
ALGO
0.99989
4.093976
581436ad-95e0-4d16-81f2-dcaaa2d43342
MKEcoin/mkecoin
src/common/pruning.cpp
#include "cryptonote_config.h" #include "misc_log_ex.h" #include "crypto/crypto.h" #include "pruning.h" namespace tools { uint32_t make_pruning_seed(uint32_t stripe, uint32_t log_stripes) { CHECK_AND_ASSERT_THROW_MES(log_stripes <= PRUNING_SEED_LOG_STRIPES_MASK, "log_stripes out of range"); CHECK_AND_ASSERT_THROW...
ALGO
0.945265
5.715393
59e0f58c-a416-4d4f-811f-a33473b858aa
rootoverswapno/All-Programming-
contest/div_3_p2.cpp
#include<bits/stdc++.h> #define int long long using namespace std; void solve_de_vai() { int n; cin>>n; vector<int>v(n); for(auto &i:v) { cin>>i; } for(int i=0;i<n;++i) { if(v[i]<v[i-1]) } } int32_t main() { int t; cin>>t; while(t--) { solve_de_va...
ALGO
0.998783
4.833796
a0adfb91-f129-48b8-8a69-f8427d427f49
coolboygym/leetcode
algorithm/ZigZag Conversion.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; class Solution { public: string convert(string s, int numRows) { string ans; int n = s.length(); if(numRows == 1) return s; for(int i = 0; i < numRows; i++){ int j = i; ...
ALGO
0.99999
5.590657