uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
1069e8b8-2e3a-4d76-8c9f-80b0c712656e
kuwako/atcoder
src/main/cpp/algorithm/MinimumSpanningTree.cpp
#include<iostream> using namespace std; static const int MAX = 100; static const int INFTY = (1<<21); static const int WHITE = 0; static const int GRAY = 1; static const int BLACK = 2; int n, M[MAX][MAX]; int prim() { int u, minv; ind d[MAX], p[MAX], color[MAX]; for (int i = 0; i < n; ++i) { ...
ALGO
0.999966
3.711565
71a3cb14-b740-4c4a-a16d-b182384e42e7
besforyou999/Baekjoon
9625/main.cpp
#include <iostream> using namespace std; int a_num = 1, b_num; void operate() { int temp = a_num; a_num = b_num; b_num += temp; } int main (void) { int K; cin >> K; for (int i = 0; i < K ; i++ ) operate(); cout << a_num << " " << b_num; return 0; }
ALGO
0.998735
3.290806
8f963459-3dc9-4d9d-94b1-01a87990d6d7
Ica-scorp/Past_Code
sum of medians 线段树.cpp
#include "bits/stdc++.h" using namespace std; const int MAXN = 100010; long long sum[4*MAXN][5]; int cnt[4*MAXN]; int tp[MAXN]; int num[MAXN]; int shu[MAXN]; int tot,Q; void push(int i) { cnt[i]=cnt[i<<1]+cnt[i<<1|1]; for(int j=0;j<=4;j++){ sum[i][j]=sum[i<<1][j]+sum[i<<1|1][((j-cnt[i<<1])%5+5)%5]; } } ...
ALGO
0.999709
3.506877
56949f24-5587-4256-ae66-9f81f534a7b9
HPC-Fortran2CPP/Fortran2Cpp
data/StarCoder2/readable_format_HPEC/cpp/file130.cpp
#include <iostream> #include <omp.h> int main() { int section_count = 0; omp_set_dynamic(false); omp_set_num_threads(1); #pragma omp parallel { #pragma omp sections firstprivate(section_count) { #pragma omp section { section_count = section_...
TOOL
0.953283
4.230919
310553ab-49ea-4eae-9170-cd05aa1cade0
i-sunny/leet_code
3 Longest Substring Without Repeating Characters.cpp
class Solution { public: int lengthOfLongestSubstring(string s) { string t; int len = 0; for(string::size_type ix = 0; ix != s.size(); ++ix) { int pos = t.find(s[ix]); if(pos != -1){ //有重复字符 t.erase(0, pos + 1); } t.append(1, s[ix]); if(len < t.size()) le...
ALGO
0.999461
5.69608
8bb5a4af-2bd1-48bb-b1a5-3689fe400f40
raincross7/code-similarity
codes/train_code/problem183/problem183_434.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <queue> #include <stdlib.h> #include <map> #include <cmath> #define MOD_P 1000000007 #define PI 3.14159265358979 #define ll long long using namespace std; int Msquare_int(int x) { return (ll)x* (ll)x% MOD_P; } int Mpower_int(int x,...
ALGO
0.99996
4.125631
8f183ec2-90ec-4090-a5fa-118def4253a3
josuerom/Competitive-Programming
Training/UVa/Others/00640 - Self Numbers.cpp
#include <bits/stdc++.h> #define endl '\n' #define debug(X) cout << #X << " = " << X << endl #define fori(i,b,e) for (int i = (b); i < (e); ++i) using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; const int oo = 1e9, MX = 1e6; int f(int x) { int ans = x; while (x > 0) {...
ALGO
0.999007
4.247176
b8fefed5-5693-4426-a8df-ad56562da7b3
AlGhani26/LatihanCoding-DDP-2021
FungsiRight.cpp
/* Program: Validasi_Right_Saiful.c * Deskripsi: Menampilkan N buah karakter terkanan dari array karakter * Nama: Muhamad Naufal Al.Ghani * Tanggal/versi: 12112021/v.1 */ #include <stdio.h> #include <string.h> int main (){ /* kamus Data */ char S[30]; char H; int N; int lenght; i...
ALGO
0.999451
3.200459
18128e5b-afd9-483b-a15e-674a4004fa47
F0RE1GNERS/ACMSteps
HDU/1267.cpp
// [Auto Archived] // Submit: 2016-10-25 21:50:39 // Time: 0MS // Memory: 1408K #include<stdio.h> int main() { __int64 a[21][21]={0}; int m,n,i,j; for(i=1;i<21;i++) { a[i][0]=1; } for(i=1;i<21;i++) { for(j=1;j<=i;j++) { a[i][j]=a[i-1][j]+a[i][j-1]; ...
ALGO
0.999805
3.893703
93ada80f-ef27-4937-8921-28fb8aa4e09a
sohailokzz/sign_in_up_UI
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.998859
6.785645
b3003424-3d39-4253-a482-092388519b20
VenkataAnilKumar/LeetCode
C++/mini-parser.cpp
// Time: O(n) // Space: O(h) /** * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate about its implementation * class NestedInteger { * public: * // Constructor initializes an empty nested list. * NestedInteger(); * * // Constructor in...
ALGO
0.911659
6.68756
a26cb287-5207-44a6-b6bb-9b6b3c8a46a1
edemir1233/codigos
PBDS.cpp
#include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <bits/stdc++.h> #define INI cin.tie(0)->sync_with_stdio(0); #define fore(i,a,b) for(int i=a;i<=b;i++) using namespace __gnu_pbds; using namespace std; typedef tree<int,null_type,greater_equal<int>,rb_tree_tag,tree_order_statistics_no...
ALGO
0.999714
4.035164
9bdf167d-66f9-413e-b8f8-ee674a6e19cd
sonapraneeth-a/competitive-programming_submissions
platforms/binarysearch/practice/hard/1377__update-list-to-make-it-strictly-increasing/solutions.cpp
// clang-format off /** * FILE DESCRIPTION * * Filename: 1377__update-list-to-make-it-strictly-increasing/solutions.cpp * Created on: 05 September 2021 * Last modified: 05 September 2021 * Author: sonapraneeth_a * Description: BinarySearch submission for 'Update List to Make It Strict...
ALGO
0.999996
5.595402
0dd66c15-b7a7-43d4-89cb-7d787242a2f2
ashusnapx/Placement_Preparation
02_Dynamic_Programming/04_frogJump_followUp.cpp
/* In this questtion basically the frog can jump upto "K" steps, ie. it can either go i+1,i+2,i+3,...,i+k (this k will be provided in the argument of function). Space optimisation isn't possible, coz we don't know what the K would be. */ /* Let me give a try */ int frogJump(int numberOfStairs, int stepsPossible, vector...
ALGO
0.999975
4.715136
d790d2f8-36fb-4165-ab43-c1a4712adddd
rohanberadev/DSA-Foundation
09_Sliding_window_and_2_pointers/01_Medium_problems/06_Count_number_of_nice_subarray/Brute/main.cpp
#include <bits/stdc++.h> using namespace std; int numberOfSubarrays(vector<int> nums, int k) { int n = nums.size(); int cnt = 0; for (int i = 0; i < n; i++) { int temp = 0; for (int j = i; j < n; j++) { if (temp > k) break; if (nums[j] % 2 != 0) temp++; if (temp == k...
ALGO
0.999987
5.20191
a7a9803f-b35b-45c4-884f-e45ff702e017
thanyakwaonueng/competitive-programming-libraries
kmp.cpp
int b[N]; int cnt = 0; void knp_proc(string t,string p){ int i=0,j=-1;b[0] = -1; while(i<(int)p.length()){ while(j>=0 && p[i]!=p[j]) j =b[j]; ++i;++j; b[i] = j; } } void knp_search(string t,string p){//count number of occurence of p in t int i=0,j=0; while(i<(int)t.length...
ALGO
0.999857
4.475948
8bff7ba7-cc59-4898-adb5-c5081ffb0b4c
Pooh1223/Online-Judge
Codeforces/Group Contests/835B.cpp
#include <bits/stdc++.h> using namespace std; int t[10]; int main(){ int k; string s,a; cin >> k >> s; a = s; int sum = 0; for(int i = 0;i < s.size();++i){ sum += s[i] - '0'; t[s[i] - '0']++; } if(sum >= k) cout << 0 << "\n"; else { int cnt = 0; sum = k - sum; for(int i = 0;i <= 9 && sum > 0;++i){ ...
ALGO
0.999943
3.564082
ac9e4973-af81-45e2-97e9-7bf100e57fcb
cdgiessen/AdventOfCode2021
src/day20.cpp
#include "common.h" #include "inputs/day20.txt" struct Grid { template <size_t dim> Grid(std::array<const char *, dim> input, const char *algorithm, size_t num_passes) : algorithm(algorithm), num_passes(num_passes) { num_passes *= 4; // account for both + and - sides of grid rows.r...
ALGO
0.999909
6.060506
e650f07a-7b82-4510-83b3-1f966f586aea
Djokovic0311/LeetCode
problems/domino_and_tromino_tiling/solution.cpp
class Solution { public: int numTilings(int n) { unsigned int dp[n + 3]; dp[0] = 1; dp[1] = 2; dp[2] = 5; for (int i = 3; i < n; i ++) { dp[i] = (2 * dp[i - 1] + dp[i - 3]) % 1000000007; } return dp[n - 1]; } };
ALGO
0.999953
5.812681
6314a1d3-d76d-4041-8b58-9d50ec7a6d3f
ChenYangyao/project-leetcode-solution
cpp/problem747.cpp
#include <mystd.h> using namespace std; /** * just find the largest and next-largest number */ class Solution { public: int dominantIndex(vector<int>& nums) { int max1 = nums[0], max2 = -1, indx = 0; for (int i = 1, n = nums.size(); i < n; ++i){ if( nums[i] > max1 ){ max2 = max1; max1 = ...
ALGO
0.999953
5.272015
de5eb5d9-cfa6-465f-9e46-aa38127ce1a4
OwaisK4/Competitive-Programming
Teknofest/Teknofest'24/Code to conquer/D_Scientific_Conference.cpp
#include <bits/stdc++.h> using namespace std; signed main() { int t = 1; // cin >> t; while (t--) { int n; cin >> n; vector<pair<int, int>> a(n); for (int i = 0; i < n; i++) { cin >> a[i].first >> a[i].second; } sort(a.begin(), a.end(), [](pair<int...
ALGO
0.999913
4.779226
66cc80ee-b731-4dce-8c79-91acba269533
prajjwal1999/SORTED-DOUBLY-LINKED-LIST
In-place conversion of Sorted DLL to Balanced BST.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; Node *prev; }; int countNodes(Node *head); Node *sortedListToBSTRecur(Node **head_ref, int n); Node *sortedListToBST(Node *head) { int n = countNodes(head); return sortedListToBSTRecur(&head, n); } Node *sorted...
ALGO
0.999999
5.614499
afd05819-42ad-44d4-9889-83107cb79d96
Dup4/Leetcode
leetcode/biweekly-contest/76/d/solution.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define endl "\n" #define fi first #define se second #define all(x) begin(x), end(x) #define rall rbegin(a), rend(a) #define bitcnt(x) (__builtin_popcountll(x)) #define complete_unique(a) a.erase(unique(begin(a), end...
ALGO
0.999871
5.315473
615837f6-f1ec-4861-b936-739f719ce47d
Chenchunxuan/rattle-iros-2022
rattle_rrt/bullet3/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorldMt.cpp
#include "btDiscreteDynamicsWorldMt.h" //collision detection #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/CollisionShapes/btCollisi...
ALGO
0.988835
3.234133
cbf1e524-e251-422e-a8c5-04d0ab825e47
codingwill/competitive-programming
COMPFEST 2020/Courses/Gemastik/I.cpp
#include <bits/stdc++.h> /* ** Author: wkwkwill (Willy I. K.) ** 2020/09/06 */ using namespace std; using ll = long long int; ll BIG = 1e18 + 1; ll MOD = 998244353; void solve(); ll fastpow(ll x, ll y, ll n = BIG) { x %= n; ll ans = 1; while (y > 0) { if (y & 1) ans = (ans * x) % n; ...
ALGO
0.999967
4.101852
bfecbcd7-e97d-49fe-a052-d7330bc47fa6
1Rayquaza/InterviewBit
Dynamic Programming/0-1 Knapsack.cpp
// Approach 2: Memoization int static t[1001][1001]; // Initialisation yahan ho jaata hai but value set main fn. mei krna hota hai int mx(vector<int> &val, vector<int> &wt, int C, int n){ if(n == 0 || C == 0) return 0; if(t[n][C] != -1){ return t[n][C]; } if(wt[n-1] <= C){ return t...
ALGO
0.999998
5.415792
a3a275bd-8d02-463c-bee8-31e6aa0d842c
puneetcoder31/cpp_programing
sum_recursion.cpp
#include<iostream> using namespace std; int sum(int n){ if (n==1) return 1 ; return (n + sum(n-1)); } int main() {int x ; cout<<"enter value of n="; cin>>x; cout<<sum(x); }
ALGO
0.999747
3.758267
5a110047-bfd6-472b-9fc5-6166dba2f283
pratyaksh1610/Codeforces
Implementation/A - Ultra-Fast Mathematician.cpp
//https://codeforces.com/contest/61/problem/A #include <iostream> #include <vector> using namespace std; int main() { string a, b; vector<int> c; cin >> a >> b; for (int i = 0; i < a.size(); i++) { if (a[i] == b[i]) c.push_back(0); else c.push_back(1); ...
ALGO
0.999993
4.017488
d8f4d524-f4a9-464e-a340-4d450798ec53
gbulmer/openstm32sw
stm32f4/libmaple/wirish/wirish_shift.cpp
#include "wirish.h" void shiftOut(uint8 dataPin, uint8 clockPin, uint8 bitOrder, uint8 val) { int i; for (i = 0; i < 8; i++) { if (bitOrder == LSBFIRST) { digitalWrite(dataPin, !!(val & (1 << i))); } else { digitalWrite(dataPin, !!(val & (1 << (7 - i)))); } ...
TOOL
0.93188
4.988724
f1f2ed6b-f991-4705-a185-ce3be839d899
harshabangi/leetcode
cpp/maximum_earnings_from_taxi.cpp
// // Created by Harsha Vardhan on 07/08/22. // #include <iostream> #include <vector> #include <unordered_map> using namespace std; long long maxTaxiEarningsHelper(int n, vector<vector<int>> &rides, int i, int prevRide, unordered_map<string, int> &umap) { if (i >= rides.size()) return 0; string k = to_string...
ALGO
0.993276
5.569646
689286a7-bed0-403b-b8c7-eb6f8f871032
emn2/Competitive-Programming-Algorithms
Problems/CSES/Range Queries/range_updates_and_sums.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; const int MAXN = 3e5; const ll INF = 1e18 + 5; struct Node{ ll sum; ll setAll; ll increment; bool setAllValid; Node(){ sum = setAllValid = increment = 0; } void reset(){ setAllValid = increment = 0;...
ALGO
0.99935
5.398365
f45d06fa-bab1-45ba-b637-61c2bf5d2c2b
ishandutta2007/codeforces
sd0061/normal/387/D.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <queue> #include <cmath> using namespace std; #define N 505 #define M 200005 int n , m , pre[N] , mcnt; bool a[N][N]; struct edge { int x , next; }e[N * N]; int re[N]; bool f[N]; bool find(int x) { for (i...
ALGO
0.999928
3.468043
dc398aa0-c2e2-4c83-9b3c-dbf90b25992a
TayabAmir/LeetCode_Problems
0926-find-and-replace-pattern/0926-find-and-replace-pattern.cpp
class Solution { public: bool Isomorphs(string s,string t) { map<char,char> iso; for(int i=0;i<s.length();i++) if(iso.find(s[i])==iso.end()) iso[s[i]] = t[i]; else if((iso[s[i]] != t[i])) return false; return true; } vector<...
ALGO
0.999956
5.912916
3ec87cc4-a0dc-4e67-8009-eacd46d3aa94
neonux/mozilla-all
gfx/angle/src/compiler/ForLoopUnroll.cpp
#include "compiler/ForLoopUnroll.h" namespace { class IntegerForLoopUnrollMarker : public TIntermTraverser { public: virtual bool visitLoop(Visit, TIntermLoop* node) { // This is called after ValidateLimitations pass, so all the ASSERT // should never fail. // See ValidateLimitations:...
ALGO
0.992023
7.481085
898efec2-859c-4282-9257-e7243d1fed25
reimen5125/libmixmod
SRC/mixmod/Kernel/Parameter/BinaryParameter.cpp
#include "mixmod/Kernel/Parameter/BinaryParameter.h" #include "mixmod/Kernel/Parameter/BinaryEkjhParameter.h" #include "mixmod/Kernel/IO/BinaryData.h" #include "mixmod/Kernel/IO/BinarySample.h" #include "mixmod/Kernel/Model/Model.h" #include "mixmod/Kernel/Model/ModelType.h" #include "mixmod/Kernel/IO/Partition.h" #inc...
ALGO
0.992166
5.286751
e4c9282c-72a3-42a3-a28d-a8bce346dfc5
alexandraback/datacollection
solutions_2749486_0/C++/akira00000/b.cpp
// b.cpp #include <iostream> #include <string> using namespace std; int main() { int T; int X, Y; cin >> T; for (int t = 1 ;t <= T ; t++) { cin >> X >> Y; string ans = ""; for (int i = 0 ; i < abs(X) ; i++) ans += (X > 0 ? "WE" : "EW"); for (int i = 0 ; i < abs(Y) ; i++) ans += (Y > 0 ? "SN" : "NS...
ALGO
0.999819
3.622129
dbc4820e-edf5-48c9-ae60-4ab37eaf5bee
cfreeze111/ncnn_face_rec
third_party/ncnn/src/layer/arm/mish_arm_asimdhp.cpp
#include "mish_arm.h" #include <math.h> #if __ARM_NEON #include <arm_neon.h> #include "neon_mathfun.h" #if __ARM_FEATURE_FP16_VECTOR_ARITHMETIC #include "neon_mathfun_fp16s.h" #endif #endif // __ARM_NEON namespace ncnn { #if __ARM_FEATURE_FP16_VECTOR_ARITHMETIC int Mish_arm::forward_inplace_fp16s(Mat& bottom_top_bl...
ALGO
0.931441
6.069646
bc7140a4-d311-42e9-91cf-a53f4dd76114
NikitaUssyukin/PP1_2023_Fall
Practice/G2/Week4/68.cpp
#include <iostream> using namespace std; int main(){ int n, counter = 0; cin >> n; int a[n]; for (int i = 0; i < n; i++){ cin >> a[i]; } for (int i = 1; i < n-1; i++){ if (a[i]>a[i+1] && a[i]>a[i-1]) { counter++; } } cout << counter << e...
ALGO
0.999938
4.282291
e833dfea-abfd-423e-b1ed-fedfea2795c4
tanamaay/DSA_SUPREAM-BATCH
Introduction_to_Arrays_10th February 2023/Arrays_and_functions.cpp
#include<iostream> using namespace std; // Here original array is passed by default void incr(int arr[],int size){ // good practice to pass size along with the array arr[0] = arr[0] + 10; } int main(){ int arr[5] = {1,2,3,4,5}; cout<<arr[0]<<endl; // 1 is printed incr(arr,5); cout<<arr[0]; // Actua...
TOOL
0.855583
4.903379
528ee7ed-a796-405f-8a28-e935988d7780
PSCoder10462/dsa
trees/replace node with depth.cpp
/************************************************************* Following is the Binary Tree node structure. class BinaryTreeNode { public : T data; BinaryTreeNode<T> *left; BinaryTreeNode<T> *right; BinaryTreeNode(T data) { this -> data = data; ...
ALGO
0.99993
5.863677
dfe0ce83-2e9b-419b-b0a8-542cccb491bb
khaledmorshed/All-programming-sites
LightOJ/1182.cpp
#include<iostream> #include<vector> using namespace std; void binary(long long int, long long int); void oddEven(int,long long int); int main(){ int n; cin>>n; vector <long long int> vec(n); for(int i = 0; i < n; i++){ cin>>vec[i]; binary(vec[i], i+1); } } void binary(lon...
ALGO
0.999866
4.145606
fddef6aa-5f51-4b42-9e17-8deee9e0f95b
ssb001111/PS
Baekjoon/Greedy/11508.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { cin.tie(NULL); ios_base::sync_with_stdio(false); int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++){ cin >> arr[i]; } stable_sort(arr, arr+n, greater<int>()); int ...
ALGO
0.999968
4.309788
a237cda1-9eef-44c5-80c9-4f7536ece9cd
fursund/EmguCV-Unity
opencv/src/ml/mlnbayes.cpp
#include "_ml.h" CvNormalBayesClassifier::CvNormalBayesClassifier() { var_count = var_all = 0; var_idx = 0; cls_labels = 0; count = 0; sum = 0; productsum = 0; avg = 0; inv_eigen_values = 0; cov_rotate_mats = 0; c = 0; default_model_name = "my_nb"; } void CvNormalBayesClass...
ALGO
0.995101
6.161754
51d3e833-b62e-4af6-b0cf-883122e48570
yadav-ankit/My-Programms
ankit/Basics/sort mine LL.cpp
#include <stdio.h> #include <stdlib.h> /* structure of a linked list node */ struct node { int data; struct node *next; }; void swap(int *p, int *q) { int c=*p; *p=*q; *q=c; } void sort(struct node *head) { struct node *t=head; struct node *p=head,*a; while(t!=NULL) { a=t; p=t->next; while...
ALGO
0.999998
4.680239
eca4f7ce-8891-4ef8-84ce-b4902044466c
DamianArado/LeetCode-tracker
2351-first-letter-to-appear-twice/2351-first-letter-to-appear-twice.cpp
class Solution { public: char repeatedCharacter(string s) { int freq[26] = {}; for(const char &c : s) { freq[c - 'a']++; if(freq[c - 'a'] >= 2) return c; } return 'a'; } };
ALGO
0.99991
5.49276
74eb0c15-5113-4d3e-9ce9-0414f40fac00
kovid-sharma/LeetCode
2062-count-vowel-substrings-of-a-string/2062-count-vowel-substrings-of-a-string.cpp
class Solution { public: bool isVowel(char c) { return c=='a' or c=='e' or c=='i' or c=='o' or c=='u'; } int countVowelSubstrings(string word) { int n=word.size(); int cnt=0; unordered_set<char>st; for(int i=0;i<n;i++) { for(int j=i;j<n;j++) ...
ALGO
0.999946
6.485545
e9df53ab-3710-4660-8e94-a5459b388248
osirisgothra/boostdoc-qch
libs/msm/doc/HTML/examples/MsmSimpleFunctors.cpp
#include <boost/msm/back/state_machine.hpp> #include <boost/msm/front/state_machine_def.hpp> #include <boost/msm/front/functor_row.hpp> namespace msm = boost::msm; namespace mpl = boost::mpl; using namespace msm::front; #include <iostream> #ifdef WIN32 #include "windows.h" #else #include <sys/time.h> #endif namespac...
TOOL
0.85697
6.905038
ef41bf6c-f816-4b07-86a8-00bfc32344a6
vrbrdr/otus4
Physics.cpp
#include "Physics.h" #include "Dust.hpp" double dot(const Point& lhs, const Point& rhs) { return lhs.x * rhs.x + lhs.y * rhs.y; } Physics::Physics(double timePerTick) : timePerTick{timePerTick} {} void Physics::setWorldBox(const Point& _topLeft, const Point& _bottomRight) { topLeft = _topLeft; bottomRigh...
ALGO
0.973887
5.523773
51f65096-4e2e-40ca-8c42-84d89509ba53
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3871_8.cpp
#include <bits/stdc++.h> using namespace std; long long n, k; vector<long long> numbers; long long check(long long med) { long long work = 0; for (long long i = n / 2; i < n; i++) { if (med - numbers[i] > 0) { work += (med - numbers[i]); } if (work > k) { return false; } } return tru...
ALGO
0.999995
5.032225
714697bf-6347-4bc7-84f1-e7e7abe59af8
Shell-Wataru/AtCoder
Codeforces/ECR68/A.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <iomanip> #include <cmath> using namespace std; using ll = long long; int main() { // 整数の入力 long long T; cin >> T; for(int i = 0;i< T;i++){ ll n,x; cin >> n >> x; ...
ALGO
0.999169
3.989033
b45c3f26-faf6-4a80-aa7c-520c888d6f83
halfbloodprince16/CODE-FORCE-AND-HACKER-RANK-SOLUTIONS
matrix.cpp
#include<iostream> using namespace std; int enter(); int add(int,int); int sub(int); int mul(int); int main() { int n,i,j,k,a; cout<<"enter equivalent no. of rows and columns"<<endl; cin>>n; int x[n][n],y[n][n],z[n][n]; do { cout<<"\n Hit 1 To Enter both the matrices"; cout<<"\n Hit 2 for addition"; cout<<"\n Hi...
ALGO
0.993744
3.123119
6c591667-4593-41af-80f8-70c187429a04
joshualoehr/neural-network-from-scratch
eigen/bench/product_threshold.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #define END 9 template<int S> struct map_size { enum { ret = S }; }; template<> struct map_size<10> { enum { ret = 20 }; }; template<> struct map_size<11> { enum { ret = 50 }; }; template<> struct ...
TOOL
0.948382
5.102006
baffd0ed-beda-46a8-9359-add21b5af497
saurabhjn76/Competitive-Coding
CodeChef/LongChallenge/JAN17/CATSDOG.cpp
#include "bits/stdc++.h" using namespace std; # define s(n) scanf("%d",&n) # define sc(n) scanf("%c",&n) # define sl(n) scanf("%lld",&n) # define sf(n) scanf("%lf",&n) # define ss(n) scanf("%s",n) # define I...
ALGO
0.99986
3.620092
3dd69500-86ad-4efa-af91-768a745bdfb0
LMFRomero/codingForInterview
hackerrank/OneWeekChallenge/Day5/queueWithTwoStacks.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <stack> using namespace std; stack<int> f; stack<int> b; void back2front() { while (b.empty() == false) { f.push(b.top()); b.pop(); } } void enqueue(int n) { b.push(n); } void dequeue(...
ALGO
0.999005
4.602233
969e734e-a1a2-48d3-be7b-a1a3c59ba808
davidabril01/Proyects
Ingenieria Informatica Proyectos y Actividades/Programacion por Procedimiento/shellsort.cpp
#include <iostream> #include <vector> // Implementación del algoritmo de ordenamiento Shell Sort void shellSort(std::vector<int>& arr) { int n = arr.size(); // Comenzar con un tamaño de brecha grande y reducirlo en cada iteración for (int gap = n / 2; gap > 0; gap /= 2) { // Realizar el ordenami...
ALGO
0.999958
6.064732
8d8e3a88-982a-4083-b515-7a1cb05dc2e9
gmaheswaranmca/c2512
phase1/learnings/Day15/cpp/15v2/Circle.cpp
#include <iostream> #include "Circle.h" using std::cout; float Circle::findArea() { return 3.14 * radius * radius; } Circle::Circle(int p_radius) { radius = p_radius; } void Circle::print() { cout << "[radius=" << radius << " ft]"; } bool Circle::isGreaterThan(Circle& other) { float area1 = f...
TOOL
0.976011
4.961664
4e29a1b3-e081-44f1-973b-ec27832a0c08
N3X15/VoxelSim
ODE/OpenDynamicsEngine/contrib/dRay/Test/test_ray.cpp
#include <ode/ode.h> #include <dRay.h> #include <drawstuff/drawstuff.h> #ifdef _MSC_VER #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints #endif // select correct drawing functions #ifdef dDOUBLE #define dsDrawBox dsDrawBoxD #define dsDrawSphere dsDrawSphereD #define dsDrawCylinder...
ALGO
0.919479
4.297994
1901a083-38f4-46a1-9664-fad71e5a9530
PanshulKantan/CPP_command_practice
functiontemplate.cpp
//function template is a sort of datatype which accepts many types of data like int, double, char, string, etc. #include <iostream> template <typename T> //if we want 2 different kind of inputs, we use different templates or else inputs can be of any type but they all have to be of the same one T maxtemplate(T x, T y)...
ALGO
0.960061
4.331046
633b527e-167a-40b5-9534-384b17e969e1
rengarcia/Data-Structure
Tercer Parcial/Proyectos/Lopez Zambrano/SFML_visual/ejercicios/ejercicio 116/ejercicio 116.cpp
// ejercicio 116.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include "ingreso.h" #include "Menu.h" #include "Vector.h" #include "Operaciones.h" using namespace std; void menuGeneral(); int main() { menuGeneral(); system("pause"); return 0; } void m...
TOOL
0.920913
3.693472
45193985-08fe-414f-9a27-ae8edee304e8
FreCap/telnet-boost
ext/boost_1_59_0/libs/multiprecision/example/gmp_snips.cpp
#include <boost/multiprecision/gmp.hpp> #include <boost/math/special_functions/gamma.hpp> #include <iostream> void t1() { //[mpz_eg //=#include <boost/multiprecision/gmp.hpp> //=#include <iostream> //= //=int main() //={ using namespace boost::multiprecision; mpz_int v = 1; // Do some arithmetic: for(...
TOOL
0.958055
4.264435
271981aa-90ab-4abb-adba-1b4104629d07
abm6/oops
OOP LAB/LAB3/5.cpp
// // Define a class named as FRACTION that contains two data members // that represent the // numerator and denominator of a fraction. //By defining necessary member functions, write a // program to add, subtract and multiply two fractions. The add accepts the objects using callby- value technique, subtract using ca...
TOOL
0.969636
5.615443
6aa79699-a03b-4982-9860-a4b8989166bc
liujiaxin999/CodingInterviews2
04/partially_sorted_m_ru.cpp
#include <vector> #include <algorithm> #include <iostream> using namespace std; class Solution { public: //ϳ bool findNumberIn2DArray(vector<vector<int>>& matrix, int target) { bool is_found=false; if(matrix.empty() || matrix[0].empty())//жǷΪ return is_found; if(target>matr...
ALGO
0.999891
5.322917
a38b68b8-5451-4e85-bf6c-5e1a74b2c1c1
alirezafour/practice
cpp/Practice/Seasen 1/Section 1/MojsazanPractice/35-odd between M and N.cpp
#include <cstdio> int main(int argc, char const *argv[]) { int min(0), max(0); printf("Insert N: "); scanf("%d", &min); printf("Insert M: "); scanf("%d", &max); if (max < min) { int temp(0); temp = min; min = max; max = temp; } for (int i = min; i < max; ++i) { if (i % 2 != 0) { printf("fi...
ALGO
0.998548
3.213128
2fe22308-8987-482c-a3a7-3ca25bc27cdd
Nafyaz/my-codes
Codeforces/0999E.cpp
#include<bits/stdc++.h> using namespace std; #define ff first #define ss second int vis[5003]; vector<int> adj[5003]; stack<int> stk; void dfs1(int s) { vis[s] = 1; for(auto u : adj[s]) { if(!vis[u]) dfs1(u); } } void dfs2(int s) { vis[s] = 1; for(auto u : adj[s]) { ...
ALGO
0.999849
3.705152
403a9ab8-aeb5-4e34-9886-9714c00b0396
ebisenttt/atcoder
abc159/d/main.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define FOR(i, m, n) for(int i = m; i < n; i++) #define ALL(x) (x).begin(),(x).end() #define SIZE(x) ((ll)(x).size() #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x)) #define INF 1e9 typedef long long ll; t...
ALGO
0.999809
3.338247
94cc4976-e0a4-42b2-9325-391ea0ad7be3
MariaChrysafis/CompetitiveProgramming
Codeforces/1322B.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cassert> #include <queue> #include <set> #include <stack> #include <map> #define ll long long using namespace std; vector<int> vec; multiset<int> ms; void print(){ for(int i: vec) cout << i << ' '; cout << endl; } int binSearch(int l, int r,...
ALGO
0.999927
4.186764
2052d1d8-3fcb-43b0-8b01-3d77ebe784d1
niquefa/code-forces-playground
problem-solving-workspace/workspace/cf1691a/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int test_cases; cin >> test_cases; for( int current_test = 1; current_test <= test_cases; ++ current_test ) { int n; cin >> n; vector<int> a(n); for( int i = 0; i < n; ...
ALGO
0.999652
4.733535
cfe3ddd4-b451-4091-8831-b66431817c05
C-2024-4-6/8209240618ChenGan
实验3.5.cpp
#include<iostream> using namespace std; unsigned long long peaches(unsigned int day) { if (day == 10) { return 1; } else { return(peaches(day + 1) + 1) * 2; } } int main() { int sum = 0; int day = 1; sum = peaches(day); cout << "Ϊ" << sum << endl; }
ALGO
0.99968
3.394433
66aed78a-1a32-494b-a19f-7922f7414c1c
kilchenk/CPP
CPP09/ex01/RPN.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* RPN.cpp :+: :+: :+: ...
TOOL
0.883537
5.243298
d1db261d-99a4-4af0-b74c-2e0da8d1c903
robodrive-24/toolkit
track-5/BEVFusion/mmdet3d/ops/roiaware_pool3d/src/points_in_boxes_cpu.cpp
#include <assert.h> #include <math.h> #include <stdio.h> #include <torch/extension.h> #include <torch/serialize/tensor.h> #define CHECK_CONTIGUOUS(x) \ TORCH_CHECK(x.is_contiguous(), #x, " must be contiguous ") // #define DEBUG inline void lidar_to_local_coords_cpu(float shift_x, float shift_y, float rz, ...
ALGO
0.966004
6.028149
ff5ce5df-45bc-4d05-99fd-2f7e3ade0858
Harsh20221/DSA
Stack/Stack Simplified.cpp
#include <iostream> #include <stdlib.h> using namespace std; int s[100] = {}; int size = 100; int top = -1; void push(int x) { int size = 100; if (top == size - 1) { cout << "The Stack is Full" << endl; } else { top++; s[top] = x; } } void pop() { ...
ALGO
0.991801
4.148206
9ecb6ea5-de57-4821-99eb-2baab9c14fe4
codewhiip/DSA-CN
3.Recursion/count_zeros.cpp
#include<iostream> using namespace std; int countZeros(int n) { if(n==0) return 0; if(n%10==0) return 1+countZeros(n/10); return countZeros(n/10); } int main() { int n; cin>>n; // string s = to_string(n); int val=0; // int len = s.length(); cout<<countZeros(n)<<endl; }
ALGO
0.999725
4.40396
14465f98-6f13-42ba-bf66-c6b3e78169e3
ahmedmostafa10/Problem-Solving
Farm Crops/Farm Crops.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include <algorithm> #include<vector> #define endl '\n' #define all(v) v.begin(),v.end() #define allr(s) s.rbegin(),s.rend() #define RT(s) return cout<<s,0 #define sz(s) (int)(s.size()) #define out(n) for(int i = 1; i <= n; i++) cout<<v[i]<<'\n'; //#define PI acos(...
ALGO
0.999997
3.747649
cc954a2e-6e0d-4276-9fc9-bddad7fff17d
yjp20/codeforces-solutions
460/b/b.cpp
// youngjinp20 // 2020 05 #include <bits/stdc++.h> #define by(x) [](const auto& a, const auto& b) { return a.x < b.x; } #define byr(x) [](const auto& a, const auto& b) { return a.x > b.x; } #define smax(a, b) ((a) < (b) ? ((a)=(b), true) : false) #define smin(a, b) ((a) > (b) ? ((a)=(b), true) : false) #define imie(.....
ALGO
0.999695
3.361944
d328f215-c058-47bb-9976-aabc30facdc1
MaggieLee01/Coding
DoublePointer03_Rainwater/Rainwater.cpp
// https://leetcode-cn.com/problems/trapping-rain-water/ LeetCode 42 // n ǸʾÿΪ 1 ӵĸ߶ͼ㰴еӣ֮ܽӶˮͼ // [0,1,0,2,1,0,1,3,2,1,2,1] ʾĸ߶ͼ£Խ 6 λˮɫֱʾˮ //һֱջķƥƣû //https://leetcode-cn.com/problems/trapping-rain-water/solution/xiang-xi-tong-su-de-si-lu-fen-xi-duo-jie-fa-by-w-8/ //͵ջƣԺٿ #include<vector> #include<algorithm> #include...
ALGO
0.999936
6.353609
32143beb-ee31-46b5-a9e5-59ef71d17796
penguin72487/programing
vs-code/矩陣計算機.cpp
#include<iostream> #include <initializer_list> using namespace std; char t; class matrix{ public: int **data=nullptr; int r; int c; matrix(int i_r,int i_c,initializer_list<int> tmp) { r=i_r; c=i_c; data = new int*[r]; for(int i = 0; i < r; i++) { data[i] = new int[c]; } *this=tmp; } matrix(int i...
ALGO
0.99986
3.237181
19b64576-ae72-4219-a019-1cf1bbea7e5d
Kuro-orzz/CP
Marisaoj/Level_2/Math/Binary_exponentiation/108.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define MOD (ll)(1e9+7) #define all(x) (x).begin(),(x).end() #define vi vector<int> #define pii pair<int, int> #define fi first #define se second ll binMul(ll a, ll b, ll c){ if(b == 0) return 0; ll x = binMul(a, b/2, c); if(b % 2) retur...
ALGO
0.999986
4.633209
44a0fbe9-9cf4-4968-b96a-723d419f1ae2
piekey1994/nim
源代码/计时专用源代码(无图像界面)/单堆拈游戏计时.cpp
#include<iostream> #include<time.h> #include<stdlib.h> #include<windows.h> using namespace std; int main() { srand((unsigned int)time(0)); LARGE_INTEGER t1, t2, tc; QueryPerformanceFrequency(&tc); int n,m; for(n=1000;n<8001;n+=1000) { for(m=10;m<31;m+=10) { int rem=n; ...
ALGO
0.985008
3.218086
1cc36823-67b8-4c20-903a-92df5d1397cd
masc-ucsc/hagent
hagent/step/bug_hunt/invariance_detect.cpp
// invariance_detect_optimized.cpp // // High-performance invariance detector with integer‐indexed parser. // Eliminates per-sample string lookups by two‐phase, in-place // VCD parsing and pre-allocated tables. // // Usage example: // g++ -std=c++17 -O2 invariance_detect_optimized.cpp -o invariance_detect // ./inva...
ALGO
0.947509
7.619832
84f7c24d-6dde-4674-b26d-cee99ee92d83
qingxinlianshui/CFDEM2
LIGGGHTS/LIGGGHTS-PUBLIC/src/fix_box_relax.cpp
/* ---------------------------------------------------------------------- Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ #include <cmath> #include <string.h> #include <stdlib.h> #include "fix_box_relax.h" #include "atom.h" #include "domain.h" #...
TOOL
0.971697
3.985949
1ed4f383-273e-4246-830d-3525456168a1
maheshmhegade/face
opentld/libopentld/mftracker/BBPredict.cpp
/** * @file bb_predict.c * * Created on: 28.03.2011 * @author: bernd * @brief */ #include "BBPredict.h" #include <cmath> #include "Median.h" /** * Returns width of Boundingbox. * @param bb Boundingbox */ float getBbWidth(float *bb) { return abs(bb[2] - bb[0] + 1); } /** * Returns hight of Boundin...
ALGO
0.999884
4.881311
d0dabf45-c7ab-4960-95ce-f957616ec071
JakeQusha/Rational_Calc
src/main.cpp
#include <iostream> #include "RationalNumber.h" #include "calc.h" auto main() -> int { std::string str; while (std::cin) { getline(std::cin, str); if (str == "exit") { break; } auto under = [](int off) -> std::string { std::string ret; for (int i = 0; i < off; ++...
ALGO
0.903758
4.690176
02121115-0b61-49b5-bf30-6c0490c7940e
Ramonr20/CompetitiveProgramming
Omega Up/training1/I-Hojas.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N, b, h; int ans, cont = 0; cin >> N >> b >> h; if (b == 10) { for (int i = 1; i <= N; ++i) { if (i < 10) cont++; else if (i > 9 && i < 100) cont += 2; else if (i > 99 && i < 1000) cont += 3; else if (i == 1000) cont += 4; } cout...
ALGO
0.996895
3.063937
71c79c23-c0a3-4e9c-a8f0-5dc2ffe1c379
user28111999/tutesouviensdubillardouonallaittoutletemps
bower_components/ammo.js/bullet/Demos/BspDemo/BspLoader.cpp
#include "BspLoader.h" #include <stdio.h> #include <string.h> typedef struct { char filename[1024]; char *buffer,*script_p,*end_p; int line; } BSPScript; #define MAX_INCLUDES 8 BSPScript scriptstack[MAX_INCLUDES]; BSPScript *script; int scriptline; char token[BSPMAXTOKEN]; bool endofscript; bool token...
TOOL
0.851213
3.00635
28d95e2d-406e-44e2-bfd8-a0ca82d7ddab
mtwebster/mozjs115
intl/icu/source/common/static_unicode_sets.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_FORMATTING // Allow implicit conversion from char16_t* to UnicodeString for this file: // Helpful in toString methods and elsewhere. #define UNISTR_FROM_STRING_EXPLICIT #include "static_unicode_sets.h" #include "umutex.h" #include "ucln_cmn.h" #include "unicode/uniset.h" #...
TOOL
0.880941
7.797869
349e0bc6-25bb-47fa-bb92-4bbbdf699e8b
paczek137/elf_2024
1_1_LocationIDs/main.cpp
#include <algorithm> #include <cctype> #include <fstream> #include <iostream> #include <numeric> #include <ranges> #include <sstream> #include <string> #include <vector> #include <list> #include <filesystem> #include <memory> #include <map> #include <set> #include <boost/algorithm/string/classification.hpp> // Include ...
ALGO
0.995382
4.975569
d2970c34-937a-4374-aba1-b921ddd2cb23
M45UDrana/DS-Algo-Problem-Solving
codeforces/493A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<string, int> psi; #define ff first #define ss second #define pb(a) push_back(a) #define mp(a,b) make_pair(a,b) #define input freopen("input.txt","r",stdin) #define output freopen("output.txt","w",stdout) #def...
ALGO
0.996054
3.522533
fbba699a-da26-4722-8bde-a52f7d31fbbd
Seungchan0325/baekjoon
solutions/2439_0.cpp
#include <iostream> int main(){ int n; scanf("%d", &n); for(int i = 1; i <= n; i++){ for(int j = 0; j < n-i; j++) printf(" "); for(int j = 0; j < i; j++) printf("*"); printf("\n"); } }
ALGO
0.999953
3.801923
f4f7fde1-fd74-4d78-9d6e-e4e6d4a71906
Gj0705/RELOCALIZATION
第一章 概述/lidar_localization/third_part/gtsam-4.0.2/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.cpp
/** * @file ConcurrentFilteringAndSmoothing.cpp * @brief Base classes for the 'filter' and 'smoother' portion of the Concurrent * Filtering and Smoothing architecture, as well as an external synchronization * function. These classes act as an interface only. * @author Stephen Williams */ ...
ALGO
0.99627
7.717406
84761006-a5aa-48c9-b41e-8ac3ec30c8e4
AadityaJ/Algorithms-Practice
gfgprac/3/2.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(int argc, char const *argv[]){ int t; cin>>t; while(t--){ int a,b; cin>>a>>b; int x,y; for(int i=0;i<b;i++) cin>>x>>y; cout<<b<<endl; } return 0; } // lesson learnt: read very seriously
ALGO
0.991029
3.624279
8d5782f6-7b26-44ba-8bb4-733666ddb01e
Dilanpc98/FUNDAMENTOS_DE_PROGRAMACION
Actividad C2/Cando Angie/suma_numeros.cpp
#include <iostream> using namespace std; int main () { float x,y,z; cout<<"Ingrese el primer numero: "; cin>>x; cout<<"Ingrese el segundo numero: "; cin>>y; z=x+y; cout<<"El resultado de la suma es: "<<x<<" + "<<y<<" = "<<z<<endl; return 0; }
TOOL
0.929551
3.477575
f53c9cf2-bf9e-416e-b7f7-3381f3bcb587
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12935_0.cpp
#include <bits/stdc++.h> using namespace std; queue<int> op[40]; int main() { int n; cin >> n; int a[n]; int i; for (i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); for (i = n - 1; i >= 0; i--) { int j; for (j = 20; j >= 0; j--) { if ((a[i] & (1 << j))) { if (op[j].size()) { ...
ALGO
0.99997
4.363426
d7f39d0a-78a2-4e07-86e1-596bd3f34539
AustinBoyuJiang/Competitive-Programming
competitions/Codeforces/Contests/825/d.cpp
/* * Author: Austin Jiang * Date: 10/10/2022 9:41:07 AM * Problem: * Description: */ //#pragma GCC optimize(2) //#pragma GCC optimize(3) #include<bits/stdc++.h> //#define int long long #define pb push_back #define fir first #define sec second #define endl '\n' #define lb lower_bound #define ub upper_bound #define P...
ALGO
0.9995
4.198128
5cc8b074-ce78-4db9-9238-5d66c9b577d4
Arannamoy-Mondal/CP
Problems/Fadi-and-LCM.cpp
#include<bits/stdc++.h> #define int long long #define nl "\n" #define blk " " #define rep(i,in,n) for(int i=in;i<n;i++) #define pb push_back #ifndef ONLINE_JUDGE #define debug(a) cout<<#a<<blk<<a<<nl; #define sep(a) cout<<#a<<#a<<#a<<#a<<#a<<#a<<#a<<endl; #else #define debug(a) #define sep(a) #endif const int N=1e7+5; ...
ALGO
0.999868
5.007123
35327fc4-2127-4907-956b-3a497d6d53df
AIxiaodi4Ever/leetcode_in_cpp
01x数组/0922SortByParityII_twoPoint.cpp
class Solution { public: vector<int> sortArrayByParityII(vector<int>& A) { int n = A.size(); int j = 1; for (int i = 0; i < n; i += 2) { if (A[i] % 2 == 1) { while (A[j] % 2 == 1) j += 2; swap(A[i], A[j]...
ALGO
0.999972
5.46043
6ccd580f-3718-42a8-8107-b728060a7339
adrian-budau/work
Codeforces/188 (Div. 1)/C/generator.cpp
#include <iostream> #include <fstream> #include <algorithm> #include <cassert> #define INPUT_GENERATOR_DEBUG #include <inputGenerator.hpp> #define read(X) cout << #X << " = "; cin >> X; using namespace std; using namespace inputGenerator; void gen(int N, int M, int V) { auto G = undirectedGraph(N, M, Boolean::T...
TEST
0.939488
4.311711
4f37f7a6-63e2-4dd2-adfd-e83ee51659d8
prateek27/launchpad-aug-18-pitampura
Lecture-04/array_store.cpp
#include<iostream> using namespace std; int main(){ //Read N Numbers Print them in reverse order //Constraint : N<=1000 int a[1000]; int n; cin>>n; //Read N Numbers for(int i=0;i<n;i++){ cin>> a[i]; } //Reverse Order for(int i=n-1;i>=0;i--){ cout<<a[i]<<endl; } return 0; }
ALGO
0.999548
4.497507
ee105171-4145-498f-8dc5-34a0574a98c8
martkist/freech-core
src/bloom.cpp
#include "bloom.h" #include "core.h" #include "script.h" #define LN2SQUARED 0.4804530139182014246671025263266649717305529515945455 #define LN2 0.6931471805599453094172321214581765680755001343602552 using namespace std; static const unsigned char bit_mask[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; CBloom...
ALGO
0.963758
6.983352
6d1541b2-f3bc-4561-bb22-93512a9cd7a2
pruthvi261104/CPP
linkedlist/Node.cpp
#include <iostream> #include <string.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; // void display(Node *head) // { // while (head!= NULL) // { // cout << head->val << " "; // head = head->next; // } // } //disp...
ALGO
0.999414
4.272747
32087f35-a741-448f-9174-9dd9002c14bf
Meyito/Competitive-programming
UVa/10363 - Tic Tac Toe.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999898
4.282399