uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
255b68d9-b63e-4917-adbc-cde18ecc9b28
wintersteiger/openenclave-tmp
3rdparty/libcxx/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference_comp.pass.cpp
// <algorithm> // template<InputIterator InIter1, InputIterator InIter2, typename OutIter, // CopyConstructible Compare> // requires OutputIterator<OutIter, InIter1::reference> // && OutputIterator<OutIter, InIter2::reference> // && Predicate<Compare, InIter1::value_type, InIter2::value_type...
TEST
0.924333
6.490046
167a7c04-6854-4132-8ac8-e9c953609f50
GyuJin-Cho/Algorithm
백준/알고리즘 수업 - 깊이 우선 탐색 1.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; vector<int> V[200001]; bool visit[200001]; int N, M, R; int result[200001]; int Count = 0; void DFS(int R) { if (visit[R]) return; visit[R] = true; Count++; result[R] = Count; for (int i = 0; i < V[R].size(); i++) { DFS(V[R][i]); ...
ALGO
0.999994
4.286582
22b587ba-e037-45bd-9fc6-8da5422f5557
adarsxh/Data-structure-in-C
stack/stock span.cpp
#include<iostream> #include<bits/stdc++.h> #include<stack> using namespace std; void span(vector<int> arr){ stack<int>s; int n=arr.size(); s.push(0); for(int i=0;i<n;i++){ while(!s.empty() && arr[s.top()]<=arr[i]) s.pop(); int span = (s.empty()?(i+1):(i-s.top())); cout<<span<<" "; s.push(i); } } int mai...
ALGO
0.9998
4.434942
8d673ac4-96bc-4a9d-8fdd-2cf99f9c506a
spreadcoin/mrspread
src/ecdsa.cpp
#include <stdint.h> #include <assert.h> #include <openssl/sha.h> #include <openssl/ecdsa.h> #include <openssl/obj_mac.h> #include "uint256.h" #include "bignum.h" #include "key.h" #include "ecdsa.h" // Group order of secp256k1 static const uint256 g_Order("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD036414...
ALGO
0.997918
6.484285
4224e76d-b7e6-49a2-8e7c-2bf6e5b01f62
Nezz7/Competitive-programming
Training Marathons/2000/F. Berland Beauty.cpp
#include <bits/stdc++.h> #define endl '\n' #define LL long long #define LD long double #define pb push_back #define sz(a) (int)a.size() #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define debug(x) cerr << #x << " is " << x << endl; using namespace std; int const MAXN = 5000 + 9; vector<vector<i...
ALGO
0.99995
4.299117
255e5278-f899-4fa2-a347-cacea457a87d
heweimin77/shoran_cpp
session2000/problem1600/p1595.connectTwoGroups.cpp
#include <gtest/gtest.h> #include <unordered_map> #include <queue> using namespace std; namespace { class Solution { public: int connectTwoGroups(vector<vector<int>>& cost) { int m = cost.size(); int n = cost[0].size(); int t = 1 << n; vector<vector<int>> adjs(t); for (int...
ALGO
0.999914
5.674108
4b4f7ef0-d82a-4565-83c3-e2c1bc2e85e7
ansh-d23/Leet-Code
3208-alternating-groups-ii/3208-alternating-groups-ii.cpp
class Solution { public: int numberOfAlternatingGroups(vector<int>& colors, int k) { int n = colors.size(); int ans = 0; int curr_cnt = 1; if(k>n) return 0; for(int i=0;i<=n+k-3;i++){ if(colors[i%n] != colors[(i+1)%n]){ curr_cnt++; ...
ALGO
0.999925
5.938713
243e2dfd-185f-4de3-9b5d-8e06762c048a
NYN31/CompetitiveProgramming
CP/Toph/segTree_FastSieve.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e5 + 9; vector<int> sieve_with_wheel(int n) { if(n <= 32) { vector<int> primes = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 }; vector<int> ans; for(int i = 0; i < primes.size(); i++) { if(n < primes[i]) { ...
ALGO
0.999959
4.560686
61b5725e-fdcb-4448-9d27-2e7310d032cc
raghu-raj23/LearningAlgorithms
InterestingProblems/palindromeSubarray.cpp
/* For a given array and ana integer x, check if any subarray of size K exists in the array such taht concatnation of elements form a palindrome. */ #include <bits/stdc++.h> using namespace std; bool isPalindrome(int num){ int temp = num; int rev = 0; while(num){ rev = rev*10 + num%10; nu...
ALGO
0.999966
5.579934
88c2f228-98b7-40e8-b8d7-a813d09cd38a
quyifei23/gem5-for-CXL
gem5/src/systemc/tests/systemc/misc/v1.0/dash5/pulse.cpp
/***************************************************************************** pulse.cpp -- Implementation of the pulse generator. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /*****************************************************...
TOOL
0.910677
6.23126
c4198134-24c1-4533-b3bd-4076ba694874
muschellij2/FSL6.0.0
extras/include/boost/libs/move/example/doc_clone_ptr.cpp
//[clone_ptr_base_derived class Base { BOOST_COPYABLE_AND_MOVABLE(Base) public: Base(){} Base(const Base &/*x*/) {/**/} // Copy ctor Base(BOOST_RV_REF(Base) /*x*/) {/**/} // Move ctor Base& operator=(BOOST_RV_REF(Base) /*x*/) {/**/ return *this;} // Move assi...
TOOL
0.991965
6.88282
d7a08974-64eb-4ebe-a6ac-19c847d57074
Hinski2/CP
gasielnica/prawnicy/cpp290.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second const int start = 1; const int koniec = 0; const int mak = 1e6 + 15; struct prawnik{ int pozycja; int nr; bool status; }; int n, k; pair<int, int>przedzial[mak]; vector<prawnik>prawnicy; void wczytaj(){ ios_base::sync_with_stdio(0)...
ALGO
0.99997
3.605465
2c679cf9-6e1e-4e80-9347-92c1e517aba1
jaku329/myrepo
grind169/l1004.cpp
// 1004. Max Consecutive Ones III int longestOnes(vector<int>& nums, int k) { int maxOnes = 0; int l = 0, r = 0; int zeros = 0; while (r < nums.size()) { if (nums[r] == 1) maxOnes = max(maxOnes, r - l + 1); else if (zeros < k) { maxOnes = max(maxOnes, r - l + 1); zeros++; } el...
ALGO
0.999663
5.945857
3bc85af8-0619-4bee-8562-b6ec114474ca
squaresLab/BatFix
results/transcoder/python/references/SUM_FIBONACCI_NUMBERS.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <numeric> #include <algorithm> using namespace std; int f_gold ( int n ) { if ( n <= 0 ) return 0;...
ALGO
0.999944
6.162842
f69782a3-db91-4338-afb6-8d757be9e411
UIT-Together-2022-Team-Nobita/Flowchart-CPP
Bai137/Bai137.cpp
#include <iostream> using namespace std; void InputX(int&); int XuLy(int); int main() { cout << "Bai 137: Tinh gia tri cua ham so f(x)." << endl; int x; InputX(x); int f = XuLy(x); cout << "\nGia tri cua ham so f(" << x << ") la: " << f << "." << endl; return 0; } void InputX(int& x) { cout << "\nNhap gia tri...
ALGO
0.998632
4.050054
32997035-2630-4bb8-97d0-82c7ab49ae73
SnoOpWo0t/Different-Programming-Platform
CodeChef/Valid Triangles.cpp
#include <iostream> using namespace std; int main() { int T, i; cin >> T; for (i = 1; i <= T; i++) { int a, b, c, sum = 0; cin >> a >> b >> c; sum = a + b + c; if (sum == 180) { cout << "YES" << endl; } else ...
ALGO
0.999832
3.859566
e3b92417-2c17-4a57-a7b1-44161f8b1655
Shahidalileghari/firebase_flutter
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.998756
6.772262
ae2a2851-439b-4bef-8946-6e30b3cfcca8
njumathdy/code-practice
Leetcode/230_Kth Smallest Element in a BST/c++/solution.cpp
/******************* Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. *******************/ #include <cstdlib> #include <cstdio> #include <exception> #include <vector> #include <algorithm> #include <string> #include <iostream> using namespace std; struct TreeNode { i...
ALGO
0.999995
6.125498
fd8c9e66-d6bb-4e6e-9789-f083173c3429
cielavenir/codeiq_problems
q1015/morningquest2.cpp
#include <valarray> #include <cstdio> using namespace std; typedef valarray<long long>V; const int mod=1000000007; int n=2; //nxn行列 V z; //一時領域 V &Me(const V &_x,const V &_y){ //行列の積 int i=0,j; for(;i<n;i++)for(j=0;j<n;j++)z[i*n+j]=(_x[slice(i*n,n,1)]*_y[slice(j,n,n)]).sum()%mod; return z; } V &Mx(const V &_x){ //行列...
ALGO
0.999933
3.391174
ebe0eeac-fe3a-443e-bdf3-54701d49131d
chiichen/leetcode-cpp
src/141.环形链表.cpp
/* * @lc app=leetcode.cn id=141 lang=cpp * * [141] 环形链表 */ // @lc code=start #include <unordered_map> #include <vector> #include <map> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(nullptr) {} }; class Solution { public: bool hasCycle(ListNode *hea...
ALGO
0.999863
5.447971
2263ee27-0808-4aa3-b51f-47da3662e548
nuoxoxo/leetcode
leet_058_last_word_len.cpp
class Solution { public: int lengthOfLastWord(string s) { stringstream ss(s); string end ; int len ; while (getline(ss, end, ' ')) if (end != "") len = end.length() ; return len ; } };
ALGO
0.994794
5.423274
92298b33-d2de-4212-ad45-29bff8db80db
Arobeyy/c-problems
loop,rand.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int n; printf("Enter no of elements: "); scanf("%d", &n); int x[n]; int i; srand(time(NULL)); int sum = 0; for(i=0;i<n;i++) { x[i] = rand() % 100; ...
ALGO
0.957284
3.238987
2f618a25-d96f-468a-b751-30da1c91f804
Farhan0140/_CP__
DATA_STRUCTURES_ALGORITHM/Linked_List/Singly_Linked_List.cpp
#include<bits/stdc++.h> using namespace std; #define ll int #define I_HATE_PROGRAMMING int main #define fast_read() (ios_base :: sync_with_stdio(false), cin.tie(NULL)); //--------------------------------------------------------------------- class Node{ public: // |--------|--------| int d...
ALGO
0.999686
4.038297
1a5e9df2-a600-40a2-9c9d-48e9f672cfb5
aadhaargoel/CP
Recursion/factorial.cpp
#include<iostream> using namespace std; int factorial(int x){ if(x==0||x==1){ return 1; } return x*factorial(x-1); } int main(){ int n; cin>>n; cout<<factorial(n); return 0; }
ALGO
0.999991
5.272583
4ddb01cf-040c-496e-bfca-8779cfb87130
Kunallion/LeetCode
0209-minimum-size-subarray-sum/0209-minimum-size-subarray-sum.cpp
class Solution { public: int minSubArrayLen(int target, vector<int>& nums) { int i=0, j=0, sum=0, n=nums.size(), ans=INT_MAX; for(i=0 ; i<n ; i++) { sum += nums[i]; if(sum>=target) { ans = min(ans, i-j+1); while(sum>=target)...
ALGO
0.999995
6.312579
6c3da355-ea5b-47e0-8e4a-b9289b8171e8
AhmedEssamYassin/Problem-Solving
CP Sheets Solutions/ICPC Assiut - Juniors Phase 1 - 2022/Practice #1 Prefix sum, freq array/E/Solution.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("Output.txt", "w", stdout); #endif //! ONLINE_JUDGE int t = 1; ll N; // cin >> t; while (t--) ...
ALGO
0.999929
4.917593
3a6ad27d-cb21-438d-91cd-f53c7f422472
hamzasyed2985/CSC211-Data-Structures-C-
HashingLinear.cpp
#include <iostream> using namespace std; const int size = 10; class HashTable { public: int arr[size]; public: HashTable() { for (int i = 0; i < size; ++i) { arr[i] = -1; // cout << " dafsdf \n" ; } } void insert(int key) { int index = key % size; ...
ALGO
0.999805
5.686254
8b597177-3d9b-4adc-843d-dab348d0eda8
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_8381_2.cpp
#include <bits/stdc++.h> using namespace std; int main() { string in; cin >> in; int count = 0; for (int i = 0; i < in.size() - 1; i++) { int div4_1 = in[i] - '0'; if (div4_1 % 4 == 0) { count++; } string test = ""; char num[2]; num[0] = in[i]; num[1] = in[i + 1]; test.appe...
ALGO
0.999778
4.146233
c9ae055f-d968-47fc-9e03-5fc47c792cc2
mariocav/opengl-idi
bloc3/10.cpp
/* Apartado 10 Entrega final. */ #if defined(__APPLE__) #include <OpenGL/OpenGL.h> #include <GLUT/GLUT.h> #else #include <GL/gl.h> #include <GL/freeglut.h> #endif #include "model.h" #include <stdio.h> #include <float.h> // DBL_MAX #include <cmath> #include <iostream> using namespace std; #define BO...
TOOL
0.923833
4.307617
94f58d01-7959-4f11-95d8-43d932c8bc47
anubhav100rao/CompettiveProgramming
BinarySearch/minimum_platforms.cpp
#include <bits/stdc++.h> using namespace std; #define dbg(x) cerr<<#x<<" = "<<x<<endl class Solution{ public: int good(int arr[], int dep[], int n) { vector<pair<int, int>>s; for(int i = 0; i<n; i++) { s.push_back({arr[i], -1}); s.push_back({dep[i], 1}); } ...
ALGO
0.999936
4.523698
257b09e2-5f6e-48d4-9974-db4f60e4a1fc
DEVESH307/LeetCode-GFG
0078-subsets/0078-subsets.cpp
class Solution { public: void subsetsHelper(vector<int>& nums, int index, vector<vector<int>> &res, vector<int> &temp){ if(index == nums.size()){ res.push_back(temp); return; } temp.push_back(nums[index]); subsetsHelper(nums, index+1, res, temp); temp....
ALGO
0.999981
5.97288
2433b31e-b371-4774-b445-da205059f165
jyotiranjankalta81/Data-Structure-And-Algorithm-
learningMaterial/linkedlist/ReverseNodesinKGroup.cpp
// Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. // k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes, in the end, should remain as it is. // You may not alter the va...
ALGO
0.999938
5.215742
f65e8c62-96fb-4e9e-bb24-ca0d15959ba4
raincross7/code-similarity
codes/train_code/problem143/problem143_267.cpp
#include <iostream> #include <iomanip> #include <algorithm> #include <bitset> #include <string> #include <cmath> #include <complex> #include <numeric> #include <cassert> #include <vector> #include <array> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <utility> #define int64...
ALGO
0.999942
3.895812
3c49fcd6-76fa-40aa-86b9-6f7ef743a3a2
madhu-korada/YOLO-IOU-cpp
IOUT_madhu.cpp
#include <iostream> #include <vector> #include <algorithm> // struct for bounding box struct Boundingbox { float x; float y; float w; float h; float score; }; // struct for track struct Track { std::vector<Boundingbox> boxes; float max_score; int start_frame; int track_id; }; // function to find iou float ...
ALGO
0.99923
6.204263
88f76b09-e861-46be-bf00-0740afd7d259
Saiprakash92/dsa-code
10. Strings/palindromeStrings.cpp
#include <iostream> using namespace std; bool isPalindrome(string &s) { int l = 0, h = s.length() - 1; while (l < h) { if (s[l] != s[h]) return false; l++; h--; } return true; } int main() { string s; cin >> s; cout << isPalindrome(s); return 0;...
ALGO
0.99951
4.742395
f4d5e161-173b-48c5-b063-459459d4bef4
coxlab/boost_patched_for_objcplusplus
libs/graph/example/dijkstra-no-color-map-example.cpp
#include <boost/graph/graph_traits.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest_paths_no_color_map.hpp> using namespace boost; int main(int, char *[]) { typedef adjacency_list < listS, vecS, directedS, no_property, property < edge_weight_t, int > > graph_t; typedef gr...
ALGO
0.99978
5.960667
4646b777-0c33-4fee-981d-1ecb71599aee
piotrcurious/simple_NiMH
exp_growth_junkbox/color/color_multi_ext3/extender_ok.cpp
// Efficient polynomial evaluation using Horner's method float ExponentialGrowthDetector::evaluatePolynomial(const std::vector<float>& coeffs, float x) { if (coeffs.empty()) return 0.0f; float result = coeffs.back(); // Start with highest degree coefficient // Traverse coefficients from highest t...
ALGO
0.987895
6.255245
af8f8261-634e-4527-bb7d-d376cc48e721
raincross7/code-similarity
codes/train_code/problem417/problem417_482.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vec = vector<ll>; using mat = vector<vec>; using pll = pair<ll,ll>; #define INF (1LL << 60) #define MOD 1000000007 #define PI 3.14159265358979323846 #define REP(i,m,n) for(ll (i)=(m),(i_len)=(n);(i)<(i_len);++(i)) #define FORR(i,v) for(auto (i...
ALGO
0.999861
4.000427
d521bd9e-dd3c-43e8-86e8-06f1e8223326
Algorithm-study-seoul22/Algorithm-Study
탁성건/week19/2150-Strongly Connected Component.cpp
#include <algorithm> #include <iostream> #include <stack> #include <vector> using namespace std; constexpr int MAX_V = 10000; // V: 정점 개수, E: 간선 개수, dcnt: 총 정점 방문 횟수 // dfsn[v]: v정점 방문 순서 int V, E, dcnt, dfsn[MAX_V + 1]; vector<int> adj[MAX_V + 1]; // 인접 리스트 bool finished[MAX_V + 1]; // finished[v]: v정점 방문이 끝났는가? v...
ALGO
0.999961
5.266315
44165653-3099-4733-a81a-841c4a908d88
AHMADULLAH15/XSPC
week 8/Day 4/seive_algorithm.cpp
#include<iostream> #include<bits/stdc++.h> #define ll long long #define loop(i,s,n) for(int i = s; i < n; i++) using namespace std; int main() { //Author : AHMAD //Never Give UP AHMAD ios ::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n;cin>>n; vector<bool> prime(n+1,true); ...
ALGO
0.999817
4.048073
d1cc611c-e009-429a-ab2b-6e5310e715c9
Naheuldark/Codingame
Puzzles/Easy/TreePaths.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <map> struct Node { int index; int leftIdx; int rightIdx; Node* left = nullptr; Node* right = nullptr; Node(int index, int leftIdx, int rightIdx) : index(index), leftIdx(leftIdx), rightIdx(rightIdx) {} }; us...
ALGO
0.999983
4.942965
6bc5fa7f-daff-41c5-b97b-3261af4413c0
sur16-cse/DSA-preparation
14-longest-common-prefix/14-longest-common-prefix.cpp
class Solution { public: string longestCommonPrefix(vector<string>& strs) { int n=strs.size(); if(n==0) return ""; if(n==1) return strs[0]; sort(strs.begin(),strs.end()); string a=strs[0],b=strs[n-1]; int i=0,j=0; while(i<a.size() && a[i]==b[j]) { ...
ALGO
0.999876
5.714212
c0c48bed-78e8-4a26-b2c3-75338a6cb38f
hyetae/VEDA
C++/9. 가상 함수와 추상 클래스.cpp
// Human의 Food 먹기 게임 #include <iostream> #include <ctime> #include <cstdlib> using namespace std; class Human; class Monster; class Food; class Game { static void print(Human *human, Monster* monster, Food* food); public: Game(); void play(Human *human, Monster *monster, Food* food); }; class GameObject...
ALGO
0.983941
3.409725
656523c2-ec55-43a8-acbb-0d7dacea51b2
ishandutta2007/codeforces
hyperbolic/normal/1451/F.cpp
#include <stdio.h> #include <vector> std::vector<int> V[210]; int x[110][110]; int check[110][110],check1[110],check2[110]; int main() { int T; scanf("%d",&T); while(T--) { int a,b; scanf("%d%d",&a,&b); for(int i=2;i<=a+b;i++) V[i].clear(); for(int i=1;i<=a;i++) for(int j=1;j<=b;j++) scanf("%d",&x[i][j]); ...
ALGO
0.999875
3.313832
0456b19e-c6ca-4929-8c3d-d50a4b68d295
alexandraback/datacollection
solutions_2453486_1/C++/himadric/a.cpp
#include <iostream> #include <string> #include <vector> #include <cstdio> using namespace std; int main() { int tests; cin >> tests; getchar(); for (int tt = 0; tt < tests; tt++) { const int n = 4; int row[4][2]; int col[4][2]; int diag[2][2]; memset(row, 0, sizeof(row)); memset(col, 0, sizeof(col)); ...
ALGO
0.999744
3.90278
b4eebda8-7a4f-4225-9b55-ba5756df7085
donsale/urs-izvjestaj
v4l-utils-1.24.1/utils/v4l2-ctl/media-info.cpp
#include <cstdint> #include <cstring> #include <fstream> #include <iostream> #include <dirent.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/sysmacros.h> #include <unistd.h> #include <linux/media.h> #include <media-info.h> #ifndef __linux__ #include <linux/videodev2.h> #include <fcn...
TOOL
0.893645
6.278288
ffe5911c-cdcb-4000-baa9-8273f7861a5f
MathOnco/adaptivePGG
initBranch/adaptiveDynamics_initNeighbor_initBranch.cpp
/* adaptiveDynamics_initNeighbor_initBranch.cpp Author: Gregory Kimmel Date: 06/12/2019 This file calculates the evolution of neighborhood size and production traits over generations, starting from a population with two separate branches. USAGE ./run_adaptiveDynamics <inputfile> <popsi...
ALGO
0.999916
6.561999
f102b95c-96a4-4cd2-8738-9830bc2f939e
codewithaman07/My-questions
374-guess-number-higher-or-lower/guess-number-higher-or-lower.cpp
/** * Forward declaration of guess API. * @param num your guess * @return -1 if num is higher than the picked number * 1 if num is lower than the picked number * otherwise return 0 * int guess(int num); */ class Solution { public: int guessNumber(int n) { int l = 1, h...
ALGO
0.999995
5.923424
6ff36e73-2935-4924-92ba-d6069de70b5a
rachit2905/cp-codes
B_Triple.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long l1; typedef long double ld1; typedef pair<int, int> pi; typedef pair<l1, l1> pl1; typedef pair<double, double> pd...
ALGO
0.999656
4.651222
4d479365-997b-44d3-853d-e6e908d5bab7
Nabinji/100-DaysOf-Futter
watch_store_app/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.998928
6.763923
e6cd5f37-231e-425f-b54b-b748c48dffcc
naonao-cola/MyQt
qt5ch20/OpenCV_3.4.3-Source/modules/cudalegacy/src/calib3d.cpp
#include "precomp.hpp" using namespace cv; using namespace cv::cuda; #if !defined HAVE_CUDA || !defined HAVE_OPENCV_CALIB3D || defined(CUDA_DISABLER) void cv::cuda::transformPoints(const GpuMat&, const Mat&, const Mat&, GpuMat&, Stream&) { throw_no_cuda(); } void cv::cuda::projectPoints(const GpuMat&, const Mat&, c...
ALGO
0.967729
6.095851
554d7262-b87c-434b-a85a-31a7668d2c48
veprbl/mysqlpp
ssx/parsev2.cpp
#include "parsev2.h" #include <utility.h> #include <algorithm> #include <cassert> #include <cctype> #include <cerrno> #include <cstring> #include <iostream> using namespace std; // System error value to string conversion #if defined(MYSQLPP_PLATFORM_WINDOWS) # define SYSERR "" #else # define SYSERR ": " << strerror...
TOOL
0.951085
6.141958
665f9cf5-0d4b-4203-95fa-68ebd1a0cffd
ishandutta2007/codeforces
square1001/normal/1155/D.cpp
#include <vector> #include <iostream> #include <algorithm> using namespace std; const long long inf = 1LL << 62; int main() { int N, X; cin >> N >> X; vector<long long> A(N); for (int i = 0; i < N; ++i) cin >> A[i]; vector<vector<long long> > dp(N + 1, vector<long long>(5, -inf)); dp[0][0] = 0; for (int i = 0; i...
ALGO
0.999932
3.939398
93a41cac-734c-4494-9fc7-644f00b03ef6
ishandutta2007/codeforces
jiangly/normal/1331/C.cpp
#include <iostream> #include <vector> int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int a; std::cin >> a; int d[6]; for (int i = 0; i < 6; ++i) d[i] = a >> i & 1; std::cout << (d[0] << 4 | d[1] << 1 | d[2] << 3 | d[3] << 2 | d[4] | d[5] << 5) << "\n"; retu...
ALGO
0.998661
3.298927
210c0912-3d1b-4294-a7bf-4f57dd11a8e1
purnamrita/LC
0948-sort-an-array/0948-sort-an-array.cpp
class Solution { public: vector<int> merge(vector<int> v1, vector<int> v2){ int n1 = v1.size(); int n2 = v2.size(); int i = 0; int j = 0; vector<int> res; while(i < n1 && j < n2){ if(v1[i] <= v2[j]){ res.push_back(v1[i]); i...
ALGO
0.999999
5.87627
4ca6ac11-1a8b-43f0-b702-2cf4dcbf2072
NovaKs68/RobotHexapod
robotHexapodControl/src/leg.cpp
#include "leg.hpp" std::vector<int> logIdServoErr(bool actionServos[3], int servoIdCoxa, int servoIdFemur, int servoIdTibia) { std::vector<int> servosIdErr; if (actionServos[0]) servosIdErr.push_back(servoIdCoxa); if (actionServos[1]) servosIdErr.push_back(servoIdFemur); ...
TOOL
0.892454
3.316596
54c86cd3-9a63-481c-9086-7d295579b8e7
quadratech188/baekjoon
solutions/14438-noinclude.cpp
#include <algorithm> #include <cstddef> #include <cstdio> #include <iostream> #include <vector> struct Segment { Segment(size_t start, size_t end): start(start), end(end) {} size_t start; size_t end; size_t size() { return end - start; } inline size_t center() { return (start + end) / 2; } inline Segment ...
ALGO
0.999891
5.306146
902eeb95-1e0e-43ac-8f2c-07e7d536d086
sarvex/leetcode-javascript
lcof2/剑指 Offer II 036. 后缀表达式/Solution.cpp
class Solution { public: int evalRPN(vector<string>& tokens) { stack<int> stk; for (auto& t : tokens) { if (t.size() > 1 || isdigit(t[0])) { stk.push(stoi(t)); } else { int y = stk.top(); stk.pop(); int x = stk.t...
ALGO
0.999587
6.477452
50554e62-22c6-411d-8402-5f35e553ef02
Son301203/Flutter
Crud_mvvm/crud_mvvm/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.998667
6.76073
9c797fb2-6b77-4f24-af52-b99e436b8768
naonaonao708/bioinformatics
hh-suite/src/hhmatrices.cpp
// Substitution matrices and their background frequencies #include "hhmatrices.h" void SetBlosumMatrix(const char matrix, const float BlosumXX[], float* pb, float P[20][20]) { int a,b,n=0; HH_LOG(DEBUG) << "Using the BLOSUM " << matrix << " matrix" << std::endl; for (a=0; a<20; ++a) for (pb[a]=0.0f, b=0; b<...
ALGO
0.995985
4.415943
e7765f86-3cc5-48c6-802f-92135af0a34a
ishandutta2007/codeforces
heart_blue/normal/79/B.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.999929
4.488347
9a48e913-5462-47a2-b197-46bdac72e1a1
papum20/tasks__old
preparazione-OII/[OII]Petali di margherita/src/[OII]Petali di margherita.cpp
#include <iostream> using namespace std; /* int solve(int N, int* S){ int } */ int solve(int N, int* S){ int tot = 0; for(int l = 2; l <= N/2; l++) { if(N%l != 0) continue; for(int start = 0; start < N/l; start++){ bool correct = true; int color = S[start]; for(int i = start + N/l; i < N; i+...
ALGO
0.999834
4.104462
9de964b0-7e6a-455e-99c2-5b4d7b1e5eb0
javagovindsharma/leetscode
solution/2100-2199/2143.Choose Numbers From Two Arrays in Range/Solution.cpp
class Solution { public: int countSubranges(vector<int>& nums1, vector<int>& nums2) { int n = nums1.size(); int s1 = accumulate(nums1.begin(), nums1.end(), 0); int s2 = accumulate(nums2.begin(), nums2.end(), 0); int f[n][s1 + s2 + 1]; memset(f, 0, sizeof(f)); int ans ...
ALGO
0.999991
5.715651
624ed13f-36f0-4146-b134-9482d9738e79
marialuizacvianna/mpc_controller
src/lib/Eigen-3.3/bench/eig33.cpp
#include <iostream> #include <Eigen/Core> #include <Eigen/Eigenvalues> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; template<typename Matrix, typename Roots> inline void computeRoots(const Matrix& m, Roots& roots) { typedef typename Matrix::Scalar Scalar; con...
ALGO
0.999345
5.61046
8c65aa92-99a8-43b3-a4fc-9e25ee37234f
Mr-Aditya-Jadhav/SDE-Sheet-Coding-Interview-Problems
Day 25/longest-common-subsequence.cpp
//https://leetcode.com/problems/longest-common-subsequence/ class Solution { public: int f(int i, int j, string &t1, string &t2, vector<vector<int>> &dp){ if(i < 0 || j < 0) return 0; if(dp[i][j] != -1){ return dp[i][j]; } if(t1[i] == t2[j]){ retur...
ALGO
0.999967
6.42419
9fd89282-b15f-4b45-b885-92b1eb1594b4
mdtalhaba/data_structure
Week3/Exam/problem2.cpp
#include<bits/stdc++.h> using namespace std; int main() { list<int> reDuplicate; while (true) { int val; cin>>val; if(val == -1) break; reDuplicate.push_back(val); } reDuplicate.sort(); reDuplicate.unique(); for(auto it:reDuplicate) { cout<<it<<" "; ...
ALGO
0.999747
3.663551
eee8d949-9c68-400a-abc1-937e4b786a66
zhangfann/zicrondb
Src/hyrise_c1aeeb6/storage/run_length_segment.cpp
#include "run_length_segment.hpp" #include <climits> #include <cstddef> #include <memory> #include <optional> #include "all_type_variant.hpp" #include "resolve_type.hpp" #include "storage/abstract_encoded_segment.hpp" #include "storage/abstract_segment.hpp" #include "storage/encoding_type.hpp" #include "types.hpp" #i...
TOOL
0.887241
7.803712
2d2cc372-4bfd-49d9-8391-b772cd6f55e4
iwtbam/leetcode
code/lt0923.cpp
// https://leetcode-cn.com/problems/3sum-with-multiplicity/ // 3sum with multiplicity class Solution { public: int threeSumMulti(vector<int>& A, int target) { long long sum = 0; long long r = pow(10, 9) + 7; int type = 0; int C[3] = { 1, 2, 6 }; long long I, J, K; vector<int> record(101, 0); for (i...
ALGO
0.999802
5.444309
be27fc26-a5f7-47e5-a30f-51279f21faeb
suubh/100-Days-of-Code
doubly_linked_list.cpp
#include<iostream> using namespace std; struct Node{ int data; Node *next; Node *prev; }; struct Node *head; //Global Node *getNewNode(int x){ Node *newNode = new Node(); newNode->data = x; newNode->prev = NULL; newNode->next = NULL; return newNode; } void insertAtHead(int x){ Node *temp = getNewNode(x); //new...
ALGO
0.999754
4.248325
f6458582-7ebe-4dd0-b63d-871d05ffb9e3
davidd0930/joke_generator
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
327fa2df-e346-43dd-bd8a-051a3504b6f6
mmtaksuu/OpenCV-Python-Tutorial
BRIEF/BRIEF.cpp
#include "BRIEF.h" #include <cv.h> #include <highgui.h> #include <cvaux.h> #include <ctime> #include <iostream> using namespace std; using namespace CVLAB; BRIEF::BRIEF(void) { // Allocates memory for 'testLocations' and 'intensityPairs': testLocations = vector< pair<cv::Point2i, cv::Point2i> >(DESC_LEN); inte...
ALGO
0.99334
6.134064
8402ed36-4d74-44a8-b1f4-29ddc67cad20
Deepak-1141/CN
Group Chat/Main_server.cpp
#include<bits/stdc++.h> #include<sys/ipc.h> #include<sys/msg.h> #include<stdio.h> #include<pthread.h> using namespace std; struct msg_buf{ long msg_type; char msg[100]; }; // G1,G2,Global int msg_id1=msgget(1000,0666|IPC_CREAT); int msg_id2=msgget(1001,0666|IPC_CREAT); int msg_id3=msgget(1002,0666|IPC_CREAT); ...
ALGO
0.984009
3.298917
df83116b-6960-44e6-a5d3-14ebc34ea399
sheyua/LAMMPS-QTB
src/USER-CUDA/atom_vec_charge_cuda.cpp
#include <cstdlib> #include <cstdio> #include <cstring> #include "atom_vec_charge_cuda.h" #include "comm_cuda_cu.h" #include "atom_vec_charge_cuda_cu.h" #include "atom.h" #include "domain.h" #include "modify.h" #include "fix.h" #include "memory.h" #include "error.h" #include "user_cuda.h" #include "comm.h" using names...
TOOL
0.874217
5.55245
db043d65-ca8e-4e75-930a-bf323a522b5e
cpp-benchmark1/BambuStudio
src/libslic3r/PerimeterGenerator.cpp
#include "PerimeterGenerator.hpp" #include "ClipperUtils.hpp" #include "ExtrusionEntityCollection.hpp" #include "ShortestPath.hpp" #include "VariableWidth.hpp" #include "CurveAnalyzer.hpp" #include "Clipper2Utils.hpp" #include "Arachne/WallToolPaths.hpp" #include "Line.hpp" #include <cmath> #include <cassert> #include ...
ALGO
0.963597
7.171525
1e3db5b8-8700-415f-8e90-6ec309cf06e9
gifsyn/AtCoder
ABC/ABC068/abc068a.cpp
#include <cstdio> int main(){ int n; scanf("%d",&n); printf("ABC%d\n",n); return 0; }
ALGO
0.999025
3.532363
326303e4-23f1-4f34-89ad-c1632bf7c5d0
mun9769/CodingTest
프로그래머스/unrated/120807. 숫자 비교하기/숫자 비교하기.cpp
#include <string> #include <vector> using namespace std; int solution(int num1, int num2) { int answer = 0; if(num1 == num2) return 1; else return -1; }
ALGO
0.999811
4.408835
3bacdbe4-c629-499f-8d11-673da79ffc4a
AlejoGazagne/MetodosNumericos
Integracion/ejercicio.cpp
#include <cstdio> #include <climits> #include <cfloat> #include <cmath> #include <iostream> #define COLUMNAS 2 #define FILAS 30 using namespace std; double f(double x, double v) { return 10 * exp(0.05 * v * pow(x,0.02)); } int main(){ FILE *readPtr; readPtr = fopen("matrixBuild.txt", "w"); double a, b, ...
ALGO
0.997599
3.044832
bdeb84a1-7762-4fed-bacb-1fe0ffc915fe
Trivedi27/Leetcode
0113-path-sum-ii/0113-path-sum-ii.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * Tree/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int ...
ALGO
0.999947
6.449306
be525eec-2969-44f2-8bea-83e82a2d1796
AmrAhmed119/Compiler
LexicalAnalyzer/RulesParser/RulesParser.cpp
#include <fstream> #include <iostream> #include <algorithm> #include "RulesParser.h" #include "../Utility/Util.h" RulesParser::RulesParser(std::string filePath) { this->filePath = filePath; this->linesCounter = 0; } int RulesParser::parseFile() { std::ifstream file(filePath); if (!file.is_open()) { ...
TOOL
0.900161
4.456819
87a4c40f-2fe8-4e43-a08e-b8a133f28d91
timmyglynn16/COSC300-2
Assignment4/PQbinomial.cpp
#include<iostream> #include<stdlib.h> #include<climits> using namespace std; /** * create a node */ struct node { int data; int degree; struct node *child; struct node *sibling; struct node *parent; }; class binomialheap { public: node *head; binomialheap() { head=NULL; } /** * create a ...
ALGO
0.999874
3.564508
268b3b34-b489-4cbc-a13f-204c1c89ff42
Anmol126singh/DSA
miscallenous/*Longest Palindromic Substring .cpp
//approach: //find the centre of the palindrome //expand from the centre and that is your palindrome //start from longest palindrom function class Solution { public: string getlength(int l,int r,int st,int end,string s,string ans){ //maintain maxlength which will track the maximum length of the palindrome i...
ALGO
0.999975
6.059136
40cf52da-2266-47ae-9417-0e6ebbea4bf2
wuyuhao28/sha3
memorypool.cpp
#include <memory.h> #include "memorypool.h" #include <stdio.h> #include <cuda_runtime.h> #include <cuda.h> /************************************************************************/ /* ڴʼַ뵽ADDR_ALIGNֽ /************************************************************************/ size_t check_align_addr(void*& pBuf...
TOOL
0.911933
4.830306
17264f57-02bb-4a2d-aab3-4a21c9ee2f3c
suman105/LeetCode-Top-100-Liked-Problems
Binary Tree/101 Symmetric 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.999987
6.56187
5c622b49-2b17-4c8e-9127-0b6862a35ee5
sarvex/leetcode-nelua
lcof/面试题40. 最小的k个数/Solution.cpp
class Solution { public: vector<int> getLeastNumbers(vector<int>& arr, int k) { int n = arr.size(); function<vector<int>(int, int)> quickSort = [&](int l, int r) -> vector<int> { int i = l, j = r; while (i < j) { while (i < j && arr[j] >= arr[l]) { ...
ALGO
0.999996
6.399315
1ca7c7e8-fa05-4a9c-af51-2857a190dea7
yenting-chen/Algorithms-and-Data-Structures
tree, graph/segment tree, pointer.cpp
/* segment tree, pointer */ #include<iostream> #include<algorithm> #include<vector> using namespace std; typedef long long ll; const int INF = 0x3FFFFFFF; const ll INF2 = 0x3FFFFFFFFFFFFFFFLL; struct node { int x, y; node *l, *r; int val, li, ri, all; node(int _x, int _y, node *_l, node *_r) :x(_x), y(_y), l(_...
ALGO
0.999975
4.609775
020e9aba-5a99-4846-bb65-eb68cbb0e552
komekome09/comp_prog
atcoder/abc158_c.cpp
#include <iostream> #include <string> #include <stdio.h> #include <cmath> #include <cfloat> #include <algorithm> #include <numeric> #include <vector> #include <iterator> #include <set> using namespace std; const double PI=acos(-1); int main(){ int a, b; cin >> a >> b; bool z = true; for(int i = 1; i ...
ALGO
0.999771
3.201729
8a57a5d9-cca0-41e3-bac2-f8ff0776b3cb
MinaYasser100/responsive_dash_board
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.998784
6.761023
4eb52733-23a6-4583-bb2d-1e99e623863a
PUCC-PI-III/Flutter
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.998799
6.776823
b34c989e-4c22-4a37-aca6-fa1f79710b5c
bae-sh/BOJ
Problems/9507.cpp
#include<iostream> using namespace std; int main() { int t; cin >> t; long long ans[68]; long long dp[68]; dp[0] = 1; dp[1] = 1; dp[2] = 2; dp[3] = 4; for (int i = 4; i < 68; i++) { dp[i] = dp[i - 1] + dp[i - 2] + dp[i - 3] + dp[i - 4]; } for (int i = 0; i < t; i++) { int x; cin >> x; ans[i] = dp[x]; ...
ALGO
0.99955
3.434486
96302139-ccd9-4b0e-abb1-0f2e263a1336
rdzhao/HodgeDecomposition
eigen/doc/examples/Tutorial_BlockOperations_block_assignment.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; using namespace Eigen; int main() { Array22f m; m << 1,2, 3,4; Array44f a = Array44f::Constant(0.6); cout << "Here is the array a:" << endl << a << endl << endl; a.block<2,2>(1,1) = m; cout << "Here is now a with m copied into its cent...
ALGO
0.97721
3.324932
14666867-34a9-4b7e-ad9a-1f98a521ba94
hirakuuuu/kyopro
ABC/328/abc328_a.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for(int i = a; i < n; i++) #define rrep(i, a, n) for(int i = a; i >= n; i--) #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> // constexpr ll MOD = 1000000007; constexpr ll MOD = 998244353; constexpr int IINF = 1001001001; conste...
ALGO
0.999896
4.994198
65cebd02-0fa4-4f63-ad9e-71391ec5a50d
shady528/GeeksforGeeks
Medium/Minimize the Heights II/minimize-the-heights-ii.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: int getMinDiff(int arr[], int n, int k) { sort(arr, arr + n); int res = arr[n-1] - arr[0]; int i = lower_boun...
ALGO
0.999903
5.783022
37e059a9-8505-42d8-827a-c29456600089
ishandutta2007/codeforces
arterm/normal/148/B.cpp
#include <cstdlib> #include <iostream> using namespace std; int main() { double vp,vd,t,f,c,d=0,l[200]; long i=0; cin>>vp>>vd>>t>>f>>c; l[0]=t*vp; if (vd<=vp){ cout<<0; return 0; } l[0]+=(l[0]/(vd-vp)*vp); while (l[i]<c){ ++i; ...
ALGO
0.999937
3.080685
6e37127c-c806-4cce-a9a6-617b0dba7df0
jeffrey-newman/Inundate-landscape-fluvial-bathtub
v2/eigen/bench/benchEigenSolver.cpp
// g++ -DNDEBUG -O3 -I.. benchEigenSolver.cpp -o benchEigenSolver && ./benchEigenSolver // options: // -DBENCH_GMM // -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3 // -DEIGEN_DONT_VECTORIZE // -msse2 // -DREPEAT=100 // -DTRIES=10 // -DSCALAR=double #include <iostream> #include <Eigen/Core> #include <Eigen/QR> #in...
TOOL
0.990582
5.772861
281fa2f0-f5ba-416c-b89f-32b251d8d179
yskeerthi/LEETCODE
3412-permutation-difference-between-two-strings/permutation-difference-between-two-strings.cpp
class Solution { public: int findPermutationDifference(string s, string t) { int sum=0; for(int i=0;i<s.size();i++) { for(int j=0;j<t.size();j++) { if(s[i]==t[j]) { sum+=abs(i-j); } } ...
ALGO
0.999984
5.923556
f7b92ffa-3945-4597-bc33-3aa4675fd085
fuhailin/show-me-cpp-code
myexamples/test_eigen_city/test2.cpp
#include "Eigen/Core" #include <iostream> #include <vector> using namespace std; using namespace Eigen; MatrixXf softmax_grad(MatrixXf x) { VectorXf vec = Map<const VectorXf>(x.data(), x.size()); auto mat = vec.asDiagonal().toDenseMatrix(); auto test = vec * vec.transpose(); return mat - test; } // 先定...
ALGO
0.99936
4.916888
d93869e2-5526-43c0-be28-95a611acf2d0
AhanafTahmid/DS
practice 1/10.cpp
//Write a program to create a Binary Search Tree of n elements and then display the elements (preorder, in order and post order) of the tree. #include <bits/stdc++.h> using namespace std; struct Babu{ int data; Babu *l; Babu *r; }; void preorder(Babu *boo){ if(boo == NULL) return; cout<<boo->data...
ALGO
0.999954
5.332901
45ef8dbb-cc06-4be1-9fb4-3d613ca073c1
layqafatima/Lab-2-tasks
lab 2 task 5.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Person { int id; string name; }; int main() { int N; cout<<"Enter the number of structures: "; cin>>N; vector<Person> people(N); for (int i=0;i<N;++i) { cout<<"Enter ID and Name for person "<...
ALGO
0.998275
5.051776
5e1b789d-b10d-4029-a5ea-bdac08996995
pengsl-lab/ParaPindel
src/farend_searcher.cpp
#include <math.h> #include <omp.h> #include <cstdlib> #include <unistd.h> #include "searcher.h" #include "farend_searcher.h" #include <ctime> #include "paraPindel.h" bool NewUPFarIsBetter(const SortedUniquePoints & UP, const SPLIT_READ& Read) { if (UP.MaxLen() < Read.MaxLenFarEnd()) { return false; } ...
ALGO
0.998949
5.09741
536271b5-fcf2-423d-9c2a-638236351086
ishandutta2007/codeforces
kalptaru/normal/1/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifndef ONLINE_JUDGE freopen("INPUT.txt", "r", stdin); freopen("OUTPUT.txt", "w", stdout); #endif ll a,n,m,d,e; cin >> n>>m>>a; ll...
ALGO
0.999897
3.581006