uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
7886b8da-df21-44c2-a8d2-ff6161302020
KyLenMou/CF
Div. 4/Codeforces Round 784 (Div. 4)/C.cpp
#include<bits/stdc++.h> #define x first #define y second #define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define endl '\n' // #define int long long #define ll long long #define pq(x) priority_queue<x,vector<x>,greater<x>> #define PQ(x) priority_queue<x> using namespace std; typedef pair<int,int> PII; ...
ALGO
0.999601
4.44354
6416f0cc-db81-4fa2-9c90-498251e7b014
Ornzas/CPPstepik
1.4/equal3.cpp
#include <iostream> using namespace std; int main() { int a, b, c, m; cin >> a >> b >> c; if (a >= b && a >= c) { m = a; } if (b >= a && b >= c) { m = b; } if (c >= b && c >= a) { m = c; } cout << m; return 0; }
ALGO
0.999535
4.360941
9f6f2404-73fa-4648-8f02-d34b09ba63db
abhishekmahajan3711/Flutter_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.998733
6.76775
27adc3d3-ac09-4fdb-84a7-354b71ea8ca6
masonarchhsieh/Training_LeetC
maximum-binary-tree-ii/Accepted/9-28-2023, 8_00_28 PM/Solution.cpp
// https://leetcode.com/problems/maximum-binary-tree-ii /** * 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) {} * Tre...
ALGO
0.99996
6.343569
8010ad04-de80-4ea4-a669-c420e0364515
kmsabrin/UVaSolved
UVaSolved/Volume 111/11112.cpp
#include <stdio.h> #include <stdlib.h> void main() { int a, b, c, i, x, k, s; while ( 1 ) { scanf( "%d %d %d", &a, &b, &c ); if ( a == 0 && b == 0 && c == 0 ) { break; } k = abs( a - c ); if ( k % b ) { printf( "No accounting tablet\n" ); continue; } x = k / b; s = 0; i = x /...
ALGO
0.999942
3.438983
c6753eea-41de-489e-8179-350dca6d8e07
AkhilYeddu/RE_CPP
STL/DEQUE.CPP
#include <bits/stdc++.h> using namespace std; int main() { deque<int>dq; dq.push_back(1); dq.emplace_back(2); dq.push_front(3); dq.emplace_front(4); dq.pop_back(); dq.pop_front(); cout<<dq.front()<<endl; cout<<dq.back()<<endl; return 0; }
ALGO
0.984321
4.343457
737150a2-87b3-4317-a08f-ac141e83e8e3
Rajath-Acharya/LeetCode
328-odd-even-linked-list/328-odd-even-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* oddEvenList...
ALGO
0.999957
5.725726
6e9d2a7c-d469-4b05-8aee-05a42f473f18
Stradex/librecoop-rbdoom3bfg
neo/tools/compilers/dmap/facebsp.cpp
#include "precompiled.h" #pragma hdrstop #include "dmap.h" int c_faceLeafs; extern int c_nodes; void RemovePortalFromNode( uPortal_t* portal, node_t* l ); node_t* NodeForPoint( node_t* node, const idVec3& origin ) { while( node->planenum != PLANENUM_LEAF ) { idPlane& plane = dmapGlobals.mapPlanes[node->plane...
ALGO
0.950589
4.194242
e7025944-2e0a-42d8-bdcf-6ff1b6b6c162
ohseongtaek/Programmers_Algorithm
430_몫구하기/소스.cpp
#include <string> #include <vector> using namespace std; int solution(int num1, int num2) { int answer = 0; answer = num1 / num2; return answer; }
ALGO
0.998337
4.595607
674ebc44-a7bb-44a9-8cbc-8a7a2a16facc
omarmohamed10/AVL-Binary-Search-Tree-Visualization
BST.cpp
#include "BST.h" BST::BST() { root = NULL; } int height(Node *N) { if (N == NULL) return 0; return N->height; } int BST::getBalance( Node *N) { if (N == NULL) return 0; return height(N->left) - height(N->right); } int BST::max(int a, int b) { return (a > b)? ...
ALGO
0.989499
4.101414
2938af9a-cf6d-49c4-b6cc-0bee05b67670
mycbxzd1/myCppCode
luogu/P1081 [NOIP2012 提高组] 开车旅行.cpp
#include<bits/stdc++.h> using namespace std; const int u=100010; long long a[u][18][2],b[u][18][2],ansA,ansB,A,B; int f[u][18][2],ans,n,m,t,i,j,k,h[u],g[u],go[u][2],x0,l,x,y; struct rec{int x,y;}; set<rec> s; set<rec>::iterator it,lt,rt; class IO { private: // 处理整数类型的快速输入 void _read(int &x) { x = 0; ...
ALGO
0.999986
3.645328
cace7e8a-5024-45b0-9bfe-95746bf7d047
GPUOpen-LibrariesAndSDKs/DirectXShaderCompiler
lib/CodeGen/LiveIntervalUnion.cpp
#include "llvm/CodeGen/LiveIntervalUnion.h" #include "llvm/ADT/SparseBitVector.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetRegisterInfo.h" #include <algorithm> using namespace llvm; #define DEBUG_TYPE "regalloc" // Merge a LiveInterval's segments. Guarantee no...
ALGO
0.953148
7.182825
4c66954f-2b2b-4378-a236-dabdde48428d
q-Mohammad-p/dsa
fasl 1/1.cpp
#include <iostream> using namespace std; int divisionRecursive(int a, int b) { if (b == 0){ cout<<"indivisible by "; return 0; } if (a < b) { return 0; } return 1 + divisionRecursive(a - b, b); } int main() { int a, b; cout<<"num 1 : "; cin>>a; cout<<"num 2...
ALGO
0.996402
4.609627
51566dc8-d4a2-40aa-ae8e-68671288f6fd
Noodle3D/ZCookie
algorithm/POJ/POJ1422 Air Raid.cpp
#include<iostream> #include<memory.h> #include<stdio.h> using namespace std; int n,m,prev[150]; bool graph[150][150],visited[150]; bool dfs(int s) { for(int i=0;i<m;i++) { if(graph[s][i] and not visited[i]) { visited[i]=true; if(prev[i]==-1 or dfs(prev[i])) ...
ALGO
0.999939
4.310601
6e694982-bd98-411a-8b72-766662ab2922
bothemrun/CAP-Complete-Algorithmic-Programming
Leetcode_All_Solved/758.m1.cpp
//m1 //better logic for bold tags #include<assert.h> #define bold_start ("<b>") #define bold_end ("</b>") #define ALPHABET 26 class TrieNode{ public: vector<class TrieNode*> children; bool word_end; TrieNode(){ word_end = false; children.resize(ALPHABET); for(int i=0;i<ALPHABET;i++)...
ALGO
0.999213
5.511412
e7a7a8d1-6f32-4cda-97a1-2df42634207e
shivkaraman/DSA
02_Strivers A-Z DSA sheet/04_Strings/02_RotateString.cpp
// https://leetcode.com/problems/rotate-string/description/ #include <iostream> #include <vector> #include <unordered_map> #include <map> #include <unordered_set> #include <set> #include <stack> #include <queue> #include <string> #include <algorithm> #include <numeric> using namespace std; class Solution { private: ...
ALGO
0.999962
6.099112
d96be711-ef19-4a1b-9a86-c6c61278d265
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/11/1109/personal_submission/cf979c_WanderOvO.cpp
/* 求有序对 (u, v),从 u 走到 v 时不能先经过 x 再经过 y 考虑 x 往不向 y 的那个方向遍历,y 往不向 x 的那个方向遍历 x 能遍历到 cnt1 个点,y 能遍历到 cnt2 个点,则这 cnt1 * cnt2 对肯定不行 其他别的对都行 */ vector<vector<int>> e(N); LL n, x, y; vector<int> path; bool finished = false; void get_path(int u, int fa) { path.push_back(u); if (u == y) { finished = true; ...
ALGO
0.999888
4.559006
ab603080-5d12-4713-b822-e33bf08498e5
GustavoPolicarpo/maratona
URI/MATHEMATICS/1202 - White Nights Festival.cpp
// Author: Gustavo Policarpo // Name: White Nights Festival // Level: 7 // Category: MATHEMATICS // URL: https://www.beecrowd.com.br/judge/en/problems/view/1202 #include<bits/stdc++.h> //LIFE IS NOT A PROBLEM TO BE SOLVED using namespace std; int M[2][2]; vector <int> A, B, C; int fib(int j) { int mm[2][2]; mm[0...
ALGO
0.999961
4.798812
c8002bbd-a52c-4de5-8011-135df44abae6
AjajAlam1399/Leetcode-Aj
1520-number-of-steps-to-reduce-a-number-in-binary-representation-to-one/number-of-steps-to-reduce-a-number-in-binary-representation-to-one.cpp
class Solution { public: int numSteps(string s) { int n=s.size(),i=0; int cnt=0; while(i<n && s[i]=='0' ){ i++; } string ans="1"; while(s!=ans){ int len=s.size()-1; if(s[len]=='1'){ s=add(s); cout<<s<<endl; } else...
ALGO
0.999994
5.547266
341cadec-0038-44ba-99aa-fea62b4d1a00
yk-fujii/nvfc
compiler/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp
#include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ScalarEvolutionNormalization.h" using namespace llvm; /// IVUseShouldUsePostIncValue - We have discovered a "User" of an IV expression /// and now we need to decide wh...
ALGO
0.948413
7.77112
554a0966-12fe-41cd-ab34-0a0a9403a378
Anshu1Gupta/Leetcode_-_GFG_Solved_Problems
0450-delete-node-in-a-bst/0450-delete-node-in-a-bst.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.999995
6.094151
53a430f3-34b0-4d7f-9ac1-ab7ca8e4b79a
ishandutta2007/codeforces
shangjingbo/normal/54/C.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #include <string> #include <vector> #include <set> #include <map> #include <queue> using namespace std; #define lowbit(x) ((x)&(-(x))) #define sqr(x) ((x)*(x)) #define PB push_back #define MP make_pair typedef long long L...
ALGO
0.998597
3.507897
f9a731bf-4594-48b5-85e8-726c2400b724
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_2512_1.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; const int mod = 1e9 + 7; inline void add(int &a, int b) { (a += b) >= mod && (a -= mod); } inline int Add(int a, int b) { return add(a, b), a; } inline void sub(int &a, int b) { (a -= b) < 0 && (a += mod); } inline int Sub(int a, int b) { return sub(a...
ALGO
0.999862
4.654655
9cff6ded-e1ae-4677-a232-bab95ae8a3ef
umaidansari12/CP
1_tree/most_frequent_subtree_sum.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.999957
6.384261
ae0a12ef-af07-4d36-bf0d-c198103100ed
weiguangno/Simple-Calculator
function.cpp
#include<iostream> #include"interface.hpp" using namespace std; //Math.Method string sqrt(string str){ string upperbound = "100.00"; string lowerbound = "5.00"; string square_upperbound = "10000.00"; string square_lowerbound = "25.00"; string middle = "52.50"; string square_middle = "2756.25"; ...
TOOL
0.993914
3.464293
b5230246-8c1c-4a9a-8d38-6c755683c7f5
kypkk/NCU_CompilerHW
Domjudge_2/firstset.cpp
#include <iostream> #include <unordered_map> #include <set> #include <vector> #include <string> #include <cctype> using namespace std; unordered_map<char, vector<string>> rule; unordered_map<char, set<char>> first; void FindFirst(char ch); int main(){ char ch; string s; while (cin >> ch >> s) { if (s ...
ALGO
0.998949
3.401455
dd99a339-cd70-40a9-bcdf-fe760b730fbf
himanshujainsanghai/DSA
1441-minimum-flips-to-make-a-or-b-equal-to-c/1441-minimum-flips-to-make-a-or-b-equal-to-c.cpp
class Solution { public: // int minFlips(int a, int b, int c) { // int flips = 0; // while(a!=0 || b!=0 || c!=0){ // // check most significant bit or rightmost bit // if((c&1) == 1){ // if((a&1)==0 && (b&1)==0){ // flips++; // ...
ALGO
0.999941
5.76705
69bfbcc6-a350-45ea-9167-0e691c6d8100
p72losaj/IntroduccionProgramacion
practica1/ejercicio7.cpp
/** * @file ejercicio7.cpp * @author Jaime Lorenzo Sanchez * @brief Implemente un programa que calcule la nota final de un alumno. La nota final se calcula en funcion de 3 notas: 1- La nota de practicas que cuenta un 25% del total. 2- La nota de un parcial que cuenta un 25% del to...
ALGO
0.986245
4.47317
8eb0f850-8ff0-47c8-aaa8-a9279662c351
deepin-community/chromium
third_party/eigen3/src/doc/examples/TutorialInplaceLU.cpp
#include <iostream> struct init { init() { std::cout << "[init]\n"; } }; init init_obj; // [init] #include <Eigen/Dense> int main() { Eigen::MatrixXd A(2, 2); A << 2, -1, 1, 3; std::cout << "Here is the input matrix A before decomposition:\n" << A << "\n"; std::cout << "[init]\n"; std::cout << "[declarati...
ALGO
0.999727
4.100483
571818e0-ffc8-4a6e-8004-15c033e6263c
ChipSum-Group/ChipSum
perf_test/perf_gemv.cpp
/* * * * * * * * * * * * * * * * * * * * * * File: test.cpp * Author: Li Kunyun * group: CDCS-HPC * Time: 2021-07-28 * * * * * * * * * * * * * * * * * * * * * */ #include <iostream> using namespace std; #include <type_traits> #include <vector> #include "../ChipSum.hpp" #include <cstdlib> #inc...
TEST
0.909814
4.851293
2cb3c4a1-af6f-4889-9a2a-b344252ab2fe
AxionAOSP/android_frameworks_av
media/module/codecs/amrnb/common/src/norm_s.cpp
/* Pathname: ./gsm-amr/c/src/norm_s.c ------------------------------------------------------------------------------ REVISION HISTORY Description: Created separate file for the norm_s function. Sync'ed up with the current template and fixed tabs. Description: Updated input/output definition and module...
ALGO
0.984478
5.865812
f0113de0-b8d8-459c-8c69-0fd8d1221e47
raincross7/code-similarity
codes/train_code/problem491/problem491_323.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int N; int ans =0; cin >> N; vector<vector<int>>vec(100010,vector<int>(3)); for(int i=0; i<N;i++){ for(int j=0; j<3; j++){ cin >> vec.at(i).at(j); } } vector<vector<int>>newvec(100010,vector<int>(3,0)); ...
ALGO
0.99991
3.846834
6664fdd2-dd3b-4ef9-af54-2f93e453ff06
Xilinx/Vitis-HLS-Introductory-Examples
Interface/Memory/cache/maxi_cache_conditional/dut.cpp
extern "C" { void dut(const unsigned int* in, // Read-Only Vector 1 unsigned int* out, // Output Result int size // Size in integer ) { #pragma HLS INTERFACE m_axi port = in bundle = aximm depth = 1024 #pragma HLS INTERFACE m_axi port = out bundle = aximm depth = 1024 // new cach...
ALGO
0.950739
3.280628
1ebbc45f-0461-4fe5-a4c0-34ee1f07dca8
ChaogangChen/LeetCode
罗马数字转整数.cpp
/* LeetCode 13 罗马数字转整数 https://leetcode-cn.com/problems/roman-to-integer */ #include <string> #include <map> using namespace std; map<char, int> symbolValues = { {'I', 1}, {'V', 5}, {'X', 10}, {'L', 50}, {'C', 100}, {'D', 500}, {'M', 1000}, }; class Solution { public: int romanToInt(stri...
ALGO
0.999815
6.252666
7ea43eb8-86cc-46dd-9a82-2b6930d969f6
mkmojo/aoapc-book
BeginningAlgorithmContests/exercises/ch7/UVa140.cpp
// UVa140 Bandwidth // Rujia Liu // ⣺һ8ͼѽźͼÿ(u,v)uvеΪеĴС // 㷨öȫСҪעDZʽ鷳һ㣬ҪϸӦ #include<cstdio> #include<cstring> #include<vector> #include<algorithm> using namespace std; const int maxn = 10; int id[256], letter[maxn]; int main() { char input[1000]; while(scanf("%s", input) == 1 && input[0] != '#') { // ĸ i...
ALGO
0.999794
3.671616
62630e7f-a13e-4562-87da-64500dfc3acd
SieR-VR/problem-solving
older/2022/20220313/14502.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; int n, m, nm; vector<vector<int>> map; int mov[4][2] = { { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 } }; bool check(int i, int j, vector<vector<int>> &map) { return (i >= 0) && (i < n) && (j >= 0) && (j <= m) && (!map[i][j]); } void bfs(in...
ALGO
0.999833
4.772249
28cf02de-4264-4024-a043-c1f18ff7aecf
Vanshika2063/Leetcode-Questions
Medium/String_to_integer(atoi).cpp
// Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++'s atoi function). // The algorithm for myAtoi(string s) is as follows: // Read in and ignore any leading whitespace. // Check if the next character (if not already at the end of the string) is '-' or '+'. ...
ALGO
0.997884
5.158326
cca36127-faf8-497b-807a-b2ebe25891a6
sjtu-imperishable-night/code-library
Template/Template of Other Teams/Spear-of-Longinus/template/template/source/data-structure/Link-cut-tree.cpp
struct node{ bool Rev; int c[2], fa; }T[N]; inline void Rev(int x){ if (!x) return; swap(T[x].c[0], T[x].c[1]); T[x].Rev ^= 1; } inline void Lazy_Down(int x){ if (!x) return; if (T[x].Rev) Rev(T[x].c[0]), Rev(T[x].c[1]), T[x].Rev = 0; } void Rotate(int x, int c){ int y = T[x].c[c]; int z = T[y].c[1 - c]; ...
ALGO
0.999956
3.924531
3564ffd1-15fb-4944-8d17-95e4323a4769
sinian666/code41m
cpp_副本14/chapter_array_and_linkedlist/list.cpp
/** * File: list.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* Driver Code */ int main() { /* 初始化列表 */ vector<int> list = {1, 3, 2, 5, 4}; cout << "列表 list = "; printVector(list); /* 访问元素 */ int num = list[1]; cout << "访问索引 1 处的元素,得到 n...
ALGO
0.954948
5.024094
d35ed65a-3b58-4944-94d4-2803d7c257d2
Gourav1695/codechef_practice
codechef/long_cha_1_april/qn2p.cpp
#include<bits/stdc++.h> using namespace std; //Gourav yo //data_type_compressions : #define ll long long int #define ull unsigned long long int #define ui unsigned int //STL : #define vi v...
ALGO
0.999874
3.72362
14d20a47-4610-4589-8dfc-04a6263c6c17
thanhdat8799/contest
contest7/bai3.cpp
#include <bits/stdc++.h> using namespace std; int main() { int times; cin >> times; cin.ignore(); while(times--) { stack<char> s; string str; getline(cin, str); for(int i = 0; i < str.size(); i++) { while(str[i] != ' ' && i < str.size()) { s.push(str[i]); i++; } ...
ALGO
0.998885
4.843338
322ab0b8-a52e-47ae-9433-f2e83002e538
ketansahu07/Interview
Stack/sort a stack using recursion.cpp
/** * Sort a stack using recursion. * No loop is allowed. * * The idea of the solution is to hold all values in Function Call Stack until the stack becomes empty. * When the stack becomes empty, insert all held items one by one in sorted order. * Here sorted order is important. * * * sortStack(stack S) ...
ALGO
0.999987
5.917556
195b7068-0c70-496f-ae8d-3e03d9287282
SandeepSinghSethi/DS-and-Algo-CPP
Sorting_algorithms/priority_queue.cpp
#include <bits/stdc++.h> #include "heapfunctions.h" using namespace CLRS::CH6; using namespace std; int main(int argc, char const *argv[]) { cout << "Initializing a heap A " << "\n"; Heap<int> arr = {2,53,1,443,12,44,133,12,534}; arr.setHeapsize(); printarray(arr); cout << "Finding the max in the above heap..\n...
ALGO
0.999551
4.047253
4d2fe561-eeb0-4802-9d95-386c72863b9f
nianheng/ICPC-resources
solution/nowcoder/std9/C.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int read(){ int a=0,fh=1;char c=getchar(); while(c>'9'||c<'0'){if(c=='-')fh=-1;c=getchar();} while('0'<=c&&c<='9'){ a=a*10+c-48; c=getchar(); } return a*fh; } #define MN 500005 #define pii pair<int,int> #define mp make_pair #define x first #de...
ALGO
0.999953
3.648231
e764040c-c044-497e-87dd-70e69336d1d7
risc0/zirgen
zirgen/Dialect/Zll/IR/Field.cpp
#include "zirgen/Dialect/Zll/IR/Field.h" #include "zirgen/Dialect/Zll/IR/IR.h" namespace zirgen::Zll { uint64_t Field::Add(uint64_t a, uint64_t b) const { uint64_t o = a + b; if (o < a || o >= prime) { o -= prime; } return o; } uint64_t Field::Sub(uint64_t a, uint64_t b) const { return Add(a, prime - b...
ALGO
0.982349
7.643933
4a6c24f8-828a-43a6-b80a-343ee553a7b3
Rikon07/Codeforces-Rik_on
C_Removal_of_Unattractive_Pairs.cpp
#include <bits/stdc++.h> using namespace std; int solve(int n) { string str, tmp; cin >> str; tmp = str; sort(tmp.begin(), tmp.end()); if(tmp[0] == tmp[n-1]){ return n; } map<char, int> mp; for(int i=0; i<n; i++){ mp[str[i]]++; } int m = 0, len = 0; for(auto i...
ALGO
0.999963
4.725181
6c497070-d5f5-4ada-a964-bc5b02e52f23
ayush-t02/cpp-practice
aplusb.cpp
#include<iostream> using namespace std; int a,b,c=0; int main() { cin>>a>>b; c = a + b; cout<<c ; }
ALGO
0.97946
3.019416
4b15010a-31e7-49b5-b934-ac3b162ce707
liuawen/Play-Leetcode
Play-Leetcode-master/LCP16-you-le-yuan-de-you-lan-ji-hua/cpp-LCP16/main.cpp
/// Source : https://leetcode-cn.com/problems/you-le-yuan-de-you-lan-ji-hua/ /// Author : liuyubobobo /// Time : 2020-05-04 #include <iostream> #include <vector> #include <unordered_set> using namespace std; /// Greedy + Combining Algorithms /// Time Complexity: O(V * E) /// Space Complexity: O(V + E) class Soluti...
ALGO
0.999993
5.814318
6df6b44a-132c-4b05-b7da-4cd4e8e9b855
qzylalala/CSP
201703/1.cpp
#include <iostream> #include <cstring> #include <algorithm> using namespace std; int a[1010]; int n, k; int main() { cin >> n >> k; for (int i = 1; i <= n; i++) cin >> a[i]; int ans = 0; int sum = 0; for (int i = 1; i <= n; i++) { sum += a[i]; if (sum >= k) { ans ++;...
ALGO
0.999918
4.217277
d7be36da-d640-46fa-9fc8-76b2b232f4fc
simonmrog/spoj-solutions
1-life-the-universe-and-everything.cpp
#include <cstdio> //The problem consists in reading and printing data until the number 42 appears int main() { int n; while(scanf("%d", &n) and n != 42) printf("%d\n", n); return (0); }
ALGO
0.996182
3.241151
181b6b2c-177d-4cce-bc4f-73ff6a93fd4f
phystech123/math_models
2sem/7week/main.cpp
#include <algorithm> #include <array> #include <iomanip> #include <ios> #include<iostream> #include<cmath> #include <iterator> #include<vector> #include<random> #include<fstream> #include<string> // #include<pair> using namespace std; // for generating random coord's and speeds std::random_device r_; std::default_ra...
ALGO
0.998573
4.261703
ca4cfad4-b48e-417f-bdef-6186d97fc464
wy117/wjx_code
C++ Primer plus/第一章 开始/04_contronal_stream/4.4if.cpp
#include <iostream> int main(int argc, char const *argv[]) { // currVal是我们正在统计的数,我们将读入的新值存入val int currVal = 0, val = 0; // 读取第一个数,并确保确实有数据可以处理 if (std::cin >> currVal) { int cnt = 1; // 保存我们正在处理的当前值的个数 while (std::cin >> val) // 读取剩余的数 { if (val == currVal) // 如果...
ALGO
0.99965
4.188941
2968a3e7-4d14-486b-a2df-adf32829056b
ShiYu0318/CP-Code
IONC/D3/pB.cpp
#include <bits/stdc++.h> using namespace std; #define ShiYu ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define int long long #define vi vector<int> #define pii pair<int,int> #define F first #define S second #define EB emplace_back #define endl '\n' #define nl cout << '\n' #define SZ(x) ((int)x.size()) #defin...
ALGO
0.999967
3.998731
60b106be-808e-467d-906f-81e424991c52
fuxin-unv/Demo
src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Projection_2D.cpp
// SMESH SMESH : implementaion of SMESH idl descriptions // File : StdMeshers_Projection_2D.cxx // Module : SMESH // Created : Fri Oct 20 11:37:07 2006 // Author : Edward AGAPOV (eap) // #include "StdMeshers_Projection_2D.hxx" #include "StdMeshers_ProjectionSource2D.hxx" #include "StdMeshers_ProjectionUt...
ALGO
0.986253
5.544748
277edf98-f81f-4d5d-bc03-872a7732b706
BenQuickDeNN/LeetCodeSolutions
三角形的最大周长.cpp
#include <vector> #include <algorithm> using namespace std; class Solution { public: int largestPerimeter(vector<int>& A) { // 排序+贪心 sort(A.begin(), A.end()); for (int i = (int)A.size() - 1; i >= 2; --i) if (A[i - 2] + A[i - 1] > A[i]) return A[i - 2] + A[i - 1] +...
ALGO
0.999616
4.358727
c0d80b70-4f11-4fab-8e72-98920bf4c003
raincross7/code-similarity
codes/train_code/problem298/problem298_353.cpp
#include<bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define PI acos(-1) #define pcnt __builtin_popcountll #define rng(a) a.begin(), a.end() #define sz(x) (int)(x).size() #define v(T) vector<T> #define vv(T) v(v(T)) #define fi first #define se second using namespace std; using ll = long long; using...
ALGO
0.999909
3.896118
698afaef-71bc-4b86-8db2-1ddfe6319f87
slavof/AdventOfCode
2023/day02/part_one/part_one.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; bool containsSubstring(const string& str, const string& sub) { return str.find(sub) != string::npos; } int stringToInt(const string& str) { int result = 0; stringstream ss(str); ss >> result; return result; } void EraseS...
ALGO
0.988862
4.97366
54adc5ce-c163-4579-8352-bf543614f4c7
GeraldCNelson/ISIMIPData
R/cpp/pwcold.cpp
#include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] std::vector<double> fcpp(std::vector<double> rh, std::vector<double> tas) { double hn = 6; std::vector<double> pwc(rh.size(), NAN); for (size_t i=0; i<rh.size(); i++) { if (std::isnan(rh[i])) continue; double wbgt = tas[i] * atan(0.15...
DATA
0.995583
6.366076
cbf6fa78-a73e-4b2e-b9a6-338564c8d2f3
hbradlow/bulletsim
lib/bullet-2.79/Demos/OpenGL/GL_Simplex1to4.cpp
#include "GL_Simplex1to4.h" #include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" #include "GL_ShapeDrawer.h" #ifdef _WIN32 #include <windows.h> #endif //think different #if defined(__APPLE__) && !defined (VMDMESA) #include <OpenGL/gl.h> #include <OpenGL/glu.h> #else #include <GL/gl.h> #endif #inc...
ALGO
0.982184
4.080389
6bd2642c-dd74-4d1d-af28-96d7f6fd36ae
jadkins89/CSCI2270_DataStructures
Final_Project/priorityLL.cpp
#include "priorityLL.hpp" PriorityLL::PriorityLL() { head = nullptr; } PriorityLL::~PriorityLL() { dequeueAll(); } void PriorityLL::enqueue(patientData pd) { priorityNodeLL* currentNode = head; bool insert = true; priorityNodeLL* newPatient = new priorityNodeLL(pd); if (head == nullptr) { head = newPatient;...
ALGO
0.995503
4.870727
6e9a3fc5-97cf-4cb5-b3ba-a1285260853a
AndHager/SysCallStubber
llvm-project/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
// template <class charT> // explicit bitset(const charT* str, // typename basic_string<charT>::size_type n = basic_string<charT>::npos, // charT zero = charT('0'), charT one = charT('1')); #include <bitset> #include <cassert> #include <algorithm> // for 'min' and 'max' #inc...
TEST
0.863969
7.631811
e74abe53-7acf-4f4e-b6fd-b3d902d8ffad
avinashsai/codeforces
699.cpp
#include<iostream> using namespace std; int seq(long long int a[],long long int n) { long long int b[n]; for(int i=0;i<n;i++) b[i]=1; for(int i=0;i<n;i++) { for(int j=0;j<i;j++) { if(a[i]>a[j]&&b[j]+1>b[i]) b[i]=b[j]+1; } } long long int max=0; for(int i=0;i<n;i++) { if(max<b[i]) max=b[i]; } ...
ALGO
0.99992
3.87287
18f817d4-21cf-432c-a27e-484f7a82c015
cheon-yong/algorithm
programmers/Lv2/튜플.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; bool comp(const vector<int> &a, const vector<int> &b) { return a.size() < b.size(); } vector<int> solution(string s) { vector<int> answer; vector<vector<int>> numbers; int cover = 0; int ve...
ALGO
0.999379
4.37569
7b74792f-5b44-4c71-a0f7-d6f0dc33ccf9
nishtha318/XEBIA
c++ practice questions/sortarray.cpp
#include <iostream> using namespace std; int main() { int arr[5] = {8,6,3,45,10}; int size = sizeof(arr) / sizeof(arr[0]); for(int i = 0 ; i < size - 1 ; i++) { for(int j =0 ; j < size - i - 1 ; j++) { if (arr[j] > arr[j+1]) { int larger = arr[j]...
ALGO
0.999481
3.361573
173e8ddb-a386-4bb7-8e1a-89032eafe426
AOSPK/frameworks_av
media/libeffects/lvm/lib/Bass/src/LVDBE_Process.cpp
/****************************************************************************************/ /* */ /* Includes */ /* ...
ALGO
0.964831
6.48001
59ae6263-b6b2-42f9-bddc-987a8e59a3cc
dralves/sp1-sp2-galois
dist_apps/experimental/no_sync/sssp_pull-topological.cpp
#include <iostream> #include <limits> #include "galois/Galois.h" #include "galois/gstl.h" #include "Lonestar/BoilerPlate.h" #include "galois/runtime/CompilerHelperFunctions.h" #include "galois/runtime/dGraph_edgeCut.h" #include "galois/runtime/dGraph_vertexCut.h" #include "galois/DReducible.h" #include "galois/runtim...
ALGO
0.998662
5.822857
2448e33f-0246-48c5-b88c-02f7e771df0e
Arnob616/Data-Structure-and-algo-basic
Recursion/Recursion level three/frogJump.cpp
//a frog can jump one or three step find out the min cost #include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int frogJump(int arr[], int size, int index) { if (index == size - 1) { return 0; } else if (index == size - 2) { return abs(arr[index] - arr[index + ...
ALGO
0.999888
4.703654
050c5ee8-8b98-43e3-af09-b657a45b933e
niloo30/leetcode
1693-sum-of-all-odd-length-subarrays/sum-of-all-odd-length-subarrays.cpp
class Solution { public: int sumOddLengthSubarrays(vector<int>& arr) { int n=arr.size(); int ans=0; for(int i=0;i<n;i++) { int l=i+1; int r=n-i; int contribution=((l*r+1)/2)*arr[i]; ans+=contribution; } return ans; ...
ALGO
0.99982
5.566899
813aac82-9b7f-4e2d-8464-233de5d0b3e3
noobie7/CodeBank
Codeforces/1443/B.cpp
/* "An anomaly, I'm Muhammad Ali Cause I know one day I'm gonna be the" - Greatest, Eminem */ #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typ...
ALGO
0.999587
4.165837
ab8dab92-b6ca-4d9b-9086-e67d07d1a0d4
ZRayZzz/flash-attention-v100
kernel/fused_mha_api.cpp
#include <torch/python.h> #include <torch/nn/functional.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <cutlass/numeric_types.h> #include "fused_mha.h" #define CHECK_DEVICE(x) TORCH_CHECK(x.is_cuda(), #x " must be on CUDA") #define CHECK_SHAPE(x, ...) TORCH_CHECK(x.sizes() == torch::In...
TOOL
0.872414
6.724554
7468991a-22ed-4834-8850-bf23480d6e2a
NdzabaM/Axe_Game
axe_game.cpp
#include <cstdio> #include "raylib.h" // remember to download raygui.h int main() { // window dimensions int width{800}; int height{450}; InitWindow(width, height, "Axe Game"); // circle coordinates int circleX{200}; int circleY{200}; int circleRadius{25}; // circle edges int ...
ALGO
0.937696
4.780372
04617cdb-b881-4a69-871b-642b9a33b2f6
GolamRabbani20/CPP
ALL_CPP_CODES/vector.cpp
#include<bits/stdc++.h> using namespace std; int main() { int i, n; cout<<"Enter vector size: "; cin>>n; vector<int>v1(n); cout<<"Enter the value of array: "; for(i=0;i<v1.size();i++) { cin>>v1[i]; } for(int i=0;i<v1.size();i++) cout<<"v1"<<"["<<i<<"]"<<"="<<v1[i]<<endl; ...
ALGO
0.957857
3.519644
8977b71d-d12c-411e-b7ad-16fba28af620
jjchoi3/CS32
Homework/hw3/maze.cpp
bool pathExists(string maze[], int nRows, int nCols, int sr, int sc, int er, int ec){ if(sr == er && sc == ec) return true; maze[sr][sc] = '#'; // North if(maze[sr - 1][sc] == '.'){ if(pathExists(maze, nRows, nCols, sr - 1, sc, er, ec)) return true; } // East if(...
ALGO
0.998746
3.932856
b51aef43-c630-4cdd-8702-fe7152cc83e3
RyanL123/Competitive-Programming
COCI/coci14c3p4.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef vector<pair<int, int>> vii; typedef vector<int> vi; typedef long double ld; typedef long long ll; typedef unsigned long long ull; #define eb emplace_back #define pb push_back #define mp make_pair #define srt(x) sort(x.begin(), x.end()) #d...
ALGO
0.999634
3.823178
d6d8e088-c276-45b7-ab3d-a5c11f0971e3
Source-SDK-Archives/source-sdk-orangebox
game/server/h_ai.cpp
#include "cbase.h" #include "game.h" #include "vstdlib/random.h" #include "movevars_shared.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" #define NUM_LATERAL_CHECKS 13 // how many checks are made on each side of a NPC looking for lateral cover #define NUM_LATERAL_LOS_CH...
ALGO
0.962291
5.999319
1e3e13e6-922d-4a43-848e-a469f5a072ec
beeeegi/uni
C++/ramodenime konstruqtoris gamoyeneba.cpp
#include <iostream> using namespace std; class martkutxedi{ public: int sigrdze; int sigane; martkutxedi(int a, int b){ sigrdze = a; sigane = b; } void fartobi(){ int x = sigrdze * sigane; cout << "martkutxedis fart...
ALGO
0.991118
4.286816
5d26d10a-a280-4f32-880b-22505f99d25d
Ali-Noghabi/QR-Factorization
eigen-3.4.0/doc/examples/TutorialLinAlgExSolveLDLT.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2f A, b; A << 2, -1, -1, 3; b << 1, 2, 3, 1; cout << "Here is the matrix A:\n" << A << endl; cout << "Here is the right hand side b:\n" << b << endl; Matrix2f x = A.ldlt().solve(b); cout << "...
ALGO
0.999887
3.807622
bee36e4d-4c1d-4bb9-85f5-558ace402c16
tongtzeho/OpenJudge
1830.cpp
#include<iostream> #include<cmath> using namespace std; int k[31][31],b[31],x[31],n,k2[31],x2,sum=0,sum2=1; void solve() { int i,j,s,t; t=1; for(i=1;i<=n;i++) { s=0; for(j=1;j<=n;j++) s+=k[i][j]*x[j]; if((s-b[i])%2!=0) { t=0; break; } } if(t==1)sum++; if(t==1) { for(i=1;i<=n;i++) cout<<x...
ALGO
0.999833
3.331149
119e7233-6a97-4e7e-9fc8-42602b73d7e2
parklicoste/Top_interview_150
problem_242.cpp
/* Leetcode 150 Interview Questions 242. Valid Palindrome */ /* ------ Approach 1 ---- */ /*Runtime O(n)*/ /* Using unordered map and arrays */ class Solution { public: bool isAnagram(string s, string t) { vector<int> a1(26, 0), a2(26, 0); for(char c: s) a1[c-'a']++; for(char c: t) a2[...
ALGO
0.99999
6.813068
8f898e21-2536-483d-81b0-43776b2da405
Karma192/gtech1-b21-snake
agrandpaul/main/snake.cpp
#include "snake.hpp" using namespace std; list<int> listx = {0}; list<int> listy = {0}; int Snake::keys(void) { int tmpdir = this->prev_dir; const Uint8 *keystate = SDL_GetKeyboardState(NULL); SDL_Event event; SDL_PollEvent(&event); if (keystate[SDL_SCANCODE_UP]) { tmpdir = UP; } ...
TOOL
0.978734
4.83091
1bd0d738-38f8-4303-90cf-c2caf47fab1b
sagpant/pwsafe
src/os/windows/file.cpp
/** * \file Windows-specific implementation of file.h */ #ifndef __WX__ #include <afx.h> #endif #include <Windows.h> #include <LMCONS.H> // for UNLEN definition #include <shellapi.h> #include <shlwapi.h> #include <io.h> #include <sys/types.h> #include <sys/stat.h> #include <fstream> #include "../typedefs.h" #incl...
TOOL
0.974343
6.538655
cb0d6e20-de09-4007-88d3-bbac29cae825
denis-gubar/Leetcode
Array/3318. Find X-Sum of All K-Long Subarrays I.cpp
class Solution { public: vector<int> findXSum(vector<int>& nums, int k, int x) { int const N = nums.size(); vector<int> result; for (int i = 0; i + k <= N; ++i) { unordered_map<int, int> M; for (int j = i, z = 0; z < k; ++j, ++z) ++M[nums[j]]; ...
ALGO
0.999938
5.469747
2c6cdeb3-4abf-4667-8862-42ca24605e78
carlospoveda90/VulkanSharedTextures
src/core/vulkan_utils.cpp
#include "core/vulkan_utils.hpp" #include <stdexcept> #include <cstring> #include <iostream> namespace vst::vulkan_utils { uint32_t findMemoryType(VkPhysicalDevice physicalDevice, uint32_t typeFilter, VkMemoryPropertyFlags properties) { VkPhysicalDeviceMemoryProperties memProperties; vkGetPhys...
TOOL
0.85415
6.539355
f901b2d3-54a8-417c-99c2-2e036e98000f
Mandarava/Data-Structure
下发资料代码/shili-2/p48-cycle.CPP
#include<stdio.h> #include<alloc.h> typedef struct node { int data; struct node *next; }LNode,*LinkList; LinkList create_LinkList() { LinkList L=NULL; LNode *s,*r=NULL; int x; printf("Please input Linklist:"); scanf("%d",&x); while(x!=9999) { s=(LNode *)malloc(sizeof(LNode)); s->data=x; s->next=NULL;...
ALGO
0.999691
3.004208
119fc1e4-730c-474f-8772-b039d831a2a7
vinitpatil2812/CP
CodeForces/String_Task.cpp
#include<bits/stdc++.h> using namespace std; bool isVowel(char c) { if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y') { return 1; } return 0; } int main() { string s; cin >> s; int n = s.length(); string ans = ""; for(int i = 0; i < n; i++) { c...
ALGO
0.999843
4.042974
0ddcbd21-2270-406a-833e-c4187af425ab
esl-epfl/xheep_matrix_spec
llvm-project/libcxx/benchmarks/algorithms/sort.bench.cpp
#include <algorithm> #include "common.h" namespace { template <class ValueType, class Order> struct Sort { size_t Quantity; void run(benchmark::State& state) const { runOpOnCopies<ValueType>(state, Quantity, Order(), BatchSize::CountElements, [](auto& Copy) { std::sort(Copy.begin(), Copy.end()); })...
TEST
0.905228
6.592072
25ed026d-a819-4cec-ae2a-e6ba8bd930ea
abhay-sen/codeforces
contests/6jun/C_Earning_on_Bets.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t;cin>>t; while (t--) { int n;cin>>n; vector<int> arr(n); for(int i=0;i<n;i++) cin>>arr[i]; int minimum=INT_MAX; int index; for (int i = 0; i < n; i++) { if(minimum>arr[i]){ ...
ALGO
0.999981
3.793693
2f6fabc2-c67f-4d55-8979-79dce7595e4e
algorithmstudy4/sw_test
s_coding/삼성 SW 역량 테스트 기출 문제/17144_미세먼지 안녕.cpp
#if 01 //미세먼지 안녕 //https://www.acmicpc.net/problem/17144 #include <iostream> #define MAXN (50) using namespace std; int R, C, T; //세로, 가로, 시간 int map[2][MAXN + 5][MAXN + 5]; int up_h, up_w, down_h, down_w; int dh[] = { -1,1,0,0 }; int dw[] = { 0,0,-1,1 }; int sol; void spread(int cur) { int next = (cur + 1) % 2; /...
ALGO
0.999524
4.256306
938c00a6-2f88-499d-badf-241789e23874
TRAN-THUY-NGOC/UPCODER
UPCODER/Other/ThuaSNT.cpp
#include <iostream> using namespace std; void primeFactorization(int n) { int check = 0; for (int i = 2; i*i <= n; i++) { int cnt = 0; bool check2 = false; while (n % i == 0) { check2 = true; n /= i; cnt++; } if (check2) check++; ...
ALGO
0.999779
4.802596
489ac88d-f552-415d-885e-e84bc65a2ee6
ManojKumarPatnaik/Sr.SoftwareEngineerInterviewPrep
Data Structures/LinkedList/C++/Join Two Linklist.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node * next; Node (int x) { data=x; next=NULL; } }; void displayList(Node *head) { while(head) { cout<<head->data<<" "; head=head->next; } } Node * joinTheLists(Node * head1,...
ALGO
0.999784
3.620617
ef43f6a5-f210-4e77-ae41-64ba95fb9647
pie-12/CompetitveProgramming
OJTRAIN/CSES/Sum of Two Values/main.cpp
//yo, i'm pie12 (●'◡'●) #include <bits/stdc++.h> #define HI signed main() #ifndef ONLINE_JUDGE #define IO \ freopen("main.inp","r",stdin); \ freopen("main.out","w",stdout); #else #define IO #endif #define FAST \ ios::sync_with_stdio(false); \ cin.tie(nullptr); #define TIME (1.0 * clock() / CLOCKS_PER_SEC) #define BYE ...
ALGO
0.99999
3.820618
5b4c33ac-016f-4f31-96b2-3375f996fea3
ayaanaman/-SdeSheetChallenge
Set Matrix Zeroes.cpp
class Solution { public: void help(vector<vector<int>>& matrix,int r, int c) { for(int i=0;i<matrix.size();i++) if(matrix[i][c]!=0) matrix[i][c]=-1e9; for(int i=0;i<matrix[0].size();i++) if(matrix[r][i]!=0) matrix[r][i]=-1e9; } ...
ALGO
0.999723
6.036223
c07af1d6-c687-484c-ad7e-e7c07bbdfd88
ishandutta2007/codeforces
jiaqiyang/normal/553/C.cpp
#include <cstdio> #include <cstdlib> #include <vector> const int N = 100000 + 10, MOD = 1000000007; int n, m, a[N], b[N], c[N]; int anc[N]; int find(int x) { return anc[x] == x ? x : (anc[x] = find(anc[x])); } int col[N]; std::vector<int> adj[N]; void dfs(int a) { for (int i = 0; i < adj[a].size(); ++i) { ...
ALGO
0.999912
4.223455
1abd3a91-8fcf-4777-88de-2ddca74820a8
tkachenko24/to_do_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.9988
6.76073
282c39c6-f82d-4a8d-84fe-4fb49f19c3ad
karan-pawar-09/codeforces
Maximum_Longest_Increasing_Subsequence.cpp
/* author:Karan created:03.08.2021 18:49:58 */ #include<bits/stdc++.h> using namespace std; #define ll long long #define all(ar) ar.begin(),ar.end() #define endl '\n' ll binarysearch(ll a,vector<ll> &arr,ll n) { ll l=-1; ll r=n-1; while(l+1<r) { ll m=l+(r-l)/2; if(arr[m]>=a) { r...
ALGO
0.99993
5.079375
f13ce141-7187-4a85-b817-7699fe1443e2
Kurre6/C-Course-Lab2
Lab2/src/task2.cpp
#include <iostream> using namespace std; class Swap{ public: //swaping without using pointers or references void swapWithoutPR(int a, int b){ int tmp = a; a = b; b = tmp; cout << a << " " << b << endl; } //swapping using pointers void swapUsingPointers(int *a, ...
TOOL
0.961018
5.708193
d8d492ba-52d6-49c5-bea1-09d84996f610
dklee0501/Lobster
homomorphic_evaluation/ntl-11.3.2/src/GF2EXKarCross.cpp
#include <NTL/GF2EX.h> #include <NTL/GF2XFactoring.h> namespace NTL { void PlainMul(GF2EX&,const GF2EX&,const GF2EX&); void mul_disable_plain(GF2EX&,const GF2EX&,const GF2EX&); } NTL_CLIENT #define TIME_IT(t, action) \ do { \ double _t0, _t1; \ long _iter = 1; \ long _cnt = 0; \ do { \ _t0 = GetT...
TEST
0.955723
5.452054
e35b0822-f098-43f8-94c0-ea68a8fc8055
hellowode1234/ardupilot_for_nanoradar_radar
libraries/AP_RangeFinder/AP_RangeFinder_Bebop.cpp
#include <AP_HAL/AP_HAL.h> #include <utility> #if (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP || \ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO) && \ defined(HAVE_LIBIIO) #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <string.h> #includ...
TOOL
0.944487
7.282815
4c72f0b6-1949-48c8-9e48-b4b9154dd864
SubhamPan/cp_templates
template_practical.cpp
////------------> FLS. #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define int long long #define double long double #define endl '\n' #define FLS ios_base::sync_with_stdio(false);cin.tie(0); cout.tie(0); #define vin(a) for(auto&XX:a)cin>>XX;//idk y but it restricts my th...
ALGO
0.996765
4.446045
80de2bfa-4042-415c-b5b6-2fcdc49ec6f4
Hasnain163/DSA_code
Heap.cpp
#include<bits/stdc++.h> using namespace std; void max_heap(){ priority_queue<int>pq; pq.push(4); pq.push(7); pq.push(3); pq.push(6); pq.push(9); while(!pq.empty()){ int q = pq.top(); pq.pop(); cout<< q << endl; } } void min_heap(){ priority_queue<int,vector<...
ALGO
0.998731
3.829997