uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
b9620372-5288-4410-aeac-770b8cf01878
raincross7/code-similarity
codes/train_code/problem406/problem406_104.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int n,ans,sum,fix; int two[100],v[123456]; signed main(){ two[0]=1;for(int i=1;i<100;i++)two[i]=two[i-1]*2; cin>>n; for(int i=0;i<n;i++)cin>>v[i]; for(int i=0;i<n;i++)sum^=v[i]; for(int i=0;i<n;i++)v[i]&=(~sum); for(int i=59;i>=0;i--){ ...
ALGO
0.999987
3.700366
6c581ba9-ea72-40fb-a9e5-ba78ba0c186f
umang-singla/Competitive-Programming
Codeforces/Round 797/A.cpp
#include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define pii pair<int, int> #define pll pair<ll, ll> #define ff first #define ss second #define vi vector<int> #define vl vector<ll> #define vvi vector<<vi>> #define vii vector<pii> #define vll vector<pll> #define FOR(i, l, r) for (...
ALGO
0.998825
3.973106
77cf0c95-ce12-41ce-96d2-3736511af024
Chun-Bae/Baekjoon
CF_Watermelon.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; (n % 2 == 0 && n > 2) ? cout << "YES" : cout << "NO"; return 0; }
ALGO
0.999848
3.960079
7016251a-3fb8-46b8-bd50-8a36f1d4dae3
marahim34/Data-Structure
Module-07/singly_link.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; }; int main() { Node a, b; a.val = 10; b.val = 20; a.next = &b; cout << a.val << " " << a.next->val << endl; return 0; }
ALGO
0.949988
3.70015
3fcb2c53-3949-4865-8368-18688c60609b
RayleighsJeans/ProgTestLibrary
leetcode/medium/treeOrderTraversal.cpp
#include "../../include/header.hpp" /// 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) : va...
ALGO
0.999187
5.998637
f175ace2-93fc-4af2-befa-f72864e1686e
Sunilkumarchavhan9/leetcode
0724-find-pivot-index/0724-find-pivot-index.cpp
class Solution { public: int pivotIndex(vector<int>& nums) { int n=nums.size(); vector<int>leftsum(n),rightsum(n); for(int i=0; i<n; i++){ leftsum[i] = nums[i]; if(i > 0) leftsum[i]+=leftsum[i-1]; } for(int i=n-1; i>=0; i--){ ...
ALGO
0.999986
6.097977
254d5250-d1a4-4458-b8da-186c81467320
jungahshin/algorithm
c:c++/LeetCode_101.cpp
class Solution { public: bool isMirror(TreeNode* tree1, TreeNode* tree2){ if(tree1==NULL && tree2==NULL) return true; if(tree1==NULL || tree2==NULL) return false; if(tree1->val!=tree2->val) return false; return isMirror(tree1->left, tree2->right) && isMirror(tree1->right, tr...
ALGO
0.999994
6.756765
67f56b14-a9f1-4fa8-8961-b3a5b8a37587
MarcelBruckner-TUMProjects/3D-Scanning-Motion-Capture
Exercise_2/libs/Eigen/bench/benchmarkXcwise.cpp
// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX #include <iostream> #include <Eigen/Core> using namespace std; using namespace Eigen; #ifndef VECTYPE #define VECTYPE VectorXLd #endif #ifndef VECSIZE #define VECSIZE 1000000 #endif #ifndef REPEAT #define REPEAT 1000 #endif int main(int argc, c...
ALGO
0.975866
3.896122
3159e543-3a04-4ee9-9633-7182c890ed28
Yvonne-Young/leetcode
cpp_solutions/70.climbing-stairs.cpp
/* * @lc app=leetcode id=70 lang=cpp * * [70] Climbing Stairs */ // @lc code=start class Solution { public: // Fibonacci number solution // Iterative solution: // Runtime: 0ms, beats 100% // Memory usage: 6.2MB, beats 33.15% // The recursive solution meets the time limits int climbStairs(i...
ALGO
0.999984
6.688907
0423e6ad-4e3a-42b3-82bb-731d46f9d538
Grefuwan/Uhuniversity
Primero/2 - Fundamentos de Análisis de Algoritmos/Prácticas 18-19/Práctica 3/ConjuntoInt.cpp
#include <iostream> using namespace std; #include <ctime> //para time #include <cstdlib> // para srand, rand #include "ConjuntoInt.h" ConjuntoInt::ConjuntoInt (int max) { tamano= max; datos= new int[max]; } ConjuntoInt::~ConjuntoInt () { delete[] datos; } void ConjuntoInt::vaciar () { tamano= 0; } int* ConjuntoIn...
TOOL
0.897065
3.237646
35b25396-3b8b-499c-8e9e-08586edaa346
ChristineZheng/Cloth-Simulator
ext/nanogui/ext/eigen/bench/benchmarkXcwise.cpp
// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX #include <iostream> #include <Eigen/Core> using namespace std; using namespace Eigen; #ifndef VECTYPE #define VECTYPE VectorXLd #endif #ifndef VECSIZE #define VECSIZE 1000000 #endif #ifndef REPEAT #define REPEAT 1000 #endif int main(int argc, c...
ALGO
0.97628
3.896122
8e925e88-b4e2-4f99-a463-249520920c9c
spacefarers/cp
problems/loj/10155.cpp
// created on 2021/6/17 by spacefarers // problem: #10155. 「一本通 5.2 例 3」数字转换 #include <iostream> #include <vector> #include <cstring> #include <algorithm> #define ll long long #define f first #define s second using namespace std; vector<int> paths[50005]; int dp[50005][2]; //最长和次长 bool vis[50005]; int factor_sum(i...
ALGO
0.99984
3.687551
bf9e873d-2936-4e18-95b1-8a501fac21c3
edson-silva/imagens
lista1.cpp
#include <iostream> using std::cout; using std::cin; int main() { int n, *iPtr; cin >> n; iPtr = new int[n]; for(int i = 0; i < n; i++) { cin >> iPtr[i]; } for(int i = 0; i <n; i++) { cout << iPtr[i] << "\n"; } de...
ALGO
0.987582
3.629184
751f25fb-974c-4842-bce3-14cf2b348f0e
pgoq/ICPC-Library
Math/polyInverse.cpp
// Poly Inverse // pega inverso de um polinomio // nlog^2 vector<int> get_inverse(vector<int> &a){ if(a.empty()) return {}; int Y = a.size() - 1, n = 32 - __builtin_clz(Y); n = (1 << n); a.resize(n); vector<int> inv = {fexp(a[0], mod-2)}, f, c; for(int sz=2; sz<=n; sz*=2){ while(f.size...
ALGO
0.999807
4.085764
18ab4f2f-014f-4eda-b41b-d88d899418eb
OjjuasGupta/LeetCode
Partition Array Into Two Arrays to Minimize Sum Difference .cpp
class Solution { public: int minimumDifference(vector<int> &num) { const int n = num.size() / 2; const int sum = accumulate(begin(num), end(num), 0); const int goal = sum / 2; const vector<int> lnum(begin(num), begin(num) + n); const vector<int> rnum(begin(num) + n, end(n...
ALGO
0.999944
5.637671
f1761cb8-bb42-41ac-afbf-28d48e090a78
TahmidaMajumder/Multilingual_QA-Rag_based_Chatbot
rag_qa/Lib/site-packages/sklearn/svm/src/liblinear/tron.cpp
#include <math.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include "tron.h" #ifndef min template <class T> static inline T min(T x,T y) { return (x<y)?x:y; } #endif #ifndef max template <class T> static inline T max(T x,T y) { return (x>y)?x:y; } #endif static void default_print(const char *buf) {...
ALGO
0.999392
5.847107
63cd8164-54d5-4abb-91ac-f3f7a9b10b5b
tinkunath/DSA-with-all-language
Next_Perfect_Square/Next_Perfect_Square.cpp
/* NEXT PERFECT SQUARE A perfect square is a number which can be expressed as a product of two equal numbers. The task is to find the first such number greater than the given number. */ #include<bits/stdc++.h> using namespace std; int main() { float n; cout << "Enter N: "; cin >> n; int x = floor(s...
ALGO
0.998019
4.885038
9b548c16-aa0a-43fb-98cd-2041fe806e0f
hendrixmar/UVA
294.cpp
#include<bits/stdc++.h> using namespace std; vector<int> generate(void){ int count = 31623; int temp; bool prime; vector<int> primes; primes.push_back(2); for(int i = 2; i < count; i++) { temp = ceil(sqrt(i))+1; prime = true; for(int j = 2; j < temp; j++) ...
ALGO
0.999868
4.471013
a54c1990-fea7-43bb-8037-a0408af7523c
Xohail69/Leetcode
Array to BST - GFG/array-to-bst.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void preorder(vector<int> &ans , int s , int e , vector<int>& nums){ if(s <= e){ int mid = (s+e)/2 ; ans.push_back(nums[mid]) ; preorder(ans , s , mid -1...
ALGO
0.999919
6.357112
98869788-48db-4bcb-acd8-4e5e444dae55
ryan1w/MxUI_example
src_gpu/universe.cpp
#include "mpi.h" #include "stdlib.h" #include "string.h" #include "stdio.h" #include "universe.h" #include "version.h" #include "error.h" #include "force.h" #include "memory.h" using namespace LAMMPS_NS; #define MAXLINE 256 /* ---------------------------------------------------------------------- create & initial...
TOOL
0.945633
4.860392
e49165f3-46b8-407b-995c-311d8354e6d5
Weijun-H/cs149
asst3/scan/main.cpp
#include <stdlib.h> #include <stdio.h> #include <getopt.h> #include <string> #include <cstring> #include "CycleTimer.h" double cudaFindRepeats(int *input, int length, int *output, int *output_length); double cudaScan(int* start, int* end, int* resultarray); double cudaScanThrust(int* start, int* end, int* resultarra...
TEST
0.924016
5.144485
11494ca0-520a-4ef9-897d-c9da50995863
sashafancy/learngit
666_path_sum_IV.cpp
class Solution { public: int pathSum(vector<int>& nums) { int len = nums.size(); int sum = 0; if(len == 0) return 0; vector<int> count(len,0); count[len-1] = 1; for(int i = len-1; i>=0; i--) { for(int j = len-1; j>i; j--) { ...
ALGO
0.999807
5.666054
d6b3e030-6532-409c-95ad-1e02d7c5f7a9
neal2018/oj_env
icpc/cu3/k.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; // https://space.bilibili.com/672328094 int main() { cin.tie(nullptr)->sync_with_stdio(false); string s; getline(cin, s); int n = int(s.size()); int index = -1; for (int i = 0; i < n; i++) { if (s[i] == '-') { index = i; br...
ALGO
0.998071
4.360401
2c9e9ce9-16bf-4793-a269-fcd14285aeb4
eyangch/competitive-programming
BOI/2008/ele.cpp
#include <bits/stdc++.h> using namespace std; int N; int a[300]; int sum = 0; vector<int> dp[100001]; bool vis[100001]; bool solve(int mid){ int csum = 0; for(int i = 0; i < N; i++){ if(mid - a[i] <= sum/2){ csum += a[i]; } } if(csum >= mid){ return true; }else...
ALGO
0.999976
3.970398
25dc6e8a-1add-4f10-95a6-e97700a662fc
Mridul0911/Leetcode
Binary Tree to BST - GFG/binary-tree-to-bst.cpp
// { Driver Code Starts //Initial template for C++ #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; Node(int val) { data = val; left = right = NULL; } }; void printInorder (struct Node* node) { if (node == NULL) ...
ALGO
0.9999
7.269036
9b3ec963-c8b2-451a-a7d7-66ba032e1525
MuhammadIktear/2025
January/codeforces/A_Black_Square.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define vec vector<int> #define pii pair<int,int> #define mii map<int,int> #define vp vector<pair<int,int>> #define fast_io ios::sync_with_stdio(false); cin.tie(nullptr) #define py cout << "YES\n" #define pn cout << "NO\n" #define ...
ALGO
0.999402
4.037518
cfef808e-613f-499f-98dd-98adc98a519c
ishabhray/Competitive-Programming
codeforces/192A.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define vi vector<int> #define ii pair<int,int> #define pb push_back #define mp make_pair #define ff first #define ss second #define pll pair<ll,ll> #define vv vector int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_...
ALGO
0.999917
4.23196
3dedc3ce-c974-4821-80b9-59c1dfd8486e
loskyertt/cpp
GIS算法/03贪心算法/04背包问题/main.cpp
#include "Solution.hpp" #include <iostream> #include <ostream> #include <vector> void test() { std::vector<Item> items = { Item(10, 60), Item(20, 100), Item(30, 120) }; double W = 50.0; Solution s1; double totalValue = s1.fractionalKnapsack(W, items); std::cout << "最高总价值:" << totalValue << std::e...
ALGO
0.998631
5.277987
6fa6429a-d822-48bc-8d52-1eba1aa559fa
Algo-Goer/LeetCodeSolutions
2022/0429_559.n-叉树的最大深度_maximum-depth-of-n-ary-tree_DFS递归.cpp
/* * @lc app=leetcode.cn id=559 lang=cpp * * [559] N 叉树的最大深度 */ // @lc code=start /* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node*> _children) { val = _val; chil...
ALGO
0.999867
6.950675
b7983ffe-66ed-4f88-a96e-e775ec5a9a60
thanh-nguyen03/CPP-Code
TRR1/FileCodeGki/cai_tui.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; const long long mod = 1e9 + 7; #define faster() ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define all(x) x.begin(), x.end...
ALGO
0.999973
3.462977
ad8049c8-e58c-409e-9010-ac083ece0287
Qlorry/AdventOfCode2024
AdventOfCode2024/Days/Day9.cpp
#include "Helpers/BaseDay.hpp" #include <optional> #include <unordered_map> namespace AdventOfCode2024 { class Day9 : public BaseDayTest { protected: Day9() : BaseDayTest(9) {} void FirstStage() { std::vector<short> memory(input.GetInputStr().size() * 9, -1); // worst case auto inserted_end = memory...
ALGO
0.999369
6.051
b1da22bb-1863-4b25-a69e-614bf62b0456
firewood/topcoder
gcj_2015/R2_C.cpp
// Google Code Jam 2015 R2 // Problem C. #include <iostream> #include <sstream> #include <algorithm> #include <set> #include <map> #include <vector> using namespace std; typedef long long LL; typedef vector<int> IntVec; typedef map<string, int> StrIntMap; int lang[2][20001]; IntVec v[20]; int solve(LL N) { int an...
ALGO
0.998201
4.616174
b695a8d5-9677-46c2-aada-eac9b0b22e24
rajat03github/DSAnew
48. Lecture 44 Linked List & its types - Singly, Doubly, Circular etc/Doubly.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node*prev; Node* next ; // constructor Node(int data ){ this->data = data; this->prev = NULL; this->next = NULL; } // desc ~Node(){ // for head temp int value = this->data; if(this->...
ALGO
0.999389
4.317133
a6c979e8-5c69-477a-ade8-4dafcc45057c
aditya33agrawal/resources
DSAlgo/linear_search.cpp
#include <iostream> using namespace std; int search(int arr[], int n, int x) { int i; for (i = 0; i < n; i++) if (arr[i] == x) return i; return -1; } // Driver code int main(void) { int arr[] = { 2, 3, 4, 10, 40 }; int x = 10; int n = sizeof(arr) / sizeof(arr[0]); // Function call int result = search(ar...
ALGO
0.998908
5.189518
ad38dfcd-714a-4462-9c61-d12aa3a0c95e
beketays/pp1-labs-2022-2023
+recursion/+string/string/b.cpp
#include <iostream> #include <cmath> using namespace std; int main() { string s; cin >> s; int x; for(int i=0; i<s.size(); i++){ if(s[i]>=97 && s[i]<=122){ s[i]=s[i]-32; } } cout << s[i]; }
ALGO
0.997079
4.050166
b85027f5-ecf1-4dcf-837f-638ceeeb0c2c
shindechandrakant/data-structure-Algo
other/napsack_DP.cpp
#include<bits/stdc++.h> #include<iostream> using namespace std; #include<math.h> #define vi vector<int> vi int napsack(vi &wt, vi &cost, int tarwt) { int n = cost.size(); vector<int> prev(tarwt+1, 0); vector<int> curr(tarwt+1, 0); for(int i = 1; i <= n; i++) { for(int j = 1; j <= tarwt; j++) { if(wt[i-1...
ALGO
0.999967
4.366269
97d3dc09-f81a-4252-9266-b744bf738158
prabhatkr007/leetcode-GFG-Problems
1745-palindrome-partitioning-iv/1745-palindrome-partitioning-iv.cpp
class Solution { public: bool isPalindrome(const string& s, int start, int end) { while (start < end) { if (s[start] != s[end]) { return false; } start++; end--; } return true; } void backtrack(const string& s, int star...
ALGO
0.99997
6.643538
3f65cc17-510d-4991-8158-424f9d2cb039
munh-orgil/leetcode
2025/03. mar/(08) 2379. Minimum Recolors to Get K Consecutive Black Blocks.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: Solution() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } int minimumRecolors(string s, int k) { int n = s.size(); int cnt = 0; for (int i = 0; i < k; i++) { ...
ALGO
0.999907
4.807166
203288ba-b92f-4b37-b9bc-6102dc22d9f3
a0x8o/caffe2
third_party/eigen/bench/spbench/test_sparseLU.cpp
// Small bench routine for Eigen available in Eigen // (C) Desire NUENTSA WAKAM, INRIA #include <iostream> #include <fstream> #include <iomanip> #include <unsupported/Eigen/SparseExtra> #include <Eigen/SparseLU> #include <bench/BenchTimer.h> #ifdef EIGEN_METIS_SUPPORT #include <Eigen/MetisSupport> #endif using namesp...
ALGO
0.992174
4.273294
c5c1bcfc-a189-4036-9474-0d702e8fe977
06suraj/Codeforces-Solution
Codeforces Round #698 (Div. 2)/B - Nezzar and Lucky Number.cpp
#include<bits/stdc++.h> using namespace std; int main() { // your code goes here ios::sync_with_stdio(0); int t; cin>>t; while(t--) { int n,d,rem,flag=0;cin>>n>>d; long long arr[n],di;for(int i=0;i<n;i++)cin>>arr[i]; for(int i=0;i<n;i++) { flag=0; di=arr[i]/d; rem=...
ALGO
0.999576
4.11217
181212c9-6ef4-4107-bf29-da55d19931d3
zyavuz610/learn-cpp
youtube/100/106-operator-ler_carpma-bolme-mod.cpp
// C++ 106 - Aritmetik Operatörler 2 | Çarpma, Bölme ve Mod (Kalan Bulma) İşlemleri #include <iostream> using namespace std; int main() { int x,y; x=10; y=3; int z; z = x%y; cout << "Sonuç:" << z << endl; //---------------------------- int n = 12547; int kalan = n % 10; cout << n << " sayıs...
ALGO
0.988967
3.528672
9259b0d6-ac8d-48e2-a152-6e20bfa05cae
zlinwei/study_cpp
study_algorithm/alg_69_tree_level_order_traversal.cpp
// // Created by linwei on 2019-07-29. // #include <iostream> #include <vector> #include <queue> using namespace std; class TreeNode { public: int val; TreeNode *left, *right; explicit TreeNode(int val) { this->val = val; this->left = this->right = NULL; } }; class Solution { public...
ALGO
0.999754
5.863256
21947b73-22b3-4a3e-8f80-ecf1925d18c0
niive12/group3
ai/sokoban/moving_rules.cpp
#include "map.h" #include <stack> #include <unordered_map> char Map::valid_push(pos_t diamond){ //a diamond is pushable if the diamond if the origin is reachable, //the destination is not a wall or diamond //and if the diamond is not locked in. const unsigned char col = 2; char ans = 0; pos_t A...
ALGO
0.999874
4.85857
c92d8199-72a5-4dbf-a86c-1b2bf88041e0
Aazen45v/C-Plus-Plus-Practice
Hollow upper-inverted pattern.cpp
#include <iostream> using namespace std; int main() { int n; cin>>n; //code to print hollow pyramid for(int row=0;row<n;row++){ //printing spaces for(int i=0;i<n-row-1;i++){ cout<<" "; } for(int k=0;k<2*row+1;k++){ //printing stars if(k==0 || k==2*row) cout<<"*"; ...
ALGO
0.999813
3.5316
a018d967-8a7d-4a1d-aa1f-507713cabde5
amsiljak/c9-Projects
Programming-Techniques/T5/Z2/main.cpp
/* TP 2018/2019: Tutorijal 5, Zadatak 2 Autotestove pisala Nina Slamnik. Prijave gresaka, sugestije i pitanja mozete slati na mail <EMAIL>. NAPOMENA: Tutorijal 5 sadrzi veliki broj ZABRANA, tipa zabrana da se koristi indeksiranje niz[i] ili simulacija indeksiranja npr. *(niz + i); dalje, da su zab...
ALGO
0.972615
4.564016
149e2757-38a2-4bc2-aa9f-9f1e6cfaa424
brichard19/certicom-challenge
common/ecc.cpp
#include <random> #include "ecc.h" #include "eccp131.h" #include "mont.h" #include "util.h" namespace { class RNG { public: virtual uint64_t next() = 0; }; class IntRNG : public RNG { private: std::random_device _rd; std::mt19937 _gen; std::uniform_int_distribution<uint64_t> _d; public: IntRNG() { ...
ALGO
0.996418
7.171722
0e8b8bbd-4705-4a63-8da4-4960c508a6df
Sherlock9256/LeetCode
M04.01.cpp
#include<vector> #include<unordered_map> using namespace std; class Solution { int n; public: bool findWhetherExistsPath(int n, vector<vector<int>>& graph, int start, int target) { unordered_map<int,unordered_map<int,bool>> mp; for(auto& p:graph){ mp[p[0]][p[1]]=true; } ...
ALGO
0.999964
5.541137
e4e068d1-b8c7-4405-a9eb-80c17dfe4ecf
iGio90/android_frameworks_base
drm/jni/android_drm_DrmManagerClient.cpp
//#define LOG_NDEBUG 0 #define LOG_TAG "android_drm_DrmManagerClient" #include <utils/Log.h> #include <jni.h> #include <JNIHelp.h> #include <ScopedLocalRef.h> #include <android_runtime/AndroidRuntime.h> #include <drm/DrmInfo.h> #include <drm/DrmRights.h> #include <drm/DrmInfoEvent.h> #include <drm/DrmInfoStatus.h> #i...
TOOL
0.922618
6.235534
9bb3a8aa-a82c-48ed-b8ac-bcd2bfc8d36d
amsraman/Competitive_Programming
Facebook Hacker Cup/2021/Round 2/C2.cpp
#include <bits/stdc++.h> typedef long long ll; #define f first #define s second using namespace std; template<class B> struct LazySegTree : public B { using T_q = typename B::T_q; using T_u = typename B::T_u; size_t n; vector<T_q> seg; vector<T_u> lazy; LazySegTree(size_t n): n(n), seg(2 * n...
ALGO
0.99978
3.906421
ce4d7595-7c6a-49fa-b8c5-c54f5eeefe12
Amisha-Ananda-Gowda/Cpp_Programs
maxtilli.cpp
#include<iostream> using namespace std; int main(){ int i,n; cout<<"Enter the number of elements"<<endl; cin>>n; int a[n]; cout<<"Enter the array elements"<<endl; for(int j=0;j<n;j++){ cin>>a[j]; } int max=a[0]; cout<<"Enter the value of i"<<endl; cin>>i; for(int j=...
ALGO
0.999468
3.228967
51f1e664-b1d7-4f9f-9ca1-dea4a0916ca2
kaigian/LeetCodeCpp
LeetCodeCpp/LeetCodeCpp/leetcode-235.cpp
#include<iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* q) { if (root->val == p->val || root->val == q->val) retu...
ALGO
0.999977
5.292806
8431cbe8-d5c7-478a-b47e-bb362282c965
ajisakti554/Algoritma_pemograman_menggunakanc-_Semester-2
matrikstugas2.cpp
#include <iostream> using namespace std; int main () { int nilai [3] = {85, 70, 75}; int i; cout << "Index Sebelum: " << endl; for (int i = 0; i < 3; i++) { cout << "Nilai[" << i << "] = " << nilai [i] << endl; } i = 0; nilai [i] = 20; cout << endl; cout << "Index Setelah...
ALGO
0.997867
3.175793
b94d51c2-3f88-4d68-bd6f-7084e6892da9
raihanruhin/Algo-DS-Template
MST(directed).cpp
//Directed MST /* Dfs to check whether solution exists or not. Traverse(source) for directed mst. nv is total node, ne total edge. Complexity O(V*E) */ int nv, ne, res, vis[MX], pre[MX], num[MX], inLength[MX]; //MX =maximum node vector<int>adj[MX]; struct Edge{ int u, v, w; }edge[10*MX]; //maximum edge int Trave...
ALGO
0.999813
4.772108
4bf020d5-d5e9-4ec2-9346-b174d1a1abfc
ishandutta2007/codeforces
boook/normal/444/C.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define REP(i,j,k) for(int i = j ; i < k ; ++i) #define RREP(i,j,k) for(int i = j ; i >=k ; --i) #define A first #define B second #define mp make_pair #define pb emplace_back #define PII p...
ALGO
0.999848
4.757379
cf290091-58a8-4acc-8d7c-795521b9b80a
gabsereniski/beecrowd
solutions/paradigms/1034.cpp
#include <bits/stdc++.h> using namespace std; #define MAXN 1000003 #define INF MAXN int a[MAXN]; int tab[MAXN]; int main() { int t; cin >> t; while (t--) { int N, M; cin >> N >> M; for (int i = 0; i < N; i++) cin >> a[i]; fill(tab, tab + M + 1, INF); ...
ALGO
0.99997
4.184542
88181316-0feb-4aa2-bae3-ce6141bd265a
1988kramer/DBoW2
src/FBrisk.cpp
#include <vector> #include <string> #include <sstream> #include <DVision/DVision.h> #include "FBrisk.h" using namespace std; namespace DBoW2 { // -------------------------------------------------------------------------- void FBrisk::meanValue(const std::vector<FBrisk::pDescriptor> &descriptors, FBrisk::TDescri...
ALGO
0.99457
6.638991
67e1a3f2-7106-44d1-9842-2011815f6326
gitlijian/backend
C++PrimerSrc/Chapter 5/nestedcl.cpp
// nested.cpp -- nested loops and 2-D array #include <iostream> #include <string> #include <array> const int Cities = 5; const int Years = 4; int main() { using namespace std; const string cities[Cities] = // array of pointers { // to 5 strings "Gribble City", ...
TOOL
0.997349
3.988903
30c525c4-bf5e-4c94-b9eb-b9920ec26e5d
Rishi0510/Codeforces
1199.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) #define ll long long #define pb(x) push_back(x) #define in(x) int x; cin>>x; #define lin(x) long long int x; cin>>x; #define instr(x) string x; cin>>x; #define nline "\n" #define yes cout << "YES" << nline; #define no cout << "NO" <...
ALGO
0.999973
3.49842
c13444d2-ff71-4c46-9467-cc3e7e41d181
nxhhoang/MarisaOJ-roadmap-solution
Roadmap/Level 3/Graph/BFS & DFS/Festival 2/code.cpp
// nxhhoang - the dreamer #include <bits/stdc++.h> #define FOR(i, a, b) for (int i = a; i < (int)b; i++) #define endl '\n' #define ub upper_bound // find target < min(value) #define lb lower_bound // find target <= min(value) #define all(a) (a).begin(), (a).end() #define pii pair<int, int> #define pll pair<ll, ll> #de...
ALGO
0.99998
4.015008
c6621e4a-fb5e-4cc5-a4c2-0ade45df0910
raincross7/code-similarity
codes/train_code/problem347/problem347_91.cpp
#include <iostream> #include <string> #include <vector> #include <cmath> #include <queue> #include <map> #include <set> #include <stack> #include<algorithm> #include<sstream> #include<iomanip> using namespace std; typedef long long ll; const ll MOD_CONST = 1000000007; const ll BIG_NUM = 1000000000000000000; int mai...
ALGO
0.999973
3.858568
64e6f897-c8f2-4580-b2f4-92dd1ceeee55
KlayClarke/learning
cpp/VariablesNArithmetic/DivisionModulus.cpp
#include <iostream> using namespace std; int main() { int x(2), y(5), z(7); int temp = y / x; cout << "x = " << x << "\ty = " << y << "\tz = " << z << endl; cout << "y / x = " << temp << endl; temp = y % x; cout << "y % x = " << temp << endl; return 0; }
ALGO
0.981902
3.225844
7b79465d-1064-45d3-90db-d2daa93fd045
KTVo/RCC
Assignments/17C Homework/Vo_Kevin_Hash_Investigation_42475/GeneralHashFunctionsCPP/GeneralHashFunctions.cpp
#include "GeneralHashFunctions.h" #include <ctime> //For RNG within random string gen. #include <cstdlib> unsigned int RSHash(const std::string& str) { unsigned int b = 378551; unsigned int a = 63689; unsigned int hash = 0; for(std::size_t i = 0; i < str.length(); i++) { hash = hash * a + s...
ALGO
0.981843
5.977743
80df5abf-685a-43ff-95b6-247d151f54ff
Mahimatestgithub/GFGPOTD
Subarrays with sum K.cpp
#include <unordered_map> #include <vector> using namespace std; class Solution { public: int countSubarrays(vector<int> &arr, int k) { // code here map<int,int> mp; mp[0] = 1; int sum = 0, count = 0; for(int i=0; i<arr.size(); i++) { sum +...
ALGO
0.999946
5.914903
3a4bb9aa-c389-4fb1-92a4-03c61cc77e3c
sunwonHong/uda_CarND-Path-Planning-Pr
src/Eigen-3.3/unsupported/doc/examples/MatrixExponential.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); MatrixXd A(3,3); A << 0, -pi/4, 0, pi/4, 0, 0, 0, 0, 0; std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "The matrix exponential ...
ALGO
0.999651
3.706936
fb66550a-b4de-457e-a74d-5c4c31c5a956
davidaqc/iotShield
rpi_cpp_projects/inferencia-iotshield/edge-impulse-sdk/dsp/kissfft/kiss_fft.cpp
#include "edge-impulse-sdk/dsp/kissfft/_kiss_fft_guts.h" /* The guts header contains all the multiplication and addition macros that are defined for fixed or floating point complex numbers. It also delares the kf_ internal functions. */ static void kf_bfly2( kiss_fft_cpx * Fout, const size_t fstride...
ALGO
0.999536
5.498605
2e6d8687-fab3-4c33-bda1-4ef02ed481ae
runasy-koonta/OOP_Lab
Lab08/5.cpp
#include <iostream> #include <string> #include <fstream> using namespace std; int main(void) { ifstream fin("5_input"); ofstream fout("5_output.txt"); char c; int i = 0, n; cout << "length = "; cin >> n; while (fin.get(c)) { i++; if (c == '\n') { fout << " "; continue; } fout << c; if (i >...
ALGO
0.997705
3.30731
fa79c27e-0689-4913-82c8-6222efc14d70
shivcodecf/leetcode-start-9-2-24
2646-kth-largest-sum-in-a-binary-tree/kth-largest-sum-in-a-binary-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.999976
5.895202
add2ec74-6c59-421c-85c1-94e375410c0d
huipengly/CppLearn
程序员代码面试指南/chap1/汉诺塔/2.用栈来求解汉诺塔.cpp
#include <stack> #include <iostream> using namespace std; void stack_hanoi(int number) { } int main() { return 0; }
ALGO
0.999545
4.451915
a8b6dd64-ca1a-4e91-9896-ebbed81c0518
vrintle/APRIL21C
KAVGMAT.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while(t--) { long long int n, m, k, w = 0; cin >> n >> m >> k; long long int mat[n][m], pref[n][m]; for(long long int r = 0; r < n; r++) { for(long long int c = 0; c < m; c++) { cin >> mat[r][c]; } } for(long lon...
ALGO
0.999872
3.690753
858cdfa4-7588-4ef2-9554-6d9a6598efd9
alhussain-shaikh/75day_DSA
Conditions/hw2.cpp
/* Q2 - Write a program to print absolute value of a number entered by the user. Sample Input: -1 Sample Output: 1 */ #include<iostream> using namespace std; int main(){ int num; cout<<"Enter the Value of num: "; cin>>num; num=abs(num); cout<<"Absolute value of num is : "<<num<<endl; return 0; ...
TOOL
0.979998
3.523046
7f952a8c-5c04-4694-8b44-9c7271b1f445
vishalkandu01/Data-Structure-and-Algorithm
12_hcf.cpp
#include <iostream> using namespace std; int gcd(int a, int b) { if(b == 0) return a; gcd(b, a%b); } int main() { // Method-1 // int a, b; // cin >> a >> b; // int mini = min(a, b); // while(mini > 0) { // if(a % mini == 0 && b % mini == 0) break; // mini--; // } //...
ALGO
0.999892
5.223904
36531dbf-5496-4d10-934c-8a648e2f3144
jingyu0/Data-Structure-Initial
二叉树进阶OJ题.cpp
https://leetcode-cn.com/problems/binary-tree-level-order-traversal/submissions/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<vector<i...
ALGO
0.999935
6.234439
d2fdf996-278d-4bd1-9009-57018f242973
113bommy/LogicalErrorFixCodeT5
logicalErrorFix_CodeT5_no_LineNumber/model/cpp/cpp_source/source_400.cpp
#include <bits/stdc++.h> using namespace std; const int Lim = 2e3, MAXN = Lim + 10, MOD = 1e9 + 7; inline long long fpow(long long a, long long x) { long long ans = 1; for (; x; x >>= 1, a = a * a % MOD) if (x & 1) ans = ans * a % MOD; return ans; } inline long long inv(long long a) { return fpow(a, MOD - 2); } int pri...
ALGO
0.999929
5.166778
d9645e76-e628-4d6f-ac7a-fc1ade9af249
Juddy2403/2D_GameEngine
GameProject/Trajectory Logic/Trajectory.cpp
#include "Trajectory.h" std::pair<glm::vec2, bool> Trajectory::Update(float speed, const glm::vec2& currentPos) { auto stateInfo = m_State->Update(m_PathData.front(), speed, currentPos); if (stateInfo.second == false) { m_PathData.pop(); m_HasDirectionChanged = true; if (m_PathData....
TOOL
0.895218
5.257843
82fbba70-9aa9-411e-bdb2-49b491fe662e
buckn4gold/turbo-dollop
PowerEditor/src/uchardet/nsSBCharSetProber.cpp
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ #include <stdio.h> #include "nsSBCharSetProber.h" nsProbingState nsSingleByteCharSetProber::HandleData(const char* aBuf, PRUint32 aLen) { unsigned char order; for (PRUint32 i = 0; i < aLen; i++) { order = mModel->charToOrderMap[(...
TOOL
0.872758
5.81795
c8f9b223-31c2-463f-91b9-bbd82b2aef00
JossKM/VirtualMaterialityFlexProject
Engine/Source/ThirdParty/PhysX3/PhysX_3.4/Source/SceneQuery/src/SqBucketPruner.cpp
#include "foundation/PxMemory.h" #include "SqBucketPruner.h" #include "GuIntersectionBoxBox.h" #include "GuInternal.h" #include "PsVecMath.h" #include "foundation/PxUnionCast.h" #include "CmRadixSortBuffered.h" #include "CmRenderOutput.h" #include "PsFPU.h" #include "PsBitUtils.h" #include "PsIntrinsics.h" #include "Gu...
ALGO
0.991947
6.760485
c6ac621f-7574-4cf4-a525-ce891eefee6a
longNguyen010203/Data-Structure---Algorithm-TLU
Week-2/exercise-5.cpp
#include<iostream> using namespace std; /* Số may mắn ===> O(n) */ int main() { unsigned long long n; cin >> n; // O(1) unsigned short du, count = 0; // O(1) while (n != 0) { // O(n) du = n % 10; // O(1) n = n / 10; // O(1) if (du == 4 || du == 7) { // O(1) count++;...
ALGO
0.999778
4.89099
aafe3484-7674-4aae-b337-55235426deba
danny-wang/leetcode
118. Pascal's Triangle.cpp
/** Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] 思路:Pascal's triangle:每一层的第i个位置,等于上一层第i-1与第i个位置之和。 代码: **/ class Solution { public: vector<vector<int>> generate(int numRows) { if(numRows...
ALGO
0.999977
5.929608
ef9878ce-7e49-4483-9fb8-7e2b3b8d6fa7
work-fw/algorithms
Old/180402_anagrams.cpp
string csort(string s) { vector<int> count(26, 0); // go through and count for (int i = 0; i < s.size(); i++) { count[s[i] - 'a']++; } // make new string using count string ret; ret.reserve(s.size()); for (int i = 0; i < 26; i++) { for (int j = 0; j < count[i]; j++) { ret.push_back('a' + i); } } retu...
ALGO
0.999902
5.483423
a43d6fd3-dac1-48f2-9b35-1d3e1aeef67a
Pigeoncoin/pigeoncoin
src/script/ismine.cpp
#include "ismine.h" #include "key.h" #include "keystore.h" #include "script/script.h" #include "script/standard.h" #include "script/sign.h" typedef std::vector<unsigned char> valtype; unsigned int HaveKeys(const std::vector<valtype>& pubkeys, const CKeyStore& keystore) { unsigned int nResult = 0; for (const ...
ALGO
0.991481
5.824142
dbf662fc-76d1-43a6-b994-9e6967186c97
avinash04iitp/leetcode_problems
Binary_Search/12_Find_the_Duplicate_Number.cpp
/* Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive. There is only one repeated number in nums, return this repeated number. You must solve the problem without modifying the array nums and uses only constant extra space. Example 1: Input: nums = [1,3,4...
ALGO
0.999977
5.833134
1d0d036c-d52b-433b-b4fe-daf5da3e5c5e
ngng628/competitive-programming
atcoder/ABC/ABC222/A/main.cpp
# include <bits/stdc++.h> # ifndef ngng628_library # define ngng628_library # define int Int # define float Float # define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) # define reps(i,n) for(int i=1, i##_len=(n); i<=i##_len; ++i) # define rrep(i,n) for(int i=(int)(n)-1; i>=0; --i) # define rreps(i,n) for(int i=(n...
ALGO
0.999717
3.834178
5a682497-28dd-4101-9274-7425d087225f
Yash-Singh1/competitive-programming
ojuz/CEOI11_bal/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long double ld; typedef pair<int,ld> pld; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(10); int n; cin >> n; stack<pld> s; int x; ld r; vector<ld> ans(n); for (int i{0}; i < n; ++i) { ci...
ALGO
0.999843
3.890161
6fa379ad-eb85-4f76-856a-88998076c30a
wisdompeak/LeetCode
Dynamic_Programming/2036.Maximum-Alternating-Subarray-Sum/2036.Maximum-Alternating-Subarray-Sum.cpp
using LL = long long; class Solution { public: long long maximumAlternatingSubarraySum(vector<int>& nums) { LL ret = INT_MIN; LL curSum0 = INT_MIN; LL curSum1 = 0; for (LL x: nums) { LL curSum0_temp = curSum0; LL curSum1_temp = curSum1; ...
ALGO
0.999998
5.59289
ee5996b9-ae2c-4de6-8989-75a9f85980c1
AlgerStowe/zxFHE
FHE_demo/src/engine/tinyconfig.cpp
#include <algorithm> #include "tools.h" #include "tinyconfig.h" #include "BinaryFileReader.h" using namespace std; bool SpaceCompare(char a, char b) { return isspace(a) && isspace(b); } string ModifyKey(const string& str) { string keyString = StringTrim(StringLower(str)); // remove multiple space c...
TOOL
0.963412
5.642344
b4a4a491-b48a-4d15-a791-a9f7d7617f0d
huy-ha/genetic-regression
src/genetic-programming/selectors/NichingSelector.cpp
#include "NichingSelector.hpp" #include "../../expression/Expression.hpp" namespace SymbolicRegression { tuple<shared_ptr<Expression>, shared_ptr<Expression>> NichingSelector::Select( const list<shared_ptr<Expression>> &population) { float threshold = 2.0f; float growth = 1.05f; int attempt = 0; whi...
ALGO
0.99962
5.880158
97b1fe18-deeb-4f2c-a9e9-149b33d0513f
spin-spin-ryo/contest-practice
solved/ABC341/F.cpp
#include <iostream> #include <vector> #include <tuple> #include <string> #include <algorithm> #include <stack> #include <utility> #include <queue> #include <map> #include <iomanip> #include <cmath> #include <set> #include <list> #include <deque> #include <limits> using namespace std; using ll = long long; #define mod ...
ALGO
0.999952
4.60412
58445b34-3c41-4a8d-a63c-b4f9b957a904
SLIIT-FacultyOfComputing/tutorial-02b-IT21335778
tute03.cpp
/*Exercise 3 - Repeatition Convert the C program given below which calculates the Factorial of a number that you input from the keyboard to a C++ program. Please Note that the input command in C++ is std::cin. This is a representation of the Keyboard.*/ #include <stdio.h> int main() { int no; long fac; ...
ALGO
0.999456
3.511962
781fa003-afa1-412b-89a5-7f998ffbb137
hkt456/cpsol
Bài 3A.cpp
#include <iostream> #include <math.h> using namespace std; double solve(int y, double z) { double S=0, k=1, Exp=1; for(int i=1; i<=y; i++){ k*=i; Exp*=z; if(i%2!=0){ S=S+(Exp/k); } else{ S=S-(Exp/k); } } return S; } int main(){ ...
ALGO
0.999848
3.514932
bab6813e-52f3-4007-aa90-5164defed978
qqee1133/Algorithm
0x02/9498.cpp
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int score; cin>>score; if (score>=90 && score <=100) cout<<"A\n"; else if (score>=80 && score <=89) cout<<"B\n"; else if (score>=70 && score <=79) cout<<"C\n"; else i...
ALGO
0.999304
3.781454
7738fd51-e0ac-41a1-83bb-8b64c15ab98b
KrithikaPadmashali/StriversA2Z
array/easy/second_largest_ele.cpp
#include <bits/stdc++.h> using namespace std; // Brute /* sort then go back, i.e if i have 1 2 4 5 7 7 i know largest=arr[n-1] so if i do for(int i=n-2;i>=0;i--){ if(arr[i]!=largest){ second_largest=arr[i]; break; } } or [1,7,7,7,7,7] so sorting logn then going through a...
ALGO
0.999967
4.207417
91cbd14b-1aa5-425a-b532-1bf43514c956
ishandutta2007/codeforces
andrew.volchek/normal/568/C.cpp
#include <iostream> #include <cstdio> #include <string> #include <string.h> #include <queue> #include <math.h> #include <cmath> #include <map> #include <set> #include <vector> #include <algorithm> #include <bitset> #include <list> #include <ctype.h> #include <cassert> #include <stack> #include <fstream> #include <unord...
ALGO
0.999987
4.137375
ced1d889-c9fc-42bb-88cd-83ade16cd59e
cpsa3/backup
OJ/HDU_CODE/16711.cpp
////////////////////System Comment//////////////////// ////Welcome to Hangzhou Dianzi University Online Judge ////http://acm.hdu.edu.cn ////////////////////////////////////////////////////// ////Username: 096040179JY ////Nickname: ___ ////Run ID: ////Submit time: 2010-12-26 10:29:11 ////Compiler: Visual C++ //////////...
ALGO
0.999899
3.900738
dd34306c-7903-432a-b009-ecd39c81d9bd
Eliksirowich/Lab2
Lab2/FileName.cpp
//#include<iostream> //#include <time.h> // #include <stdio.h> //using namespace std; /*int main() { // 1.2 10000 setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); clock_t start, end; // double cpu_time_used; int ROW = 10000; int COL = 10000; int elem_c; int i = 0, j = 0, r; unsigned ...
ALGO
0.997036
3.442267
a59b6764-2ac8-455a-9c45-c971a607863c
android-la64/swiftshader
third_party/llvm-16.0/llvm/lib/Support/MD5.cpp
#include "llvm/Support/MD5.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Endian.h" #include <array> #include <cstdint> #include <cstring> // The basic MD5 functions. // F and G are optimized compared to the...
ALGO
0.998603
7.555989
df5df94c-9e40-4428-b21c-7d7a1a40e1ab
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3471_17.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; const int MAX = 2e5 + 5; const long long MAX2 = 11; const long long MOD = 1000000007; const long long MOD2 = 1000005329; const long long INF = 2e18; const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0}; const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0}; ...
ALGO
0.999961
4.120286
9cd0befa-f1a2-4ebb-aa6d-fe24138aed4d
sylvanaalpert/Model-Predictive-Control
src/Eigen-3.3/unsupported/test/BVH.cpp
#include "main.h" #include <Eigen/StdVector> #include <Eigen/Geometry> #include <unsupported/Eigen/BVH> namespace Eigen { template<typename Scalar, int Dim> AlignedBox<Scalar, Dim> bounding_box(const Matrix<Scalar, Dim, 1> &v) { return AlignedBox<Scalar, Dim>(v); } } template<int Dim> struct Ball { EIGEN_MAKE_ALIGN...
TEST
0.989561
6.337957
81285c94-e140-4946-b084-6a6b4c5fd70b
matteocam/zkcsp-over-bitcoin
SNARK-sudoku/main.cpp
#include <iostream> #include <sstream> #include <fstream> #include <type_traits> #include <chrono> using namespace std; #include <libsnark/gadgetlib1/gadgets/basic_gadgets.hpp> #include <libsnark/common/default_types/r1cs_ppzksnark_pp.hpp> #include <libsnark/common/utils.hpp> #include <libsnark/zk_proof_systems/ppzksn...
ALGO
0.985612
4.815969
e1e86561-4bde-496a-b5c4-751aba56ebe8
FlutterSanjay/Data-Structure-Algorithm
loveBabber(DSA Q)/Binary_Search/find_odd_occurence_bs.cpp
// Type-3 Problem (Imp) // Find the Odd Occurence of Element using Binary Search #include<bits/stdc++.h> using namespace std; int findOddOccurence(vector<int> arr){ int s = 0; int e = arr.size() - 1; while(s<=e){ int mid = (s + e) / 2; if(s==e){ return s; } //m...
ALGO
0.999934
4.894478
26408c96-34fc-49b4-aa91-a9b94f04a667
ShivamIITK21/CS610-Programming-for-Performance
assignment3/problem2/problem2.cpp
#include <algorithm> #include <cassert> #include <chrono> #include <climits> #include <cstdlib> #include <immintrin.h> #include <iostream> #include <x86intrin.h> #include <random> using std::cout; using std::endl; using std::chrono::duration_cast; using HR = std::chrono::high_resolution_clock; using HRTimer = HR::time...
ALGO
0.998729
5.139788