uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5ac7c649-bf17-441f-ae3e-be0a851bd57f
aniketsingh10/Striver-Sheet
Binary Search/Nth_Root_of_M.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: int NthRoot(int n, int m){ int low=1; int high=m; while(low<=high){ int mid=low+(high-low)/2; if(pow(mid,n)==m){ return mid; } ...
ALGO
0.999972
6.274719
c571b781-42c8-4938-84f0-39540b4fce27
itohdak/AtCoder
ABC/old/023/D.cpp
#include <bits/stdc++.h> #include "/home/itohdak/AtCoder/000/print.hpp" using namespace std; #define ll long long #define ld long double #define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--) #define rrep(i,n) RREP(i,n-1,0) #define a...
ALGO
0.999908
3.761963
fbe23cf5-9032-4c65-9594-88abba84c65a
ishandutta2007/codeforces
kalptaru/normal/821/A.cpp
#include <bits/stdc++.h> #include <string> #include <cmath> #include <sstream> //#include <unordered_map> #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define FORD(i, a, b) for(int i = (a-1); i >= (b); i--) #define pb(a) push_back(a) #define mp(a,b) make_pair(a,b) typedef long long int ll; using namespace std; ...
ALGO
0.999976
3.825024
a11c11bb-552c-4a1a-b422-b74b915a22d8
rohit11012003/cp_problems
Little Elephant and Interval.cpp
#include<bits/stdc++.h> using namespace std; int main() { long long int l,r; cin>>l>>r; long long int ans=0; if(r>100) { long long int z=r/100; ans=ans+(z-1)*10; z=z*100; cout<<z<<endl; for(long long int i=z+1;i<=r;i++) { stringstream str; str<<i; string s; str>>s; if(s[0]==s[s.size()-1]...
ALGO
0.998843
3.235421
b9f9188a-3cfe-4ceb-b8ed-a346f5ba9b5e
satyamgupta0202/Interview-Preparation
237-delete-node-in-a-linked-list/237-delete-node-in-a-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: void deleteNode(ListNode* node) { node->val = node->next->val; node->next = node->next->next; } }; /*...
ALGO
0.99992
5.611264
860951e7-2b2b-4ef4-b5e7-4a2a5ddf3ad6
bhishma15/DSA
tree/max_level_sum.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int val; Node *left; Node *right; Node(){ val=0; left=0; right=0; } }; Node* createList(vector<int> v){ int n=v.size(); if(n==0){ return 0; } Node* root; Node* t[n]; for(int i=0;i<n;i++){ t[i]=new Node; } for(int i=0;i<n;i++){ t...
ALGO
0.999852
4.883793
3fef057f-19d4-4348-8074-ca4d9f85808b
BaironR/Taller2C
Taller2C/NodoAVL.cpp
#include "NodoAVL.h" /* Constructor del nodo de AVL. El atributo de paquete lo inicializa por el que recibe por parmetro, sin hijo izquierdo ni derecho. Su altura se define en 1. */ NodoAVL::NodoAVL(Paquete* paquete){ this->paquete = paquete; this->hijo_izquierdo = nullptr; this->hijo_derecho = nullptr; this->alt...
ALGO
0.986801
3.604493
b6c9d2a7-26a5-4fa6-9c94-a2484c91a353
samwang1228/c-university
初階程式/判斷哪個字元最多.cpp
#include<fstream> #include<cstdlib> #include<cmath> #include<string> using namespace std; int main() { ifstream instream; ofstream outstream; instream.open("1.in.txt"); outstream.open("1.out.txt"); string s; while(getline(instream,s)) { int max1=0,max2=0,max3=0; int counter1[...
ALGO
0.999619
3.10737
bc69c2f6-37ec-4d8c-9e9d-979316b08473
showmic96/Online-Judge-Solution
Gym/102152C/21754360_AC_358ms_4kB.cpp
// In the name of Allah the Lord of the Worlds. #include<bits/stdc++.h> using namespace std; typedef long long ll; int main(void) { ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); int t; cin >> t; while(t--){ ll n , m; cin >> n >> m; if((n+m)%2==0)cout << 12 << endl; ...
ALGO
0.999806
4.04317
bd62302d-87cc-42c8-aaf5-4702a37339fb
kantuni/Kattis
provincesandgold.cpp
#include <bits/stdc++.h> using namespace std; int main() { int g, s, c; cin >> g >> s >> c; int total = g * 3 + s * 2 + c; string v, t; if (total > 7) { v = "Province"; } else if (total > 4) { v = "Duchy"; } else if (total > 1) { v = "Estate"; } if (total > 5) { t = "Gold"; } else i...
ALGO
0.994034
4.515449
d7868ced-32ba-4622-91ab-6c70040e94ff
masterboy376/dsa_tutorial
real-problems/subarrayWithPalindromeConcatination.cpp
#include "bits/stdc++.h" using namespace std; // sliding window approch bool isPalindrome(int n){ int temp = n, number = 0; while(temp>0){ number = number*10 +temp%10; temp=temp/10; } if(number==n){ return true; } return false; } int subarrayWithPalindromeConcatination(v...
ALGO
0.999823
4.964543
79a28ccc-6ed3-498b-a60a-b1bf5ffb70fa
greenrok/baekjoon
cpp/basic/정수_N개의_합.cpp
#include <iostream> #include <vector> using namespace std; long long sum(vector<int> &a) { long long add = 0; for (int i = 0; i < a.size(); i++) { add += a[i]; } return add; } int main() { vector<int> v; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> v[i]; } ...
ALGO
0.999281
4.631877
448df5e5-1709-4e0a-ad60-790a856fa18a
PriyanshuA1507/Leetcode-Solutions
1010-powerful-integers/powerful-integers.cpp
class Solution { public: vector<int> powerfulIntegers(int x, int y, int bound) { set<int> a; for(int i=0;pow(x,i)<=bound;i++){ for(int j=0;pow(y,j)<=bound;j++){ long long sum = pow(x,i)+pow(y,j); if(sum<=bound){ a.insert(sum); } if(y==1){break;} } if(x...
ALGO
0.999716
5.143852
435e2c0f-a904-4525-86df-a78f667084c7
grend3d/bullet
src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
///btBox2dBox2dCollisionAlgorithm, with modified b2CollidePolygons routines from the Box2D library. ///The modifications include: switching from b2Vec to btVector3, redefinition of b2Dot, b2Cross #include "btBox2dBox2dCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "...
ALGO
0.999421
6.993068
2171838b-f67a-4ffa-a23a-06481816abd7
ShikhaPallavi123/C_Plus_Plus
datastructure/pushBackLinkedList.cpp
// // Created by Shikha Pallavi on 7/31/24. // #include<iostream> using namespace std; class Node{ public: int data; Node* next; Node(int val){ data = val; next = NULL; } }; class List{ private: Node* head; Node* tail; public: List(){ head = NULL; tail = N...
ALGO
0.989412
4.988907
da7fd276-872e-4639-830b-4acf34fa9f78
huangsunyang/PAT-A
1011/main.cpp
#include <iostream> #include <math.h> double max(double a, double b, double c, char * answer) { if (a > b && a > c) { *answer = 'W'; return a; } else if(b > a && b > c) { *answer = 'T'; return b; } else { *answer = 'L'; return c; } } double get_right(doubl...
ALGO
0.999595
3.484909
cc5113f1-3a3d-48d8-ad56-ebf85fa8d539
mooner92/2022algo
11866-요세푸스0/11866-요세푸스0.cpp
#include <iostream> #include <queue> using namespace std; int main() { queue<int> k; int tc, t; cin >> tc >> t; for (int i = 0; i < tc; i++) { k.push(i + 1); } // 배열 생성해줌 // vector<int>::iterator iter = k.begin(); cout << "<"; while (!k.empty()) { for (int i = 0;...
ALGO
0.999597
3.69563
1d21a145-ef26-4cb1-9bff-d6e116b80a3b
chatterjee-sid/CodeSVNIT
cs231_1/OOP_2/02_armstrong.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter number: "; cin>>n; int n1 = n; int digitcnt = 0; while(n1){ digitcnt++; n1/=10; } int armcheck = 0; n1 = n; while(n1){ int d = 1; for(int i=0;i<digitcnt;i++){ d *=...
ALGO
0.999879
4.711604
ff817817-9c91-450d-8b26-e3134557c507
shubhamyaduvanshi/competetivecoding
bfsgraphclass.cpp
#include<bits/stdc++.h> using namespace std; class Graph { int v; list<int>*adj;//list<int>*adj; public: Graph(int v);//constructor of no return type. void addedge(int u,int w) { adj[u].push_back(w); adj[w].push_back(u); } void bfs(int s); }; Graph:: Graph(int v) { this->v=v; a...
ALGO
0.999963
4.188646
38776a00-5208-4669-bcab-d5887ce0520e
sarvex/leetcode-nelua
solution/2000-2099/2091.Removing Minimum and Maximum From Array/Solution.cpp
class Solution { public: int minimumDeletions(vector<int>& nums) { int mi = 0, mx = 0, n = nums.size(); for (int i = 0; i < n; ++i) { if (nums[i] < nums[mi]) mi = i; if (nums[i] > nums[mx]) mx = i; } if (mi > mx) { int t = mi; mi = mx; ...
ALGO
0.999981
6.138232
c8ed19d8-4189-4031-af4f-e4cd6649896f
Someijam/LeetCode-First-Meet
1415.the-k-th-lexicographical-string-of-all-happy-strings-of-length-n.cpp
/* * @lc app=leetcode.cn id=1415 lang=cpp * @lcpr version=30104 * * [1415] 长度为 n 的开心字符串中字典序第 k 小的字符串 */ // @lcpr-template-start using namespace std; #include <algorithm> #include <array> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <list> #include <queue...
ALGO
0.999988
6.297381
9f92d037-25f0-46e7-9ef2-9c510aa71b1a
M4MD24/Algorithms-and-Problem-Solving-Level-2-by-Programming-Advices
src/_4_problems_from_31_to_40/_4_3_problem_33/Problem33.cpp
#include <iostream> using namespace std; int readPositiveNumber() { int number; do { cout << "Enter positive number:" << endl; cin >> number; } while (number < 1); return number; } short randomNumber(const short FROM, const short TO) { return rand() % (TO - FROM + 1) + FROM; } char ra...
TOOL
0.880336
4.152877
cc440426-10ee-4737-8f65-fbadb2593981
ishandutta2007/codeforces
saketh/normal/768/C.cpp
#include <bits/stdc++.h> using namespace std; #define TRACE(x) x #define WATCH(x) TRACE(cout << #x" = " << x << endl) #define WATCHR(a, b) TRACE(for (auto it=a; it!=b;) cout << *(it++) << " "; cout << endl) #define WATCHC(V) TRACE({cout << #V" = "; WATCHR(V.begin(), V.end());}) #define all(x) (x).begin(), (x).end() ...
ALGO
0.999971
4.195623
61136256-8d2f-49b0-9c5d-4bcf8bb59532
Apo-Matchbox/LeetCode_Practice
Arai60/20/step2_1.cpp
#include <string> #include <stack> class Solution { public: bool isValid(const std::string& s) { std::stack<char> st; st = {}; for (char c : s) { switch (c) { case '(': st.push(')'); break; case '{': st.push('}'); break; case '[': st.push(']'); break; case ')': case...
ALGO
0.995983
7.022325
632975dd-7333-44cc-8edf-5464c089a366
raincross7/code-similarity
codes/train_code/problem079/problem079_190.cpp
#include<bits/stdc++.h> #include<cctype> using namespace std; #define rep(i,n) for (int i=0;i<(n);i++) #define reps(i,n) for (int i=1;i<=(n);i++) #define rrep(i,n) for (int i=(n)-1;i>=0;i--) #define rreps(i,n) for (int i=(n);i>0;i--) #define all(v) (v).begin(),(v).end() #define pi 3.1415926535897932384 #define E9 10000...
ALGO
0.999995
4.222742
c5f6969e-3a3b-4cf1-a3f2-f7f3c2c5e1a9
emonhassan83/practice-data-structure
Week-03. Doubly Linked List/2.5. week_03_practice_01/4. queries_in_dubly_ll.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node *prev; Node(int val) { this->val = val; this->next = NULL; this->prev = NULL; } }; void print_forward(Node *head) //* O(N) { Node *tmp = head; while (tmp != NULL) { ...
ALGO
0.9999
4.623031
65dfde4a-34f8-49a7-8a78-0e6bf720c6b8
yazeedalrubyli/SDCND
Term2/MPC/src/Eigen-3.3/bench/sparse_transpose.cpp
//g++ -O3 -g0 -DNDEBUG sparse_transpose.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out // -DNOGMM -DNOMTL // -DCSPARSE -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a #ifndef SIZE #define SIZE 10000 #endif #ifndef...
ALGO
0.985463
5.110691
1d24d63d-3c90-483c-a5a9-e423b41b6368
yjkim0306/baekjoon
#11655.cpp
// ROT13 #include <iostream> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string str; getline(cin, str); for(int i = 0; i < str.length(); i++) { char c = str[i]; if(c >= 'a' && c <= 'z') { ...
ALGO
0.999907
5.526612
8415d6e9-5b56-4f52-a0b4-926c0a955b8d
nedelcu-ioan/.dotfiles
.config/nvim/snippets/math/math_polynomial.cpp
// math_fft_recursive // or // math_fft_iterative template<typename T> class Polynomial { public: static_assert(is_integral<T>::value || is_floating_point<T>::value); vector<T> poly; Polynomial(int n) : poly(n) {} Polynomial(int n, T initialize) : poly(n, initialize) {} Polynomial(const vector<T...
ALGO
0.999368
5.613247
9d2da51f-fb88-4568-9028-f9b749f9fd53
Delthin/leetcode-solution
luogu/P4516 [JSOI2018] 潜入行动.cpp
// dp[u][i][0/1][0/1]⟹ 以 u 为根节点的子树,在放了 i 个监视器,保证全部的子树上点都被监视到的情况下,带点 u 上放与不放监视器,且是否被监视到 // 考虑每个子问题的u需要v提供哪些信息 #include <bits/stdc++.h> using namespace std; using ll = long long; const int MOD = 1000000007; const int MAXN = 100005; const int MAXK = 105; // ================== 修改点 1: 使用全局 C 风格数组 ================== // dp...
ALGO
0.999936
5.095522
f650699d-5405-4b2a-b3f9-47962ced9f6c
yash-gargji/codeforces-solution
B_Ten_Words_of_Wisdom.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin>>t; while(t--){ int n; cin>>n; int ans = 0; int count = -1; for(int i = 0;i<n;i++){ int num,k...
ALGO
0.999788
3.560172
2c7a94cf-cd7c-4ce0-b961-88d9e9f56636
Sandy4321/NN
fnn/main.cpp
#include <iostream> #include "fann.h" int main() { const unsigned int num_input = 2; const unsigned int num_output = 1; const unsigned int num_layers = 3; const unsigned int num_neurons_hidden = 2; const float desired_error = (const float) 0.001; const unsigned int max_epochs = 500000; cons...
DATA
0.972204
5.26093
b581a663-f39e-4cec-8891-87025b95af06
Soumyaguttigoli/100_code_library
Dyck.cpp
//Follows the Catalon numbers. //Catalon Number =(2N)!/(N+1)!*N! //Montain Range Problem , and closed braket follows the same method #include<bits/stdc++.h> using namespace std; int main() { int N; cout<<"Enter number of grids\n"; cin>>N; int res=1; for(int i=0;i<N;i++) { res*=2*N-i; ...
ALGO
0.999948
4.316187
0e09fbd0-0add-4fa1-83e9-c046ea3aefaa
Coder-Vippro/Code
Archived/GiaHung/main (100).cpp
#include <bits/stdc++.h> using namespace std; float a,b; int main() { cin>>a>>b; if(a>b) cout<<fixed<<setprecision(2)<<a-b; else cout<<fixed<<setprecision(2)<<a/b; return 0; }
ALGO
0.99925
3.418412
99c48941-1475-46be-b372-fcabad71f4a3
ehnryx/acm
petrozavodsk-winter-2015-cf100962/c.cpp
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef pair<ld,ld> pdd; typedef complex<ld> pt; typedef vector<pt> pol; const char nl = '\n'; const int INF = 0x3f3f3f3f; const ll INFLL = 0x3f3f3f3f3f3f3f3f; const ll MOD ...
ALGO
0.999958
3.7055
b00a110e-6520-47ad-a548-bd0cdd0f1515
Daivaaddia/img-stego-passwords
stego.cpp
#include <fstream> #include <iostream> #include <iomanip> #include <vector> #include <cstring> #include <cstdint> #include <cstdio> #include <zlib.h> #include <string> #include <openssl/evp.h> #include <openssl/aes.h> #include <openssl/conf.h> #include <openssl/err.h> #include <openssl/rand.h> #include "stego.h" #defi...
TOOL
0.882216
4.282967
a0374baf-1240-4523-a3f2-0afaaad710b1
ABHINAV-0003/Some-bits-of-code
Set2_5.cpp
#include<iostream> using namespace std; int fibo(int num){ int i=2; int a=0; int b=1; int k; if(num==1){ return 1; } else if(num==0){ return 0; } else { return fibo(num-2)+fibo(num-1); } } long long int factorial(int num){ if (num==0){ return 1; } else { return num*factorial(num-1); } ...
ALGO
0.99756
3.552907
e4a19a66-72f5-4aa1-8b65-4b4ccb0d54b7
arlechann/atcoder
AtCoder/ABC236/D.cpp
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <tuple> #include <t...
ALGO
0.999953
3.996531
2c6c5eee-3aee-4ea6-bbd9-fd566604bb2a
tfg1434/cp
Codeforces/1984C.cpp
#include <bits/stdc++.h> using namespace std; #define int int64_t #ifdef LOCAL #include "algo/debug.h" #endif #define f first #define s second template<class T> using V = vector<T>; using vi = V<int>; #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define pb push_back #define lb lower_bound #de...
ALGO
0.999669
5.318219
51ce36bf-aa91-4e9f-a59f-d555e85c3f9a
dosomethingbyme/408
数据结构/严版教材/数据结构第2版-书中算法(C语言版)/第8章/8.3.cpp
//㷨8.3 ϣ #include <iostream> using namespace std; #define MAXSIZE 20 //˳󳤶 typedef struct { int key; char *otherinfo; }ElemType; //˳Ĵ洢ṹ typedef struct { ElemType *r; //洢ռĻַ int length; //˳ }SqList; //˳ void ShellInsert(SqList &...
ALGO
0.999895
3.367815
2eb21ffc-6cb3-428f-bf1a-b028dfd6acbf
ishandutta2007/codeforces
chasedream/normal/1209/A.cpp
#pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define RE register #define rint RE int #define rep(i, l, r) for (rint i = l; i <= r; i++) #define req(i, l, r) for (rint i = l; i >= r; i--) #define Each(i) for (rint i = head[u]; i; i = edge[i].n...
ALGO
0.99991
3.679777
e6a601ff-4546-4af0-93f5-6f6bbfdb3746
qbolec/c
zywoplot_drzewa.cpp
#include<cstdio> #include<set> #include<algorithm> #include<vector> using namespace std; const int max_n=50000; int n; int odpowiedz[max_n]; int h[max_n+3]; const int INF=1000000000; struct punkt{ int l,h,r,inputid,kara,answer; punkt(int _l,int _h,int _r,int _inputid){ h=_h; l=_l<?_r; r=_l>?_r; inpu...
ALGO
0.999887
3.536856
2ebc485d-0d10-4a7c-affe-a0398f140949
vrichter/assign
assign_multiple.cpp
#include <map> #include <vector> #include <sstream> #include <algorithm> #include <cstdlib> #include <cassert> #include <iostream> #include "common.h" #include "munkres.h" #include "matrix.h" using namespace assign; std::string read_next(int& i, int arg_num, char** args, const std::string& argname){ if(i+1 >= arg_n...
ALGO
0.999176
5.300891
2fa27f3a-42f7-4d62-b054-455d7ba4232c
VanshajGoel/100-Days-of-Code
Day15.cpp
//Question -->Implement stack data-structure #include <iostream> #include <bits/stdc++.h> #include <vector> using namespace std; class Stack { public: int n; int top=-1; Stack(int a) { n=a; } vector<int> arr; void push(int e) { if(top<n-1){ arr.push_bac...
ALGO
0.927628
4.219043
f3e2f4a0-80e6-4921-8ca5-0717d2b928b5
anurag03sati/cp
petya.cpp
#include <iostream> #include <cctype> using namespace std; int main(){ string a; cin>>a; string b; cin>>b; int sum=0; int n=b.size(); for(int i=0;i<n;i++){ char lower_a = tolower(a[i]); char lower_b = tolower(b[i]); if (lower_a < lower_b) { cout << -1 << e...
ALGO
0.999999
3.807375
f08d49d9-9a0b-46ef-a367-a059e8df60f1
4fedotov/MarkovChain
src/3rd/icu/source/common/stringtriebuilder.cpp
#include "utypeinfo.h" // for 'typeid' to work #include "unicode/utypes.h" #include "unicode/stringtriebuilder.h" #include "uassert.h" #include "uhash.h" U_CDECL_BEGIN static int32_t U_CALLCONV hashStringTrieNode(const UHashTok key) { return icu::StringTrieBuilder::hashNode(key.pointer); } static UBool U_CALLCO...
ALGO
0.973924
7.441104
bb20c14d-08aa-492a-b945-55c2e124629c
ishandutta2007/codeforces
kmjp/normal/465/B.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<to;x++) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) //-----...
ALGO
0.999803
3.98137
12fd46ff-f9b4-46b9-9d1c-41f916bc5b7a
arnabxero/Online-Judge-Problems-Solution
Gym/224687A/25328661_AC_124ms_0kB.cpp
#include<stdio.h> //arnab int main () { int n, i, a, b; scanf("%d", &n); if(n<=200000) { for(i=0; i<n; i++) { scanf("%d %d", &a, &b); if(a>=1 && a<=100000 && b>=1 && b<=100000) { printf("Case %d: %d\n", i+1, a+b); } ...
ALGO
0.997056
3.270107
d572f787-eff3-4d1d-ae79-4c81faf5b289
abhishek18124/PPCPPFeb2025
Lecture 07/012CheckKthBit.cpp
#include<iostream> using namespace std; int main() { int n = 42; int k = 4; if ((n >> k) & 1) { cout << "bit " << k << " of " << n << " is set" << endl; } else { cout << "bit " << k << " of " << n << " is not set" << endl; } return 0; }
ALGO
0.997425
5.242643
305335d7-fb0c-4294-837d-4e3be623ba87
FelixTheC/advent_of_code_2021
day5/Diagram.cpp
// // Created by felix on 05.12.21. // #include <cmath> #include <iostream> #include <valarray> #include "Diagram.hpp" Diagram::Diagram(const int &columns, const int &rows) { for(int row = 0; row <= rows; ++row) { std::vector<Point> points; points.reserve(columns); for(int column = 0;...
ALGO
0.978233
6.282695
d4b6af2d-4406-45b4-89ad-1435e9468102
florianRacine/code
cpp/teleporterEasyVersion.dir/teleporterEasyVersion.cpp
/** * author: evoPrg * created: 03.02.2023 17:29:38 **/ #include <bits/stdc++.h> using namespace std; int main() { int tt; cin >> tt; while (tt--) { int n, c; int count = 0; cin >> n >> c; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i];...
ALGO
0.999995
4.328166
3e8d6647-59f7-4e20-a48c-bf11ed6a7ce2
clarinet758/atcoder
etc/Boot_camp_for_Beginners/easy (88).cpp
#include<bits/stdc++.h> using namespace std; #define ll int64_t #define rep(i,n) for(int i=0;i<n;++i) #define per(i,n) for(int i=n-1;i>=0;--i) #define ii1(a) scanf("%d",&a) #define ii2(a,b) scanf("%d %d",&a,&b) #define ii3(a,b,c) scanf("%d %d %d",&a,&b,&c) #define ll1(a) scanf("%lld",&a) #define ll2(a,b) scanf(...
ALGO
0.999976
4.029845
17b84737-32f3-4872-9813-52536288b1c3
AFK247/DSA-Journey
Matrix/8. Rotate matrix clockwise by 90 degrees/matrix_rotate_clock.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: // Function to rotate matrix anticlockwise by 90 degrees. void rotateby90(vector<vector<int>> &a, int n) { int temp, i, j; for (i = 0; i < n; i++) { for (j = i; j < n; j++) { ...
ALGO
0.999961
6.639365
2ef2c8e4-6094-4d99-acf2-5cf711568f5d
DiptaGomes/Graph_Representation_Using_Adjancency_Matrix_BFS_DFS
main.cpp
#include<iostream> #include <list> using namespace std; int *v, *adj, adj_count=0; class Graph { private: int counts; public: int** matrix; Graph(int counts) { this->counts = counts; matrix = new int*[counts]; for (int i = 0; i < counts; i++) { ...
ALGO
0.999646
4.562512
87f26e16-8d5b-422a-ba87-20e4a7b72246
DDeo99/Algorithm-Study
TimeComplexity/2096.cpp
// BOJ 백준 2096번 내려가기 #include <iostream> #include <vector> #include <cstring> #include <algorithm> using namespace std; int N; vector<int> maxDP(3,0), minDP(3,0); vector<int> nextMaxDP(3), nextMinDP(3); int main() { cin >> N; for(int i=0;i<N;i++) { int a,b,c; cin>>a>>b>>c; // DP[0]은 0번 인덱스에 올 수 있는 가장 ...
ALGO
0.999926
3.983986
45e8507c-8822-4f6f-88e9-36caff0780c0
ishandutta2007/codeforces
rushcheyo/normal/611/G.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 500005, P = 1000000007; int n; struct point { ll x, y; } p[2 * N]; point operator+(const point &a, const point &b) { return (point){a.x + b.x, a.y + b.y}; } point operator-(const point &a, const point &b) { return (point){a.x - b.x,...
ALGO
0.99995
3.880206
a7bed475-9fcb-47a4-9216-056a19726f2d
melikamohamadifakhar/Advanced-Programming-IUST
Class_HWs/C3/C3_main.cpp
#include<iostream> #include<vector> #include<stdlib.h> using namespace std; //Default Value --> tafavot ba initialize kardan ine keh toye main mitonim taghiresh bedim class myvector{ public: //myvector(int capacity = 5)-->meghdare default-->parametrhaee keh meghdare default daran bayad tahe list biyan //:m_nCapacity(...
TOOL
0.980667
3.490691
b67a4c31-5242-4212-a2c2-3f4cd4cc3a74
OZAKI0812/3DProgram
L03_座標変換/Src/Framework/Math/KdCollision.cpp
#include "KdCollision.h" using namespace DirectX; // ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### // レイの当たり判定 // ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### // ///// /...
ALGO
0.984823
6.323969
d60dc85a-0444-48e9-87be-24fc60abd8a1
yancouto/competitive-programming
ojs/la/616-2.cpp
#include <bits/stdc++.h> using namespace std; #define fst first #define snd second typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; #define pb push_back #define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++) template<typename T> inline T abs(T t) { return t < 0?...
ALGO
0.9995
4.310823
c0c16fb1-4c13-48cf-95c7-88f0b2bd064f
nobled/mesa-ics
src/glsl/lower_variable_index_to_cond_assign.cpp
/** * \file lower_variable_index_to_cond_assign.cpp * * Turns non-constant indexing into array types to a series of * conditional moves of each element into a temporary. * * Pre-DX10 GPUs often don't have a native way to do this operation, * and this works around that. */ #include "ir.h" #include "ir_rvalue_vi...
ALGO
0.983267
7.816518
d0a1e8d3-4d90-4637-a8a1-dd81ae17c799
PoudelRabin/FELCE_Deformation_Localisation
src/FECore/FEAnalysis.cpp
#include "stdafx.h" #include "FEAnalysis.h" #include "FEModel.h" #include "FECoreKernel.h" #include "log.h" #include "DOFS.h" #include "MatrixProfile.h" #include "FEBoundaryCondition.h" #include "DumpMemStream.h" #include "FELinearConstraintManager.h" #include "FEShellDomain.h" #include "FEMeshAdaptor.h" #include "FETi...
ALGO
0.988921
5.841297
243ef132-8282-460f-86fa-2ae6cf985f5e
Atanu0341/0-to-dsa
patterns-III/pyramid-star-pattern-II/solution.cpp
#include<iostream> using namespace std; int main() { int num; cout<<"Enter the number of rows for the pattern: "; cin>>num; for(int row = 1; row<=num; row++){ // space print for(int cols = 1; cols<=num-row; cols++){ cout<<" "; } // star print fo...
ALGO
0.995722
3.948103
7051312f-9d63-4263-98ee-0a199eb20736
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4356_174.cpp
#include <bits/stdc++> using namespace std; int main(){ int M; cin>>M; cout<<"48-M"<<endl; }
ALGO
0.999241
3.221504
e3644d66-ebd1-42e8-a4d1-85be0ea80b07
arhsimluhar/Algopedia
Algorithms/Number Theory/Chinese Remainder Theorem/Chinese Remainder Theorem.cpp
//Chinese Remainder Theorem /* As per wikipedia The Chinese remainder theorem is a theorem of number theory, which states that, if one knows the remainders of the division of an integer n by several integers, then one can determine uniquely the remainder of the division of n by the product of these integers, under...
ALGO
0.999986
5.070546
dcab8af0-292a-4cd9-8dd5-81600b37a788
Yunseong-Jeong/Algorithm
[카카오 블라인드 2019] 4번.cpp
#include <iostream> #include <string> #include <vector> using namespace std; void preprocessing(string s, int *p) { s = " " + s; int s_index = 1; int c_index = 0; p[0] = 0; p[1] = 0; p[s.length()] = 0; while (s_index < s.length()) { if (c_index == 0 || s[s_index] == s[c_index]) { s_index++; c_index++...
ALGO
0.999634
4.377353
9ebb540d-e98c-4df4-b638-bb9c74735d76
gaetano-7/FDP2
fdp2/2_22_Feb_2022/eser2.cpp
#include <iostream> #include <list> using namespace std; class FakeList : public list<int>{ public: FakeList(const list<int>& lst) : list<int>(lst) {} int getFakeSize() const{ return this->size()*2; } void insert(int el) { int check = 0; for(aut...
ALGO
0.994931
4.306477
76ec9e71-e51c-4af6-bff4-efc119b19292
maahirgit/College
COLLEGE - 2/IOOP/IOOP UNIT_3/14.cpp
// 14. Write a C++ program that will generate diagonal matrix of a given matrix. #include <iostream> using namespace std; int main() { int rows, cols; cout << "Enter the number of rows: "; cin >> rows; cout << "Enter the number of columns: "; cin >> cols; int mat[rows][cols]; cout << "Enter...
ALGO
0.989391
4.820084
a86adac4-2442-4eb8-b1e6-5af5c57e6e3a
mont-y-001/CppCourse
AddBinary(easy).cpp
#include <iostream> #include <math.h> using namespace std; int main() { int a; cout << "enter value of a: "; cin >> a; int ans = 0; int i = 0; while (a != 0) { int digit = a % 10; if (digit == 1) { ans = digit * pow(2, i) + ans; } a = a / 1...
ALGO
0.999869
3.567379
bce22ede-db26-438f-b5f2-8f973a0b4447
abdullahbutt09/Data-Structure-Algorithms
Leet-Code-Problems/Problem2.cpp
#include <iostream> using namespace std; class Solution { public: int sumOfMultiples(int n) { int storesum = 0; for (int i = 0; i <= n; i++) { if (i % 3 == 0 || i % 5 == 0 || i % 7 == 0) { storesum += i; } } return st...
ALGO
0.999838
4.668073
b8a58ff3-dd81-432c-b18e-3c3cec346f5f
HamamatuReiya/02-Converter
externals/DirectXTex/DirectXTexMipmaps.cpp
#include "DirectXTexP.h" #include "filters.h" using namespace DirectX; using namespace DirectX::Internal; using Microsoft::WRL::ComPtr; namespace { constexpr bool ispow2(_In_ size_t x) noexcept { return ((x != 0) && !(x & (x - 1))); } size_t CountMips(_In_ size_t width, _In_ size_t height) n...
TOOL
0.87836
6.526328
e62c54c0-70e3-4de0-a0b6-3080ebd866bd
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p03089/p03089_num3_parsed.cpp
#include <iostream> #include <vector> int main() { int N; std::cin >> N; std::vector<int> b(N); for (int i = 0; i < N; i++) { std::cin >> b[i]; } std::vector<int> a; std::vector<int> operations; for (int i = 0; i < N; i++) { int j = i; while (j >= 0 && ...
ALGO
0.999916
4.596008
6a28f3ca-4e0f-4db5-9a6f-b6ae3375ee91
Sumonta056/Learning-DataStructure-and-Algorithms
ACM-Library-master-copy/Math/Linear Equation - Matrix/Matrix.cpp
//Determinant + Inverse Tested : Codechef - CSTREE #include<bits/stdc++.h> using namespace std; #define MAX 105 #define ll long long int const ll MOD = 1e9 + 7; const ll MOD2 = MOD * MOD * 3; inline ll bigMod(ll a,ll b){ ll res=1; while(b){ if(b&1) res=(res*a)%MOD; a=(a*a)%MOD; b>>=1; } ...
ALGO
0.999976
3.62349
4d4e7944-d597-436d-96d7-85f269d8fb6d
Addii155/DSA-with-Cpp
c++/insertionsort.cpp
#include<iostream> using namespace std; int insertionsort(int arr[],int n){ for(int i=1;i<n;i++){ int temp=arr[i]; int j=i-1; while(j>=0){ if(arr[j]>temp){ arr[j+1]=arr[j]; j--;} else { break;} } arr[j+1]=temp; } for(int i=0...
ALGO
0.999962
4.400241
d8a64732-d711-4197-8995-df96b6cbc561
10Kaiser10/OpenMP-Learn
Exercises/023_Pi_Padding.cpp
#include<iostream> #include<omp.h> #define PAD 8 #define thread 8 using namespace std; #define ld long double int main() { double time = omp_get_wtime(); ld realpi = 3.141592653589793238462643383279l; long long int n = 1000000000; ld len = 1.0l/n; ld pi = 0; ld th_res[thread][PAD]; omp_s...
ALGO
0.999822
3.78026
10126654-2584-4bff-80e6-eb5212fa6af2
ishandutta2007/codeforces
rfpermen/normal/1608/C.cpp
#include<bits/stdc++.h> #pragma GCC optimize("O3") #pragma GCC target("tune=native") #pragma GCC optimize("unroll-loops") using namespace std; #define ll long long #define ull unsigned long long #define rep(i,n,N) for(int i=(n);i<=(N);++i) #define For(i,n,N) for(int i=(n);i< (N);++i) #define rap(i,n,N) for(int i=(n...
ALGO
0.999968
3.692587
61ac32a5-1273-4b5f-916d-d97c17319880
fireblocks-labs/safeheron-gg20-exploit-poc
src/multi-party-ecdsa/gg18/sign/round0.cpp
#include "round0.h" #include "context.h" #include "crypto-commitment/commitment.h" #include "crypto-curve/curve.h" #include "mta.h" #include "crypto-bn/rand.h" using std::string; using std::vector; using safeheron::bignum::BN; using safeheron::curve::CurveType; using safeheron::curve::CurvePoint; using safeheron::cur...
ALGO
0.985554
5.759096
db8d95a5-a235-40b7-8375-21823953a6ac
gaow1423/CS325-Project_2
test_revised.cpp
#include <iostream> #include <string> #include <cstdlib> #include <bits/stdc++.h> #include <vector> using namespace std; struct change { vector<int> coins; int minimum; }; struct change changeslow(vector<int> v, int amount) { struct change myChange, tempChange1, tempChange2; int length = v.size(); int tempMin; ...
ALGO
0.999893
3.312448
a2c7f318-0a14-4d7f-9820-1205b232d216
MEILYNGRC/programming-1
capitulo_4/salidaTabular.cpp
#include <iostream> using namespace std; int main() { int n = 1; // Encabezados cout << "N\t10*N\t100*N\t1000*N\n"; // Ciclo para imprimir de 1 a 5 while (n <= 5) { cout << n << '\t' << (10 * n) << '\t' << (100 * n) << '\t' << (1000 * n) << endl; ++n; } return 0; }
ALGO
0.989569
3.719002
d915cafa-c086-45ba-8b51-0b00b912396f
ftiasch/mithril
2012-11-28/A.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <cctype> #include <string> #include <algorithm> #include <iostream> #include <cassert> using namespace std; const int maxn = 666; const int WORD = 0; const int ALISTOF = 1; const int COMMA = 2; const int AND = 3; int token[maxn]; int tokens; string wo...
ALGO
0.998548
4.091013
e9b1546d-6d66-4718-bcfb-6c7f1b3624e1
ronitmotivaras/LeetCode
0169-majority-element/0169-majority-element.cpp
class Solution { public: int majorityElement(vector<int>& nums) { int freq=0,ans=0; int n=nums.size(); for(int i=0;i<nums.size();i++){ if(freq==0){ ans=nums[i]; } if(ans== nums[i]){ freq++; }else{ ...
ALGO
0.999972
5.533399
99361dd4-c7e7-4e88-b9e7-cb86f819211b
piyushshrma/Leetcode-Ques
3491-find-the-maximum-length-of-valid-subsequence-ii/3491-find-the-maximum-length-of-valid-subsequence-ii.cpp
class Solution { public: // int asns(vector<int>& nums, int k, vector<int>& dp){ // } int maximumLength(vector<int>& nums, int k) { int maxL=0; for(int val=0; val<k; val++){ vector<int> dp(k,0); for(int num:nums){ int rem=num%k; int ne...
ALGO
0.999896
5.601866
916cff4f-5633-4541-a5a1-2af0d9b1836b
subnr01/subs-practice
leet_code/trees/medium/treeToDoublyList.cpp
/* Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers as synonymous to the previous and next pointers in a doubly-linked list. */ class Solution { public: Node* treeToDoublyList(Node* root) { Node *head = NULL, *tail = NULL; convert(root, head, ta...
ALGO
0.999917
6.264812
8bc0d062-3713-4bdf-8ecf-3028865e609b
yeqingyan/LLVM-obf
lib/Transforms/Utils/LowerSwitch.cpp
#include "llvm/Transforms/Scalar.h" #include "llvm/ADT/STLExtras.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/LLVMContext.h" #include "llvm/Pass.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include ...
TOOL
0.991501
6.681457
3f7dca0a-56d3-41c6-b733-04ce97fa3fb9
DionysiosB/ProjectEuler
problem139-PythagoreanTiles.cpp
#include <iostream> #include <cmath> using namespace std; long gcd (long a, long b){return (b == 0) ? a : gcd (b, a%b);} long pythagoreanTiles(long upperBound){ long upperLimit=1+sqrt(upperBound/2),output=0; long a,b,c,perimeter; for(int n=2;n<=upperLimit;n++){ for(int m=1+(n%2);m<n;m+=2){ ...
ALGO
0.998841
4.518006
ca6155b9-898e-4f4c-aa82-b939f023b611
Nilanjana02/DSA_C_C-_programe
hamdis copy.cpp
#include<stdio.h> #include<iostream> #include<string.h> using namespace std; int main() { int i, length, count = 0; char v1[8], v2[8]; printf("\nWrite a Program to Find Hamming Distance\n"); printf("Enter 1st String : "); scanf("%s", &v1); printf("Enter 2nd String : "); scanf("%s", &v2); ...
ALGO
0.999819
4.112929
e68d010f-f8ca-4dc5-95c8-4d2a0edd03e6
oscarpobletes/programming-mix
P_queues2.cpp
#include <iostream> #define MAX 100 // Maximum size of the queue using namespace std; struct queue { int elements[MAX]; int front; int rear; }; // Functions to use void insert(struct queue *pq, int x); void remove(struct queue *pq); void print(struct queue *pq); void parking(struct queue *pq, int value);...
ALGO
0.999037
5.940048
2ecb41a5-24df-4c91-9694-da11d3214963
Sancaaa/CSES-Daily
Repetitions.cpp
#include<iostream> using namespace std; int main(){ string s; cin >> s; int len = s.length(); int count = 1; int cbest = 1; for (int i = 0; i < len - 1; i++){ if (s[i+1] != s[i]) { count = 1; } else { count++; if(cbest < count) cbest = count;...
ALGO
0.999902
3.428076
8e5a6668-e13a-41dc-998c-f0f7dfa747c0
QuickLogic-Corp/vtr-verilog-to-routing
vpr/src/route/spatial_route_tree_lookup.cpp
#include "spatial_route_tree_lookup.h" #include "globals.h" SpatialRouteTreeLookup build_route_tree_spatial_lookup(ClusterNetId net, t_rt_node* rt_root) { constexpr float BIN_AREA_PER_SINK_FACTOR = 4; auto& device_ctx = g_vpr_ctx.device(); auto& cluster_ctx = g_vpr_ctx.clustering(); auto& route_ctx =...
ALGO
0.998408
7.492449
06a2afb5-dfe6-48ec-bc24-b6c21225bcdc
ishandutta2007/codeforces
froggyzhang/normal/1422/F.cpp
#include<bits/stdc++.h> using namespace std; #define N 100010 const int mod=1e9+7; typedef long long ll; inline ll read(){ ll x=0,f=1; char c=getchar(); while(c<'0'||c>'9'){ if(c=='-')f=-1; c=getchar(); } while(c>='0'&&c<='9'){ x=(x<<1)+(x<<3)+c-'0'; c=getchar(); } return x*f; } int qpow(int a,int b){ i...
ALGO
0.999898
3.827607
dd2b8b91-f3da-4551-bdd9-f527268d98c8
MiljanMiki/Strukture
Vezbanje II kol/RekurzivanPutDFS/GraphAsListsInt.cpp
#include "GraphAsListsInt.h" #include <iostream> using namespace std; #include "QueueAsArrayInt.h" #include "StackAsArrayInt.h" GraphAsListsInt::GraphAsListsInt() : start(nullptr), nodeNum() { } GraphAsListsInt::~GraphAsListsInt() { } LinkedNodeInt* GraphAsListsInt::findNode(const int& data) const { LinkedNodeInt...
ALGO
0.994035
4.197478
2ff2061b-bcbb-4d64-84c2-ef8133afb440
qj118/alg_exercise
AnifInDhaka.cpp
#include <cstdio> const int maxn = 60; typedef long long LL; LL gcd(LL a,LL b) { return b == 0 ? a : gcd(b,a%b); } int main() { int n,t; while(scanf("%d%d",&n,&t) == 2 && n) { LL pow[maxn]; pow[0] = 1; for(int i = 1;i <= n;i++) { pow[i] = pow[i-1] * t; } LL a = 0; for(int i = 0;i < n;i++) a +...
ALGO
0.999521
4.099368
d96ea0f9-ea43-431f-975a-238d0fcd6b59
sagar98cyber/DSA_TUTORIAL
RECURSION/med/countAllSubsequencesWithSumK.cpp
#include <bits/stdc++.h> using namespace std; void getSum(int sum, int arr[], int n, int &a, int cur, int flag) { if (sum == cur) { a++; } if (n == flag) { return; } for (int i = flag; i < n; i++) { cur += arr[i]; getSum(sum, arr, n, a, cur, i + 1); ...
ALGO
0.999817
4.870211
9a04e437-8ae9-4a9a-904f-e0d6c2ebcaf6
Matteo-Burzio/Esercitazione_5_STL
src/Utils.cpp
#include "Utils.hpp" using namespace std; using namespace Eigen; using namespace PolygonalLibrary; // function which reads the input files bool read_mesh(PolygonalMesh& mesh) { // Read points if(!read_cell0d(mesh)) { return false; } // Read segments if(!read_cell1d(mesh)) { ...
TOOL
0.860969
4.432122
70b5d74a-1e90-44dc-9505-a69ac3ccbeca
Nirav-1999/Small_Programs
C and C++/Competitive/Hackerrank/queens_attack_2.cpp
#include <bits/stdc++.h> using namespace std; vector<string> split_string(string); bool matters(int i,int j,int a,int b){ if(i==a or j==b){ return true; } else if(abs(i-a) == abs(j-b)){ return true; } else{ return false; } } int checkdir(int i,int j,int a,int b){ if(i...
ALGO
0.999586
3.982167
d921239d-0975-422d-9115-7f8898b51059
Artlesbol/Cpp-practice-on-CGplatform
tasks of the 6th week/6-13.cpp
#include<cstdio> #include<iostream> #include<cstdlib> #include<algorithm> #include<cstring> using namespace std; int main() { int m,ans=0; cin>>m; for(int i=0;i<=m;i++) { for(int j=i+1;j<=m;j++) { for(int k=j+1;k<=m;k++) { if(i!=0) ...
ALGO
0.999367
3.813492
0ec11182-b194-4231-9054-ce20818c006a
Dtananaev/calibration
src/toolsApp.cpp
#include "tools.h" typedef struct{ float x; float y; }point; bool read_file(std::string filename, std::vector<point> &output){ std::ifstream file_stream_pose(filename); if (file_stream_pose.is_open()) { // check if file exsist std::string line; while (std::getline(file_stream_pos...
TOOL
0.958874
3.537531
48b53514-5399-4a9a-8c1d-eb126f8699d0
hanzohasashi33/Competetive_programming
Geeks4Geeks/Binary Trees/Count_Leaves.cpp
//Initial Template for C++ #include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int data; struct Node* left; struct Node* right; Node(int x){ data = x; left = NULL; right = NULL...
ALGO
0.999706
4.470506
44f6e35b-c301-459f-818c-f0e5c7644440
Manzood/Google-Code-Jam
2022/Round-2/B/B.cpp
#include "bits/stdc++.h" #ifdef local #include "custom/debugger.h" #else #define debug(...) 42; #endif using namespace std; #define int long long vector<vector<int>> grid1; vector<vector<int>> grid2; void draw_circle_perimeter(int R, int actual_radius) { for (int x = -R; x <= R; x++) { int y = (int) (sqr...
ALGO
0.995698
4.086845
5be0efa9-1c88-4523-8fa6-1cb1312a6e94
clmccart/KD-Tree---C-
render.cpp
/* render.cpp * * visualization tool for rendering a kd tree in 2D space * and coloring it to look like a Mondrian painting. * * * created by bridget went and claire mccarthy 3/18/17 * last modified 3/28/17 * * cs3250: computational geometry, spring 2017 * laura toma * */ //#include "rtimer.h" #include "kd.h" #i...
ALGO
0.964609
4.194547
6891e1a3-0854-4432-b4b6-28c6fa0b3c6f
tzhuan/cmlib
lib/image/test/test-algorithm.cpp
#include <iostream> #include <iterator> #include <algorithm> #include <cmlib/image/Algorithm.h> #include <cmlib/image/Functional.h> using namespace std; using namespace cmlib::image; int main() { double array1[] = {1, 2, 3, 4, 5}; int array2[] = {2, 3, 4, 5, 6}; size_t size = sizeof(array1)/sizeof(array1[0]); cm...
ALGO
0.970799
3.656451