uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
57043078-3a1e-44ff-b7bb-8f4091aa1c79
DipankerSingh/CodingBlocks
coding blocks class/selection sort.cpp
//selection sort #include<iostream> using namespace std; int main() { int arr[100000],n; cout<<"enter the number of elements"<<endl; cin>>n; for(int i=0;i<n;i++) { cin>>arr[i]; } for(int i=0;i<n-1;i++) { for(int j=i+1;j<n;j++) { if(arr[j]<arr[i]) ...
ALGO
0.999722
3.681149
896d1cd3-16b3-4893-812d-924c05eea3fc
ravikumard0748/trianingphase1
Day2/primalitycheck.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cout<<"enter the number : "; cin>>n; bool flag=false; for(int i=2;i*i<=n;i++) { if(n%i==0) { flag=true; } } if(flag) { cout<<"This number "<<n<<" is not a prime number "; ...
ALGO
0.999196
3.000667
80eeb53e-7323-464a-beb4-13d36fb9cfc6
wtain/LeetCodeCpp
SearchInRotatedSortedArray2/SearchInRotatedSortedArray2.cpp
#include <iostream> #include <iomanip> #include <vector> using namespace std; /* https://leetcode.com/problems/search-in-rotated-sorted-array-ii/ Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). You are given a targ...
ALGO
0.999935
6.170856
1e7c8b49-2602-497e-bf4d-8fcc3919e6a6
ApoorvShri/CSES-Solutions
Mathematics/Divisor_Analysis.cpp
// Problem -> https://cses.fi/problemset/task/2182 // Solution -> https://usaco.guide/problems/cses-2182-divisor-analysis/solution #include<bits/stdc++.h> using namespace std; int mod = 1e9 + 7; using ll = long long; ll binpow(ll x, ll n) { ll res = 1; while (n) { if (n & 1) res = res * x % mod; x = x * ...
ALGO
0.999863
4.310382
26400a5c-eefa-44a8-8bb1-db371b815286
QbitQuantum/Basics
Исходники/testBST.cpp
int main(void) { int n, N; int x; BinarySearchTree<int> bst; //bst.allowduplicates(); cin>>N; cout<<"Insertions:"<<endl; n = N; while(n--) { cin>>x; bst.insert(x); bst.printtraversalinorder(); cout<<"\t---"<<endl; } cout<<"\t---"<<endl; cout<<"\t---"<<endl; //ASSERT(false, "GG!"); cout<<"Dele...
ALGO
0.999284
5.038688
93e9e3c4-ec61-45df-857e-8b7508e5c8f4
george536/Self-Parking-Car
src/libcarla/include/carla/geom/Math.cpp
#include "carla/geom/Math.h" #include "carla/geom/Rotation.h" namespace carla { namespace geom { double Math::GetVectorAngle(const Vector3D &a, const Vector3D &b) { return std::acos(Dot(a, b) / (a.Length() * b.Length())); } std::pair<float, float> Math::DistanceSegmentToPoint( const Vector3D &p, ...
TOOL
0.974188
7.096588
a1b238fa-40dd-4aa1-af48-582cd03281d0
Rizwansheik666/owl
1411-convert-binary-number-in-a-linked-list-to-integer/convert-binary-number-in-a-linked-list-to-integer.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) {} * }; */ static const auto _ = [](){ cin.tie(NULL); ...
ALGO
0.999996
5.517227
5d5b8d34-4efb-4497-8254-0f58ffd0f447
ishandutta2007/codeforces
arbuzick/normal/1365/C.cpp
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; vector<int> a(n), a1(n+1); for (int i = 0; i < n; ++i) { cin >> a[i]; a1[a[i]] = i; } vector<int> b(n), b1(n + 1); for...
ALGO
0.999981
3.698268
918bed44-db04-425b-8a7d-e64bcd7b60ce
delwar03/CF
G_Snakes.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using o_set = tree<T, null_type, std::less<T>, rb_tree_tag, tree_order_statistics_node_update>; // #define int long long #define endl '\n' #define F first #define S se...
ALGO
0.999914
4.327078
90e9245e-c247-4f6a-8c98-af7fd692e8c6
circt/llvm
libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14 // <numeric> // Became constexpr in C++20 // template<class InputIterator, class OutputIterator, class T, class BinaryOperation> // OutputIterator // inclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, // B...
TEST
0.946412
7.478186
af1db927-38c4-46da-a08c-8e031d17bfeb
hyunJIN7/PRACTICE_CODDINGTEST
BackJoon/C++/BOJ2751.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n,*arr; scanf("%d",&n); arr = new int [n]; for(int i=0;i<n;i++) scanf("%d",&arr[i]); sort(arr,arr+n); for(int i = 0 ; i <n; i++) printf("%d\n",arr[i]); return 0; }
ALGO
0.99963
3.478389
925b48ce-5e6c-4abe-8a2a-10084d7664c1
RakibulRanak/Solved-ACM-problems
Codeforces/Copy-paste CF 1417A.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define FastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define mod 1000000007 #define S second #define pb push_back #define F first #define loop(i,a,b) for (ll i = a; i <= b; i++) ...
ALGO
0.999752
3.737372
0d638d78-a200-4be0-b464-b1cd4d23ef2b
Rhithick02/C-code
Codeforces/1311/B.cpp
#include<bits/stdc++.h> using namespace std; #define lli long long int main(){ int t; cin>>t; while(t--) { int n,p,flag=0,temp; cin>>n>>p; vector <int> ar(n),pi(p); vector <int>:: iterator it; for(int i=0;i<n;++i) cin>>ar[i]; for(int i=0;i<p;+...
ALGO
0.999951
3.236214
44f4cfe2-dbd8-4058-b7a5-8aff34ed2d49
HCY-ASLEEP/llvm-study
libc/src/math/nvptx/copysign.cpp
#include "src/math/copysign.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(double, copysign, (double x, double y)) { return __builtin_copysign(x, y); } } // namespace LIBC_NAMESPACE_DECL
TOOL
0.968585
5.730906
5d8bcb2c-a3f1-4183-a077-c4eca02fb91d
trhgquan/CPP
basic_algorithm/RECURSION/hanoi_tower.cpp
#include <iostream> using namespace std; int n, total_steps = 0; void swap (int disks, char col_from, char col_to, char col_mid); int main () { cout << "Number of disks:"; cin >> n; // recursion swap(n, 'A', 'C', 'B'); cout << "Total steps: " << total_steps; return 0; } void swap (int di...
ALGO
0.999845
5.324774
5f60292e-b13e-46d9-8787-2c029471b32b
wanyding/leetcode_practicing
tree105.cpp
//complex version /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: void Construct(TreeNode* root,int &count,vector<int> begin,vector<int> end,ve...
ALGO
0.999938
6.211904
89397610-6a29-40c4-a02f-f85a01a06b25
2h1082/Coding-Test-Repo
프로그래머스/1/131705. 삼총사/삼총사.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> number) { int answer = 0; for(int i=0;i<number.size()-2;i++){ for(int j=i+1;j<number.size()-1;j++){ for(int k=j+1;k<number.size();k++){ int sum=number.at(i)+number.at(j)+number.at(k); ...
ALGO
0.999802
5.630591
7a91f9fb-a991-431d-a914-a310033afe09
mellcr/ALGORITMIA
EXAMEN02/Dijkstra/main.cpp
/* * File: main.cpp * Author: david * * Created on 24 de junio de 2024, 10:59 */ #include <cstdlib> #include <iostream> #define V 5 #define MAX 1000 using namespace std; /* * */ int recorrer(int grafo[V][V],int inicio,int fin){ int min = MAX; /*Inicializamos con un valor maximo porque nos piden el mi...
ALGO
0.999851
4.778403
df9a7c38-5b37-478b-a408-c1f746f2b825
ishandutta2007/codeforces
cchao/normal/216/B.cpp
#include <cstdio> int p[110], s[110]; int find(int x){return p[x] == x ? x : p[x] = find(p[x]);} int main(){ int n, m, ans = 0; scanf("%d%d", &n, &m); for(int i = 1; i <= n; ++i) p[i] = i, s[i] = 1; for(int i = 0; i < m; ++i){ int a, b; scanf("%d%d", &a, &b); int ta = find(a), tb = find(b);...
ALGO
0.999988
4.287766
8db1ac11-262c-414f-b3a4-855ddc32470e
Sudhir769/leetcode-solutions
621-task-scheduler/task-scheduler.cpp
class Solution { public: int leastInterval(vector<char>& tasks, int n) { vector<int>mp(26, 0); for(auto ch: tasks){ mp[ch-'A']++; } int time = 0; priority_queue<int>pq; for(int i=0; i<26; i++){ if(mp[i] > 0){ pq.push(mp[i]); ...
ALGO
0.999993
6.607446
e8167e95-b916-400e-b48f-49ba519b4f8e
webgeekhabib007/MyCompetitiveProgrammingTemplate
codeforces/Can I Square.cpp
//Problem Name : Can I Square //Solver : Codecrasader036 //Date : 2023-12-28 //////////////////////////////////////////////////////////////////////// //OOOOOOOOOOOOOOOOOOOOOOOkxdoollooooooollodkkOOOOOOOOOOOOOOOOOOOOOOOOO// //OOOOOOOOOOOOOOOOOOOkdoc:::ccccccccccccc:::clodxkOOOOOOOOOkOOOOOOOOOO// //OOOOOOOOOOOOOOkxdlc::...
ALGO
0.999804
5.605042
046b49d7-8022-4cda-a6fd-b703a48f29ca
DuyLongg/DataStructure_Algorithms_PTIT
Algorithm/4. Dynamic Programing/Xem_phim_2/Xem_phim_2.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int C,N; vector <int> Wei; int step[101] = {0}; int FOPT = 0; void Nhap_Wei (){ int temp; for (int i = 0 ; i < N ; i++){ cin >> temp; Wei.push_back(temp); } } void Try (int i, int j_cu){ for (int j = j_cu+1 ; j < N ; j++){ step...
ALGO
0.999992
4.26219
a6fd0a49-4ed3-4dc8-9b8b-feedde9f5f98
akashhdev/ICPC
assignment/LABWORK_7_p2_03-01-2022.cpp
#include<iostream> using namespace std; class Books{ int Id; string Name; int Price; public: void readInfo(); void Disp(); int getPrice(); }; void Books:: readInfo(){ cout << "Book Id: "; cin >> Id; cout << "Book Name: "; cin >> Name; cout << "Book Price...
TOOL
0.986393
4.205389
bf8baf2c-905a-49c1-8f36-b4ea6525eb96
cogsys-tuebingen/gerona
path_follower/src/utils/cubic_spline_interpolation.cpp
#include <path_follower/utils/cubic_spline_interpolation.h> // band_matrix implementation // ------------------------- band_matrix::band_matrix(int dim, int n_u, int n_l) { resize(dim, n_u, n_l); } void band_matrix::resize(int dim, int n_u, int n_l) { assert(dim>0); assert(n_u>=0); assert(n_l>=0); m_up...
ALGO
0.999941
6.609011
a7cc9185-a5f1-402a-bf7d-dfc603fdc4e3
siddharthnarula/Object2.0
Untitled3.cpp
#include <iostream> using namespace std; // Function to return trailing 0s in factorial of n int findTrailingZeros(int n) { // Initialize result int count = 0; // Keep dividing n by powers of 5 and update count for (int i=5; n/i>=1; i *= 5) count += n/i; return count; } // Driver ...
ALGO
0.999649
6.173456
7f6e8a2e-b02d-4fde-99ef-5cc59ac12fca
tyolab/antelope
source/relevant_document.cpp
/* RELEVANT_DOCUMENT.C ------------------- */ #include <string.h> #include "relevant_document.h" /* ANT_RELEVANT_DOCUMENT::COMPARE() -------------------------------- */ int ANT_relevant_document::compare(const void *a, const void *b) { ANT_relevant_document *one, *two; one = (ANT_relevant_document *)a; two = (ANT...
TOOL
0.877055
5.80837
c932194b-44f9-4c33-b741-999b0e91c69d
asce1062/MAHDI-ROM_external_skia
tools/skdiff_main.cpp
#include "skdiff.h" #include "skdiff_html.h" #include "skdiff_utils.h" #include "SkBitmap.h" #include "SkData.h" #include "SkForceLinking.h" #include "SkImageDecoder.h" #include "SkImageEncoder.h" #include "SkOSFile.h" #include "SkStream.h" #include "SkTDArray.h" #include "SkTemplates.h" #include "SkTSearch.h" #include...
TOOL
0.898445
6.309956
c4f9e4a8-ca5c-4993-9310-5eb3c070c432
belikeakash/Leetcode
1557-minimum-number-of-vertices-to-reach-all-nodes/1557-minimum-number-of-vertices-to-reach-all-nodes.cpp
class Solution { public: vector<int> findSmallestSetOfVertices(int n, vector<vector<int>>& edges) { vector<int>in(n,0); for(auto x:edges) { in[x[1]]++; } vector<int>ans; for(int i=0;i<n;i++) { if(in[i]==0) ans.push_back(i); } return ans...
ALGO
0.999927
6.019518
e815d64b-d5df-4a58-b6b5-97ee4d25952a
xray-storage/xray162-imdex
code/engine/xrGame/ai/monsters/rats/ai_rat_behaviour.cpp
//////////////////////////////////////////////////////////////////////////// // Module : ai_rat_fsm.cpp // Created : 25.04.2002 // Modified : 07.11.2002 // Author : Dmitriy Iassenev // Description : AI Behaviour for monster "Rat" //////////////////////////////////////////////////////////////////////////// #inclu...
TOOL
0.999197
3.930409
48d1c5f1-f961-47c4-b042-c26f4382eaf3
Pritish125/CipherSchools-Weekly-Questions
Day - 06 Questions - Week-02 (August 22th, 2024)/q2.cpp
#include <iostream> using namespace std; int main() { int n, oddSum = 0, evenSum = 0; cout << "n: "; cin >> n; int arr[n]; for (int i = 0; i < n; ++i) { cin >> arr[i]; if (arr[i] % 2 == 0) { evenSum += arr[i]; } else { oddSum += arr[i]; } ...
ALGO
0.999856
5.71979
89c6b5d8-9619-4698-adf1-e6a0c03a7225
GauravZn/scheduling-algos
roundRobin.cpp
// C++ implementation for the Round Robin algorithm. // April 27 2025 #include <bits/stdc++.h> using namespace std; struct process { int at, bt, ct, tat, wt, rt, id, rem; }; bool cmp(process a, process b) { if (a.at < b.at) { return true; } else if (a.at == b.at) { return a.id...
ALGO
0.999836
4.00349
fd4d626e-7571-4f33-80c5-b60d3d40d4cd
05sachin/DSAwithCpp
15-BinaryTree/1takeInput.cpp
#include<iostream> #include "BinaryTreeNode.h" using namespace std; BinaryTreeNode<int>* takeInput(){ int data; cout<<"Enter Data "<<endl; cin>>data; if(data==-1){ return NULL; } BinaryTreeNode<int>* root = new BinaryTreeNode<int>(data); root->left = takeInput(); root->right = ...
ALGO
0.997134
4.50311
52c40d42-4a38-4cc8-bd98-12f4c1a8edaa
itmogamedev/cpp
sem2/KirichenkoAP/minihomework2/mathclient/mathclient/mathclient.cpp
#include <iostream> #include "dllmath.h" int main() { const int size = 7; int arr[size] = { 23, 45, 62, 7, 89, 11, 4}; std::cout << arithmetic_mean(arr, size) << std::endl; std::cout << median(arr, size) << std::endl; std::cout << quadratic_mean(arr, size) << std::endl; std::cout << dispersion...
ALGO
0.997287
4.514214
59b078f3-3bab-4416-9470-c7ed183e0809
MathiasVandePol/algo2
Automaten/main.cpp
#include "thompsonna.h" #include "na.h" #include <fstream> #include <string> using std::ifstream; using std::cout; using std::endl; void leesBestand(vector<string>& zinnen, const string bestandsnaam){ ifstream in(bestandsnaam); if (in.is_open()){ string zin; while (getline(in, zin)){ zinnen.push_back(zin); ...
TOOL
0.895429
3.899686
3624aec9-ffc6-435f-a0f4-9c5299920959
HanYouyang/Computer
数据结构与算法/PKU-CS/Leetcode/LeetCode-master/C++/319. Bulb Switcher.cpp
319. Bulb Switcher My Submissions QuestionEditorial Solution Total Accepted: 17314 Total Submissions: 42815 Difficulty: Medium There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it's off or tu...
ALGO
0.999966
5.471425
b019621f-dc25-435f-bf9a-61ed970d0ec0
Lessica/HikariSummer
clang/tools/clang-check/ClangCheck.cpp
#include "clang/AST/ASTConsumer.h" #include "clang/CodeGen/ObjectFilePCHContainerOperations.h" #include "clang/Driver/Options.h" #include "clang/Frontend/ASTConsumers.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Rewrite/Frontend/FixItRewriter.h" #include "clang/Rewrite/Frontend/FrontendActions.h" #in...
TOOL
0.879016
7.62466
0b53b9a8-fbad-4871-944e-4fae0e9b5609
ShabeerHussainCoder/practice-problems-in-cpp
problem38.cpp
#include <iostream> using namespace std; int main() { //9: swap without using third variable int num1=5,num2=4; cout << "Enter the Num1: "; cin >> num1; cout << "Enter the Num2: "; cin >> num2; num1=num1+num2; num2=num1-num2; num1=num1-num2; cout << num1 << " "<<num2; }
ALGO
0.997885
3.347312
05a4ebfc-9061-4554-a63f-87a4630571a8
raincross7/code-similarity
codes/train_code/problem495/problem495_132.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; typedef pair<ll, ll> P; #define rep(i, n) for(ll i = 0; i < n; i++) #define REP(i, a, b) for(ll i = a; i <= b; i++) #define out(x) std::cout << x << '\n' #define all(a) a.begin(), a.end() #define ...
ALGO
0.999909
3.955869
926f895a-3f66-4d84-8826-c48f09bfcc9d
AHAsif1234/Codeforces
codeforces problem solve/A. Candies and Two Sisters.cpp
#include<iostream> using namespace std; int main() { int t; cin>>t; int arr[t]; for(int i=0;i<t;i++) { cin>>arr[i]; if(arr[i]==1 || arr[i]==2) { cout<< "0"<<endl; } else { cout<<(arr[i]-1)/2; } } }
ALGO
0.999975
3.433526
c4e3e868-281a-458f-ac48-e2aa13c9300b
Johannyjm/c-pro
AtCoder/abc/abc217/a.cpp
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (n); ++i) #define rep1(i, n) for(int i = 1; i < (n); ++i) using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); string s, t; cin >> s >> t; if(s > t) puts("No"); else puts("Yes"); ...
ALGO
0.999975
4.500011
6d9a41d9-43ab-4180-8f93-65b16f22a6d9
jjbutler52/Code-samples
creadWorkArray.cpp
# include<iostream> # include<cmath> using namespace std; void print(int* arr, int rowLength, int colLength) { for (int r = 0; r < rowLength; r++) { for (int c = 0; c < colLength; c++) { int spot = r * rowLength + c; cout << arr[spot] << " "; } cout << e...
ALGO
0.970067
3.404165
ebf2c35d-9e8f-4f20-804b-ba2a580d94b5
scarletrunner7000/contests
templates/palindrome.cpp
// palindrome #include <bits/stdc++.h> using namespace std; /** * @param (str) string consists of any chars except '^', '$' and '_'. * @param (res) a vector to which the function will return result. * res[i] is the length of the longest parindrome whose center is str[i * 0.5 - 1] * @detail * ex.: * str: ...
ALGO
0.999984
4.38538
7cc74f07-9169-4666-9dab-2822565553a8
kulecalala/c-ComoProgramar5ed
cap05/exerc5-8/main.cpp
// exerc5-8: main.cpp /* Problema: Escreva um programa que utiliza uma instrução for para localizar o menor de vários inteiros. Assuma que o primeiro valor lido especifica o número de valores restantes e que o primeiro número não é um dos inteiros a ser comparado.*/ #include <iostream> using s...
ALGO
0.998992
4.224854
a3f0f501-5e0e-41a9-8a81-4c364a0f7b31
StormLight14/godot-4.3-freebsd
thirdparty/icu4c/common/ustring.cpp
#include "unicode/utypes.h" #include "unicode/putil.h" #include "unicode/uchar.h" #include "unicode/ustring.h" #include "unicode/utf16.h" #include "cstring.h" #include "cwchar.h" #include "cmemory.h" #include "ustr_imp.h" /* ANSI string.h - style functions ------------------------------------------ */ /* U+ffff is th...
TOOL
0.986061
6.187
103be136-c07e-496f-902e-17ceb13b147f
DeveshKumar8423/C-with-Classes
zo.cpp
//hexadecimal to decimal #include<bits/stdc++.h> //it includes all the header files like string , vectors etc using namespace std; int hexadecimaltodecimal(string n){ int ans = 0; int x = 1; int s = n.size(); for(int i=s-1 ; i>=0 ; i--){ if(n[i] >= '0' && n[i] <= '9'){ ans+=x*(...
ALGO
0.994959
5.203293
6ffbefb7-7571-4c18-894b-ac45603f5b7a
sctpimming/Competitive-Programming
codeforces/644 (div3)/C.cpp
#include<bits/stdc++.h> using namespace std; using lli = long long; using pii = pair<int, int>; #define rep(i,k,n) for(int i=(k); i != int(n); ++i) #define sz(x) x.size() #define all(x) x.begin(), x.end() #define dbg(x) cout << #x << '=' << x << '\n' #define dbg2(x, y) cout << #x << '=' << x << ' ' << #y << '=' << y ...
ALGO
0.999753
4.400087
4a91cd4b-cf67-4580-aa74-cee4ee9660fc
anikxt/DS_Templates_Blaze
Mathematics/Advanced Math/matrix_exponentiation.cpp
#include <bits/stdc++.h> #define endl '\n' #define blaze ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); //======================= using namespace std; //======================= typedef vector<vector<int>> matrix; const int matrixmod = 1234567891; matrix matrixUnit(int n) { matrix res(n, vector<int>(n)); ...
ALGO
0.999869
3.846799
6cc81688-5826-4af7-9356-fac0d3bbb87a
tahmine-t/MultiCoreProg-Prj
serial/n_body.cpp
/* Sequential version of N body simulation */ #include "../Dataset/NBody-4.h" #include "VectorMath.h" #include "CycleTimer.h" #include <fstream> using namespace std; int COMPUTATION_STEP = 100; void display_bodies(ofstream &outfile) { for (int i = 0; i < BODY_COUNT; i++) { // printf("\nBody %d:\nMass: %f\nP...
ALGO
0.998708
4.96866
7d21b4c8-947c-4360-b481-53efd153f13a
ritesh-raushan/problem-solving
codeforces/starting-problems/A_Kevin_and_Arithmetic.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' void solve() { int n; cin >> n; vector<int> v(n); int even = 0, odd = 0; for(int i = 0; i < n; i++) { cin >> v[i]; if(v[i] % 2 == 0) even++; else odd++; } if(even == 0) cout ...
ALGO
0.999724
5.205114
6efd3a38-0a9c-4ca0-8981-0ca7e7340d5d
abhishekBhangalia/Striver-s_SDE_Sheet_cpp_solutions
17. Binary Tree/11. All root to leaf paths in a binary tree.cpp
/******************************************************************** Following is the Binary Tree node structure: class BinaryTreeNode { public : int data; BinaryTreeNode<T> *left; BinaryTreeNode<T> *right; BinaryTreeNode(T data) { this -> data = data; ...
ALGO
0.999982
6.160615
8911792e-fcbc-401d-b8b7-52c1381ac705
sahilThite01/C-programming
Untitled3.cpp
#include<stdio.h> void getv() { int x,y; printf("Input x: "); scanf("%d",&x); printf("Input y: "); scanf("%d",&y); } int power(int x,int y) { int p=1; while(y>0) { p=p*x; y--; } return p; } void display() { //printf("%d raised to %d = %d",x,y,p); } int main() { int x,y,p,ans; getv(); ans=power(x,...
ALGO
0.999799
4.082457
ffcfda53-9103-4289-9992-15abdbcf8a97
mongodb-labs/mongo-netopo
src/mongo/db/commands/find_and_modify_common.cpp
// find_and_modify.cpp #include "mongo/db/commands/find_and_modify.h" #include <string> #include <vector> #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" #include "mongo/db/auth/privilege.h" #include "mongo/db/jsobj.h" namespace mongo { namespace find_and_modify { void addPrivi...
TOOL
0.899848
7.792251
427f90ac-3416-4e7a-b151-ff725355fcc8
nhemnt/competitive
c++/utopian-tree/using_loop.cpp
// https://www.hackerrank.com/challenges/utopian-tree/problem int utopianTree(int n) { int i =0; int max = 0; while(i<=n){ if(i%2 == 0){ max++; }else { max = max * 2; } i++; } return max; }
ALGO
0.999674
5.556862
602afb1d-acf9-4398-8710-cf55ddff4868
Wonderuj/codes
az revision list prac/graphs/bellman_ford.cpp
/* You have given a graph G with n nodes and m edges. Each edge has an integer weight associated with. The weight of an edge may negative, positive or zero. If the graph contains a cycle with total weight > 0, print -1. Otherwise, find the weight of the highest weighted path from node 1 to n. Input Format The first...
ALGO
0.99994
4.342066
2cadac39-cadd-4f06-80f3-f776b1786a4b
SingularDuo/C-COMPETITIVE-TRAINING
BT-CO-SUONG/2POINTER/SEGMENT_2.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define KING_PHAT signed main() #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl '\n' #define vec(type, a, size, value) vector<type> a(size, value); #define all(x) x.begin(), x.end() #define I_O(inpu...
ALGO
0.999538
4.025824
b397d7bf-d142-45ea-9be3-0392c17e36e6
tchomphoochan/cmutoi_codes
resources/o61_oct_problems_and_solutions/Day06 - 2015.10.28 (Stack Queue List BIS Hash)/(4).Oct11_SearchSum2/Oct11_SearchSum2.cpp
#include <cstdio> #include <queue> #include <algorithm> using namespace std; int arr[1005]; int q[1005]; int main(){ int N, Q; scanf("%d%d", &N, &Q); for(int i = 1; i <= N; ++i) scanf("%d", &arr[i]); while(Q--){ int M; scanf("%d", &M); int ma = 0, sum = 0, fir = 0, las ...
ALGO
0.999849
3.92773
75aebb7a-a7c8-47c9-9b1b-8d22f6401d41
ishandutta2007/codeforces
hyperbolic/normal/1670/D.cpp
#include <stdio.h> #define gap 5 int sqrt(int k) { if(k==0) return 0; if(k==1) return 1; int min = 0, max = k; int ans = k; while(min<=max) { int h = (min+max)/2; if((long long int)h*h<=k) { ans = h; min = h+1; } else max = h-1; } return ans; } int main() { int T; scanf("%d",&T); while(T-...
ALGO
0.999949
3.633719
e11c3b2b-4724-4707-a496-8cec0a4f7307
hieunv183534/ttud
trongsoconlonnhat.cpp
#include<stdio.h> int main() { int n; scanf("%d",&n); int a[n]; for(int i=0; i< n ; i++) { scanf("%d",&a[i]); } int maxsum = -9999999; for(int i=0; i< n; i++) { for (int j=i; j < n; j++) { int tmpsum=0; for(int k=i; k<=j; k++) ...
ALGO
0.999933
3.720922
cd490f19-6c3f-4b6b-9137-2c34e5b3e023
An0udo/pharmcare-plus
env/lib/python3.12/site-packages/sklearn/svm/src/liblinear/tron.cpp
#include <math.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include "tron.h" #ifndef min template <class T> static inline T min(T x,T y) { return (x<y)?x:y; } #endif #ifndef max template <class T> static inline T max(T x,T y) { return (x>y)?x:y; } #endif static void default_print(const char *buf) {...
ALGO
0.999513
5.847107
0598e29a-98f3-4e11-8dfa-9e1153f799d6
lwher/Algorithm-exercise
C++/SJTU/sjtu 3040.cpp
#include<iostream> #include<queue> #include<cmath> #include<vector> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; int n, m, ty, maxx, maxy, minx, miny; int dx[4] = {0, 0, 1, -1}; int dy[4] = {1, -1, 0, 0}; double S, maxdist, mindist; char map[1010][1010]; inline bool O...
ALGO
0.999695
3.301897
305bd67e-b049-4cfd-93ec-19d51445a131
srang03/flutterInflearnStudy
book_0702/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.998897
6.76073
418585a1-815c-4e71-aefb-ef252939f484
SecretGame/labHell22
lab22_1.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node *next; ~Node(); }; class List{ public: Node *root; int size; void show(); void append(int); void insert(int,int); void remove(int); }; Node::~Node(){ cout << data << " was deleted.\n"; } void List::insert(...
ALGO
0.999315
4.224585
72c59e60-6277-4556-b4a1-d3c7cbbff596
ishandutta2007/codeforces
suiseiseki/normal/1416/E.cpp
/* */ #include <set> #include <cstdio> using namespace std; #define int long long void read(int &a){ a=0; char c=getchar(); while(c<'0'||c>'9'){ c=getchar(); } while(c>='0'&&c<='9'){ a=(a<<1)+(a<<3)+(c^48); c=getchar(); } } const int Maxn=500000; int T; struct Reverse_Set{ int left,right; set<int> point...
ALGO
0.999556
3.984249
63936f7d-4cc6-46c0-af31-ebcd05199fd8
danclancey/CPP-Starting-Out-Challenges
ch06/18_population.cpp
/* In a population, the birth rate is the percentage increase of the population due to births, and the death rate is the percentage decrease of the population due to deaths. Write a program that asks for the following: - The starting size of a population (minimum 2) - The annual birth rate - The annual d...
ALGO
0.998701
7.023432
16c812fe-5d33-4a62-9fb0-c393315d80af
vrangr1/competitive-programming
contests/codeforces/edu_rounds/edu_round_1--/edu_round_163_div2/c.cpp
/*************************************************** * Author : Anav Prasad * Nick : vrangr * Created : Fri Mar 15 20:18:31 IST 2024 ****************************************************/ #include <iostream> #include <vector> #include <string.h> #include <ctype.h> #include <set> #include <stdlib.h> #include <map> #i...
ALGO
0.99996
3.88319
0f8441e0-6f57-4fe1-b9fe-a07fabb6c3ac
BielMandelli/maratona-unioeste
codeforces/485/a.cpp
#include <bits/stdc++.h> #define int long long using namespace std; signed main(){ ios::sync_with_stdio(false); cin.tie(0); int x, y; cin >> x >> y; x += x%y; for (int i = 0; i < 30; i++) { if(x%y == 0) { cout << "Yes" << endl; return 0; } ...
ALGO
0.999979
3.694806
ad6b824e-1b13-4064-a63b-286fe14f2f38
eftrahman/LeetCode
008/solwithmain.cpp
#include <iostream> #include <string> #include <climits> #include <cctype> using namespace std; class Solution { public: int myAtoi(string str) { int i = 0; int n = str.size(); // Step 1: Skip leading whitespace while (i < n && isspace(str[i])) { i++; } ...
ALGO
0.999347
6.117314
66b3a4f3-c750-4cff-b0a5-54232ed6e94d
fang50253/lanqiao_2024
874_1.cpp
#include<iostream> using namespace std; long long ol(int x) { long long res=x; for(int i=2;i<=x/i;i++) { if(x%i==0) res=res*(i-1)/i; while(x%i==0) x/=i; } if(x>1) res=res*(x-1)/x; return res; } int main() { int n; long long res=0; cin>>n; for(int i=1;i<=n;i++) res...
ALGO
0.999974
4.702067
123c5e37-7c89-4ba5-9974-4dc2635c9f2a
adityatulsyan03/LeetCodeSolutions
15-3sum/3sum.cpp
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> ans; sort(nums.begin(),nums.end()); for(int i=0;i<nums.size();i++){ if(i>0 && nums[i]==nums[i-1]) continue; int t= -1*nums[i],s=i+1,e=nums.size(...
ALGO
0.999968
5.816844
cb329f1d-aa77-405d-9767-485d14bea7a5
mrcchef/CP
Contest/code_forces/div3/636/E_Weights_Distributing.cpp
//LinkedIn:https://www.linkedin.com/in/abhijeettamrakar/ //GitHub:https://github.com/mrcchef/ #include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(false); cin.tie(0) ; cout.tie(0); #ifndef ONLINE_JUDGE #define debug(x) cerr << #x <<" "; _print(x); cerr << endl; #else #define d...
ALGO
0.999934
4.628239
e12ad6ed-db2a-47ea-9eb4-daa076dec277
Sourabh-Kumar04/Cpp
Practical-sem2.cpp/practicle3.cpp
<<<<<<< HEAD #include <iostream> #include <map> #include <cctype> std::map<char, int> count_alphabets(const std::string& text) { std::map<char, int> counts; for (char c : text) { if (std::isalpha(c)) { char lowercase_c = std::tolower(c); counts[lowercase_c]++; } } ...
ALGO
0.933733
5.344979
64075738-490c-4929-8803-5d302dd3e442
Hamsik2rang/Today-I-Solved
Problems/Simulation/14500.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> using namespace std; int a[500][500]; int main() { int n, m; cin >> n >> m; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> a[i][j]; } } int ans = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (j + 3 < ...
ALGO
0.999854
3.492022
d2679ab5-b279-4c90-b114-f42cc0aa9c6c
abdullaabdullazade/rio-semifinal-submissions-2025
Məryəm_Rəsulzadə_Vüqar qızı_9.0_1_5BAL_RIO2025_Semifinal_J1.cpp
#include <bits/stdc++.h> using namespace std; int a[2]; int main() { int t; cin>>t; while(t--) { string s; long long d; cin>>s>>d; int a, b, h,m; a=(int(s[0])-48)*10 + int(s[1])-48; b=(int(s[3])-48)*10 + int(s[4])-48; m=(d%60+b)%60; h=(d/60...
ALGO
0.999
4.48061
2da2c78e-8bb7-48c5-83d4-1c56158ff20f
zeroslope/BZOJ-code
BZOJ/3892 [Usaco2014 Dec]Marathon.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long LL; template<class T> inline void Read(T& x){ x=0; bool flag=0; char ch=getchar(); while(ch> '9' || ch< '0'){ if(ch=='-'){ flag=1; ch=getchar(); break; } ch=getchar();} while(ch>='0' && ch<='9'){ x=x*10+ch-48; ch=getchar...
ALGO
0.999942
3.763381
7f6877ee-7d65-4624-b25d-f96cd96ea172
HermanMcElveen/SEVENGINE
Engine/Engine/Core/Physics/CollisionManager.cpp
#include "CollisionManager.h" inline vec3 e(const ColliderComponent& coll) { return coll.size; } inline vec3 c(const ColliderComponent& coll) { return coll.position; } inline mat3 u(const ColliderComponent& coll) { return (mat3)coll.rotation; }; bool CollisionManager::TestAxis(vec3 L, vec3 cA, vec3 cB, vec3 rA, vec3 ...
ALGO
0.995077
5.967255
ac6ce5f8-c978-4341-801e-64e681110647
yashk9293/Love-Babbar-DSA
Lec_063/63_2.cpp
// Question Link :- https://leetcode.com/problems/balanced-binary-tree // Balanced Binary Tree (Striver) // T.C = O(N) // S.C = O(height) class Solution { public: int solve(TreeNode* root, bool& result) { if(root == NULL) { return 0; } int leftHeight = solve(root->left, result);...
ALGO
0.999967
6.819283
7781922a-418e-415e-b4b2-4a3e52903e6b
TranNguyenDo/DoTranNguyen_monC
Chapter 13/Program_13.4.cpp
#include <iostream> #include <memory> using namespace std; // Rectangle class declaration. class Rectangle { private: double width; double length; public: void setWidth(double); void setLength(double); double getWidth() const; double getLength() const; double getArea() const; }; void Rect...
TOOL
0.947357
5.929219
bf1a2abe-6046-43b8-b3b4-c1397974ecfc
miriam-m-s/EDA
tema4/4.2rep/4.2rep/Source.cpp
// Nombre del alumno ..... // Usuario del Juez ...... #include <iostream> #include <iomanip> #include<set> #include<algorithm> #include<vector> #include <fstream> #include <math.h> using namespace std; struct Monomio { public: Monomio() {}; Monomio(int c, int e) :coef_(c), exp_(e) {}; int coef_; int e...
ALGO
0.999971
3.624477
2f6d6105-326b-41dd-b672-e2f82327fbef
rushizgithub/compare
nullgram/TMessagesProj/jni/rlottie/src/vector/vcompositionfunctions.cpp
#include "vdrawhelper.h" /* result = s dest = s * ca + d * cia */ void comp_func_solid_Source(uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) { int ialpha, i; if (const_alpha == 255) { memfill32(dest, color, length); } else { ialpha = 255 -...
TOOL
0.949117
6.431121
255c2260-c24f-40b8-bbc1-07c43ef50343
littlee1032/fkalg
POJ/1324/main.cpp
/* 用C++提交, 368K188MS 犀利啊 */ #include<cstdio> #include<cstring> #include<queue> #include<map> using namespace std; int n,m,l,len; bool gap[21][21]; int mat[21][21]; int dx[4]= {0,1,0,-1}; int dy[4]= {1,0,-1,0}; int x[10],y[10]; struct Snack { int state; int step; Snack() {} Snack(int sta,int ste) { s...
ALGO
0.999961
3.829708
436966b7-0586-4618-be5e-e92f7a63946c
ishandutta2007/codeforces
ssamt/normal/1660/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int i, j, k, l; int t, n, m, q; scanf("%d", &t); for(int cl=0; cl<t; cl++) { int a, b; scanf("%d %d", &a, &b); if(a == 0) { printf("1\n"); } else { printf("%d\n", a+2*b+1); } } }
ALGO
0.999309
3.198703
30e584e6-c16a-4486-adb9-b5e8acd799d7
Banerjeehub/GFG
Medium/Shortest path in Directed Acyclic Graph/shortest-path-in-directed-acyclic-graph.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ //.........toDo list......... // 1. make the graph with the weight // 2. find out the topo sort // 3. find the distance from source to all the nodes class Solution...
ALGO
0.999846
5.864937
1ecb5747-6d28-4600-80cd-4078d57699e3
OwenHelios/algo
greed/LCw390-2.cpp
// https://leetcode.cn/problems/apply-operations-to-make-sum-of-array-greater-than-or-equal-to-k/ #include <bits/stdc++.h> using namespace std; class Solution { public: int minOperations(int k) { int ans = k - 1; for (int i = 0; i < k; ++i) { // number of add operations ans...
ALGO
0.999919
5.138277
f473fb9b-f654-4df6-a41d-b49eddce90bc
mustakimur/CFI-LB
llvm-project/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp
// <algorithm> // template<ForwardIterator Iter1, ForwardIterator Iter2> // requires HasSwap<Iter1::reference, Iter2::reference> // Iter2 // swap_ranges(Iter1 first1, Iter1 last1, Iter2 first2); #include <algorithm> #include <cassert> #include <memory> #include "test_macros.h" #include "test_iterators.h" temp...
TEST
0.889983
6.72896
55d0b2a8-b7e6-480c-8177-7ba02484257a
HuanHuanHuanFFF/HuanF-CodeX
BIT/AcWing241.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; void init() { } void open(char s[]) { freopen(s, "r",stdin); } template<typename T> struct BIT { int n; vector<T> t; explicit BIT(int n): n(n), t(vector<T>(n + 1)) { } int lowbit(int x) { return x & -x; } //单点修改 v...
ALGO
0.99965
3.660789
912d6fe2-8560-4bd9-82cb-6a74269dd01c
carlos3g/URI-solutions
categorias/iniciante/c++/1131.cpp
#include <iostream> using namespace std; int main() { int p1, p2, i, op, qtd=1; int inter=0, gremio=0, empates=0; cin >> p1 >> p2; if (p1 == p2) { empates += 1; } else if (p1 > p2) { inter += 1; } else { gremio += 1; } cout << "Novo grenal (1-sim 2-nao)\n"; ...
ALGO
0.999969
4.323199
e7c7ac81-0cb8-4c8a-9071-af15522168f2
raincross7/code-similarity
codes/train_code/problem307/problem307_195.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) #define rep2(i,a,b) for(int i=(a);i<(b);++i) template<class T> inline void chmin(T& a, T b) {if (a > b) a = b;} template<class T> inline void chmax(T& a, T b) {if (a < b) a = b;} ll const mod = 1e9+7; int main() ...
ALGO
0.999984
4.643677
521a69e4-5c18-42e8-9541-e5dc093ea9e4
AlexanderKhasanov/Laboratory-works
Л.Р.№7(часть2)/Л.Р.№2(часть 2).cpp
#include<iostream> #include<string> #include<fstream> void OpenFile(std::fstream & file) { std::string fileName; std::cout << "Enter the file name: "; std::cin >> fileName; file.open(fileName, std::ios_base::in); while (!file.is_open()) { std::cout << "Error! Enter the file name again: "; fileName = ""; st...
TOOL
0.989583
3.942538
92aeacf2-ff0c-432a-baa9-7c6c9dbfef35
Niharika-Sunnam/Training
Arthemetic Progression.cpp
#include<iostream> using namespace std; int main() { int a1,a2,n,d,An; cout<<"Enter a1: "; cin>>a1; cout<<"Enter a2: "; cin>>a2; d=a1-a2; cout<<"d is: "; cout<<d<<endl; cout<<"Enter n: "; cin>>n; An = a1 + (n-1) * d; cout<<"An is: "; cout<<An<<endl; re...
ALGO
0.998618
3.266948
5060b54c-c1cb-438d-82f7-e0b2d984520b
TheStranger512/Competitive-Programming-Stuff
SPOJ/INCARDS.cpp
/* Solved * 50. Invitation Cards * File: INCARDS.cpp * Author: Andy Y.F. Huang * Created on May 24, 2013, 9:02 PM */ #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include...
ALGO
0.999965
4.822361
02d95a62-df86-431b-8ac5-7d3e754b8d37
tlrmchlsmth/tms_submod
la/vector.cpp
#include <iostream> #include "vector.h" #include "matrix.h" #include "immintrin.h" #include "ipps.h" // // Double precision vector ops // template<> double Vector<double>::norm2() const { double nrm = cblas_dnrm2( _len, _values, _stride); return nrm; } template<> double Vector<double>::dot(const Vector<doubl...
TOOL
0.866073
6.849486
f7bfd913-9f6c-4653-8889-3f6d2f53d18f
yudong-0222/CC-Practice
Codeforces/Edu_TPR#1/pC.cpp
#include <bits/stdc++.h> #define read(type) readInt<type>() // Fast read #define int long long #define endl "\n" #define pb push_back #define eb emplace_back #define mk make_pair #define pii pair<int, int> #define F first #define S second #define vi vector<int> #define all(x) (x).begin(), (x).end() #define umap unorder...
ALGO
0.999691
4.0354
9ad172ed-cf84-482e-bb01-b48adc843c82
alexandraback/datacollection
solutions_5766201229705216_1/C++/ilackthatsuperpower/b.cpp
// // b.cpp // // #include <cstdlib> #include <stdint.h> #include <iostream> #include <iomanip> #include <utility> #include <functional> #include <fstream> #include <algorithm> #include <vector> #include <string> #include <map> #include <set> #include <math.h> //#include <boost/multi_array.hpp> // function prototyp...
ALGO
0.998852
5.22506
c4eccc51-584b-46c0-844b-94d5420a620e
BangKartavya/GFG
Bridge edge in a graph/main.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { private: int bfs(vector<vector<int>> adj, int V) { queue<int> q; vector<int> vis(V,false); int cnt = 0; for(int i = 0;i<V;i++) { if(!vis[i]) {...
ALGO
0.999764
6.228589
e5444d5b-a2e6-4d41-8b28-be0c1a976a30
cropgeeks/topali-v2
binaries/src/fastml/bestHKYparam.cpp
#include "bestHKYparam.h" #include <iostream> using namespace std; #include "brLenOptEM.h" #include "numRec.h" #include "logFile.h" bestHkyParamAndBBL::bestHkyParamAndBBL(tree& et, //find Best HkyParam and best BBL const sequenceContainer& sc, stochasticProcess& sp, const Vdouble * weights, ...
ALGO
0.999481
4.529812
f491d645-f9af-4572-bf36-d5a9727184f1
CedricKuang/LeetCode
others/crossing_streets.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; vector<int> crossing_street(vector<int>& a, vector<int>& b) { vector<int> ans(a.size(), 0); int curr_time = 0; int last = -1; queue<vector<int>> avenue; queue<vector<int>> street; for (int i = 0; i < a.size(); i++) ...
ALGO
0.999994
5.141966
57d66079-6a8c-4bde-b44d-c8b3d2c09939
alibaba/havenask
aios/apps/facility/build_service/build_service/util/StatisticUtil.cpp
#include "build_service/util/StatisticUtil.h" #include <cstdint> namespace build_service { namespace util { // Walker M L, Dovoedo Y H, Chakraborti S, et al. An improved boxplot for univariate data[J]. The American Statistician, // 2018, 72(4): 348-353. // // | |----------IQR----------| ...
ALGO
0.999858
6.103658
1c9a1f9b-9890-49fc-8eec-081e5e5035c5
qmqsyz/libcxx-build
llvm-project/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if_not.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<input_iterator I, sentinel_for<I> S, class Proj = identity, // indirect_unary_predicate<projected<I, Proj>> Pred> // constexpr I ranges::find_if_not(I first, S last, Pred pred, Proj proj = {}); // template<input_range R, class Proj = ide...
TEST
0.945116
7.138468
787dd3a8-fbda-4953-ba02-0a9d697730d5
VillaKeth/Competitive-Programming
1400/Books-Queries.cpp
#include <cstdlib> #include <vector> #include <map> #include <set> #include <unordered_map> #include <iostream> #include <string> #include <deque> #include <queue> #include <stack> #include <cmath> #include <climits> #include <algorithm> #include <chrono> #include <cstdint> #include <fstream> #include <numeric> #defin...
ALGO
0.999834
4.307566
4a5bbab9-776e-4537-a3fa-92967e8a86fd
mohitmallick17/LeetCodeSolutions
665-non-decreasing-array/665-non-decreasing-array.cpp
class Solution { public: bool checkPossibility(vector<int>& nums) { int count = 0; int n=nums.size(); for(int i=1;i<n and count <= 1;i++){ if(nums[i-1] <= nums[i])continue; count++; if(i-2<0 or nums[i-2]<=nums[i]) nums[i-1]=nums[i]; ...
ALGO
0.999987
5.907652