uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5278a992-8dec-4760-b62e-dc4e7b397de0
nenisssos/DibirovaNena
TSP/main.cpp
#include <vector> #include <iostream> #include <numeric> using namespace std; int main() { int a; cin >> a; int x[a], y[a]; for (int q = 0; q < a; q++) { cin >> x[q] >> y[q]; } vector<int> ans(a); iota(ans.begin(), ans.end(), 0); for (int q = 1; q < a; q++) { double mn = 1e...
ALGO
0.999989
3.917339
b88ee4ff-dbb9-4259-bb59-b90aa0b06017
ParthBiyani/Cpp_DSA_Love_Babbar
Programs Practice/10 - Solving LeetCode Questions [Arrays]/Q2_Find_only_1_unique_value_in_an_array.cpp
#include<iostream> using namespace std; int findUnique(int arr[], int size) { int ans = 0; for(int i=0;i<size;i++) { ans = ans ^ arr[i]; } return ans; } int main() { int arr[7] = {1, 5, 3, 9, 5, 3, 9}; int size = 7; int unique = findUnique(arr, size); cout << "The unique value in the array is: " << ...
ALGO
0.999627
5.365575
dcf6a7f6-d803-4996-adcf-2ed89cfe1630
esl-epfl/xheep_matrix_spec
llvm-project/libc/src/math/nvptx/remainder.cpp
#include "src/math/remainder.h" #include "src/__support/common.h" namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(double, remainder, (double x, double y)) { return __builtin_remainder(x, y); } } // namespace LIBC_NAMESPACE
TOOL
0.961305
6.571589
16b8294d-eec4-490b-b164-482e10400f2a
atulb07/Cpp
HackerRank/DS/linkedList/posInsert.cpp
#include <bits/stdc++.h> using namespace std; class SinglyLinkedListNode { public: int data; SinglyLinkedListNode *next; SinglyLinkedListNode(int node_data) { this->data = node_data; this->next = nullptr; } }; class SinglyLinkedList { public: S...
ALGO
0.999702
4.339473
6f8a0a41-b8ed-43d2-b50f-1492e2284972
Bauyrzhan07/ADS
Data Structures/DoublyLinkedList.cpp
#include<iostream> using namespace std; struct node{ int val; node* prev; node* next; node(int x){ val=x; prev=NULL; next=NULL; } }; struct DoublylinkedList{ private: int size; node* head; node* tail; public: DoublylinkedList(){ size=0; head=N...
ALGO
0.99943
4.108908
36a71891-0ce3-4220-adc7-e2359955b198
ishandutta2007/codeforces
fastmath/normal/1393/C.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define ii pair <int, int> #define app push_back #define all(a) a.begin(), a.end() #define bp __builtin_popcountll #define ll long long #define mp make_pair #define f first #define s second #define Time (double)clock()/CLOCKS_PER_SEC #define debug(x) st...
ALGO
0.999962
4.5929
e70b1e99-798c-4a7d-9e54-0b3b10fe5e7d
ahnafhasanniloy/Academic
CC++/bfs.cpp
#include<bits/stdc++.h> #include<vector> using namespace std; int main(){ int n, k; cin>>n>>k; vector<vector<int>> graph(n); for(int i=0; i<k; i++){ int u, v; cin>>u>>v; graph[u].push_back(v); graph[v].push_back(u); } for(int i=0; i<n; i++){ cout<<i<<": "...
ALGO
0.999943
4.367857
bf7d2656-ab28-4770-8059-3810b4b601a7
Daksh2356/Leetcode_Questions
Game Theory/Divisor Game.cpp
/* Question : 1025. Divisor Game Date : 11-09-23 Problem Difficulty level : Easy Related Topics : Math, Dynamic Programming, Brainteaser and Game Theory Problem Statement: Alice and Bob take turns playing a game, with Alice starting first. Initially, there is a number n on the chalkboard. On each player's turn, that ...
ALGO
0.999961
5.944955
b3e0ea4d-b270-4b1d-a24e-00492e6c1780
gert86/ball_game
Board.cpp
#include "Board.h" #include "Piece.h" #include <fstream> const std::string Board::INIT_OPTIONS_CACHE_FILE = "/tmp/initPlaceableOptionsCache.txt"; bool Board::isPlaceable(const Piece *piece, int orientation, const Coord &coord, const BoardState &boardBefore, BoardState &boardAfter) { auto bo...
ALGO
0.904723
6.651057
f08d4fa6-1f0d-4244-ba08-b734146cde01
samujjalgit/MINDFUL
mindful/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.997999
6.761023
a707a207-e109-4e0a-9134-26199ceb06e7
brian09088/personal-leetcode-solution
cpp/(125) Valid Palindrome.cpp
class Solution { public: bool isPalindrome(string s) { int start = 0; int end = s.size() - 1; while(start <= end){ // isalnum 函數檢查是否為英文字母或數字 if(!isalnum(s[start])){ start++; continue; } if(!isalnum(s[end])){ ...
ALGO
0.999385
6.171333
01fee70d-aacf-4847-a999-93f326330da2
Marcux777/Programacao_Competitiva
CSES/Graph Algorithms/Flight Routes Check.cpp
/* ~~ Alguma parte/frase foda de um livro/mangá para dar sorte ~~ Uma vez eu gritei, gradualmente, perdi minha voz. Uma vez eu chorei, gradualmente, perdi minhas lágrimas. Uma vez eu sofri, gradualmente, me tornei capaz de suportar tudo. Uma vez me alegrei, gradualmente, me tornei indiferente ao mundo. E agora, tudo o...
ALGO
0.99997
4.048395
c4e611be-3c2b-4c53-b952-efb1862c1dc3
glipari/rtscan
driver/ppl/edf_sim.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <cstdlib> //#include <random> #include <algorithm> #include <cmath> #include <ppl.hh> #include <boost/ref.hpp> #include <analysis/task_utility.hpp> #include <models/task_parser.hpp> #include <models/fp_task.hpp> #include <analysis/ppl_...
ALGO
0.994908
4.879927
b3b06065-8bf5-4a1e-94a1-07d7beb1c5b3
dangquangthai2003/DangQuangThai_monC
Chapter 09/Programming Challenges/Challenges_5.cpp
// BT5: Pointer Rewrite #include <iostream> using namespace std; int doSomething(int *x, int *y); // Function prototype int main() { int a, b, result; // Nhap a, b cout << "Enter a: "; cin >> a; cout << "Enter b: "; cin >> b; // Su dung ham de tinh toan result = doSomething(&a, &b...
ALGO
0.999078
5.057244
88268d20-7814-4ada-a785-0a47342c98dc
Sakshy18/basics
Strings/first_occiurence.cpp
Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: haystack = "sadbutsad", needle = "sad" Output: 0 Explanation: "sad" occurs at index 0 and 6. The first occurrence is at index 0, so we return 0. int strStr(...
ALGO
0.999551
5.049559
e702eb03-2d79-497e-8811-54a34456f03a
justadreamer/uva-solutions
uva11242/uva11242.cpp
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <map> #include <sstream> #include <set> #include <iomanip> #include <list> #include <stack> #include <queue> #include <bitset> #include <cstdio> #include <cmath> #include <climits> #include <cstring> #include <cctype> #include <cstdl...
ALGO
0.996606
3.373184
e4d57455-c97a-4695-9333-e05ac4feed51
vfolunin/archives-solutions
UVa Online Judge/12049.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; void solve() { int aSize, bSize; cin >> aSize >> bSize; map<int, int> k; for (int i = 0; i < aSize; i++) { int x; cin >> x; k[x]++; } for (int...
ALGO
0.999623
3.729041
072c8599-d847-4bd6-afdd-950f0fdc6350
Tigran-Oqroyan/Common-Algorithms
Sorting-Algorithms/bucketSort.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void print_array(int array[], int length){ for(int i = 0; i < length; i++){ cout << array[i] << " "; } cout << endl; } void bucket_sort(int array[], int length){ if(length <= 0) return; // find maximum ...
ALGO
0.999902
5.064762
745fa92f-3a98-4521-9e35-f2ab8bfb88df
Shehab-Sarker/codforces-code
A_Translation.cpp
#include<iostream> using namespace std; int main(){ string s; cin>>s; string t; cin>>t; string r; for(int i=t.size()-1;i>=0;i--){ r+=t[i]; } if(s==r){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } return 0; }
ALGO
0.99997
3.59669
b4aa5527-e503-46ad-82ce-f1650fb58618
so0oppy/Algorithm
프로그래머스/2/17686. [3차] 파일명 정렬/[3차] 파일명 정렬.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; vector<string> solution(vector<string> files) { vector<string> answer; vector<tuple<string, int, int>> record; //[[HEAD, NUMBER, Index], ...] for(int i=0; i<files.size(); i++) { string head = ""; string ...
ALGO
0.999264
5.270256
83ce3017-06b1-4013-b4b7-cef84cc03684
csvultrainstinct/DSA-Code-Templates
Grpahs/MST(Kruskal's Algorithm).cpp
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
ALGO
0.999993
5.223614
978a774f-411d-49ae-8f54-1a32d83d7301
PedroHenriqueSchneider/Maratona-de-Programacao
semana 7/componentes.cpp
#include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; void dfs(char node, vector<vector<char>>& graph, vector<bool>& visited, set<char>& component) { visited[node - 'a'] = true; // Mark the node as visited component.insert(node); // Add node to the current component ...
ALGO
0.999945
6.970602
eeaf581d-3bda-4896-ba5e-091ee60bd18e
Neksus42/macr
vcpkg_installed/x64-windows/vcpkg/blds/opencv4/src/4.8.0-f4e8005717.clean/samples/cpp/watershed.cpp
#include <opencv2/core/utility.hpp> #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <cstdio> #include <iostream> using namespace cv; using namespace std; static void help(char** argv) { cout << "\nThis program demonstrates the famous watershed segmentation ...
ALGO
0.990284
6.171174
af80f09e-66c2-40d2-aac6-60f522147206
osirisQdt2810/algorithms
src/leetcode/cheatsheet/solution/2300-2399/2318.Number of Distinct Roll Sequences/Solution.cpp
class Solution { public: int distinctSequences(int n) { if (n == 1) return 6; int mod = 1e9 + 7; vector<vector<vector<int>>> dp(n + 1, vector<vector<int>>(6, vector<int>(6))); for (int i = 0; i < 6; ++i) for (int j = 0; j < 6; ++j) if (gcd(i + 1, j + 1) ==...
ALGO
0.999987
6.052822
31b92d19-bea6-4b9e-987c-6254dadf7285
carlosgiovani/Flutter_GreenGrocer
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
6b57da48-7c7b-46f5-b7d4-5b2f80d13f6a
ApolloOS/bootable_recovery
updater/blockimg.cpp
#include <ctype.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <inttypes.h> #include <linux/fs.h> #include <pthread.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include ...
TOOL
0.891278
7.503593
29a863d3-9354-4ade-9978-825d5a156976
LeoninCS/My_AlgorithmCode
Algorithm_Code/蓝桥杯/十五届大学C组省赛/3.cpp
#include<bits/stdc++.h> using namespace std; using i64 = long long; const int inf = 1e9; const i64 INF = 1e18; void solve() { set<i64> se; se.insert(1); for(int i = 1; i < 63 ; i++) { i64 val = pow(2,i); se.insert(i); } int n = 1; cin >> n; int cnt = 0; while(n--) { i64 val; cin >> val; if(se.count(...
ALGO
0.997368
4.47815
d300c48b-4b55-4f2f-82f2-cd5bef2841ee
bhanupgpt/leetcode-practice
Difficulty: Medium/Duplicate Subtrees/duplicate-subtrees.cpp
//{ Driver Code Starts #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; } }; // Function to Build Tree Node* buildTree(string str) { // Corner Case if (str.length()...
ALGO
0.999831
7.110518
774c0c16-02da-4d73-b5cc-547bb64f1a3d
tetriv0217/Striver-questions
5_LinkedList/3_questions/1_SLL/2_odd_even.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int data; node *next; node(int data1) { data = data1; next = nullptr; } }; node *convertArrToLL(vector<int> &arr) { node *head = new node(arr[0]); node *mover = head; for (int i = 1; i < arr.size(); i++) ...
ALGO
0.999948
4.902332
06dddb62-a15d-487f-b8b7-8ad68c560dce
raincross7/code-similarity
codes/train_code/problem287/problem287_274.cpp
#include <bits/stdc++.h> using namespace std; int max_index(const vector<int> &xs) { vector<int> ys(xs); vector<int>::iterator iter = max_element(ys.begin(), ys.end()); return distance(ys.begin(), iter); } int change_count(int n, const vector<int> &xs, const vector<int> &ys) { int x_max_idx = max_index(xs); ...
ALGO
0.999984
4.018824
cc92b968-7a56-403f-8c3e-6dfc981cfa3c
10247bit/Distributed_Scheduling_Algorithm
RDG.cpp
# include <stdio.h> # include <stdlib.h> # include <iostream> # include <fstream> # include <math.h> # include <vector> //# define nop 5 /*nop is the number of processors*/ using namespace std; int pro[4] = {2,3,4,5}; float shapeparameter[3] = {0.5,1,2}; float ccr[5] = {0.1,0.5,1,5,1...
ALGO
0.982374
3.185799
44795d19-c039-45a8-9a1b-4a39a6ec8dd5
hui09241/uva
uva10252-Common Permutation(Solution).cpp
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int main() { string str1,str2; while(getline(cin,str1)) { getline(cin,str2); int str1l,str2l,max1,min1; string ans="",nstr1="",nstr2=""; sort(str1.begin(),str1.end()); sort(str2.begin(),...
ALGO
0.999914
3.148346
24def99e-30c8-428d-9156-90697257dee2
K14KHaNaSa/bojPractice
10811.cpp
#include <iostream> #include <vector> using namespace std; int main(void) { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m, i, j; cin >> n >> m; vector<int> bag(n + 1); for (int k = 1; k <= n; k++) { bag[k] = k; } while (m--) { cin >> i >> j; vector<int> temp(j - i + 1); for (int...
ALGO
0.999984
3.844052
d2f3e33d-5af5-4451-a7fd-d59e8c69c168
mukul9897/May-LeetCode-Challenge-2020
Day08(Check If It Is a Straight Line).cpp
class Solution { public: bool checkStraightLine(vector<vector<int>>& c) { int l=c.size(); set<float>s; for(int i=1;i<l;i++){ float a=c[i][1]-c[i-1][1]; float b=c[i][0]-c[i-1][0]; float m=a/b; //cout<<m<<endl; s.insert(m); } ...
ALGO
0.999891
4.868721
21883303-854b-4736-aec4-a06efe08a3a0
gauravjha0711/DSA
recursion/Array/linearsearch.cpp
#include<iostream> using namespace std; bool linearSearch(int arr[], int n, int k){ if(n==0){ return false; } if(k==arr[0]){ return true; } return linearSearch(arr+1,n-1,k); } int main(){ int n,k; cout<<"Enter the size: "; cin>>n; int arr[n] = {0}; cout<<"Enter el...
ALGO
0.999927
5.267811
6ebefac2-97fb-49ad-8d60-f66974eab9b7
FredB1/qcNotes
cs211/cross.cpp
#include <cmath> #include <iostream> using namespace std; bool ok(int q[], int adj[][5], int c) { for (int i = 0; i < c; ++i) if (q[i] == q[c]) return false; for (int i = 0; adj[c][i] != -1; ++i) if (abs(q[c] - q[adj[c][i]]) == 1) return false; return true; } void ...
ALGO
0.999958
4.023038
660afea3-b296-43ef-87a9-4d0506f4cf68
Mokhtar628/task_manager
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
62dc79d0-76a0-40d1-b1d0-37f2fe70c44b
saddeath/Labs_VVP
Задания к теме 18/Задание 3/Задание 3.cpp
#include <stdio.h> #include <locale.h> int main() { int a, b, c=0, mass[100]; setlocale(LC_ALL, "Rus"); printf("Введите количество :\n"); scanf_s("%d", &a); printf("Введите элементы массива :\n"); for (b = 1; b <= a; b++) { printf("mass[%d] = ", b); scanf_s("%d", &mass[b]); } for (b = 1; b <= a; b++) { ...
ALGO
0.998829
3.334177
00d2ffb4-ca95-4eb5-9564-96579801206c
ashokabairwaideology/Leet-code-problem
solution/2100-2199/2197.Replace Non-Coprime Numbers in Array/Solution.cpp
class Solution { public: vector<int> replaceNonCoprimes(vector<int>& nums) { vector<int> stk; for (int x : nums) { stk.push_back(x); while (stk.size() > 1) { x = stk.back(); int y = stk[stk.size() - 2]; int g = __gcd(x, y); ...
ALGO
0.999994
5.711416
e52e4011-7eae-4478-a888-a1c37cec93e4
ishandutta2007/codeforces
maspy/normal/486/A.cpp
#line 1 "main.cpp" #include <bits/stdc++.h> #line 3 "/home/maspy/library/my_template.hpp" using namespace std; using ll = long long; using ld = long double; using pi = pair<ll, ll>; using vi = vector<ll>; template <class T> using vc = vector<T>; template <class T> using vvc = vector<vc<T>>; template <class T> using v...
ALGO
0.999816
4.061392
e72a6e48-5626-40cf-ba66-7ed943f9d043
HodongMan/professional-cpp-4th-ed
c20_code/03_Random/06_uniform_int_distribution.cpp
#include <random> #include <functional> #include <map> #include <fstream> #include <ctime> using namespace std; int main() { const unsigned int kStart = 1; const unsigned int kEnd = 99; const unsigned int kIterations = 1'000'000; // Uniform Mersenne Twister random_device seeder; const auto seed = seeder.entrop...
ALGO
0.979279
4.985474
b3949345-329b-4007-802e-7d3f740bbef4
kmjp/procon
codeforce/edu/041-060/051/e.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999216
3.899043
023abf72-ac6a-4fb2-bca6-ad2b32d350cf
jiry17/MaxFlash
src/parser/specification_parser.cpp
#include "specification_parser.h" #include "semantics_factory.h" #include "config.h" #include <cstring> #include <iostream> namespace { std::vector<int> extractAllInt(std::string s) { std::vector<int> result; for (int i = 0; i < s.length(); ++i) { if (s[i] >= '0' && s[i] <= '9') { ...
TOOL
0.865696
4.633103
751555eb-0acf-47e4-983d-ce2f794f37af
ishandutta2007/codeforces
fsouza/normal/96/A.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <vector> #include <map> #include <set> using namespace std; typedef long long lint; int main() { int c; int last = -1, many = 0; bool danger = false; while ((c = getchar()) != -1) { if (c != '1' &...
ALGO
0.99956
3.490167
7c5046ff-8e35-45df-b9ba-77d6f7ea9bfb
Rakibul-Hassan-1/Phitron-Modules
Contests/Practice/A_Fox_And_Snake.cpp
#include <bits/stdc++.h> #define R_H Rakibul Hassan #define nl endl #define all_occarance (ctrl + shift + a) #define pii pair<int, int> using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int a, b; cin >> a >> b; for (int i = 1; i <= a; i++) ...
ALGO
0.999992
3.69446
ddcc4d83-6373-49e6-9d63-e52e4fee81fa
RyzenOS/system_core
libsparse/sparse_crc32.cpp
/* * First, the polynomial itself and its table of feedback terms. The * polynomial is * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 * * Note that we take it "backwards" and put the highest-order term in * the lowest-order bit. The X^32 term is "implied"; the LSB is the * X^31 ter...
ALGO
0.997086
5.736622
ce278d7b-028f-409b-8aa0-f559b012236c
shunliuniliu/SVO_edge
Thirdparty/opencv-2.4.13/samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp
/** * @function cornerHarris_Demo.cpp * @brief Demo code for detecting corners using Harris-Stephens method * @author OpenCV team */ #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace cv; using namespace std; //...
ALGO
0.998728
6.736506
fe62c0f3-3b6e-4e0e-a38f-7d394ea17c6c
CRIXSHWA/diegolix29s-shadPS4-V.0.4.1
src/core/file_format/pkg.cpp
#include <zlib.h> #include "common/io_file.h" #include "common/logging/formatter.h" #include "core/file_format/pkg.h" #include "core/file_format/pkg_type.h" static void DecompressPFSC(std::span<char> compressed_data, std::span<char> decompressed_data) { z_stream decompressStream; decompressStream.zalloc = Z_NU...
TOOL
0.893994
4.583761
ee47b1ec-9c4f-4ca5-948e-f04ddc4341e2
ishandutta2007/codeforces
turmax/normal/1257/B.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int t; cin>>t; for(int cycle=0;cycle<t;++cycle) { int a,b; cin>>a>>b; if(a==1 && b!=1) { cout<<"NO"<<endl; continue; } ...
ALGO
0.999948
4.120722
9a182b5b-6a8e-4191-89d2-54cffc8bece5
mainul3195/codes
camp - october 2024/day - 1/B_B.cpp
#include <bits/stdc++.h> using namespace std; struct nd { int val, ind; }; bool cmp(nd &a, nd &b) { return a.val < b.val; } vector<nd> v, ans; int n; void make(int l = 0, int r = n - 1, int base = 0) { if (l > r) return; if (base < v[l].val) { for (int i = l; i <= r; i++) ...
ALGO
0.999888
3.897663
ed65db9d-4dad-4b2f-b696-3c5719a59855
Ankan-B10/Delta-MERN-Stack
Backend/SQL/hi.cpp
#include<iostream> using namespace std; int main() { int i=1; int n; cout<<"enter the value of n = "; cin>>n; while(i <= n){ cout<<i<<" X "<<n<<" = "<<i*n<<endl; i++; } return 0; }
ALGO
0.998615
3.416307
d5420a25-cb6a-4701-bc20-1fa773bc5392
whyharshhh/DSA_Supreme
Week_12/__Queues/Queue CLass 1 Codes/main (26).cpp
#include <iostream> using namespace std; class CirQueue{ public: int size; int *arr; int front; int rear; CirQueue(int size) { this->size = size; arr = new int[size]; front = -1; rear = -1; } ...
ALGO
0.994431
4.448387
769b6039-f11e-482e-890b-505ca0a54f2a
PixelExperience/hardware_qcom_display
msm8998/sdm/libs/utils/rect.cpp
#include <math.h> #include <utils/rect.h> #include <utils/constants.h> #include <algorithm> #define __CLASS__ "RectUtils" namespace sdm { bool IsValid(const LayerRect &rect) { return ((rect.bottom > rect.top) && (rect.right > rect.left)); } bool IsCongruent(const LayerRect &rect1, const LayerRect &rect2) { retu...
TOOL
0.983231
7.193449
10dcd3e2-7089-4012-a3a4-e30bd33fa202
QWERx29/Code
Luogu/P/P_5723.cpp
#include <bits/stdc++.h> using namespace std; bool is_prime(int q) { if (q < 2) return 0; for (int i = 2; i * i <= q; i++) if (q % i == 0) return 0; return 1; } int main() { int n, cnt = 0, tot = 0; cin >> n; for (int i = 2; i <= n; i++) { if (is_prime(i) ...
ALGO
0.999994
4.093189
a8936fc6-1ecc-4db8-9c9e-8487b5428b60
NanZiqian/Programming_work
Data_Structures/Projects/PR2_Dijkstra_with_heap/#作答者2/code/Heap.cpp
#include "Heap.h" #include <iostream> using namespace std; /////////////////////////////////////////////////////////// // The implementation of Binary Heap (Complete Heap) /////////////////////////////////////////////////////////// void CompleteHeap::percolateUp(int index){ // Compare the node with its parent, an...
ALGO
0.997711
4.260559
b059d130-7d07-40bb-ae47-107c5fbf8e7c
ishandutta2007/codeforces
skywynne/normal/282/E.cpp
#include<bits/stdc++.h> #define int long long using namespace std; const int N = 1e5 + 10; int n, Mx, B[N], S[N]; struct Node { int32_t l, r, c; Node() {l = r = c = 0;} }; struct BST { int L = 32; vector < Node > A; BST(int _L = 32) {L = _L, A.clear(); A.push_back(Node());} void Add(int val, int...
ALGO
0.999994
4.29503
b5a7af6b-9c41-4230-a93f-0482de3e6d5f
NimeshJohari02/LeetCodeGrind
5. January 2022 Questions/134-gas-station/134-gas-station.cpp
class Solution { public: int canCompleteCircuit(vector<int>& gas, vector<int>& cost) { int total =0 ; int currSum = INT_MAX; int start =0; for(int i =0 ; i < gas.size() ; i++){ int currNeed = gas[i] - cost[i]; cout<<currNeed<<" "; total += currNeed...
ALGO
0.999983
5.689126
c15cd609-3456-4eff-8162-51df1ac3d653
CodeBySushant/SolvedLeetcode
leetcode-main/leetcode-main/solution/2600-2699/2642.Design Graph With Shortest Path Calculator/Solution.cpp
class Graph { public: Graph(int n, vector<vector<int>>& edges) { this->n = n; g = vector<vector<int>>(n, vector<int>(n, inf)); for (auto& e : edges) { int f = e[0], t = e[1], c = e[2]; g[f][t] = c; } } void addEdge(vector<int> edge) { int f = ...
ALGO
0.999928
5.83773
267e5c73-c54a-4e7c-bb4b-7bb42fac549b
elgamalsalman/cp-solutions
CF/CF_Solutions/1512G_Short_Task/1512G.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int c, tc, d[10000050], ans[10000050]; void sieve() { ans[1] = 1; for (ll i = 1; i < 1e7; i++) { for (ll j = i; j <= 1e7; j += i) d[j] += i; if (d[i] <= 1e7 && ans[d[i]] == 0) ans[d[i]] = i; } } int main() { ios_base::sync_with_stdio(0); ...
ALGO
0.99987
4.515066
7c5743ec-e330-4f7e-b4dd-077d1cded4cd
ahbaxter/Basilisk
dependencies/include/FreeImage/LibRawLite/internal/demosaic_packs.cpp
#include <math.h> #define CLASS LibRaw:: #include "libraw/libraw_types.h" #define LIBRAW_LIBRARY_BUILD #define LIBRAW_IO_REDEFINED #include "libraw/libraw.h" #include "internal/defines.h" #define SRC_USES_SHRINK #define SRC_USES_BLACK #define SRC_USES_CURVE #include "./wf_filtering.cpp" #include "./dht_demosaic.cpp...
TOOL
0.850613
4.143373
b0b6acc9-9125-4430-8454-0df0160aea78
pavel-ryzhov/global_vars
runs/003111.cpp
#include <iostream> #include <string> #include <fstream> #include <algorithm> #include <functional> #include <map> #include <list> using namespace std; static int len_word=50000; static int max_len=100001; inline int letters(char a){ if(a=='a' || a=='b' || a=='c'){ return 2; } else if(a=='d' || a=='e' || a=='f'...
ALGO
0.998259
3.197514
2ade5e8c-c258-40c0-b7be-1380a6de5203
kmjp/procon
yuki/0001-1000/401-500/474.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999917
4.133246
c4988ef9-a42d-4bd1-9113-b22a2365a386
ishandutta2007/codeforces
mjhun/normal/859/D.cpp
#include <bits/stdc++.h> #ifdef DEMETRIO #define deb(...) fprintf(stderr,__VA_ARGS__) #define deb1(x) cerr << #x << " = " << x << endl #else #define deb(...) 0 #define deb1(x) 0 #endif #define pb push_back #define mp make_pair #define fst first #define snd second #define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i) #...
ALGO
0.999615
3.182513
ed3f6b53-3972-4ed3-a8bf-1fc704d6b3a8
nccaiteam/histopathology_annotation_nia
libs/boost_1_67_0/libs/hana/benchmark/reverse/move.fusion.vector.erb.cpp
<% if input_size > 10 %> #define FUSION_MAX_VECTOR_SIZE <%= ((input_size + 9) / 10) * 10 %> <% end %> #include <boost/fusion/include/as_vector.hpp> #include <boost/fusion/include/make_vector.hpp> #include <boost/fusion/include/reverse.hpp> #include "measure.hpp" #include <cstdlib> #include <string> #include <util...
ALGO
0.907474
4.550695
4eeb3d3f-b058-428e-ad9f-7753c1b7afed
scanof/Competitive-Programming-Notebook
code/graph/dijkstra.cpp
// O ((V+E)*log V) vector <ii> g[nax]; int d[nax], p[nax]; void dijkstra(int s, int n){ forn(i, n) d[i] = inf, p[i] = -1; d[s] = 0; priority_queue <ii, vector <ii>,greater<ii> > q; q.push({0, s}); while(sz(q)){ auto [dist, u] = q.top(); q.pop(); if(dist > d[u]) continue; for(auto& [v, w]: g[u]){ ...
ALGO
0.999869
5.088102
c6d5ccaf-f3e5-4f8a-8904-77ac891c1d8e
emrul-chy/Competitive-Programming
CodeForces/697A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t, s, x; cin >> t >> s >> x; int a = x, b = x -1; if(x < t) { printf("NO\n"); return 0; } if((a-t) % s == 0 && (x-t)!= 1) { cout << "YES\n"; return 0; } if((b-t) % s == 0 && (b-t) !=...
ALGO
0.999814
3.662342
44490835-1431-48e2-b5c8-f43f4bab6f13
tanushkaaaa/competitive-coding
105-construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal.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.999991
6.720725
a6c5f7b7-1815-4165-a79c-4bbacf0956e1
19CSAbhishek001Singh/A2OJ
DIV2A/45.cpp
/* CP Abhishek Codeforces - Abhishekcs001 Codechef - abhishekcs AtCoder - abhishekcs001 */ #include <bits/stdc++.h> #include <ctype.h> using namespace std; #define ll long long #define int long long #define endl "\n" #define for0(i, n) for (ll i = 0; i < n; i++) #define for1(i, n) for (ll i = 1; i <= n; i++) #define m...
ALGO
0.999872
4.349866
ab9d0c40-79ce-4594-8155-a378dee97700
sarvex/leetcode-rockstar
solution/0500-0599/0509.Fibonacci Number/Solution.cpp
class Solution { public: int fib(int n) { int a = 0, b = 1; while (n--) { int c = a + b; a = b; b = c; } return a; } };
ALGO
0.999994
6.220306
e4de996a-20c3-464b-ba6b-51a488c0588e
PRABHUDEESHWARAN/dsa-preparations
random problems/xorBitwise.cpp
#include<bits/stdc++.h> using namespace std; int main() { int m,n; cin>>m>>n; int v1=(m%2==0)?m+1:m,v2=0; for(int i=m;i<=n;i++) { if(i%2==0) { v2|=i; } else{ v1=v1&i; } } cout<<v1<<" "<<v2; return 0; }
ALGO
0.999986
3.213894
cf35d378-db59-40f0-ad56-2a033e0e0edc
Rain9876/ProjectEuler
Q51-60/Q52/Q52.cpp
/* * Project Euler Problem 52 * Yurun SONG * 2019-09-24 * * Problem 52: * It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. * Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits. * */ #i...
ALGO
0.998111
4.999885
780c8e2a-fcf8-4c90-9ab3-18c03511359c
Yidadaa/Coding-Every-Day
2019/acwing/105-qixi-day[CH0502].cpp
#include <iostream> #include <algorithm> #include <string> using namespace std; const int N = 100000; int row[N], column[N]; long long solve(int arr[], int n, int t) { int avg = t / n; // 求解均值 for (int i = 0; i < n; i++) arr[i] -= avg; // 减去均值 for (int i = 1; i < n; i++) arr[i] += arr[i - 1]; // 求前缀和 sort(a...
ALGO
0.999971
4.173905
c0444477-a372-47a8-aa80-b74572a2af17
patrickslcomputerprogramming/CPlusPlus
w8_pointers/exe1/additionnalVersion_ArrayPointer.cpp
#include<algorithm> #include <iostream> using namespace std; int main() { //Dclarer des sous-programmes int * liste_croissant(int * arr, int t); int * liste_decroissant(int * arr, int t); //Dclarer des variables int taille = 3; int arr[taille] = {5, 1, 4}; int i; typedef int * Pointeur...
ALGO
0.999948
4.493135
3dfe4e9c-09a3-49b2-8021-4445db34a07b
rivaldirp/sharechip_project
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
86693861-ee72-4458-b65e-758c713a5da3
Arsssenij/Course-project
src/main.cpp
#include <iostream> #include <string> #include "palindrome.h" int main() { std::string input; std::cout << "Введите строку для проверки на палиндром (или 'exit' для выхода):" << std::endl; while (true) { std::cout << "> "; std::getline(std::cin, input); if (input == "exit") { ...
ALGO
0.919297
5.285829
8e6a0edb-ba98-44c4-9c0b-2d0a81647225
iimKoala/study
Ex_Files_Learning_Cplusplus/Exercise Files/Ch04/04_03/End/CodeDemo/CodeDemo.cpp
// Learning C++ // Exercise 04_03 // While Loops, by Eduardo Corpeño #include <iostream> #include <vector> using namespace std; vector<int> numbers = {12,25,31,47,58}; int main(){ auto ptr = numbers.begin(); while (ptr != numbers.end()){ cout << *ptr << " "; ptr = next(ptr, 1); } ...
ALGO
0.995162
3.791996
ec2cd901-dc67-4c13-b7b5-a8b473a2e1f5
kfarsany/undergraduate
ICS_46/quiz6/driver_quiz6.cpp
//#include "q6solution.hpp" // // ////Recursive Merge Sort (based on merge written in q6solution.hpp) //template<class T> //void merge_sort(T a[], int low, int high) { // if (high - low < 1) //Base case: 0 or 1 value to sort -> sorted // return; // else { // int mid = (low + high)/2; //Split...
TEST
0.994424
5.263644
91133731-1607-4114-8bd1-8f8b0af73e0f
ishandutta2007/codeforces
coderanshu/normal/1061/B.cpp
#include<bits/stdc++.h> using namespace std ; #define M 1000000007 #define MM 998244353 #define ll long long #define pb push_back #define mem0(a) memset(a,0,sizeof(a)) #define mem1(a) memset(a,-1,sizeof(a)) #define memf(a) memset(a,false,sizeof(a)) #define all(v) v.begin(),v.end() #define F first #define S second #d...
ALGO
0.999994
4.069016
88705a0e-819d-4a36-aa17-1848231596ec
hjiang13/LLMs-in-IR
POJ-104/101/1173.cpp
#include <iostream> using namespace std; int main () { for(int a=1; a<4; a++) { for(int b=1; b<4; b++) { for(int c=1; c<4; c++) { if(((b>a)+(c==a)==3-a)&&((a>c)+(a>b)==3-b)&&((c>b)+(b>a)==3-c)) { int rank[3]={ a,b,c} ; char ch[3]={ 'A','B','C'} ; for(int i=0; i<2; i++) { if(rank[i]<rank[i+1]) { swap(rank[i],rank[i+1]);...
ALGO
0.999937
3.673438
7c2ac879-3eca-4fad-a947-863866de1ef8
vrshchk/pp_cpp
05Vareshchuk/Main.cpp
#include <iostream> #include <time.h> #include "Horner.h" using namespace std; int main() { double x = 0; size_t size = 0; srand(time(NULL)); for (int t = 0; t < 100; t++) { x = (rand() % 100 + 0); size = (rand() % 20 + 1); double* coeff = new double[size]; fillArray(c...
TEST
0.943498
5.515839
8de515d4-ead2-4ec7-b9ee-38d70f2f207b
Lukehututu/leetcode_practice
5_1_相交链表/5_1_相交链表/test.cpp
#include<iostream> #include<unordered_set> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* getIntersectionNode(ListNode* headA, ListNode* headB) { unordered_set<L...
ALGO
0.999095
5.42891
940feb70-725c-456f-a6be-49cdc2c83341
djfdyuruiry/cnc-td-nco-mod
TIBERIANDAWN/LAYER.CPP
/* $Header: F:\projects\c&c\vcs\code\layer.cpv 2.18 16 Oct 1995 16:50:14 JOE_BOSTIC $ */ /*********************************************************************************************** *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S *** **************************...
ALGO
0.98812
6.99852
e6ab66c0-f090-408a-91a0-6a41eca6288a
chaoxu1990/LeetCode
C++/Jump Game.cpp
/* Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. For example: A = [2,3,1,1,4], return true. A = [3,2,1,0,4], return false. */ ...
ALGO
0.999936
6.148629
e52672b4-a4ec-4baa-b021-e863abe66325
ksanti6/Simple2D
Simple2D/Source/Enemy.cpp
/********************************************************************************************************************** * * Author : Kiara Santiago * File : Enemy.cpp * Purpose: the behaviors,etc of the enemy * ***********************************************************************************************************...
ALGO
0.929467
4.643735
1518d3c1-a854-45e9-a165-831151d9a14d
Prateekk02/CP-Templates
TemplateStuff/Template.cpp
#pragma GCC optimize("O3,unroll-loops") #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace chrono; using namespace __gnu_pbds; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MOD 1000000007 #d...
ALGO
0.986834
3.224638
85efd432-e279-416f-b0bd-64965feff703
skygupta07/cpp
57_recursion1/12_pascalTriangle.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<vector<int>> generate(int numRows) { // recursion -> base case kaam fn call if (numRows == 1) return {{1}}; vector<vector<int>> prevRows = generate(numRows-1); // fn call pehle likh diya taaki reverse...
ALGO
0.999954
5.180642
5a6d3704-54ff-449e-ab76-391842264de1
Ra1nWarden/Algorithms_And_Data_Structures
data_structures/SplayTree.cpp
#include "SplayTree.h" #include <cstdlib> using namespace std; Node::Node() { ch[0] = ch[1] = NULL; s = 1; flip = 0; } int Node::cmp(int k) const { int d = k - (ch[0] == NULL ? 0 : ch[0]->s); if(d == 1) return -1; return d <= 0 ? 0 : 1; } void Node::maintain() { s = 1; if(ch[0] != NULL) s +=...
ALGO
0.99992
4.039225
de368169-ca0a-468d-a7ae-c04ce3663c29
ARW2705/leet-code-solutions
solutions/2181-M-Merge-Nodes-in-Between-Zeros/main.cpp
#include <iostream> #include <vector> #include "../../utilities/singly-linked-node.hpp" #include "../../utilities/build-linked-list.cpp" #include "../../utilities/print-linked-list.cpp" ListNode* mergeNodes(ListNode* head) { ListNode* current = head; ListNode* buildNode = head; while (current->next) { if (cu...
ALGO
0.999958
6.036433
83e2e19c-2df3-43f2-9e00-f04972520c60
hammerx999/exam_washing
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
0deb9c56-21f5-46d7-8c60-403994f24419
tickscn/leetcode
71.simplify-path.cpp
/* * @lc app=leetcode id=71 lang=cpp * * [71] Simplify Path */ class Solution { public: string simplifyPath(string path) { int length = path.length(); if (length < 2) return "/"; string res; vector<string> stack; for (int i = 1, j, k; i < length; i = k + 1) { string tmp; for (j = i; j < length &...
ALGO
0.999773
6.157074
23088475-6542-48e6-9946-647c563253b2
fabiozak/minimosd-extra
libraries/AP_Math/vector3.cpp
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- #include "AP_Math.h" #define HALF_SQRT_2 0.70710678118654757 // rotate a vector by a standard rotation, attempting // to use the minimum number of floating point operations template <typename T> void Vector3<T>::rotate(enum Rotation rotati...
ALGO
0.992144
7.297258
853cd131-134f-4f76-a9df-456e7f62e260
ManTang034/MT-LeetCode_solution
1020.number-of-enclaves.cpp
/* * @lc app=leetcode.cn id=1020 lang=cpp * @lcpr version=30110 * * [1020] 飞地的数量 */ // @lcpr-template-start using namespace std; #include <algorithm> #include <array> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <list> #include <queue> #include <stack> #...
ALGO
0.999959
6.435931
02e814eb-fbf3-4b6b-8096-44f768286131
Pablo-barquin/EDNL
P7/Ejercicio10.cpp
#include "Util/alg_grafoPMC.h" #include "Util/alg_grafo_E-S.h" #include "iostream" typedef unsigned int tcoste; using namespace std; struct Solucion { tcoste CosteRecorrido; vector<GrafoP<tcoste>::vertice> P; }; Solucion TarifaMinima(const GrafoP<tcoste>& Avion, const GrafoP<tcoste>& Tren, const GrafoP<tcost...
ALGO
0.998908
4.107858
10d36a11-025e-4fef-a3ee-8f2bf79e05ec
du5l5ljason/LeetCodeTests
CombinationSum.cpp
#include <iostream> class Solution { public: vector< vector<int> > solutions; vector<vector<int> > combinationSum(vector<int> &candidates, int target) { // Start typing your C/C++ solution below // DO NOT write int main() function solutions.clear(); if( candidates.size()==0 ) re...
ALGO
0.999962
5.569538
1844701b-0153-4182-8f09-6b54865e3e84
developer-bin/algorithm
boj/boj_10971.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <string> #include <queue> #include <map> #include <vector> #include <cmath> #include <set> #include <stack> #include <bitset> #define MIN_VALUE -200000000 #define MAX_VALUE 200000000 #define MOD 9901 #define ll long long using namespace std; int n; in...
ALGO
0.999984
3.624041
d803fbf9-3563-4c3c-9bcc-4af690807730
muhammadjonyorqinov/weather_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.99887
6.783439
27002101-e3e1-405f-a3bf-f7e858126b7b
JatinSharma32/NSM_Lab_Assig
Newton_Raphson_Meathod.cpp
#include<stdio.h> #include<math.h> float f(float x){ return pow(x,3)-(6*x)+4; } float f_(float x){ return (3*pow(x,2))-6; } int main(){ printf("\t\tNEWTON RAPHSON MEATHOD\n\n"); float a,b,x; printf("Enter any integers giving -ve and +ve value in equation: "); scanf("%f %f",&a,&b); if(f(a)>f(b)){ x=b; } el...
ALGO
0.999954
3.497753
da6bf38f-87cb-437a-ac2e-badfb3a29bcc
Prakashkumar88/DSA-and-CP
Trees/bfs.cpp
#include <bits/stdc++.h> using namespace std; // Add the necessary include paths to the compiler flags #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #define nl '\n' #define sp ' ' #define pi 2 * acos(0.0) const int INF = 1e9 + 10; // Control Flow #define F...
ALGO
0.999847
6.031317
aedeb977-ae7e-4269-89ad-d01c535c4f2c
johnson3d/titan3d
3rd/native/crunch/crnlib/crn_sparse_bit_array.cpp
namespace crnlib { sparse_bit_array::sparse_bit_array() : m_num_groups(0), m_ppGroups(NULL) { } sparse_bit_array::sparse_bit_array(uint size) : m_num_groups(0), m_ppGroups(NULL) { resize(size); } sparse_bit_array::sparse_bit_array(sparse_bit_array& other) { m_num_groups...
TOOL
0.92464
6.093106
a280c69b-b88f-4713-8db9-856cfb3cc2d4
suddenabnormalsecrets/libcxx
test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp
// <algorithm> // template<RandomAccessIterator Iter> // requires ShuffleIterator<Iter> // && LessThanComparable<Iter::value_type> // void // partial_sort(Iter first, Iter middle, Iter last); #include <algorithm> #include <cassert> void test_larger_sorts(unsigned N, unsigned M) { assert(N != 0); ...
TEST
0.999496
6.71293