uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
3f65ac09-1b23-4d90-b7f1-86894eca66be
qwaker00/Olymp
Trains/21112014/I/hax.cpp
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> #include <sstream> #include ...
ALGO
0.999765
3.532193
af85f5d8-98d3-4a05-b5fb-e1fc33445c45
sachinkumar8757/CPP_Programs
cpp cource/decimal_binary.cpp
#include<iostream> using namespace std; int main() { int n; cout<<"Enter a number: "; cin>>n; int arr[10]; int i=-1; while(n>0) { int r=n%2; i=i+1; arr[i]=r; n=n/2; } cout<<"In binary: "; for(int p=i;p>=0;p--) { cout<<arr[p]<<" "; }...
ALGO
0.999969
4.274848
6e4b8dc2-6697-4820-8e3b-421a56b330ec
yuri-you/Problem-solving-and-Practice
Jacobi Iteration/Jacobi Iteration/源.cpp
#include <iostream> #include <vector> #include <string> #include <iomanip> #include <sstream> #include <cmath> #include <algorithm> //#include <fstream> using namespace std; class NO_SOLOTION {}; class NO_UNIQUE_SOLUTION {}; class NO_COVERGE {}; const double eps = 1e-8; const double inaccurate = 1e-8; const double stop...
ALGO
0.99991
3.340112
ea10999b-f84d-4c9e-87f2-6ab8412f01b1
xinchengxx/algorithm_contest
codeforces/796div2/A.cpp
#include<bits/stdc++.h> using namespace std; using i64 = long long; void solve() { // x | y >= x int x; cin >> x; int y = 0; for (int i = 0; i < 32; i++) { if ((1 << i) & x) { y |= (1 << i); break; } } if (__builtin_popcount(x) == 1) { for (int j = 0; j < 32; j++) { if (!((1 << j) & x)) { y |...
ALGO
0.999681
4.984918
fb39d75c-1c27-45e9-9cad-506846c174b5
n-popov/dasr-2023
dynamic/tree.cpp
#include <iostream> struct Node { int value; Node* left = nullptr; Node* right = nullptr; int height = 1; Node(int value) { this->value = value; } }; Node* find(Node* root, int value) { if (!root) { return nullptr; } if (value == root->value) { return root;...
ALGO
0.999996
5.861864
441b965f-6b33-4eb6-8825-4e7b5f14ee4f
Ayesha049/all_contest_codes
RAMADAN VACATION JUNE 2017/16 jun/A. Anton and Polyhedrons.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; long long ans=0; for(int i=0;i<n;i++) { string s; cin>>s; if(s=="Icosahedron") ans+=20; else if(s=="Dodecahedron") ans+=12; else if(s=="Octahedron") ans+=8; else if(s=="Cube") an...
ALGO
0.99062
4.253632
4d5c358d-e6b3-4190-8d58-959657a03e1a
ynsairam/programming
problems/1_bulls_n_cows.cpp
#include <iostream> #include "std_lib_facilities.h" vector<int> nums; //vector for user's guesses vector<int> key; //the 4 digit code int track=0; //this variable helps handling various trackings in the while loop and increases by 1 each time that the user enters a number int bull=0; int cow=0; int const guess=4; //ea...
ALGO
0.99179
4.315876
5bbd2fa8-0de4-44cc-bb36-72ffeb12f76d
MahajanPreksha/DSA-in-CPP
Template Classes/Map/longestSubarrayWithSum0.cpp
#include<iostream> #include<vector> #include<unordered_map> using namespace std; int maxLengthZeroSumSubarray(vector<int> &v){ unordered_map<int, int> m; int prefixSum = 0; int maxLen = 0; for(int i=0; i<v.size(); i++){ prefixSum +=v[i]; if(prefixSum==0){ maxLen++; } ...
ALGO
0.999823
5.729399
99019a80-decc-4c2f-be93-e367820b6f0e
ishandutta2007/codeforces
gapzinho/normal/1621/D.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int inf = 1e18; const int ms = 600; const int mod = 1e9+7; using ii = pair<int, int>; using iii = pair<int, ii>; using ll = long long; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int a[ms][ms]; int cst[ms][ms]; void ...
ALGO
0.999913
3.96039
383e4be0-f8b1-40fc-86ac-c16ce39786e1
westsider/UnrealEngine-staging-4.20
Engine/Source/ThirdParty/IntelEmbree/Embree270/src/kernels/xeonphi/bvh4i/bvh4i.cpp
#include "bvh4i.h" #include "bvh4i_builder.h" #include "bvh4i_builder_morton.h" #include "../../common/accelinstance.h" #include "../geometry/triangle1.h" namespace embree { __aligned(64) BVH4i::Node::Helper BVH4i::Node::initQBVHNode[4] = { { pos_inf, pos_inf, pos_inf,BVH4i::invalidNode}, { neg_inf, neg_i...
ALGO
0.971923
4.600088
f2967949-a7af-45d2-8c25-ea4c0fa4303e
vuicash/fake
src/test/util/blockfilter.cpp
#include <test/util/blockfilter.h> #include <chainparams.h> #include <validation.h> bool ComputeFilter(BlockFilterType filter_type, const CBlockIndex* block_index, BlockFilter& filter) { CBlock block; if (!ReadBlockFromDisk(block, block_index->GetBlockPos(), Params().GetConsensus())) { return false; ...
TOOL
0.892157
6.742158
987b9a5e-3465-4104-af0d-adcc5da8e099
mrsantoshsahoo/flutter_projects
codelab/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.998668
6.76775
87e45b54-099d-4251-a309-4b9aba225592
jcgaskin/cs162
assignment_1/assignment1.a.cpp
// // assignment1.a.cpp // Hangman program // // Created by Jared Gaskin on 9/22/17. // // can assume lowercase letters, do not have to convert input to lowercase // can assume user will enter only a single char (assumed to be a letter) , no other input validation required // can read input as char or string //the...
ALGO
0.984122
3.112438
bab73142-8db9-4185-b20c-a039a5c4d660
Tryamb/gfg-Solutions
Total Cuts.cpp
class Solution{ public: int totalCuts(int N,int K,vector<int> &A){ int lf[N],rt[N]; lf[0]=A[0]; for(int i=1;i<N;i++){ lf[i]=max(lf[i-1],A[i]); } rt[N-1]=A[N-1]; for(int i=N-2;i>=0;i--){ rt[i]=min(rt[i+1],A[i]); } int answer=0; ...
ALGO
0.999966
5.37889
72172d81-d1da-4b91-aa96-22e3f196c48a
ishandutta2007/codeforces
sirshokoladina/normal/559/A.cpp
#include <bits/stdc++.h> using namespace std; #ifdef SG #include <debug.h> #else #define show(...) #define debug(...) #define deepen(...) #define timer(...) #endif #define ARG4(_1,_2,_3,_4,...) _4 #define forn3(i,l,r) for (int i = int(l); i < int(r); ++i) #define forn2(i,n) forn3 (i, 0, n) #define forn(...) ARG...
ALGO
0.999676
3.242106
18864629-f63f-4694-a086-4cffad88e296
akhilr007/Leetcode-problems
0077-combinations/0077-combinations.cpp
class Solution { public: void solve(int i, int n, int k, vector<int>& ans, vector<vector<int>>& result) { if(k == 0){ result.push_back(ans); return; } for(int j=i; j<=n; j++){ ans.push_back(j); solve(j+1, n, k-1, ans, result); ...
ALGO
0.999986
6.126774
74d2b817-5929-41c2-b2a8-b941dd4023c3
kiwoongyoon/comsil_5_github
main.cpp
#include <stdio.h> #include "Stack.h" void prnMenu(){ cout<<"*******************************************"<<endl; cout<<"* 1. 삽입 2. 삭제 3. 출력 4. 종료 *"<<endl; cout<<"*******************************************"<<endl; cout<<endl; cout<<"원하시는 메뉴를 골라주세요: "; } int main(){ int mode, selectNumber, tmpItem; ...
TOOL
0.957269
4.262414
9fbe59f7-b76b-4ded-801a-d2424e370b14
kongkang123123/Solving_Algorithm_Problems
Data_Structures/HashMap/1620.cpp
// 1620: 나는야 포켓몬 마스터 이다솜 // 실버4 #include <iostream> #include <string> #include <vector> #include <map> using namespace std; //해시맵사용 int main(){ map<string, int> pokemon; vector<string> name; int n, m; string temp; //포켓몬 이름과 번호가 섞여있으므로 string cin >> n >> m; vector<string> result; for (int i ...
ALGO
0.999562
4.857127
5039c815-e921-4f9d-8c67-f2ab86d42a63
yorklephone/android_framework_base
media/libstagefright/codecs/amrnb/enc/src/hp_max.cpp
/* ------------------------------------------------------------------------------ Filename: /audio/gsm_amr/c/src/hp_max.c Date: 02/01/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: Replaced "int" and/or "char" with OSCL defined types. Des...
ALGO
0.999618
7.219464
5cbc3d5b-52bf-49b4-ae3d-629b54b3ff93
ishandutta2007/codeforces
deemo/normal/248/D.cpp
#include<iostream> #include<string> #include<algorithm> #include<vector> using namespace std; const int MAXN = 5e5 + 10; int n, t, c1, c2, lasth; string s; int fs[MAXN]; int get(int x, int l = 0){ int ret = 0, ls = l; bool fl = 0; int w = max(lasth, fs[c1 - x]); for (int i = l; i <= w; i++){ ret++; if (s[i]...
ALGO
0.999938
3.7667
30d45171-80da-4b6c-817f-dd91df04c908
STMicroelectronics/fp-sns-datalog2
Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/gru/arm_nnexamples_gru.cpp
/** * @ingroup groupExamples */ /** * @defgroup GRUExample Gated Recurrent Unit Example * * \par Description: * \par * Demonstrates a gated recurrent unit (GRU) example with the use of fully-connected, * Tanh/Sigmoid activation functions. * * \par Model definition: * \par * GRU is a type of recurrent neura...
ALGO
0.914648
7.471897
25611366-b4a4-40e8-a28c-f59261570638
AdvTrainEvalSrcDomain/adv-train-evaluation-source-code-domain
code-imitator/data/dataset_2017/dataset_2017_8/ssor96/5304486_5760761888505856_ssor96.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); int tt; cin >> tt; for (int t = 1; t <= tt; ++t) { int n, m; cin >> n >> m; vector <string> ar(n); vector <vector <bool> > used(n, vector <bool> (m, false)); for (int i = 0; i < n; ++i) { cin >...
ALGO
0.999979
4.528005
ee6aa5da-3cac-451d-b736-9e5986f55add
Jyunpp/Algorithm
acmicpc.net August 2017/20170821/11495.cpp
//20170821 06:31 ~ 10:10 ~ 01:11 ~ 02:57 // ſ Ѵ!! /* classified */ #ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #include <iostream> #include <stdio.h> #include <memory.h> #include <algorithm> #include <vector> #include <queue> using namespace std; int n, m, t, ans = 0; int S = 0, T = 5001; int c[5002][50...
ALGO
0.999456
3.331215
8c9dae75-3226-4043-84bf-894473ad1038
ishandutta2007/codeforces
deemo/normal/322/E.cpp
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<vector> #include<utility> #include<cstring> using namespace std; const int max_n = 1e5 + 40; const int LOG = 25; int n, sz; vector<int> adj[max_n]; bool seen[max_n]; int mark[max_n], cnt[max_n]; int col; void dfs(int v, int p){ seen[v...
ALGO
0.999982
4.260297
d203a233-4291-481f-aeaa-dda6e7fd999b
MMeowJiang/Zero-judge
a229 括號匹配問題.cpp
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; while (cin >> n) { auto dfs = [&](auto self, string &s, int lhs, int rhs) -> void { if ( lhs < rhs || lhs > n) { return; } if (lhs + rhs == 2 * ...
ALGO
0.999863
4.275873
0a15b174-5b68-45a3-b27a-8107dff6d0c4
Sid330s/useFullCodes-return-AC-
uber/b.cpp
#include <bits/stdc++.h> using namespace std; struct node{ long long val; int i; int j; }; bool compare(node a, node b) { return a.val < b.val; } int main(){ int t,n,k,p; cin>>t; while(t--){ cin>>n>>k>>p; long long drr[n]; long long brr[k]; for(int i=0;i<n;i++) cin>>drr[i]; for(int ...
ALGO
0.999981
3.544462
777948fa-7cd7-44fb-ad5b-43fd91501859
youtube/cobalt_sandbox
buildtools/third_party/libc++/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp
// <algorithm> // template<ForwardIterator Iter> // requires LessThanComparable<Iter::value_type> // Iter // is_sorted_until(Iter first, Iter last); #include <algorithm> #include <cassert> #include "test_macros.h" #include "test_iterators.h" #if TEST_STD_VER > 17 TEST_CONSTEXPR bool test_constexpr() { int...
TEST
0.97124
7.498707
ff64307d-72f4-410c-8d57-ed6a5a1595b6
jsh15932/Programmers_Solve
LEVEL3/입국심사.cpp
#include<string> #include<vector> #include<algorithm> using namespace std; long long solution(int n, vector<int> times) { long long answer = 0; sort(times.begin(), times.end()); long long start = 1; long long end = (long long) times[times.size() - 1] * n; long long mid; while(start <= end)...
ALGO
0.99999
5.156437
f9970f22-e4d9-4820-99cb-46bf37086e0e
shubhamcodingblocks/G9
09-10-2023/complex.cpp
#include<iostream> using namespace std; class Complex{ int real; int imag; public: void set(int r,int i); int get_real(); int get_imag(); void subtract(Complex n2){ int new_real = real - n2.get_real(); int new_imag = imag - n2.get_imag(); cout<<new_real<<" i"<<new_imag<<endl; } }; void Complex::set(int r...
ALGO
0.915727
4.28667
2fbd7d02-6ded-4e7e-929a-86c12149771d
faizalerlangga/cpp
bilangan.cpp
#include <iostream> using namespace std; int main() { int input; cout << "MASUKKAN ANGKA : "; cin >> input; cout << endl; if (input < 0) { cout << "BILANGAN NEGATIF" << endl; } else if (input > 0) { cout << "BILANGAN POSITIF" << endl; } else if (input =...
ALGO
0.979938
3.530775
c40cdc73-05be-4259-8af2-d08967a20ac8
mkatch/kletch
src/bench/smk1_cond.cpp
#include "prefix.h" #include <lib/fresnel_core.hpp> #include <lib/fresnel_core_log.hpp> #include <lib/heald.h> #include <math/printing.h> using namespace kletch; inline vec2r fresnel_bgk1(real k0, real k1, real s) { return FresnelCore<real>::eval_bgk1<Heald5>(k0, k1, s); } inline vec2r fresnel_smk1(real k0, rea...
ALGO
0.978883
4.424379
8e4c4d99-494e-4875-a6c0-02d087f20f44
ergovschi/prisoner
play.cpp
#include <string> #include <iostream> #include <functional> #include "include/prisoner.h" #define CLAIM 0 #define SETTLE 1 #define STOP cin.get(cr) int score[100]; int main(){ /*Bash is taking care of this */ std::function<Prisoner*()> new_prisoner[] = { }; int num_players; ...
ALGO
0.999628
3.721134
0b99aa0f-c152-4029-8450-57f7488447bc
vbonnici/grafe-sim
analysis/data/p04001/s604417075.cpp
#include <bits/stdc++.h> using namespace std; // utility #define ALL(a) (a).begin(), (a).end() #define FOR(i, begin, end) for (int i = (begin); i < (end); i++) #define REP(i, n) FOR(i, 0, n) #define rer(i, l, u) for (int(i) = (int)(l); (i) <= (int)(u); ++(i)) #define reu(i, l, u) for (int(i) = (int)(l); (i) < (int)(u)...
ALGO
0.999953
4.087811
cc6c3a52-4aba-42ef-a464-e7e3ef75f81b
drew138/competitive-programming
codeforces/round_835_div4/E.cpp
#include <bits/stdc++.h> #include <cstdint> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef vector<int> vi; // int vec typedef vector<vi> vvi; // int vec vec typedef vector<pii> vpi; // int int pair vec const double pi = 3.1415926535897932384626433832795; const...
ALGO
0.999968
5.203316
8c801efa-1ba7-4d5f-859e-85470b1bc421
VijayNandakumarkumar/CodingPractise
sortingnumbers.cpp
#include<bits/stdc++.h> using namespace std; int main() { int a=432501; int temp=a; for(int i=0;i<=9;i++) {//cout<<"for"; temp=a; while(temp>0) { //cout<<"\n while"; int t=temp%10; if(t==i) { // cout<<"\n if"; cout<<t; } temp=temp/10; } } return 0; }
ALGO
0.99987
3.453931
27f73980-0d7d-49f4-b258-823722e9f0b0
eariunerdene/C-course
Day #4/RGB72100.cpp
#include <iostream> using namespace std; int main () { int a; cin>>a; for(int i=1;i<=10;i++){ cout<<a<<"*"<<i<<"="<<a*i<<endl; } }
ALGO
0.997067
3.434934
d999b892-8aa6-49a6-a9ed-ba78775158ed
ishandutta2007/codeforces
zjjws/normal/1486/A.cpp
#include <vector> #include <string> #include <stdio.h> #include <string.h> #include <iostream> #include <algorithm> #define LL long long using namespace std; inline LL rin() { LL s=0; bool bj=false; char c=getchar(); for(;(c>'9'||c<'0')&&c!='-';c=getchar()); if(c=='-')bj=true,c=getchar(); for(;c...
ALGO
0.999862
3.728616
ceb4bd14-db74-47b9-858a-39a244093258
govons99/KUKA_LWR
Cpp_Code/src/learning/learning.cpp
#include <learning/learning.hpp> void learning::InitializeGp(std::string &XFile,std::string &YFile) { std::vector<Eigen::VectorXd> Y; std::vector<Eigen::VectorXd> X; std::chrono::time_point<std::chrono::system_clock> Tic, Toc; double elapsed_time; if(!(this->X_manager.read_dat...
ALGO
0.993084
4.394632
8ff00def-f782-4490-bda5-b1335cf246fa
conan1005/DSA-Questions
Leetcode/3-stacks-and-queues/medium/1871-jump-game-vii.cpp
/******************************************************************* // DP SOLUTION // WORKS => But can be optimized with BFS bool isAbleToReach(int i, string s, int minJump, int maxJump, vector<int> &dp) { if(i == s.length()-1) return true; if(i >= s.length()) return false; if(dp[i] != -1) return dp[i];...
ALGO
0.999748
5.217096
399d70df-0728-4f54-858b-2dd8d0b9a1c5
Ritwik7631/Leetcode_Solutions
3914-check-if-any-element-has-prime-frequency/check-if-any-element-has-prime-frequency.cpp
class Solution { public: bool isPrime(int x){ if(x == 2) return true; if(x % 2 == 0 || x == 1) return false; for(int i = 3; i*i <= x; i += 2) { if(x % i == 0) return false; } return true; } bool checkPrimeFrequency(vector<int>& nums) { ...
ALGO
0.999887
5.475031
d58d269e-a6ed-4f7a-8c0a-51a7c27f0009
amitpatle10/Problems
Geeks For Geeks/Practice/BACKTRACKING /Combination Sum .cpp
/* To delete duplicates in a array : A.erase(unique(A.begin(),A.end()), A.end()); */ class Solution { public: //Function to return a list of indexes denoting the required //combinations whose sum is equal to given number. void solve(vector<int> A, int B, vector <int> temp, int sum, vector<vector<in...
ALGO
0.999971
5.482887
b8e2705f-0444-4e3c-87e6-d7831b658132
LHBM04/Lecture_WinAPI
#5 (2025-05-07)/Project #05_07/Main.cpp
#include <windows.h> #include <vector> #include <ctime> #include <cstdlib> #include <string> #include <cmath> #define CELL_SIZE 100 #define BOARD_SIZE 6 #define TIMER_ID 1 #define ANIMATION_SPEED 20.0f // 픽셀 단위 속도 struct Block { int value = 0; bool merged = false; float posX = 0.0f, posY = 0.0f; // 실제 위치 ...
ALGO
0.970053
4.767803
d11b5f7d-828a-4e90-825c-f1676a5dc356
kspalaiologos/dev-urandom
tarsort/tarsort.cpp
#include <string> #include <cstring> #include <archive.h> #include <archive_entry.h> #include "tlsh.h" #include <vector> #include <algorithm> enum { BLAKE2B_BLOCKBYTES = 128, BLAKE2B_OUTBYTES = 64, BLAKE2B_KEYBYTES = 64, BLAKE2B_SALTBYTES = 16, BLAKE2B_PERSONALBYTES = 16 }; typedef struct { uint64_t h[8];...
ALGO
0.986896
6.130004
4a8d47d0-2aa1-460a-92b5-dc170a81ad80
dkhonker/sysu
数据结构/数据结构实验课文件/EXP6-EXAM01/EX6学生代码/20354015/task3.cpp
#include <stdio.h> #include <stdlib.h> int m; // struct node{ int data; struct node *next; }; node *head; // headָͷڵ void insert(int i, int x){//xa[i] node *p = head; while (i > 1){ p = p->next; i--; } node *q = (node*) malloc(sizeof(node)); q->data=x; q->next=p->next; p->next=q; //add something her...
ALGO
0.999455
3.646684
92288272-1287-4538-a59b-0f4fea439d30
GopalSingh09/C-_Practice_-codes
stack.cpp
#include<iostream> #include<stdlib.h> using namespace std; struct stack{ int data; struct stack *next; }*top = NULL, *p; void push(int n){ struct stack* new_data = (struct stack*)malloc(sizeof(struct stack)); new_data->data = n; new_data->next = top; top = new_data; cout<<"data pushed\n"; } void pop(){ p = top;...
ALGO
0.995745
3.609726
cc1b4336-0ce7-46f5-b7be-585856dc8a87
dvaitam/codeforces
1000-1999/1900-1999/1990-1999/1991/solB.cpp
#include<iostream> using namespace std; int main(){ int t;cin>>t; while(t--){ int n;cin>>n; int b[n+1],a[n+1],d=1; for(int i=1;i<=n-1;i++)cin>>b[i]; b[0]=b[n]=0; for(int i=1;i<=n;i++){ a[i]=(b[i]|b[i-1]); } for(int i=2;i<=n;i++){if((a[i]&a[i-1])!=b[i-1])d=0; if(!d)break;} if(!d)cout<<-1<<endl; else {for(int i=1;i<=n;i+...
ALGO
0.999454
3.96874
f807ab26-5169-4a3c-9979-2e3d15be9c1a
Snowstorm0/OTB
tracker_benchmark_v1.0/trackers/IVT/interp2.cpp
#include "mex.h" #include <math.h> //#include "cvbase/cvimage.h" #define ARR(A,r,c,nr,nc) (((r)<0 || (r)>=(nr) || (c)<0 || (c)>=(nc))? 0 : (A)[(c)*(nr)+(r)]) inline double interp(double *img, int w, int h, double x, double y) { register int x0 = (int) x, y0 = (int) y, x1 = x0+1, y1 = y0+1; register double rx0 =...
ALGO
0.992008
4.715799
dfd11856-934d-478e-8814-6c80efc855e0
blueflotsam/Kattis-Solutions
C++/aprizenoonecanwin.cpp
#include <bits/stdc++.h> #include <array> using namespace std; int main(){ int sales, cost; cin>>sales>>cost; vector<int> prices; for(int i=0; i<sales;i++){ int num; cin>>num; prices.push_back(num); } int counter=0; sort(prices.begin(), prices.end()); int prev=0; for(auto i=prices.begin(); i!=prices.end();i++){ if...
ALGO
0.999777
4.072018
54aa1977-f4c6-4f09-b3bf-2485004c47c1
ashpool37/codeforces-cxx20
problems/1328a-divisibility-problem/main.cpp
#include <iostream> unsigned turn_count(unsigned a, unsigned b) { if (a <= b) return b - a; else if (a % b == 0) return 0; else return ((a / b) + 1) * b - a; } int main() { unsigned test_count; std::cin >> test_count; for(unsigned test_no = 0; test_no < test_count; test_no++) { unsign...
ALGO
0.998904
5.611877
76b648f4-0070-4ec8-a613-2b9ec4895b07
CrisAQ2410/golf2d
time.cpp
#include "time.h" duration<double> extraTimeToAdd(0); bool extraTimeAdded = false; high_resolution_clock::time_point startTime = high_resolution_clock::now(); int calculateRemainingTime() { high_resolution_clock::time_point currentTime = high_resolution_clock::now(); duration<double> elapsedTime = duration_ca...
ALGO
0.994962
5.142362
65efabfa-fe99-4d0a-acb7-db06582c2772
igarcica/PicknPlace
ROSPlan/rosplan_knowledge_base/src/VALfiles/FuncAnalysis.cpp
#include "FuncAnalysis.h" #include <set> #include <algorithm> using std::set; using std::find; namespace VAL1_2 { bool FAverbose = true; bool isSigned(const FValue & f1) { switch(f1) { case E_POSITIVE: case E_NEGATIVE: case E_NONPOS: case E_NONNEG: return true; default: return false; }; }; bool i...
ALGO
0.996278
4.837161
f7bd8663-5855-4552-b642-6072595a3e93
dtc03012/My_Algorithm
codeforces/1536/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lld; typedef pair<int,int> pi; typedef pair<lld,lld> pl; typedef pair<int,lld> pil; typedef pair<lld,int> pli; typedef vector<int> vit; typedef vector<vit> vitt; typedef vector<lld> vlt; typedef vector<vlt> vltt; typedef vector<pi> vpit; typedef vector...
ALGO
0.999856
3.974988
0c77f510-d805-4e3b-9208-d03da864c957
kiprasmel/competitive-programming
codeforces/cf1443/c.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const ll MOD = (1e9 + 7); #if (0 || defined(DEBUG)) && !defined(EVAL) #define LOG(x) std::cout << x << "\n" #define LOGS(x) std::cout << x << " " #define LO(x)...
ALGO
0.999677
4.187912
90f85124-3350-40f5-8c87-fd1b603d9c38
raincross7/code-similarity
codes/train_code/problem267/problem267_497.cpp
#include <bits/stdc++.h> #define REP(i, n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() const int INF = 1e9; using namespace std; int main(){ REP(i, 9) REP(j, 9) cout << i+1 << "x" << j+1 << "=" << (i+1) * (j+1) << endl; return 0; }
ALGO
0.973117
3.463737
4d07c403-2556-4489-84e9-ad6859f9a4fb
raincross7/code-similarity
codes/train_code/problem155/problem155_71.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using P = pair<int, int>; using PLL = pair<ll, ll>; #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define repn(i,n) for(int i = 0; i <= (int)(n); i++) #define srep(i,l,n) for(int i = l; i < (int)(n); i++) #define srepn(i,l,...
ALGO
0.999978
4.044087
782d4b2b-6007-40dd-85a2-393b0c9b06b7
HariBhavsar/One-Program-To-Outspeed-Them-All-Mentees
Week3/OpenCL/OpenCL-Wrapper/src/matMul.cpp
#include "opencl.hpp" #include <iostream> int main () { Device device (select_device_with_most_flops()); const uint N = 1024; Memory<float> A3(device,N*N); // A3 is a N*N matrix Memory<float> B3(device,N*N); // B3 is a N*N matrix Memory<float> C3(device,N*N); // C3 is a N*N matrix, C3 = A3*B3 Kernel m...
ALGO
0.977332
4.490091
4d2bdc09-6efa-4a00-b3cd-2bcd79811f92
shahzaneer/Data-Structures-and-Algorithms
Codes/DS and Algo/Math/SieveofEratosthenes.cpp
#include <iostream> using namespace std; // Its a mathematical way to better the time complexity while finding the prime numbers in an array // Approach -> ismay 2 se start krte hain aur uske saaray multiples ko mark krlete hain // then 3 k baar 3^2 = 9 se start krke marks krlete hain aur tb tk krte jatay hain // jb t...
ALGO
0.999741
4.250313
d977491d-eb95-4e0f-bad5-13918fd98ea8
ishandutta2007/codeforces
sol3/normal/1393/D.cpp
#include <iostream> #include <cmath> #include <cstring> #include <cstdio> using namespace std; #define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++) char buf[1 << 21], *p1 = buf, *p2 = buf; inline int qread() { register char c = getchar(); register int x = 0, f = 1; while (c < '0' || ...
ALGO
0.999833
3.014644
42d398e3-117b-4811-a0e8-36310179e90d
Abhinav200207/CrackYourPlacement
DynamincPrograming/UglyNumbers.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int nthUglyNumber(int n) { vector<int> dp; dp.push_back(1); int index2 = 0; int index3 = 0; int index5 = 0; for (int i = 1; i < n; i++) { int temp = min(min(dp[index2] * 2,...
ALGO
0.999993
5.409689
b9bddc30-0ab7-4c76-bc27-5acee1d1ebf8
kosirobwada/AtCoderSubmit
submissions/abc109/b.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<string> W(N); for (int i = 0; i < N; i++) { cin >> W.at(i); } bool ans = true; for (int i = 1; i < N; i++) { if (W[i - 1][W[i - 1].size() - 1] != W[i][0]) ans = false; for (int j = 0; j < i; j++) { ...
ALGO
0.999981
4.343816
b06d8fa0-e06a-40c5-94f5-f0475d0c9add
yuguoshao/boost
libs/numeric/odeint/performance/SIMD/roessler.cpp
#include <iostream> #include <vector> #include <random> #include <boost/timer.hpp> #include <array> #include <boost/numeric/odeint.hpp> namespace odeint = boost::numeric::odeint; typedef boost::timer timer_type; typedef double fp_type; //typedef float fp_type; typedef std::array<fp_type, 3> state_type; typedef st...
ALGO
0.999936
6.014265
aa083d33-5581-49cc-806e-42f35b6424d9
e1810/kyopro
ac/abc094/arc095_b/11957429.cpp
#include<bits/stdc++.h> using ll = int_fast64_t; int main(){ int n; scanf("%d", &n); std::vector<ll> a(n); for(int i=0; i<n; i++) scanf("%ld", &a[i]); std::sort(a.begin(), a.end()); int idx = std::upper_bound(a.begin(), a.end(), a.back()/2) - a.begin(); ll r; ...
ALGO
0.999979
3.539708
ac33255d-6120-4da6-b839-f2aa84c74c7b
luvu4ever/grinding_till_death
Codeforces/1811/c/c.cpp
#include<bits/stdc++.h> #define MAX_MIN (1e9 + 5) #define MAX_N (200005) using namespace std; int a[MAX_N], ans[MAX_N]; void Solve(){ int n; int min_pos = 1; cin>> n; for(int i = 1; i<=n-1; i++){ cin>>a[i]; if(a[i] < a[min_pos]) min_pos = i; } ans[min_pos] = a[min...
ALGO
0.999963
3.898284
0bd71d29-a5f3-4d03-9a3f-75ba122d68eb
ishandutta2007/codeforces
stevenkplus/normal/103/C.cpp
// =========== Template ========== // #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef long double ld; #define fi first #define se second // =========== Book ============ // int fastio() { ios_base::sync_with_stdio(0); cout << fixed ...
ALGO
0.99994
3.876184
da4ad123-98ab-482b-ac81-2f7bd0a49a35
Rushikesh-18/DataStructure-and-Algos
Lec-19(C++ STL)/Containers/queue1.cpp
#include<iostream> #include<queue> using namespace std; int main() { queue<string> q; q.push("Rushikesh"); q.push("Ramesh"); q.push("Pachpute"); cout<<"Front Element is:"<<q.front()<<endl; cout<<"Size of Queue is:"<<q.size()<<endl; q.pop(); cout<<"Front Element is:"<<q.front()<<endl; cout<<"Size of Queue is:"<<q.size()...
ALGO
0.962878
3.566833
4868c497-3c40-4f42-9e22-630670509ae8
ImagineHJ/Problem-Solving
Leet-Code/Top-Interview-Questions/011_Container_With_Most_Water.cpp
class Solution { public: int maxArea(vector<int>& height) { int max=0, area, i=0, j=height.size()-1, h; // only compute areas which might be larger than current max, for lower complexity while(i<j){ h=min(height[i], height[j]); area=(j-i)*h; ...
ALGO
0.999986
6.748307
2a7a915c-53a3-457d-8cb4-b528677b557d
chaowang15/MeshSimplification
mesh_simp/mesh_simp/include/Eigen/test/eigen2/eigen2_visitor.cpp
#include "main.h" template<typename MatrixType> void matrixVisitor(const MatrixType& p) { typedef typename MatrixType::Scalar Scalar; int rows = p.rows(); int cols = p.cols(); // construct a random matrix where all coefficients are different MatrixType m; m = MatrixType::Random(rows, cols); for(int i =...
TEST
0.855076
5.877094
4c1e5ada-1981-46ee-a66e-983e5db37bea
Hrithik200/DSA--c---
programs/v6.cpp
/* BINARY AND DECIMAL NUMBER SYSTEM */ #include <iostream> #include <math.h> using namespace std; int main() { int n; cin >> n; int ans = 0; int i = 0; while (n != 0) { int bit = n & 1; ans = (bit * pow(10, i)) + ans; n = n >> 1; i++; } ...
ALGO
0.999838
4.724697
857fff83-5384-4ead-970b-f3c9ff447152
ot/path_decomposed_tries
tries/skips_distribution.cpp
#include <iostream> #include "patricia_builder.hpp" #include "succinct/broadword.hpp" #include <boost/date_time/posix_time/posix_time_types.hpp> struct skip_counter_visitor { skip_counter_visitor() : skip_bits_counts(32) , n_strings(0) {} typedef size_t representation_type; represent...
ALGO
0.885941
6.421658
9014a3bc-aada-41d0-8a27-b320b5f3e840
KamijouToumaKun/PracticeForACM
2015ACM/I(暴搜超时).cpp
#define N 16 #include <stdio.h> // int arr[N] = {14,1,2,3,0,4,5,6,7,8,9,10,11,12,13}; // int n = 15; // int arr[N] = {7,6,1,2,3,0,4,5}; // int n = 8; int arr[N] = {4,2,3,0,1}; int n = 5; int maxdepth; int recordTop = 0; //当前最佳路径栈 int recordStatus[N]; int recordTurns[N]; int pathTop; //当前最佳路径 int path[N][3]; void mypus...
ALGO
0.999992
3.265262
bb1a4d1b-8a4c-485e-9116-c9107eefe5d0
Abhaycl/CarND-MPC-2P5
src/Eigen-3.3/bench/dense_solvers.cpp
#include <iostream> #include "BenchTimer.h" #include <Eigen/Dense> #include <map> #include <vector> #include <string> #include <sstream> using namespace Eigen; std::map<std::string,Array<float,1,8,DontAlign|RowMajor> > results; std::vector<std::string> labels; std::vector<Array2i> sizes; template<typename Solver,type...
TOOL
0.997494
6.326138
09573e19-4943-4fe5-95d7-b2d3684d3f3a
imprudence/imprudence
linden/indra/llmessage/llmessageconfig.cpp
/** * @file llmessageconfig.cpp * @brief Live file handling for messaging * * $LicenseInfo:firstyear=2000&license=viewergpl$ * * Copyright (c) 2000-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the term...
CONFIG
0.890952
6.266417
08b5d6eb-7b15-4268-b096-cf4354d8986b
Bharatbardiya/my-leetcode-solutions
0098-validate-binary-search-tree/0098-validate-binary-search-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999977
6.28397
bee0247a-b188-46d5-994c-70c4161c099c
AmanAssassin/DSA
CP/Codechef/Motivation.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; int x; cin >> x; pair<int, int> p[n]; for (int i = 0; i < n; i++) { cin >> p[i].second >> p[i].first; ...
ALGO
0.999978
3.772628
85a0a28e-bef5-46ad-adf4-61b639ee8dca
Anikcsejnu/cpp-leetcode-solutions
424. Longest Repeating Character Replacement.cpp
class Solution { public: int mp[26]; int getMaxFrequency() { int maxFq = 0; for(int i = 0;i < 26;i++) { maxFq = max(maxFq, mp[i]); } return maxFq; } int characterReplacement(string s, int k) { memset(mp, 0, 26); int res = 0, ...
ALGO
0.999989
6.051322
793c7ce0-0d4c-4640-a85b-28ace3045616
arnabsheikh007/Programming-Contest
Codeforces/C - Tiles.cpp
#include<bits/stdc++.h> #define ll long long #define pb push_back #define eps 1e-9 using namespace std; int main() { ll a,b; cin>>a>>b; ll x=1; for(int i=0;i<a+b;i++) { x=(2*x)%998244353; } cout<<x<<endl; return 0; }
ALGO
0.999954
4.223019
e565e774-4b84-464e-9b84-28f4df27ee8e
gokulcodes/leetcode
167-two-sum-ii-input-array-is-sorted/167-two-sum-ii-input-array-is-sorted.cpp
class Solution { public: vector<int> twoSum(vector<int>& numbers, int target) { int l = 0, r = numbers.size() - 1; while(l < r){ int s = numbers[l] + numbers[r]; if(s == target){ return {l+1, r+1}; } if(s < target)...
ALGO
0.999779
6.595229
67c47511-ca69-4fee-a131-b60989fc73fc
Nakib-Arman/CSE318---ArtificialIntelligence
4.DecisionTree/.history/decision_tree_20250705121004.cpp
#include<bits/stdc++.h> using namespace std; float getEntropy(vector<vector<string>>& dataset,unordered_set<string>& decisions) { float entropy=0; vector<string> decisions_vect; vector<int> count(decisions.size(),0); for(string decision : decisions){ decisions_vect.push_back(decision); } ...
ALGO
0.993477
5.269952
e630a64f-be4e-4716-aecb-41ee2da07716
anipatil72/My_Competitive_Programming
1078.cpp
// ॥ श्री गणेशाय नमः ॥ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long #define ull unsigned long long using namespace std; using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ord...
ALGO
0.999943
4.726247
b361caad-a519-4223-a793-634c5b90d3d1
tokyj515/baekjoon
bj1392.cpp
#pragma warning(disable : 4996) using namespace std; #include <iostream> #include <iomanip> #include <string> #include <cstring> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <deque> #include <functional> #include <cmath> #include <map> #include <set> #define _CRT_SECURE_NO_WARNINGS ...
ALGO
0.999756
3.646563
72aa8ce3-5b6f-4c99-9cee-13bd2f3a1343
rajatbansal01/100daysofDSA
C++/linked list cycle.cpp
# [Linked list cyclic or not] /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool hasCycle(ListNode *head) { ListNode* slow = head; ListNode* fast = hea...
ALGO
0.99955
4.555331
d1066522-5f39-40ac-a5cf-c74cf9e893bb
s-shikharcse/Codechef-Code
addition_and_multiplication.cpp
//for help https://www.codechef.com/viewsolution/13794337 #include<iostream> #define mod 1000000007 typedef long long int lli; using namespace std; lli a[100000], seg_tree[400000]={0}, lazys[400000]={0}, lazym[400000]={0}; void build(lli s, lli e, lli node_num){ if(s==e) seg_tree[s]=a[s]; else{ lli m = (s+e)/2;...
ALGO
0.999651
4.506504
b3cc3574-e618-48de-ad25-03793d5c098c
HEltim7/cpcode
CF/Round/876/C_Insert_Zero_and_Invert_Prefix.cpp
#include <algorithm> #include <array> #include <cassert> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; #define endl '\n' using LL=long long; constexpr int N=1e5+10; int a[N]; void solve() { int n; cin>>n; for(...
ALGO
0.999957
4.315639
b835c607-67eb-4f9e-a716-c8a074b9d0a7
xrayFan/xray_history
xrStalkerOld/xrGame/ai_alife_misc.cpp
//////////////////////////////////////////////////////////////////////////// // Module : ai_alife_misc.cpp // Created : 14.01.2003 // Modified : 14.01.2003 // Author : Dmitriy Iassenev // Description : A-Life simulation : miscellanious functions ////////////////////////////////////////////////////////////////////...
ALGO
0.966641
5.099099
3c5149ac-585e-4821-a46e-234a8a1c7ce5
pokk/ACM-ICPC
q10921.cpp
#include <iostream> #include <string> using namespace std; int main() { int i=0,num=0,output[100]={0}; char word[100],letter=0; for (num=2,i='A';i<='Z';i++) { output[i]=num; if (i=='C' || i=='F' || i=='I' || i=='L' || i=='O' || i=='S' || i=='V') num++; } while (cin.ge...
ALGO
0.997894
3.805909
7a45eb85-08aa-43f7-8615-8be729147e0e
ksd11/algo
leetcode/str/344-反转字符串.cpp
#include<vector> using namespace std; class Solution { public: void reverseString(vector<char>& s) { int n=s.size(); int i=0; int j=n-1; while(i<j){ swap(s[i], s[j]); i++; j--; } } };
ALGO
0.999605
6.00888
e5fec242-d24f-4d17-9b9c-d0abae4a4b3a
hutuleacbogdan001/info2025
prob3.cpp
#include <iostream> #include <fstream> using namespace std; int n, m = 0, a[10][10], v[100], x[100], grade[100]; void creare_matrice_adiacenta() { fstream f("graf.txt"); int i,x,y; f>>n; while(f >> x >> y) { a[x][y] = a[y][x] = 1; m++; } f.close(); } void afisare_matr...
ALGO
0.999606
3.865537
ce67e671-ce8b-4425-b8bc-69c9946e9b2b
chetan0402/DSA-book
Linked List/Q11.cpp
#include<iostream> #include "SLL.cpp" #include<stack> using namespace std; Node*ReverseBlockOfKnodes(Node*head,int k){ int k_dup=k; Node*cur=head; stack<Node*> recur; // Loop for k times // Check if the list has enough items to reverse the segment // If it doesn't then return the original head ...
ALGO
0.999918
4.777341
5222345c-64a3-4aa4-93da-93c6051875a4
ishandutta2007/codeforces
coderanshu/normal/333/D.cpp
#include<bits/stdc++.h> using namespace std ; #define M 1000000007 #define MM 998244353 #define ll long long #define pb push_back #define mem0(a) memset(a,0,sizeof(a)) #define mem1(a) memset(a,-1,sizeof(a)) #define memf(a) memset(a,false,sizeof(a)) #define all(v) v.begin(),v.end() #define sz(a) (ll)a.size()...
ALGO
0.999964
4.204125
da963270-8128-41bd-9560-1644c2584308
Shintaro0105/Competitive-programming
atcoder/abc/305/a.cpp
#include <iostream> #include <vector> #include <set> #include <array> #include <cmath> #include <string> #include <algorithm> #include <functional> #include <map> #include <tuple> #include <queue> #include <stack> #include <bitset> #include <deque> #include <iomanip> #define rep(i,n) for(int i = 0;i < (n);i++) #define ...
ALGO
0.999952
3.834009
feaeaeeb-7499-4ea4-b113-be0e7ca6d0b0
ssunggun2/LeetCode
1916-find-center-of-star-graph/1916-find-center-of-star-graph.cpp
class Solution { public: int findCenter(vector<vector<int>>& edges) { int u = edges[0][0]; int v = edges[0][1]; int s = edges[1][0]; int t = edges[1][1]; if (s == u || t == u) { return u; } else { return v; } } };
ALGO
0.99996
5.987047
a39c124e-8d42-4c34-9cf0-d4cab6b20244
ryotakano77/atcoder
ICPC/0912/A.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) for (int i = 0; i < (n); i++) #define pb push_back #define ALL(obj) (obj).begin(), (obj).end() //template <class T = int> in()(T x; cin >> x; return (x);) //tem...
ALGO
0.999842
4.777881
01967833-dafc-4f6f-a641-2519af8a9ff3
sophialsts/edICpp
cursoCpp/Vetores/Aula 05 - Exercicio de classe 06.cpp
#include <iostream> #include <iomanip> // Para usar fixed e setprecision using namespace std; int main() { int N, idade, soma = 0; float media; cout << "Informe a quantidade de alunos da turma: "; cin >> N; if (N > 0) { int v_idade[N]; // Vetor para armazenar as idades // Loop p...
ALGO
0.998228
5.722336
30b3c8c2-f678-4004-a55c-460aa7ab009b
robinsinghpatiyal/CppCodes
Searching_and_Soritng/find_missing_and_repeating.cpp
#include<bits/stdc++.h> using namespace std; int *findTwoElement(int *arr, int n) { // code here sort(arr,arr+n); int j=0; static int ar[2]; for(int i =0;i<n;i++){ if(arr[i+1]!=arr[i]+1 && i<n && arr[i]!=arr[i+1]){ ar[1]=arr[i]+1; break; //j++; // cout<<endl<<ar[j]<<endl; } } for(int i ...
ALGO
0.999967
4.153218
181cf5c4-5230-4d00-a24a-c67e26824bdc
Sarumathi-Devi/Placement-Interview-Questions
Decimal to binary form.cpp
// Input : 10 // Outout : 1010 #include <bits/stdc++.h> using namespace std; int main() { int num; cin >> num; int place = 1; int binaryform = 0; while ( num ) { binaryform += ( (num%2)*place ); place *= 10; num /= 2; } cout << "The binary form of the given number is " << binaryfor...
ALGO
0.999937
5.343895
ad67d412-c26b-4280-9d2e-88742f382b78
cyrilggg/ACM
problem/CODEFORCE/810/B.cpp
#include <bits/stdc++.h> using namespace std; //ڱȽϳ "YES""NO"Ŀ #define returnNo return void(puts("No")) #define returnYes return void(puts("Yes")) // // debug,ֻڱر༭ʾ template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } templa...
ALGO
0.999905
4.57594
26f35ed0-c94b-4b82-8c50-2ade04b80b6c
Rohitrky2021/JavaSourceCode
=C--P/Coding-blocks-CP-master/Lucas_Theorem/Lucus_Theorem.cpp
#include<bits/stdc++.h> using namespace std; int nCrModpDP(int n, int r, int p) { int C[r+1]; memset(C, 0, sizeof(C)); C[0] = 1; for (int i = 1; i <= n; i++) { for (int j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j-1])%p; } return C[r]; } int nCr...
ALGO
0.999977
4.163263
bb522601-f9fb-4d64-9734-171a17d04e44
nickschoeb/cis_115_fundamentals_of_programming_cpp_v02
code/0080_rectangle_calculator.cpp
// **************************************************************************** // Rectangle Calculator v1 // Author: Mark Dencler // Description: This program takes integer inputs for the length and height // of a rectangle and displays the corresponding area and perimeter. // ****************************************...
TOOL
0.96808
4.736314
b91f75b5-21be-41d8-8b00-ff11317163f6
rishi10rana/dsa-rishi
Popular Problem's/Insertion Sort/Insertion_Sort.cpp
#include <bits/stdc++.h> void insertionSort(int n, vector<int> &arr){ for(int i=1;i<n;i++){ int temp = arr[i]; int j=i-1; for(;j>=0;j--){ if(arr[j]>temp){ arr[j+1]=arr[j]; } else{ break; } } ...
ALGO
0.999951
5.703141
d1afa961-79bd-40c2-8767-a27a93a4eee1
muhammadhasan01/cp
Online Judge/Codeforces/Contests/Others/Wunder Fund Round 2016 (Div. 1 + Div. 2 combined)/A.cpp
#include <bits/stdc++.h> using namespace std; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > struct rge { c b, e; }; sim > rge<c> range(c i, c j) { return rge<c>{i, j}; } s...
ALGO
0.999991
3.87388