uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
f6d7f865-caf6-4963-a288-0fc5fee41a4e
HagarAbdelzaher/Codeforces-Solutions
151B-Phone Numbers.cpp
#define FOR(i,n) for(int i=0;i<n;i++) #define rFOR(i,x,n) for(int i=x;i>n;i--) #define SZ(x) (int)x.size() #define pb push_back #define mp make_pair #define fi first #define se second typedef long long ll; const int oo=(1LL<<30); const ll OO=(1LL<<62); const int MaxSize=1e2+2; const double PI=3.141592653589; #include...
ALGO
0.999228
3.614557
48e7d31b-7cb0-40d1-ad3b-b2758cb95115
yuminsuh/caffe_retrieval
src/caffe/solvers/adam_solver.cpp
#include <vector> #include "caffe/sgd_solvers.hpp" namespace caffe { template <typename Dtype> void AdamSolver<Dtype>::AdamPreSolve() { // Add the extra history entries for Adam after those from // SGDSolver::PreSolve const vector<Blob<Dtype>*>& net_params = this->net_->learnable_params(); for (int i = 0; i ...
ALGO
0.991797
7.613853
8b5d8de3-1acd-4e5d-a843-d298bcfdc316
GeonHyeongKim/2022-2-Algorithm-Study
src/taeeun/week29/๋ฑ€๊ณผ ์‚ฌ๋‹ค๋ฆฌ ๊ฒŒ์ž„.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; typedef pair<int, int> pi; void bfs(int start, vector<int> &board) { vector<bool> visited(101, false); queue<pi> q; q.push({ start, 0 }); visited[start] = true; while (!q.empty()) { int cur = q.front().first; i...
ALGO
0.9999
3.740375
62c22db4-322c-4c92-b51c-a95bffa35778
ColdGrub1384/fortran-ios
ios_flang_runtime/ios_flang_runtime/common/log/fma3/fdlog1.cpp
#if defined(TARGET_LINUX_POWER) #include "xmm2altivec.h" #elif defined(TARGET_LINUX_ARM64) #include "arm64intrin.h" #elif defined(TARGET_X8664) #include <immintrin.h> #define USE_SLP #else #error Unknown architecture - must be one of: TARGET_LINUX_POWER, TARGET_LINUX_ARM64, or TARGET_X8664 #endif #include "fdlog_defs.h...
ALGO
0.945361
6.479107
3694e2bc-2639-4ff9-b100-57ac9f5f48b1
djplatt/code
zero_stats/debug.cpp
#include "../includes/int_double12.0.h" #include "../includes/hurwitz1.0.h" #include "inttypes.h" #define two_64 ((double) 18446744073709551616.0) #define two_32 ((double) 4294967296.0) #define two_m_101 ((double) 3.9443045261050590270586428264139311483660321755451150238513946533203125e-31) #define two_m_102 ((doubl...
ALGO
0.923943
3.536707
0fbae0ff-6efd-49f5-918b-1eecfb604865
punitsoni22/L-T
assignment1/ques10.cpp
// 10. Write a program to delete an element from an array. #include <iostream> using namespace std; int findElement(int arr[], int n, int key); int deleteElement(int arr[], int n, int key) { int pos = findElement(arr, n, key); if (pos == -1) { cout << "Element not found"; return n; } // Deleting element int ...
ALGO
0.99985
5.42843
f67284c2-c257-4de8-8d65-b254178805c2
heewon-chung/cfhe
src/comparison.cpp
#include "comparison.h" using namespace std; using namespace NTL; using namespace helib; // Equality Test over the Integers void equalityTestOverZ(Ctxt& equalCtxt, const Ctxt& ctxt1, const Ctxt& ctxt2, const long bitLength, const EncryptedArray& ea){ assert(&ctxt1.getPubKey() == & ctxt2.getPubKey()); assert(b...
TOOL
0.939142
4.878984
c834f2bb-6279-4fc6-bb4d-07a812df201d
Kecheng-Ye/My_Leetcode
Problem/By section/Search/BFS/Problem 542/problem_542.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: const vector<pair<int, int>> directions = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; // Time: O(n), Space: O(n) vector<vector<int>> updateMatrix(vector<vector<int>>& mat) { int m = mat.size(); int n = mat[0].size(); ...
ALGO
0.999968
6.342591
e7b3a3a5-50db-422a-90fa-948722e17f41
arshomashohag/UVA-
oddsum.cpp
#include<stdio.h> int main(void) { int test,a,b,odd_sum,count; while(scanf("%d",&test)==1) { for(count=1;count<=test;count++) { scanf("%d%d",&a,&b); if(a>=0 && a<=b) { odd_sum=0; while(a<=b) { if(a%2) odd_sum=odd_sum+a; a++; } printf("Case %d: %d",count,odd_sum); } ...
ALGO
0.999636
3.544734
a6ee99bb-4a77-4e72-863f-65b8e02817a4
ShafkatSharif/Cplus
LabMannualCse225/prsheet5.cpp
/*Write a function ๐‘๐‘œ๐‘š๐‘๐‘–๐‘›๐‘Ž๐‘ก๐‘–๐‘œ๐‘›(๐‘–๐‘›๐‘ก ๐‘›, ๐‘–๐‘›๐‘ก ๐‘Ÿ) that takes two integers as its parameter and calculates the combination using the formula given below. ๐‘›๐ถ๐‘Ÿ =๐‘›!/๐‘Ÿ! (๐‘› โˆ’ ๐‘Ÿ)! */ #include<iostream> using namespace std; int fact(int n){ return n*fact(n-1); } int combination(int a, int b){ r...
ALGO
0.999723
5.764766
dcd820cd-4938-43ec-9179-3d39f2ea29fd
CESNET/libfastbit
src/isbiad.cpp
//////////////////////////////////////////////////////////////////////// // functions of ibis::sbiad // /// Constructor. If an index exists in the specified location, it will be /// read, otherwise a new bitmap index will be created from current data. ibis::sbiad::sbiad(const ibis::column* c, const char* f, const uint...
ALGO
0.924908
6.756231
0cbda9d6-cff1-479b-bd84-5fb4019216c2
tridhapuku/DSP_MLIR
llvm/lib/Support/BalancedPartitioning.cpp
#include "llvm/Support/BalancedPartitioning.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Format.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/ThreadPool.h" using namespace llvm; #define DEBUG_TYPE "balanced-partitioning" void BPFunctionNode::dump(raw_ostream &OS) const { OS << form...
ALGO
0.993934
7.544666
96a50588-0049-4238-ac59-0ef697483d06
AbhishekHacks/DSA-Solutions
Bit_Manipulation/LeetCode_338.cpp
/*Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1's in the binary representation of i.*/ //Time Complexity -- O(nlogn) class Solution { public: vector<int> countBits(int n) { vector<int>ans; for(int i=0;i<=n;i++){ in...
ALGO
0.999979
6.20488
b7d01773-8148-4966-968f-e2209f3ce46f
Rexmaha/Coding_Test
SWEA/D1/2072.โ€…ํ™€์ˆ˜๋งŒโ€…๋”ํ•˜๊ธฐ/ํ™€์ˆ˜๋งŒโ€…๋”ํ•˜๊ธฐ.cpp
#include <iostream> using namespace std; int main(int argc, char** argv) { int test_case; int T; cin >> T; for (test_case = 1; test_case <= T; ++test_case) { int tmp; int sum = 0; for (int i = 0; i < 10; i++) { cin >> tmp; if (tmp % 2 != 0) { sum += tmp; } } cout << "#" << test_case << " " <...
ALGO
0.997667
4.016923
a07c09a1-8c11-4526-a5a5-8e9dbf096254
HamzaQasim7/app_localization
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
ee69eb50-20bf-4e03-a8b7-7618a3b17bec
Nadim-Mahmud/Online-Judge-Solves
Light OJ/1107 - How Cow .cpp
#include<iostream> using namespace std; int main(){ int x,y,a,b,m,n,t1,t2,i,j; cin>>t1; for(i=1;i<=t1;i++){ cin>>a>>b>>x>>y>>t2; cout<<"Case "<<i<<":\n"; for(j=1;j<=t2;j++){ cin>>m>>n; if((m > a && m < x) && ( n > b && n < y)) cout<<"Yes\n"; ...
ALGO
0.999218
3.123531
5035621f-2a0d-44d5-bd05-9ecadbd713be
queolvi/korpCpp
CHALLENGES/CH-15/Korpachyov_CH-15.cpp
#include <iostream> #include <string> int count_char_occurrences(const std::string& line, char symbol); int main() { char a; std::string line; std::cout << "Enter symbol and string: " << std::endl; std::cin >> a >> line; std::cout << count_char_occurrences(line, a) << std::endl; return 0; }...
ALGO
0.995735
5.734984
16fa1b5a-a2c5-4d05-8066-b0f8499ddd35
ishandutta2007/codeforces
atomicenergy/normal/1361/B.cpp
using namespace std; //#define fileio #ifndef fileio #include <iostream> #endif #include <fstream> #include <vector> #include <queue> #include <algorithm> #include <set> #include <map> #include <assert.h> #include <functional> #include <math.h> #include <string> #include <ctime> typedef long long ll; #ifdef fileio...
ALGO
0.99988
3.81741
e1d567e0-63ba-48e3-a3d0-3910593d0c6b
PhQuangMinh/PTIT
Kรฌ 3/Code PTIT C++/CPP0315.cpp
#include<bits/stdc++.h> using namespace std; void solve(){ string s; cin >> s; int n=s.size(); for (int i=n-1;i>=0;i--){ int ok=0; for (int j=i+1;j<n;j++) if (s[i]>s[j]){ ok=1; break; } if (ok==1){ char ma='0'-1;...
ALGO
0.99972
3.576322
20f9bede-a138-4470-b75a-534c4f3a5028
Nirob-0812/Codeforces-cpp-Code
Rating 800 cpp/B. Kana and Dragon Quest game.cpp
#include<iostream> using namespace std; int main() { int t; cin>>t; while(t--) { long long int x,n,m,i; cin>>x>>n>>m; if(x<=10 && m>=1 && n>=0) { cout<<"YES"<<endl; } else if(x>10) { for(i=0;i<n;i++) { x=(x/2...
ALGO
0.998787
3.185087
a54a0a1e-2da5-4919-8e4d-77d3e1f4e54e
kanishkachaudhary-03/flight-management-system-
boost_1_88_0/libs/math/example/agm_example.cpp
#ifndef BOOST_MATH_STANDALONE #include <boost/multiprecision/cpp_bin_float.hpp> #endif // This example computes the lemniscate constant to high precision using the agm: using boost::math::tools::agm; using boost::math::constants::pi; int main() { using std::sqrt; #ifndef BOOST_MATH_STANDALONE using R...
ALGO
0.999879
5.292722
06f90b2a-99db-4c23-aba1-2834c76a4d01
VaibhavxLegend/DSA-practice
1. lectures/1-11 Basics/dsalec6.cpp
#include <bits/stdc++.h> using namespace std; int decimaltobinary(int num){ int binary = 0; int i = 0; while(num > 0){ int rem = num % 2; num = num / 2; binary = binary + rem * pow(10, i); i++; } return binary; } int binarytodecimal(int num){ int decimal = 0; ...
ALGO
0.9987
4.383437
1414ccfd-ba68-43e5-b523-5bbd83a1450a
sujal-jain-1011/DSA-Geeks_For_Geeks
Data Structures and Algorithms GFG/Chapter-6 Arrays/Topic-13 Frequencies in a Sorted Array/Program_1.cpp
/*C++ Program to Find the Frequencies of Elements in a Fixed Sized Array(Heap Allocation)*/ #include<iostream> #include<new> #include<limits.h> using namespace std; /*Creating a class*/ class Implement_Fixed_Sized_Array{ public: /*Data Members of class: long long unsigned int and int* */ long long un...
ALGO
0.997274
4.849299
f71b99b2-7b65-45ea-a7b4-a724c6202439
prakritii-i/Discrete-Structure-
Enumerating r permutation of n objects in Lexicographic order.cpp
#include <stdio.h> // Function to swap two elements in an array void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } // Function to reverse a portion of an array void reverse(int arr[], int start, int end) { while (start < end) { swap(&arr[start], &arr[end]); start++; ...
ALGO
0.999972
5.507387
285b63ea-f82d-473f-814c-7e6c83b39682
gustavomuller99/Algo
zOld/brain network (medium)/main.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> g; pair<int, int> dfs(int n, int f = -1) { int r = 0; int v = n; for (int i = 0; i < g[n].size(); ++i) { if(g[n][i] != f) { pair<int, int> k; k = dfs(g[n][i], n); if(k.second > r) { ...
ALGO
0.999779
4.326571
d1a22bca-34ba-4400-990b-4192089e4762
niharsarkartirtho/Codeforces
G_Factorial.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,num; cin>>n; while(n--){ long long int fact=1; //end of a loop, the value of fact will be reset to 1 & long long holds 9X10^18 cin>>num; if(num==0) //Factorial zero is defined as equal to 1. { cout<<1<...
ALGO
0.999991
4.212137
51242a16-8a07-4c54-a0ae-f93be3aa003a
Nazar04u/Programming-2022
classwork(12.10)/task3/task3/Source.cpp
#include<iostream> using namespace std; int main() { cout << "Enter n" << endl; int n; cin >> n; int u0 = 0; int u1 = 1; int u; cout << u0 << endl; cout << u1 << endl; for (int i = 2; i <= n; i++) { u = u0 + u1; cout << u << endl; u0 = u1; u1 = u; } return 0; }
ALGO
0.999958
3.315094
d7b037bb-da99-4bec-b6bf-6ffd1bc125f2
mhjmbs/cpp-course-assignments
course/section_16-arrays/coding_exercise_11/exercise.cpp
#include <iostream> #include "exercise.h" bool is_collection_sorted(int numbers[], unsigned int collection_size){ // Don't modify anything above this line //Your code will go below this line bool sorted = true; for(int i = 1; i < collection_size; i++) { if(numbers[i-1] >= numbers[i]) sorted =...
ALGO
0.994822
5.556258
6f6a2203-3e3f-45f3-8b30-e52484646c02
Daard/CarND-P10-MPC-Project
src/Eigen-3.3/bench/sparse_setter.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.935109
4.152793
e87fa9da-0e8f-48d8-8ed7-c1432d95198f
raviRB/SPOJ-backup
GLJIVE - GLJIVE.cpp
#include<iostream> #include<algorithm> #include<vector> #include<queue> using namespace std; int main(){ int arr[10]; for(int i=0;i<10;i++) cin>>arr[i]; int sum=0,diff=100; for(int i=0;i<10;i++) { if(abs(sum+arr[i]-100)<=diff) sum+=arr[i]; else break; diff = abs(sum-100); //cout<<diff<<" diff \n";...
ALGO
0.999868
3.377589
f8f22eb8-e3f2-4b8c-a181-3f60c8f33d60
HellVolhard07/LeetCode
1695-maximum-erasure-value/1695-maximum-erasure-value.cpp
class Solution { public: int maximumUniqueSubarray(vector<int>& nums) { int n = nums.size(); unordered_set<int> freq; int start = 0; int end = 0; int sumSoFar = 0; int maxSum = 0; while(end < n) { while(freq.count(nums[end])) { freq...
ALGO
0.999892
6.719031
b3603ba9-00fa-49bf-8b5b-57d0aae40404
fsy-juruo/noip-2021-js-answer
t2021/JS-0217/variance/variance.cpp
#include <bits/stdc++.h> using namespace std; int n; int a[10010]; long long ans; long long fc(int t[]){ int sum=0; long long sum2=0; for(int i=1;i<=n;++i) sum+=t[i]; for(int i=1;i<=n;++i) sum2+=(n*t[i]-sum)*(n*t[i]-sum); return sum2/n; } int main(){ freopen("variance.in","r",stdin); freopen("variance.out","...
ALGO
0.999523
3.191449
bcab57cc-abdf-42dc-95be-915862626559
vaishu0706/Fluttercodes
netflix_demo/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.998692
6.76775
c337ce19-5e73-44fa-b75b-6000a157c36d
pdtxie/calhacks10-cubecv
app/identify.cpp
#include "identify.hpp" using namespace cv; using namespace std; bool USE_CAM = true; VideoCapture cap(1); enum Colour { BLUE, GREEN, ORANGE, RED, YELLOW }; map<Colour, vector<vector<int>>> RANGES; vector<vector<Colour>> piece_colours; int faces[54]; void print_array(int* v) { for (int i = 0; i < 54; i++) ...
ALGO
0.940782
4.021535
6fabc267-5828-4467-9d72-369b63758b7d
Yeonji-Lim/ps-log
BOJ/1/9/1926/1926.cpp
#include <bits/stdc++.h> #define I first #define J second using namespace std; int n, m, num = 0, ms = 0, cs; int board[501][501]; bool vis[501][501]; queue<pair<int, int>> q; int di[4] = {-1, 0, 1, 0}; int dj[4] = {0, 1, 0, -1}; bool isInMap(int i, int j) { return i > -1 && i < n && j > -1 && j < m; } pair<int, int>...
ALGO
0.999427
4.061418
0231006f-feaa-4278-afff-08e0dc5c9b37
Shell-Wataru/AtCoder
Codeforces/619/D.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <map> #include <iomanip> #include <cmath> using namespace std; using ll = long long; ll BASE_NUM = 998244353; int main() { ll n, m, k; cin >> n >> m >> k; ll max_k = 4 * n * m - 2 * n - 2 * m; i...
ALGO
0.999969
4.321158
78aded0a-d849-4892-9f02-ad0a24b775b1
sarvex/leetcode-java
solution/2100-2199/2157.Groups of Strings/Solution.cpp
class Solution { public: int mx, n; vector<int> groupStrings(vector<string>& words) { unordered_map<int, int> p; unordered_map<int, int> size; mx = 0; n = words.size(); for (auto& word : words) { int x = 0; for (auto& c : word) x |= 1 << (c - 'a')...
ALGO
0.999908
5.838264
5fe20c74-edfe-441e-9ce3-c706d0d72123
Dev-Shivam-05/Full_CPP
PATTERN/program-3.cpp
#include<iostream> using namespace std; int main() { for (int i=1; i<=5; i++) { for (int j=1; j<=i; j++) { cout << j + i << " "; } cout << endl; } return 0; }
ALGO
0.997707
3.424216
eac01407-0001-42c4-a038-c3b12a6969bf
magae1/AlgorithmPractice
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/2/42626.โ€…๋”โ€…๋งต๊ฒŒ/๋”โ€…๋งต๊ฒŒ.cpp
#include <vector> #include <queue> using namespace std; int solution(vector<int> scoville, int K) { priority_queue qu(scoville.begin(), scoville.end(), greater<int>()); if (qu.top() >= K) { return 0; } int answer = 0; while(qu.size() >= 2) { int fst = qu.top(); qu...
ALGO
0.999634
5.760566
f70d8e17-d64e-4cdf-921e-a985c959342e
kp30-bit/Leetcode-DSA
107-binary-tree-level-order-traversal-ii/107-binary-tree-level-order-traversal-ii.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.99996
6.348053
9800d4c3-dad8-44a0-89bc-69d07eb80c47
tnameera/CSCI135
bookcode-bc-3/ch03/sec04/tax.cpp
#include <iostream> #include <string> using namespace std; int main() { const double RATE1 = 0.10; const double RATE2 = 0.25; const double RATE1_SINGLE_LIMIT = 32000; const double RATE1_MARRIED_LIMIT = 64000; double tax1 = 0; double tax2 = 0; double income; cout << "Please enter your incom...
ALGO
0.892528
5.122303
951483b4-09d7-42c0-8f61-d134e074336a
edison16029/competitive-programming
CF 719 Virtual/B_Ordinary_Numbers.cpp
#include <bits/stdc++.h> using namespace std; #define fo(i, n) for (int i = 0; i < n; i++) #define foeq(i, n) for (int i = 1; i <= n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define si(x) scanf("%d", &x) #define sl(x) scanf("%lld", &x) #define ss(s) scan...
ALGO
0.999668
5.149148
7e189b29-3385-41e2-b40e-5206decde273
Gauravism2017/leetCode
176/temp.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<int> A(n); for(int i = 0; i< n;i++) cin>>A[i]; for(int d : A) cout<<d<<" "; return 0; }
ALGO
0.99905
3.113451
2e966324-5e40-438d-869f-6422891266d8
maZymaZe/cpp_code
model/ๅฏๆŒไน…ๅŒ–็บฟๆฎตๆ ‘.cpp
//CF840d #include<cstdio> using namespace std; int n,q; int root[300005],cnt; struct TREE{ int l,r,sum; }dat[300005<<5]; void insert(int &o,int l,int r,int pre,int x){ int mid=(l+r)/2; o=++cnt; dat[o]=dat[pre]; dat[o].sum++; if(l==r)return; if(x<=mid){ insert(dat[o].l,l,mid,dat[pre]....
ALGO
0.999949
3.606349
018392f0-80a0-4811-8b7b-b029783cb7b1
hjiang13/LLMs-in-IR
processed_data/DecompiledResuts_Human_x_164_O1/MetaLLama_Human_x_164_O1_decompiled/CPP_57.cpp
#include <stdbool.h> bool monotonic(float* arr, int len) { int increasing = 0; int decreasing = 0; for (int i = 1; i < len; i++) { if (arr[i] > arr[i - 1]) { increasing = 1; } if (arr[i] < arr[i - 1]) { decreasing = 1; } } return increasing ...
ALGO
0.999499
4.598396
2f3e8087-f539-4e7c-8ca5-b8a0a39987d9
MdAfsarHossain/Phitron
Semester 1/Course 3 [Data Structures]/Week 8 [Binary Tree]/Module 29 [BFS & DFS]/BFS_Traversal.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int id; Node* left; Node* right; Node* parent; }; class BinaryTree{ public: Node* root; Node* allNode[9]; BinaryTree() { root = NULL; } Node* CreateNewNode(int id) { Node* newNode = new Node;...
ALGO
0.999878
3.967024
d7792f48-d931-4bb3-b2dd-3965f8436df2
Syncpine/LeetCodeSolutions
Array/506. Relative Ranks.cpp
class Solution { public: std::vector<string> findRelativeRanks(vector<int>& score) { const int scoreSize = score.size(); std::vector<std::string> vecStr(scoreSize, ""); int ii = 0; int jj = 0; for(ii = 0; ii < scoreSize; ++ii) { int cur = 1; ...
ALGO
0.999717
6.146767
91ab7a19-5535-4bfb-9531-4a1711a5f97c
Azad99-9/Flutter
GitHub Clone/sample/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.997856
6.785645
3ef1d7e4-fd6f-4afa-abbf-e63c24b014b4
ishandutta2007/codeforces
ssrs_/normal/1451/A.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; for (int i = 0; i < t; i++){ int n; cin >> n; if (n == 1){ cout << 0 << endl; } else if (n == 2){ cout << 1 << endl; } else if (n == 3){ cout << 2 << endl; } else if (n % 2 == 0){ cout << 2 <...
ALGO
0.999963
4.046798
89b69c90-59eb-464b-bfa5-f06d89e12464
dlsyj/School-Projects
Computer Science 3 - C++/lab 6 - Travelling Salesman/dev/vers 5/combo appery/ComboApp_take2/main.cpp
#include <iostream> #include <fstream> #include<string> using namespace std; void main() { fstream myFile; myFile.open("12.txt", ios::out ); int numNodes; cout << "How many nodes? : " ; cin >> numNodes; char* tempList = new char[numNodes + 1]; tempList[numNodes] = '\0'; for(int i = 0; i < numNodes; i++)...
ALGO
0.981923
3.157613
9c8aec89-1609-4035-a974-d2d6076b3e2b
D4PHOENIX/Semester-1-PF-Lab
Example Programs/stringclass3.cpp
#include <iostream> #include <string> using namespace std; int main(){ string s1 = "We all should respect everyone"; cout <<s1<<endl; cout<<"Total characters: "<<s1.length()<<endl; // int len = a1.length(); int n; n = s1.find("respect"); cout << "Found respect at index: " << n << endl; n = s1.find_first_of("abcd"); c...
ALGO
0.945972
3.706281
96561b63-24c6-4dd7-b34a-3120000cd7d7
avijitgupta/contrail-avrotest
boost_1_49_0/libs/intrusive/example/doc_slist_algorithms.cpp
struct my_node { my_node *next_; //other members... }; //Define our own slist_node_traits struct my_slist_node_traits { typedef my_node node; typedef my_node * node_ptr; typedef const my_node * const_node_ptr; stati...
TOOL
0.987108
6.154762
b2497955-ea4f-4319-b6f8-bf5f82069b96
NikolausDemmel/rootba
src/rootba/bal/bal_bundle_adjustment_helper.cpp
#include "rootba/bal/bal_bundle_adjustment_helper.hpp" #include <tbb/blocked_range.h> #include <tbb/parallel_reduce.h> namespace rootba { template <typename Scalar> std::tuple<Scalar, Scalar> BalBundleAdjustmentHelper<Scalar>::compute_error_weight( const BalResidualOptions& options, Scalar res_squared) { // TO...
ALGO
0.943677
7.673319
de129043-6140-4d45-b40d-008018a97315
rajatsaxena035/Compiler-Design-Lab
grammer/main.cpp
#include <iostream> #include <string> using namespace std; int main() { string str; int len,i; cout << "The grammer is : " << endl << endl; cout << " A -> Ab" << endl; cout << " A -> a" << endl; cout << endl << "Enter a string : "; cin >> str; len = str.size(); for(i=0;i<len;i++) ...
ALGO
0.996179
3.68896
a50cb284-033d-4144-8913-a575b7e7e22f
remote-android/platform_external_swiftshader
third_party/LLVM/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
#include "llvm/CodeGen/SelectionDAG.h" #include "llvm/Target/TargetLowering.h" using namespace llvm; namespace { class VectorLegalizer { SelectionDAG& DAG; const TargetLowering &TLI; bool Changed; // Keep track of whether anything changed /// LegalizedNodes - For nodes that are of legal width, and that have m...
ALGO
0.93251
7.798431
5794812d-1d8a-4f49-9f63-97929430737b
shumbul/DSA-Series
DP/1. Climbing Stairs.cpp
// Link: https://leetcode.com/problems/climbing-stairs // Code class Solution { int dp[46]; int helper(int n){ if(n<=2) return n; if(dp[n]!=-1) return dp[n]; return dp[n]=helper(n-1)+helper(n-2); } public: int climbStairs(int n) { // top down if(n<=2) return n; ...
ALGO
0.999988
6.622057
5badb70d-9260-4016-9123-2763181fbacd
anshul45-github/Leet-GFG-360
Strings/Smallest_Palindromic_Rearrangement_I.cpp
// https://leetcode.com/problems/smallest-palindromic-rearrangement-i/description/ // 3517. Smallest Palindromic Rearrangement I // Medium #include<bits/stdc++.h> using namespace std; class Solution { public: string smallestPalindrome(string s) { vector<int> freq(26, 0); for(int i = 0; i < s.size(...
ALGO
0.999974
6.463303
9e5c66f5-e490-4768-b23d-6cb6b511ca89
Nikhil2003/DSA-Journey
Arrays/Subarray.cpp
// printing the sum of the subarrays of an given array; /*for(int i=0; i<n; i++) { for(int j=i; j<n; j++) { s=s+arr[j]; cout<<s<<endl; } s=0; }*/ #include<iostream> using namespace std; int main() { int sum=0,s=0,n; cout <<"e...
ALGO
0.999695
3.431001
a4ad8669-ea0a-4c59-8150-21d5a28f9098
EsauHervert/PHYS-2321-Computational-Physics
Assignments/Final Exam - Population Equations/Final Exam - Population Equations.cpp
// These are all the libraries that will be used in this program. #include <iostream> #include <iomanip> #include <cmath> #include <fstream> #include <stdio.h> using namespace std; // Here is the function that will be used to calculate all the population problems. // The general form of the equation is dN/dt = a*N-b*...
ALGO
0.998845
4.361429
ef1211af-8ea0-470d-a15a-5b5b5a2dd27a
raincross7/code-similarity
codes/train_code/problem433/problem433_112.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define pi 3.141592653589793238 #define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define mod 1000000007 ll mod_pow(ll a,ll b,ll m) { ll res=1; while(b) { if(b&1) res=(res...
ALGO
0.999945
3.874199
fa503352-63c4-493c-b561-24dec1d1f2f5
mangosArchives/Mangos-One-server-old
dep/src/g3dlite/BinaryInput.cpp
/** @file BinaryInput.cpp @author Morgan McGuire, graphics3d.com Copyright 2001-2007, Morgan McGuire. All rights reserved. @created 2001-08-09 @edited 2005-02-24 <PRE> { BinaryOutput b("c:/tmp/test.b", BinaryOutput::LITTLE_ENDIAN); float f = 3.1415926; int i = 1027221; std::string...
TOOL
0.859647
5.516302
964230d9-2adf-450e-88bf-7206224b7746
ishandutta2007/codeforces
bigbag/normal/753/A.cpp
#include <bits/stdc++.h> using namespace std; const int max_n = 111111, inf = 1011111111; int n, m, ans, a[max_n], t[max_n]; vector<int> v[max_n]; multiset<int> q; void update(int i, int x) { for (; i < max_n; i = (i | (i + 1))) { t[i] += x; } } int get(int r) { int res = 0; for (; r >= 0; ...
ALGO
0.999891
3.62805
e50f1e20-8e3f-43d9-ad40-7b291e13b833
cechallenge/2025
llvm/libc/src/stdbit/stdc_bit_ceil_us.cpp
#include "src/stdbit/stdc_bit_ceil_us.h" #include "src/__support/CPP/bit.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(unsigned short, stdc_bit_ceil_us, (unsigned short value)) { return cpp::bit_ceil(value); } } // namespace LIBC_N...
TOOL
0.890373
6.816877
4e583d9c-6dfe-4a75-a59c-eee904037e26
Shubhamprakash007/competative_coding
STL_and_preprocessing/36_STL.cpp
/* Given n strings , print unique strings in lexiographical order with their frequency N<=10^5 |s|<=100 */ #include<bits/stdc++.h> using namespace std; int main(){ map<string,int> m; int n; cin>> n; for(int i=0;i<n;++i){ string s; cin>>s; m[s]=m[s]+1; } for(auto pr :...
ALGO
0.999924
4.634686
6b4d8f76-ce57-49d2-869f-42e700d1c20b
kkawka/codility
cpp/Lesson8/MinPerimeterRectangle.cpp
// you can use includes, for example: #include <limits.h> // you can write to stdout for debugging purposes, e.g. // cout << "this is a debug message" << endl; int solution(int N) { // write your code in C++11 long long int result = LLONG_MAX; for (int i = 1; i*i <= N; ++i) { if (N % i == 0) ...
ALGO
0.999869
5.033499
3b2e6212-1e36-4a14-a1a9-e63e12e4fb23
mpatwa98/DSA
Recursion_Backtracking_DnC/Generate-all-Parentheses-II.cpp
#include <bits/stdc++.h> using namespace std; void solve(int i, int n, int open, int close, string &cur, vector<string> &res) { if (i >= 2 * n) { res.push_back(cur); return; } if (open > close && close < n) { cur.push_back(')'); solve(i + 1, n, open, close + 1, cur, res); cur.pop_back();...
ALGO
0.999679
4.932439
d463b54e-5427-48d4-b851-9270ce469e5d
mehrab2603/scan3d-capture
src/im_util.cpp
#include "im_util.hpp" cv::Mat im_util::rotate_image(cv::Mat const& image, size_t rotation) { if (rotation==90) { cv::Mat outimg(image.cols, image.rows, image.type()); for (int h2=0,w1=0; h2<outimg.rows; ++h2,++w1) { cv::Vec3b * row2 = outimg.ptr<cv::Vec3b>(h2); for (int w2=0,h1=image.rows-...
TOOL
0.89125
6.536644
d0eaccc8-dff0-4b0c-bf79-f31e7ed377cc
unitpoint/os2d
Box2D/Box2D/Collision/b2CollideEdge.cpp
#include <Box2D/Collision/b2Collision.h> #include <Box2D/Collision/Shapes/b2CircleShape.h> #include <Box2D/Collision/Shapes/b2EdgeShape.h> #include <Box2D/Collision/Shapes/b2PolygonShape.h> // Compute contact points for edge versus circle. // This accounts for edge connectivity. void b2CollideEdgeAndCircle(b2Manifold*...
ALGO
0.999751
7.537114
133e823b-6819-48ef-8542-4e3a208a602c
nogsp/UVa-solved-problems
Complete Search/Iterative (Two Nested Loops)/11242 Tour de France.cpp
#include <bits/stdc++.h> #define endl '\n' #define ll long long #define pb push_back using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll m, n; while(cin >> m, m != 0) { cin >> n; vector <ll> front(m), rear(n); for(ll i = 0; i < m; i++) { ...
ALGO
0.999796
3.842678
53519f30-1562-46d3-b48f-5046a60e946d
ishandutta2007/codeforces
jenxls/normal/1198/D.cpp
#include <iostream> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <iomanip> #include <cassert> #include <cstring> #include <sstream> #include <numeric> #include <cstdio> #include <bitset> using namespace std; typedef ...
ALGO
0.999837
4.262526
2d8f8366-e3c6-4a6b-9c03-5c99fa45f209
aks-master/A2Z_DSA
patterns/18.cpp
/* Example: Input: โ€˜Nโ€™ = 3 Output: C C B C B A */ #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { cout << char(65 + n - j) << " "; } cout << endl; } return 0; ...
ALGO
0.999977
4.253067
a707c355-f076-4e04-944d-0547133783c6
CoderSaswat/Programming_Concepts
C++/26.cpp
#include<iostream> using namespace std; // 1 + 4i // 5 + 8i // ------- // 6 + 12i class Complex{ int a, b; friend Complex sumComplex(Complex, Complex); //prototype mandatory with minimal // above line means that non member - sumComplex funtion is allowed to do anything with my private parts (members) ...
ALGO
0.886129
4.126887
a757bf0c-3693-474c-94c9-fba937de2067
mynameisarwan/flutter_firebaseapp
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
fbc85f53-f03e-47d5-a62b-efd475e6ee43
isangyoon-zz/BOJ
2805.cpp
#include <iostream> #include <algorithm> #include <vector> int N, M; std::vector<long long> trees; long long sum(long long const H) { long long total = 0; for (auto const tree : trees) { if (tree >= H) { total += (tree - H); } } return total; } int main(int const argc, char const** argv...
ALGO
0.999949
5.16172
d6c6f26d-c193-4c51-b3d1-f537bacbbcaa
ivzdev/invisiblecoin
src/hash.cpp
#include "hash.h" inline uint32_t ROTL32 ( uint32_t x, int8_t r ) { return (x << r) | (x >> (32 - r)); } unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash) { // The following is MurmurHash3 (x86_32), see http://code.google.com/p/smhasher/source/browse/trunk/MurmurH...
ALGO
0.99241
6.283599
08a3698f-e66c-430b-8916-a76125d28686
fysabelah/uri
DATA STRUCTURES AND LIBRARIES/1766.cpp
#include<iostream> #include <cstring> #include<algorithm> using namespace std; typedef struct { char nome[100]; int peso, idade; float altura; }Ovelha; bool comper(Ovelha, Ovelha); int main(){ int rept, renas, puxar, i, cen; cin >> rept; cen = rept; while (rept--){ cin >> rena...
ALGO
0.998072
3.520775
19dba3dc-e6c9-46c2-b9fe-1448c908d2ea
dmbldr/contests
leetcode/combination-sum-iii.cpp
class Solution { public: vector<vector<int>> combinationSum3(int k, int n) { vector<vector<int>> result; vector<int> comb; combination(result, comb, 1, k, n); return result; } void combination(vector<vector<int>>& result, vector<int>& comb, int val, int k, int target...
ALGO
0.999926
6.8261
548887bd-e453-46d7-81ae-58a4aad43c06
Shuiliusheng/spec2006_simpoint
arm_x86_gem5/src/systemc/tests/systemc/misc/examples/datawidth_int_c/datawidth_int.cpp
/***************************************************************************** datawidth_int.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**********************************************************************...
ALGO
0.902164
5.523096
f4a4c460-df35-48be-90da-0267e5e3c919
anuragtiwari3100/DSA
Love-Babbar-450-master codes/10_stack_and_queues/18_length_of_the_longest_valid_string.cpp
/* link: https://practice.geeksforgeeks.org/problems/valid-substring0624/1 */ // ----------------------------------------------------------------------------------------------------------------------- // /* using stack TC: O(N) SC: O(N) */ int findMaxLen(string str) { int n = str.length(); //...
ALGO
0.999394
5.121756
d4042749-5828-4ec6-8e87-f879cd4dd39b
devanshtelanga/OpenGl
Assignment_4.cpp
#include <freeglut.h> #include <vector> #include <string> #include <sstream> #include <iomanip> #include <cmath> using namespace std; struct Point { float x, y; }; vector<Point> points; vector<pair<float, float>> lines; bool point1Set = false; Point currentStartPoint, currentEndPoint; void bresenhamDevansh(Point...
ALGO
0.983064
5.005959
8f4bcf21-65f5-46ad-8157-74f4a7739ff9
Rserendipity/win_code_vs2022
Cplusplus/bilibili/4็ฑป/ๅ‡ฝๆ•ฐ้‡่ฝฝ.cpp
//#define _CRT_SECURE_NO_WARNINGS 1 //#include <iostream> //using namespace std; // //// อฌาปฺฒอฌสนรณะฒอฌฤบ //// ฺบฤถ //// c++ฬฌ //// //// ุตอฌาป //// อฌ or //// อฒอฌ or //// หณอฌ //// าปอฟ //// ืขโฃบฤทึตฮชุต //// ิญ๒ฃบฑฺฑฺผรฒฮฒอฌฤบ //// func(int) --> "func@int" (ึปาปึผ) //// func(int, int) --> "func@intint" //// //// ืขโฃบุบฤฌฯฒอฌสฑาปืฒ //// //void my...
TOOL
0.908681
3.013667
cfcb2303-e0e0-49c1-8204-be97a1de9d46
nastyakuzenkova/CSC-Algorithms
I/11F.cpp
#include <cstdio> #include <iostream> #include <cassert> #include <climits> #include <cstdlib> using namespace std; typedef unsigned long long ull; struct Treap { int value; int prior; int count; Treap *left; Treap *right; ull sum; bool rev; Treap() : left(NULL), right(NULL), count(0), sum(0), rev(false) {}...
ALGO
0.999981
4.66895
17337180-65b8-4ce2-8208-3c007b93988d
andrew-kulikov/stunning-waffle
year1/oaip/lb_2/ะพะฑั‰ะธะต/3/File3.cpp
#include <iostream> #include <math.h> using namespace std; int main() { float a, b, x; cout << "a: "; cin >> a; cout << "b: "; cin >> b; bool y = a>b ? true : false; cout << y << endl; x = y == true ? a : b; cout << x << endl; system("pause"); return 0; }
ALGO
0.997562
3.042892
86ea4110-4fd0-4d30-af80-7c5833584f6d
vvinokurshin/AlgorithmsCourseVK
rk3/task1.cpp
#include <iostream> #include <queue> #include <utility> #include <vector> struct IGraph { virtual ~IGraph() {} virtual void AddEdge(int from, int to) = 0; virtual int VerticesCount() const = 0; virtual std::vector<int> GetNextVertices(int vertex) const = 0; }; class ListGraph : public IGraph { publi...
ALGO
0.999474
5.52481
00ae4246-3fe9-49bc-83a1-b8f106977f51
yosupo06/library-checker-problems
data_structure/range_affine_range_sum/gen/small_random.cpp
#include "random.h" #include <iostream> #include <tuple> #include "../params.h" using namespace std; int main(int, char* argv[]) { long long seed = atoll(argv[1]); auto gen = Random(seed); int n = gen.uniform<int>(1, 2000); int q = gen.uniform<int>(1, 2000); printf("%d %d\n", n, q); for (int ...
TOOL
0.911827
3.727603
5e47f11a-b58b-4124-8960-206bd927746a
samlacetbrown737/OC11B
selectionSort.cpp
#include <iostream> using namespace std; void Initialize(string a[]); void SelectionSort(string a[]); int FindMin(string a[],int start); void Swap(string a[],int p1,int p2); void Display(string a[]); int main() { string a[10]; int i; for(i=0;i<10;i++) { cout<<"a["<<i<<"]="; cin>>a[i]; ...
ALGO
0.999366
4.012474
66be6524-ac3b-488a-b860-1185e1c1103c
afjaramilg/comp_prog
practice1/spojMCOINS.cpp
// https://www.spoj.com/problems/MCOINS/ // typedefs and such/----------------- #include <bits/stdc++.h> #define fi first #define se second #define forn(i, n) for (int i = 0; i < (int)n; ++i) #define for1(i, n) for (int i = 1; i <= (int)n; ++i) #define fore(i, l, r) for (int i = (int)l; i <= (int)r; ++i) #define ford(...
ALGO
0.999962
4.096576
3a5c685a-694e-4022-b51c-929cac8e964c
melnan/distNCG
graph.cpp
#include "graph.h" #include"definitions.h" Graph::Graph(const unsigned int _num_of_nodes, const bool _storage_distances, const int _infty) : adjacency_matrix_int(_num_of_nodes), num_of_nodes(_num_of_nodes), players_strategy(_num_of_nodes), storage_distances(_storage_distances), dist_matrix(_num_of_nodes), infty(_inf...
ALGO
0.99838
3.698081
b7ddde54-3d65-4251-bbce-65737ebbe05d
bollig/viennacl
examples/tutorial/vector-range.cpp
/* * * Tutorial: Explains the use of vector ranges with simple BLAS level 1 and 2 operations. * (vector-range.cpp and vector-range.cu are identical, the latter being required for compilation using CUDA nvcc) * */ // activate ublas support in ViennaCL #define VIENNACL_WITH_UBLAS // // include necessary ...
ALGO
0.976792
4.911651
dabdb298-435c-482a-8d1c-a95f78a435fd
bigbillfighter/OJ_Solved
practice/ๆŒ‘ๆˆ˜็จ‹ๅบ่ฎพ่ฎก็ซž่ต›/primary/chap2.5graph/books/floyd_warshall.cpp
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; /* 7 10 0 1 2 0 2 5 2 1 4 1 3 6 2 3 2 1 4 10 3 5 1 4 5 3 4 6 5 5 6 9 */ const int MAX_V = 10; int d[MAX_V][MAX_V]; int V, E; const int INF = 0x3f3f3f3f; void warshall_floyd() { for(int k=0; k<V; k++) { for(int i=0; i<V; i++) { for...
ALGO
0.999955
3.922349
d57a97f8-6a0e-446b-a81a-99b7bad4df2b
shaoyuchu/TCG
hw2_modified_EWN/agent/src/main.cpp
#include <limits.h> #include <iostream> #include "board.hpp" #include "mcts.hpp" #define SECOND_PER_MOVE 9.0 using namespace std; void readAndSetInitialPosition(Board& board) { int redPos[6][2] = {{0, 0}, {0, 1}, {0, 2}, {1, 0}, {1, 1}, {2, 0}}; int bluePos[6][2] = {{3, 6}, {4, 5}, {4, 6}, {5, 4}, {5, 5}, {5...
ALGO
0.995039
5.827288
e5695251-49b4-4d3f-8aa4-46fe145922fb
beingaryan/Leetcode_Solutions
103-binary-tree-zigzag-level-order-traversal/103-binary-tree-zigzag-level-order-traversal.cpp
class Solution { public: vector<vector<int>> zigzagLevelOrder(TreeNode* root) { vector<vector<int>>ans; vector<int>currAns; if(!root)return ans; stack<TreeNode*>currLevel; stack<TreeNode*>nextLevel; currLevel.push(root); bool leftToRight=true; ...
ALGO
0.999997
6.164396
05e15dec-91a3-4836-82d5-c936ba1d8f6e
amangupta143/cpp-learning-journey
Programs/P14_Math.cpp
/* C++ has many functions that allows you to perform mathematical tasks on numbers. The max(x,y) function can be used to find the highest value of x and y. And the min(x,y) function can be used to find the lowest value of x and y. Functions, such as sqrt (square root), round (rounds a number) and log (natural loga...
ALGO
0.975458
4.640318
70efea56-b607-4b07-bbb1-ea972df2c0de
aanjaneykumarverma/USACO_Solutions
Simulation/thelostcow.cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define cd complex<double> #define MOD 1000000007 #define MODA 998244353 #define pb push_back #define mp make_pair #define sortv(v) sort(v.begin(), v.end()) #define sorta(A, N) sort(A, A + N) #define debug(x) cerr << #x << "is" << x; #define r...
ALGO
0.999901
4.632253
65fd01d6-adb6-4edd-b912-43e9d9758557
sierracoin-foundation/sierra
src/sync.cpp
#include "sync.h" #include "util.h" #include "utilstrencodings.h" #include <stdio.h> #include <boost/foreach.hpp> #include <boost/thread.hpp> #ifdef DEBUG_LOCKCONTENTION void PrintLockContention(const char* pszName, const char* pszFile, int nLine) { LogPrintf("LOCKCONTENTION: %s\n", pszName); LogPrintf("Loc...
TOOL
0.96258
5.919316
85eba51f-cd53-45cf-8bd6-9ea84b388b14
tiredbear-1106/skills-introduction-to-github
250705/์Œ์ˆ˜ ๊ตฌ๋ณ„ํ•˜๊ธฐ/separate-negative-number.cpp
#include <iostream> using namespace std; int main() { int a; cin >> a; cout << a << '\n'; if (a<0) cout << "minus"; return 0; }
TOOL
0.987892
3.696205
a52c2568-549c-41ab-b7bd-5fdbdd26b7c3
gaeunU/Algorithm
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/unrated/181922.โ€…์ˆ˜์—ด๊ณผโ€…๊ตฌ๊ฐ„โ€…์ฟผ๋ฆฌโ€…4/์ˆ˜์—ด๊ณผโ€…๊ตฌ๊ฐ„โ€…์ฟผ๋ฆฌโ€…4.cpp
#include <string> #include <vector> #include <iostream> using namespace std; vector<int> solution(vector<int> arr, vector<vector<int>> queries) { vector<int> answer; for(int i=0; i<queries.size(); i++){ for(int j=queries[i][0]; j<=queries[i][1]; j++){ if(j%queries[i][2] ==0){ ...
ALGO
0.999171
4.150505
b7d168ee-4af0-43d1-94b0-5f6b51ff2722
vster/OOP_CPP
Ch05/Ch05-Exercises/ex12/ex12.cpp
#include <iostream> using namespace std; struct fraction { int c; int z; }; fraction fadd( fraction, fraction ); fraction fsub( fraction, fraction ); fraction fmul( fraction, fraction ); fraction fdiv( fraction, fraction ); int main() { fraction f1, f2, f3; char dummychar, ch; char op; do { cout << "Enter f...
TOOL
0.95801
5.01897
a5526b81-9e1e-448f-b031-3baa74b5ae94
RoelYoon/Baekjoon-Practice
Platinum/XOR 12844/xor.cpp
#include <iostream> #include <vector> using namespace std; class SegmentTree{ #define LC(i) (2*(i)+1) #define RC(i) (2*(i)+2) private: int n; vector<int> data; vector<int> st; vector<bool> lazyFlag; vector<int> lazyUpdate; inline bool outBounds(int L, int R, int QL, int QR){ ...
ALGO
0.999884
5.183662
122a0053-f9b2-43b3-a9c9-c1deb33de278
ajay9758/cpp-programs
graphs/inorder_traversal_in_Btree.cpp
#include <iostream> #include <stack> using namespace std; // Data structure to store a binary tree node struct Node { int data; Node *left, *right; Node(int data) { this->data = data; this->left = this->right = nullptr; } }; // Iterative function to perform inorder traversal on...
ALGO
0.999998
6.462082