uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
073f1d5f-be8b-4061-85f7-b32d8a29d254
DysfunctionalROMs/device_oneplus_bacon
gps/utils/LocHeap.cpp
#include <LocHeap.h> class LocHeapNode { friend class LocHeap; // size of of the subtree, excluding self, 1 if no subtree int mSize; LocHeapNode* mLeft; LocHeapNode* mRight; LocRankable* mData; public: inline LocHeapNode(LocRankable& data) : mSize(1), mLeft(NULL), mRight(NULL), mDa...
ALGO
0.997679
6.439088
c0e70042-c385-42ad-8abb-23608889dfb7
xXchamomileteaXx/_NAME_
Course.cpp
#include <iostream> #include <string> #include <vector> #include <fstream> #include <chrono> using namespace std::chrono; using namespace std; //для очереди struct node { const void* ptr; struct node* next; }; struct queue { node* head; node* tail; }; //Структура для дерева struct tree { int data; tree* left; ...
ALGO
0.992046
3.540759
7f66e414-d8f8-4a4a-a373-f4e748b2eedc
vedanty3/dsa-codeground
leetcode-gfg-solutions/leetcode-solutions/Break a Palindrome.cpp
// https : // leetcode.com/problems/break-a-palindrome/ class Solution { public: string breakPalindrome(string palindrome) { string s = palindrome; if (palindrome.size() == 1) { return ""; } int cnt = 0; for (auto ch : palindrome) { ...
ALGO
0.987174
4.057945
a0a001a4-d238-4294-b0a6-f7d0a18a87ab
Krishal-Modi/CodeVault
C++/20-Structure.cpp
#include <iostream> using namespace std; // Define a structure struct Person { string name; int age; }; int main() { // Create a structure variable Person p1; // Assign values p1.name = "Alice"; p1.age = 25; // Print values cout << "Name: " << p1.name << endl; cout << "Age: ...
TOOL
0.881674
4.93742
dc601ee1-dd14-44c6-8ce3-2380ed7d648a
Nara6/Migration-from-old-air
Main File/c++ programming/TP16/YIN_SOKNARA_TP16_Problem4.cpp
#include<iostream> using namespace std; struct Element{ string name; string ID; string gender; int score; Element *next; Element *previous; }; struct List{ int n; Element *tail; Element *head; }; List *emptyList(){ List *ls = new List; ls->n = 0; ls->tail = NULL; ls...
TOOL
0.984505
3.992217
31456c65-0923-4b7e-9ac5-3546b0f08d5f
shAwmitrAcse134582/phitron_course
Algorithm/Module-3/Merge_sort.cpp
#include<bits/stdc++.h> #define ll long long int #define pb push_back #define get_out return 0 #define fast ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); using namespace std; const int N=1e5+7; int arr[N]; void merge(int l,int r,int mid){ int ls=mid-l+1; int a[ls+1]; int rs=r-mid; int b[rs+1];...
ALGO
0.999988
4.162269
43da02c2-99c1-4647-a34a-c15459e2c02a
simgrid/simgrid
examples/cpp/dht-kademlia/answer.cpp
#include "answer.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(kademlia_node); namespace kademlia { /** @brief Prints an Answer, for debugging purposes */ void Answer::print() const { XBT_INFO("Searching %08x, size %zu", destination_id_, nodes_.size()); unsigned int i = 0; for (auto const& [contact, distance] : nodes...
TOOL
0.994385
6.076511
6c7a8f12-1092-4240-a3b4-d239ec12fbad
Shuv25/LANGUAGES
CodingNinjasCPP/C++/Practice/bub.cpp
#include<iostream> using namespace std; void bub(int n,int a[]) { int k=0; for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if(a[i]>a[j]) { k=a[i]; a[i]=a[j]; a[j]=k; } } } for(int i=0;i<n;i...
ALGO
0.999838
3.842851
1d10fd3b-1c50-481c-b8b8-8705958a906e
algoroom/video_lectures
cpp/bubble_sort/bubble_sort.cpp
#include <iostream> /// Ֆունկցիան կատարում է պղպջակային սորտավորում 'n' երկարություն ունեցող /// 'x' զանգվածի վրա։ /// Որևէ օպտիմիզացիաներ ներառված չեն։ void bubble_sort( int x[], int n ) { for ( int k = 1; k < n; ++k ) { // k-րդ իտերացիա for ( int i = 0; i < n-1; ++i ) { if ( x[i] > x[i+1] ) { // տեղափոխ...
ALGO
0.999909
4.869182
152c5573-0c29-4c92-95ec-8877a5a1102e
ddyeon/AlgorithmSTD
programmers/dayeon_hIndex.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; int solution(vector<int> citations) { int answer = 0; int size = citations.size(); sort(citations.begin(), citations.end()); //01365 for(int i = 0; i < citations.size(); i++) { int hindex = size-i;...
ALGO
0.999898
6.080311
031676f1-3023-4c70-a0d9-4e4bd2dcd6f2
ishandutta2007/codeforces
natofp/normal/1616/A.cpp
#include <bits/stdc++.h> #include <random> #define ll long long int #define pb push_back #define st first #define nd second #define pii pair<int,int> #define mp make_pair #define pll pair<long long,long long> #define ld long double #define ull unsigned long long using namespace std; int cnt[222]; void solve(){ i...
ALGO
0.999847
4.307463
afc66b98-5b3d-418b-acf9-91f2ab1c53b8
10alswhd/BlueHouseProject
search/lc_96.cpp
class Solution { public: int numTrees(int n) { if(n<=1) return 1; int *a = new int[n+1]; memset(a, 0, sizeof(int)*(n+1)); a[1] = 1; a[0] = 1; for(int i=2; i<=n; i++) { for(int j=1; j<=i; j++) { a[i] += (a[j-1] * a[i-j])...
ALGO
0.999982
5.696119
55d04392-6d3b-4862-b069-7a450ea7723e
tajmone/tads-sources
tads3/vmrun.cpp
#ifdef RCSID static char RCSid[] = "$Header: d:/cvsroot/tads/tads3/VMRUN.CPP,v 1.4 1999/07/11 00:46:58 MJRoberts Exp $"; #endif /* Name vmrun.cpp - VM Execution Function Notes Modified 11/12/98 MJRoberts - Creation */ #include <stdio.h> #include "t3std.h" #include "os.h" #include "vmrun.h" #include "vmdbg.h" ...
TOOL
0.99101
6.043633
d679437a-7ee3-4b8c-9d27-fb956a448870
ishandutta2007/codeforces
oierwanhong/normal/1517/G.cpp
#include<cstdio> #include<iostream> #include<cstring> #include<vector> #include<algorithm> #include<map> typedef long long ll; typedef unsigned un; typedef std::vector<int> P; typedef std::pair<int,int> pii; ll read(){ll x=0,f=1;char c=getchar();while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}while(c>='0'&&c<='9')x=x*1...
ALGO
0.999651
3.594626
1fd86d83-149b-4c61-81f6-9f8c637b751b
itzuditsharma/GFG-Solved
Difficulty: Easy/DFS of Graph/dfs-of-graph.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void DFS(int node, vector<int>&list, vector<int>&vis, vector<vector<int>>& adj){ vis[node] = 1; list.push_back(node); for(auto it : adj[node]){ if(!vis...
ALGO
0.999754
6.601666
74b68b3b-bf59-4aa9-8b2c-6b4f927f2e74
iNiKe/boost
libs/spirit/example/qi/compiler_tutorial/calc5.cpp
/////////////////////////////////////////////////////////////////////////////// // // Same as Calc4, this time, we'll incorporate debugging support, // plus error handling and reporting. // // [ JDG April 28, 2008 ] For BoostCon 2008 // [ JDG February 18, 2011 ] Pure attributes. No semantic actions. // /////...
TOOL
0.939009
7.892432
371492e5-0d6d-4f02-8da4-e6b8261a0145
faterazer/LeetCode
1664. Ways to Make a Fair Array/Solution.cpp
#include <vector> using namespace std; class Solution { public: int waysToMakeFair(vector<int>& nums) { int res = 0, s = 0; for (size_t i = 0; i < nums.size(); i++) s += i & 1 ? -nums[i] : nums[i]; for (size_t i = 0; i < nums.size(); i++) { s += i & 1 ? nums[i] :...
ALGO
0.999963
5.719254
3b9ef42e-bd9c-4797-bd08-0b09b866a4c3
Macri-man/ProgrammingProblems
LeetCode/2301-2400/Problem2348_NumberofZeroFilledSubarrays/NumberofZeroFilledSubarrays.cpp
class Solution { public: long long zeroFilledSubarray(vector<int>& nums) { long long count = 0; long long streak = 0; for (int n : nums) { if (n == 0) { streak++; } else { if (streak > 0) { count += streak * (streak ...
ALGO
0.999852
6.4708
3f3c6fd4-6e0f-4e31-872f-b425a4bbc9f8
LauZyHou/Algorithm-To-Practice
LeetCode/530.cpp
/** * 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 { private: vector<int> v; public: void inOrder(TreeNode* p){ if(p==nullptr) return; inOrder(p->left)...
ALGO
0.999985
6.448988
e29821d3-40ba-4b2d-8258-6b1d8863fb15
Ritesh-Bommaraju/100-Days-Of-Code
Day 7 29-6-21/deleteatfirstLL.cpp
#include <bits/stdc++.h> using namespace std; struct node { int data; struct node *next; }; void lltraversal(struct node *ptr) { while (ptr != NULL) { cout << ptr->data << endl; ptr = ptr->next; } } struct node *deletefirst(struct node *head) { struct node *ptr = head; head...
ALGO
0.996808
3.837466
6eb5b546-30ce-48dc-8729-2a775caf2fe1
aashnajc1/Leetcode-easy-problems
268. Missing Number.cpp
class Solution { public: int missingNumber(vector<int>& nums) { sort(nums.begin(),nums.end()); int n = nums.size(); for(int i=0;i<n;i++){ if(i != nums[i]){ return i; } } return nums.size(); } };
ALGO
0.999828
5.468763
6db3a12b-c23f-48d9-a6a1-2c812b0b4e3c
joaomarcos2803/competitive-programming
Uri/beginner/1079.cpp
// https://www.beecrowd.com.br/judge/en/problems/view/1079 #include <iostream> #include <iomanip> using namespace std; int main() { int N; double number1, number2, number3; double average; cin >> N; for (int i = 0; i < N; i++) { cin >> number1 >> number2 >> number3; average = ...
ALGO
0.999131
4.826027
5de845da-cae6-421d-a980-e8743e76c941
vishusharmaX/100DaysofCodeChallenge
Difficulty: Medium/Majority Element II/majority-element-ii.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to find the majority elements in the array vector<int> findMajority(vector<int>& arr) { // Your code goes here. int n = arr.size(); map<int,int>mpp;...
ALGO
0.998686
6.590643
6f065f31-0d7c-4fd4-904b-145300176470
raincross7/code-similarity
codes/train_code/problem157/problem157_343.cpp
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)n;++i) #define each(a, b) for(auto (a): (b)) #define all(v) (v).begin(),(v).end() #define fi first #define se second #define pb push_back #define show(x) cout <<#x<<" = "<<(x...
ALGO
0.999876
3.615864
07c5e8ad-9e68-4401-ada5-f2a7eb3cf343
raincross7/code-similarity
codes/train_code/problem362/problem362_410.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int ans=max({a,b,c})-min({a,b,c}); cout<<ans<<endl; }
ALGO
0.999985
4.152086
4cbffdcc-a603-45ca-90a9-897b3352c91e
jacarav0/Cf-probls
Cf-compprog/src/KevinAndGeometry2061B.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; while(t--){ int n; bool w1=false; cin>>n; int arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } sort(arr,arr+n); for(int i=0;i<n-3;i++){ if(arr[i]==arr[i+1]&&i<n-2){w1=true;cout<<arr[i]<<" "<<arr[i+1]<<" "<<arr[i+2]<<" "<<arr[i+3]<<"\n"...
ALGO
0.999828
3.43517
d36bfc08-16a0-40c0-b384-558ac647a3a3
ishandutta2007/codeforces
ytkn/normal/1483/C.cpp
#include <iostream> #include <algorithm> #include <iomanip> #include <vector> #include <queue> #include <deque> #include <set> #include <map> #include <tuple> #include <cmath> #include <numeric> #include <functional> #include <cassert> #include <stack> #include <algorithm> #include <cassert> #include <iostream> #inclu...
ALGO
0.999962
4.268436
a589f91f-2cb2-4575-b897-f7e78aa2ea0f
MichaelLee-ceo/NYCU-Network-Programming
NP_Project2/utils.cpp
#include <string> #include <regex> #include <vector> #include <cstring> #include <ctype.h> #include <unistd.h> #include <stdlib.h> using namespace std; void show_cmd(vector<string> cmd){ cout << "\nsplited command: "; for (int i = 0; i < cmd.size(); i++) cout << '[' << cmd[i] << ']' << ' '; cout << endl; } void ...
TOOL
0.961306
3.079226
dcaaa066-700f-4950-a5fa-c9f66852e982
virajgudhetwar/CPP-DSA-Code-Library
02.ARRAYS/unique_ele_array.cpp
#include <iostream> using namespace std; //CODE STUDIO QUESTION int unique_ele (int *arr ,int size) { //find unique element of the array int flag; for (int i = 0; i < size; i++) {int sum = 0 ; for (int j = 0; j < size; j++) { if (arr[i] == arr[j]) { sum++; ...
ALGO
0.992483
4.098869
0b52f1ee-8e3b-44d3-a6c1-f54ea4bdbdb2
hjiang13/LLMs-in-IR
POJ-104/61/8.cpp
#include <iostream> using namespace std; int fibo(int n) { if (n==1||n==2) return(1); return(fibo(n-1)+fibo(n-2)); } void main() { int n,i,a; cin >> "%d",&n); for (i=0; i<n; i++) { cin >> "%d",&a); cout << "%d\n",fibo(a)); } }
ALGO
0.999798
3.807772
be3df331-cb7f-48b3-92e3-6cb83e6c5e5d
HolicKW/codetree-TILs
240717/정수 복사/copy-integer.cpp
#include <iostream> using namespace std; int main() { // 여기에 코드를 작성해주세요. int a(3), b(4); b = a; cout << a << ' ' << b << "\n" << a*b; return 0; }
ALGO
0.997182
4.189777
68a2e7d9-8261-458e-b63a-b020ee4bad5d
7-Mangodish/DSA-PTIT
DSA07029 Giai ma xau ki tu.cpp
#include<bits/stdc++.h> #define mod 1000000007 #define ll long long #define ii pair<int,int> using namespace std; int main(){ int t; cin >>t; while(t--){ string str; cin >>str; string ans; stack <string> s; for(char x:str){ if(x!=']'){ string tmp(1, x); s.push(tmp); } else{ // Lap ch...
ALGO
0.999422
4.546142
b92631b6-826a-4550-bf39-70bfec94254b
mohit-11011/leetcode
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.999959
5.813578
e0beb690-7472-4e8b-a736-b864c5248587
DJStArbuzz/C1_Demidov_Laboratory
indicator/books.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> using namespace std; int main() { int n, t; cin >> n >> t; vector<long long> list(n); for (int i = 0; i < n; i++) { cin >> list[i]; } int countBook = 0; long long sumTime = 0; int...
ALGO
0.999985
4.876055
bd8330bd-4eb3-4cdd-bb50-e277570008a5
joery0x3b800001/LEETCODE-150-Days
EXERCISE/q3.cpp
#include <iostream> #include <vector> #include <numeric> using namespace std; int candy(vector<int> &ratings) { vector<int> candies(ratings.size(), 1); for (int i = 1; i < ratings.size(); i++) { if (ratings[i] > ratings[i - 1]) { candies[i] = candies[i - 1] + 1; } ...
ALGO
0.999992
6.132217
a3b3a239-b8ba-4b40-813e-e39e079b1ffd
071yoon/Algorithm
BOJ/26. two pointer/3273/3273.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; vector <int> vec; int ret, x; void solve(int start, int end){ if (start >= end) return ; else if (vec[start] + vec[end] == x){ ret++; solve(start + 1, end - 1); } else if (vec[start] + vec[end] > x){ solve(start, end - 1); } ...
ALGO
0.99993
4.738829
d39b85aa-ae0d-4e35-924f-a31b839e1884
ishandutta2007/codeforces
neko_nyaaaaaaaaaaaaaaaaa/normal/1450/D.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; template<class T> struct RMQ { vector<vector<T>> jmp; RMQ(const vector<T>& V) : jmp(...
ALGO
0.999788
4.133576
c843be30-dc87-4e6e-a223-8822c8a3620a
kushuu/competitive_programming_all
maut ka nanga naach/code.cpp
/**************************************************************** Author: kushuu File: code.cpp Date: Thu Feb 25 2021 ****************************************************************/ #include <bits/stdc++.h> //shorts #define ll long long int #define sll stack<long long int> #define vll vector<long long int> #def...
ALGO
0.998898
4.530356
91e6287b-017e-4b1b-8e23-870e0c842df7
IonRod/droidTLD
jni/libopentld/mftracker/FBTrack.cpp
/** * @file track.c * * Created on: 01.03.2011 * @author bernd */ #include "FBTrack.h" #include <cstdio> #include "BB.h" #include "BBPredict.h" #include "Median.h" #include "Lk.h" /** * Calculate the bounding box of an Object in a following Image. * Imgs aren't changed. * @param imgI Image conta...
ALGO
0.999245
4.93914
d550f45c-d918-4fd9-935c-b03738699a47
Khram-V/Vessel
Руководство/Digest/Cross/Cross.cpp
const double EPS = 1e-9; struct pt { double x,y; }; struct line{ double a,b,c; line( pt p,pt q ){ a=p.y-q.y; b=q.x-p.x; c= -a*p.x-b*p.y; norm(); } void norm(){ double z=sqrt( a*a+b*b ); if( abs( z )>EPS )a/=z,b/=z,c/= z; } double dist( pt p ) const { return a*p.x + b*p.y + c; } }; #define det( a,b,c,d )( a*d-b...
ALGO
0.998876
4.318199
f2d729a8-5047-4785-8539-408f39c75585
teddyy279/dynamic-programming
Problem2 (LIS1 N^2) Dãy con tăng dài nhất.cpp
#include<bits/stdc++.h> using namespace std; int mod = 1e9 + 7; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; int a[n]; for(int &x : a) cin >> x; int F[n]; for(int i = 0; i < n; i++){ F[i] = 1; for(int j = 0; j < i; j++){ if(...
ALGO
0.999921
4.140621
26e76a1f-6f08-4932-beae-5d34089dda72
BKhomutenko/visgeom
test/reconstruction/equalizer_test.cpp
#include "std.h" #include "ocv.h" #include "io.h" #include "eigen.h" #include "ceres.h" void calcHist(const Mat8u & img, int valMin, int valMax, int binSize, vector<int> & hist, double correction = 1) { int binCount = (valMax - valMin) / binSize; hist.resize(binCount); fill(hist.begin(), hist.end()...
ALGO
0.941745
4.596936
4a50b10a-69a5-4d12-91d7-50538bcb918f
teru01/algorithms
queue.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> #include <string> #include <vector> #include <map> #include <set> #include <stack> #include <list> #include <queue> #include <deque> #include <algorithm> #include <numeric> #include <utility> #include <complex> #include <functi...
ALGO
0.999656
3.497506
f54c3cd0-5f97-4d93-ae55-28278f53773f
BarkNMeow/Baekjoon
1086.cpp
#include <iostream> #include <string> using namespace std; // Dummy variable to prevent misinterpretation bool __dummy__ = ios::sync_with_stdio(false); auto __dummy2__ = cin.tie(NULL); auto __dummy3__ = cout.tie(NULL); short N, K; long long dp[1 << 15][100]; short pow_10[51], one_cnt[1 << 15]; short num_len[15], num_...
ALGO
0.999942
4.901278
e8e49734-c14a-48bb-9d14-f0304f834ec9
ishandutta2007/codeforces
mohammedehab2002/normal/37/A.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> using namespace std; int main() { set <int> t; vector <int> v; int n,i,maxi=0; cin >> n; int ans=n; v.resize(n); for (i=0;i<n;i++) cin >> v[i]; while (v.size()) { if (count(v.begin(),v.end(),v.back())>maxi) maxi=count(v.begin(),v.en...
ALGO
0.999893
3.679612
1b622a49-bb11-4510-94b9-cf1112a6b824
ishandutta2007/codeforces
yuma_/normal/550/B.cpp
#include "bits/stdc++.h" #include<vector> #include<iostream> #include<queue> #include<algorithm> #include<map> #include<set> #include<iomanip> #include<assert.h> #include<unordered_map> #include<unordered_set> #include<string> #include<stack> #include<complex> #include<memory> #pragma warning(disable:4996) using names...
ALGO
0.999883
3.362013
61a79635-7b40-4b42-aacc-aa2dd54b5f01
davidrpenas/sacess_petab
benchmarks/systemsBiology/parPE/temp/parpe_Perelson_Science1996/model/Perelson_Science1996_dwdx_colptrs.cpp
#include "amici/sundials_matrix_wrapper.h" #include "sundials/sundials_types.h" #include <array> #include <algorithm> namespace amici { namespace model_Perelson_Science1996 { static constexpr std::array<sunindextype, 5> dwdx_colptrs_Perelson_Science1996_ = { 0, 2, 2, 4, 5 }; void dwdx_colptrs_Perelson_Science19...
TOOL
0.915156
4.194629
dc153b91-1789-4b96-9ed3-36fc9fd275e2
sburuiana/adventofcode
2015/day17/part1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; #define mp make_pair #define CHECK(x) if(!(x)) return false; #define CHECKRET(x, y) if(!(x)) return (y); #define SKIP(x) if((x)) continue; typedef pair<int, int> pii; vector<string> getAllLines() { vector<string> v; string s; while (getline(cin,...
ALGO
0.998154
3.811784
4b23b8ca-d003-4316-8f90-eeeab822dd59
MostafaMohamed2001/C-Data-Structure
.history/hello_20240701174912.cpp
#include <iostream> #include <cmath> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++){ cin >> arr[i]; } int min = arr[0]; for (int i = 1; i < n; ++) }
ALGO
0.999513
3.919162
ad52770f-ea17-4dc8-9555-25e69f1f3a44
qwas982/lian-xi
练习cpp/函数.cpp
#include "函数声明.h" #include <iostream> using namespace std; int 输入两个数号(){ int 甲,乙; cout<<"输入提示:"<<endl; cin>>甲;cin>>乙; return 甲,乙; } int 一个加法函数(int 数号1,int 数号2) { int 求和 = 数号1+数号2; return 求和; } int 调用函数() { cout<<"输入两个数:"<<endl; int 甲,乙; cin>>甲; cin>>乙; int 求和 = 一个加法函数(甲,乙); ...
ALGO
0.988805
3.98597
238e75ac-ab7d-488d-82d2-f6e33cb253a6
AriadnaVillacorta/Programacion
EjerciciosClase/Practica3.cpp
#include <iostream> #include <cmath> using namespace std; int main (){ double tax,annualincome; cout<< "Please enter your annual income in dollars"; cin >> annualincome; if (annualincome <= 10000) { tax = 0; } else if (annualincome<= 20000) { tax= (annualincome- 10000) * 0.10; } else if (an...
ALGO
0.993972
3.523996
7de664e0-1248-4107-a963-e4098d5d6c9e
aryabhatta0/CP-AlgoZenith
phase1/Advanced STL AlgoZenith/STL Basics/buyMaxObjs.cpp
// https://maang.in/problems/Buy-Maximum-Objects-I-75?resourceUrl=cs99-cp510-pl3436-rs75 #include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 void solve(){ int n, m; cin>>n>>m; int a[n]; for(int i=0; i<n; i++) cin>>a[i]; sort(a, a+n); int cnt=0; for(int i=...
ALGO
0.999906
5.732111
dd114f97-da36-4c2f-b103-90fb24ad4bc3
LIUHUANUCAS/next_journey
leetcode/stack/71-simplify-path.cpp
#include <cstdio> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> #include "../header/data_type.h" using namespace std; class Solution { public: string simplifyPath(s...
ALGO
0.999888
5.313474
216aab78-f7dd-4a0c-b290-67f11cd2da87
Aman18111625/LeetCode-Solutions
1184-distance-between-bus-stops/1184-distance-between-bus-stops.cpp
class Solution { public: int distanceBetweenBusStops(vector<int>& distance, int s, int d) { int n=distance.size(); if(s==d) return 0; int sum1=0,sum2=0; //distance in clockwise direction int i=s; while(i!=d){ sum1+=distance[i]; i=(i+1)%n; }...
ALGO
0.999978
5.539904
590d64a9-2d37-4f37-bf6e-2f9fec14770c
kramer04/France-Ioi
Niveau 5/Plus courts chemins/Brûler de la poudre II/main.cpp
#include <iostream> #include <vector> #include <queue> #include <climits> #include <algorithm> struct Edge { int node, length; }; struct Event { int time, node; bool operator>(const Event &other) const { if (time == other.time) return node > other.node; return time > other.time; } }; int main() { st...
ALGO
0.999942
4.088645
a1c29e7f-8aa7-4c7d-9038-b0dddff3a59f
dgcnz/competitive-programming
codeforces/1417B-two-arrays.cpp
#ifdef DBG_MACRO_NO_WARNING #include <dbg.h> #endif #include <bits/stdc++.h> #define all(c) c.begin(), c.end() #define isz(c) (int)c.size() using namespace std; using ll = long long; using ii = pair<int, int>; using vi = vector<int>; template <typename InputIterator, typename T = typename iterator_traits<In...
ALGO
0.99925
3.508635
8c6ef148-fd54-4406-b0a6-831c7c3deb57
ishandutta2007/codeforces
bidzilya/normal/671/B.cpp
#include <iostream> #include <vector> #include <deque> #include <algorithm> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n; long long k; cin >> n >> k; vector<long long> a(n); long long sum = 0; for (int i = 0; i < n; ++i) { cin >> ...
ALGO
0.999992
3.789342
0164dc8b-d7dd-404c-81a2-74c429e97fdf
abhisingh2244/leetcode
2241-design-an-atm-machine/2241-design-an-atm-machine.cpp
class ATM { private: vector<long long> v; public: ATM() { vector<long long> v1(5,0); v=v1; } void deposit(vector<int> b) { for(long long i=0;i<b.size();i++) { v[i]+=b[i]; } } vector<int> withdraw(int amount) { vector<int> not...
ALGO
0.999025
4.494852
9d71009d-dd2e-4e7a-aaef-29034b5028e6
AbhJ/some-cp-files-3
codeforces/1956C.cpp
#include <iostream> #include <stdlib.h> #include <algorithm> #include <cstdio> #include <numeric> #include <cstring> #include <numeric> #include <vector> #include <iterator> #include <map> #include <set> #include <climits> #include <queue> #include <cmath> #include <stack> #include <cctype> #include <bitset> #define in...
ALGO
0.99929
3.461157
29a62479-7412-4bd3-a199-ffc668bb362e
SaikatKar-12/CppCompetitive-
recursion2/sumTriangle.cpp
#include<iostream> using namespace std; void sumTriangle(int arr[],int n){ for(int i=0;i<n;i++){ cout<<arr[i]<<" "; } if(n==1) return ; cout<<endl; for(int i=0;i<n-1;i++){ arr[i]+=arr[i+1]; } sumTriangle(arr,n-1); } int main(){ int arr[]={3,4,6,7,9,13,16}; sumTriangle...
ALGO
0.999889
4.519859
03611706-f675-493b-9937-a8502b4ef719
sunwenxiang133/acwing
17_class/03qujian_fenzu.cpp
// // Created by sun on 2022/3/29. // #include<iostream> #include<algorithm> #include<queue> using namespace std; const int N=1e6+10; int n; struct Range{ int l,r; bool operator < (Range &W) const{ return l<W.l; } }range[N]; int main() { scanf("%d",&n); for(int i=0;i<n;i++){ int l,...
ALGO
0.999931
4.790124
29a4bd9b-bfd7-4d83-a79f-0462465bda93
sanjaykukreti136/leetcode-solutions
75-sort-colors/75-sort-colors.cpp
class Solution { public: void sortColors(vector<int>& nums) { int low = 0 , high = nums.size()-1; int mid = 0; while(mid <= high){ if(nums[mid]==0){ swap(nums[mid++] , nums[low++]); } else if(nums[mid]==1){ mid++; ...
ALGO
0.999984
6.035516
726205bb-6ea2-44fb-a595-7661451046cc
EZZATW12/ECPCTemplet
Graph/MinCostMaxFlowWithNegativeCycles.cpp
template<typename flow_t = int, typename cost_t = int> struct mcSFlow { struct Edge { cost_t c; flow_t f; int to, rev; Edge(int _to, cost_t _c, flow_t _f, int _rev): c(_c), f(_f), to(_to), rev(_rev) {} }; static constexpr cost_t INFCOST = numeric_limits<cost_t>::max() / 2; cost_t eps; int N, S...
ALGO
0.999518
3.947237
02926ee0-b7b0-4786-9518-f65d80231320
YAJATapps/android_frameworks_av
media/codecs/amrnb/common/src/mult_r.cpp
/* Filename: /audio/gsm_amr/c/src/mult_r.c ------------------------------------------------------------------------------ REVISION HISTORY Description: Created separate file for the mult_r function. Sync'ed up with the current template and fixed tabs. Description: Passing in a pointer to the overflow ...
ALGO
0.999324
6.261268
14dc1725-1720-42e3-b982-0ddf5a29ca01
grx62203/leetcode
1、acwing/剑指offer/AcWing80骰子的点数-动态规划+线性DP+滚动数组.cpp
/* 将一个骰子投掷 n 次,获得的总点数为 s,s 的可能范围为 n∼6n。 掷出某一点数,可能有多种掷法,例如投掷 2 次,掷出 3 点,共有 [1,2],[2,1] 两种掷法。 请求出投掷 n 次,掷出 n∼6n 点分别有多少种掷法。 数据范围 1≤n≤10 样例1 输入:n=1 输出:[1, 1, 1, 1, 1, 1] 解释:投掷1次,可能出现的点数为1-6,共计6种。每种点数都只有1种掷法。所以输出[1, 1, 1, 1, 1, 1]。 样例2 输入:n=2 输出:[1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1] 解释:投掷2次,可能出现的点数为2-12,共计11种。每种点数可能掷法数目分...
ALGO
0.999702
5.869561
53632b44-fdb2-4ddf-8a46-f73339ffbcc4
gamzee/appMobi
appMobiLib/Classes/DirectBox2D/Box2D/Dynamics/Joints/b2LineJoint.cpp
#include <Box2D/Dynamics/Joints/b2LineJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // Linear constraint (point-to-line) // d = p2 - p1 = x2 + r2 - x1 - r1 // C = dot(perp, d) // Cdot = dot(d, cross(w1, perp)) + dot(perp, v2 + cross(w2, r2) - v1 - cross(w1, r1)) // = -dot(perp...
ALGO
0.99916
5.718181
68fd85d5-4995-43f7-85e2-a5fba984e95e
basecode-lang/basecode
share/prototypes/bootstrap-redux/ext/boost-1.70.0/libs/numeric/odeint/examples/molecular_dynamics_cells.cpp
#include <boost/numeric/odeint.hpp> #include <cstddef> #include <vector> #include <cmath> #include <algorithm> #include <tuple> #include <iostream> #include <random> #include <boost/range/algorithm/for_each.hpp> #include <boost/range/algorithm/sort.hpp> #include <boost/range/algorithm/unique_copy.hpp> #include <boost...
ALGO
0.999944
5.402653
ff3e3154-bf4f-4e5f-9aa0-c38cee20a3ca
momomorgentau/code
atcoder/abc/abc174/B_Distance.cpp
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;++i) using namespace std; using ll = long long; int main() { ll n, d; cin >> n >> d; vector<ll> x(n); vector<ll> y(n); rep(i, n) cin >> x[i] >> y[i]; int cnt = 0; rep(i, n) { if (x[i] * x[i] + y[i] * y[i] <= d * d) cnt++; } cout << cnt; return 0; ...
ALGO
0.999908
3.67875
a1553010-5cff-4a1b-82e4-560238c6cb03
yuchiXiong/data-structure-and-algorithm
leetcode/136(简单)/1. 只出现一次的数字.cpp
#include "iostream" #include "vector" using namespace std; class Solution { public: int singleNumber(vector<int> &nums) { int ans = nums[0]; for (int i = 1; i < nums.size(); i++) { ans = ans ^ nums[i]; } return ans; } };
ALGO
0.999094
5.414362
47d08e64-9b13-4aaa-90b2-01a736f4b385
Shyeok/Algorithm-Programming
BOJ/3943.cpp
#include<stdio.h> int a[100001]; int main() { int i, testcase; int n, max; scanf("%d",&testcase); for(i = 0; i < testcase; i++) { scanf("%d",&n); a[i] = n; for(;;) { if(n == 1)break; if(n % 2 == 0)n = n / 2; else if(n % 2 == 1)n = n * 3 + 1; if(a[i] < n)a[i] = n; } } for(i = 0;i < testcase;...
ALGO
0.999965
3.976766
0cf68cd1-ff50-4387-b374-5bd005def212
Totoro97/Experiments
ThirdParty/Eigen/eigen3/doc/examples/TemplateKeyword_simple.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; void copyUpperTriangularPart(MatrixXf& dst, const MatrixXf& src) { dst.triangularView<Upper>() = src.triangularView<Upper>(); } int main() { MatrixXf m1 = MatrixXf::Ones(4,4); MatrixXf m2 = MatrixXf::Random(4,4); std::cout << "m2 before copy:"...
TOOL
0.991327
5.198941
14ca066d-d167-41fc-9c15-ea003d356da2
yashk9293/Love-Babbar-DSA
Lec_047/47_0.cpp
// Question Link :- https://leetcode.com/problems/linked-list-cycle/ // Linked List Cycle // Using Map // T.C = O(n) // S.C = O(n) bool detectLoop(Node* head) { if(head == NULL) { return false; } map<Node*, bool> visited; Node* temp = head; while(temp !=NULL) { //cycle is present ...
ALGO
0.999736
5.625587
6d089af0-6fbd-47b6-869a-627c341cac85
Oein/PS
acmicpc/1____/17___/174__/1747_/17478/17478.cpp
#include <vector> #include <algorithm> #include <queue> #include <iostream> #include <map> #include <set> #include <math.h> #include <numeric> #include <cassert> #include <stack> #include <cstring> #include <climits> typedef long long ll; typedef unsigned long ull; #define interface struct #define zx3f 1061109567 ty...
ALGO
0.998974
3.917161
2b15ab62-7e7d-4782-83a5-f7e87b9e946f
raincross7/code-similarity
codes/train_code/problem139/problem139_203.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 18; int sum[MAXN+1][1<<MAXN]; int boro[MAXN+1][1<<MAXN]; int main() { int n; cin >> n; for (int i = 0; i < (1<<n); i++) { cin >> boro[0][i]; sum[0][i] = -1; } for (int p = 1; p <= n; p++) { for (int msk = 0; ms...
ALGO
0.99994
4.598119
bb70fd77-d81e-479a-8106-408eb6c4e29c
shashi352/Data-structures-and-algorithms-with-C-
Recursion/challenge/String in Recursion/ascii.cpp
#include<bits/stdc++.h> using namespace std; void ascii(string s,string ans){ if(s.length() == 0){ cout<<ans<<endl; return ; } char ch =s[0]; int code=ch; string ros= s.substr(1); // rest of string we send for function call ascii(ros,ans); ascii(ros,ans+ch); ascii(ros,ans+to_string(code)); } int main{...
ALGO
0.999866
3.628485
5313cf27-4fdc-4800-a171-ec2964d17ee9
XingwenZhang/codeDemo
c++/sjexercise_Kruskal/Source.cpp
#include"Kruskal.h" #include"AdjGraph.h" #include<iostream> using namespace std ; int main(int argc, char** argv) { int a[6] = {INFINITY,6,1,5,INFINITY,INFINITY} ; int b[6] = {6,INFINITY,5,INFINITY,3,INFINITY} ; int c[6] = {1,5,INFINITY,5,6,4} ; int d[6] = {5,INFINITY,5,INFINITY,INFINITY,2} ; int e[6] = {INFINITY...
ALGO
0.999504
3.894459
bd8bae31-1ff1-4b19-9de5-73e78ffa39f0
floppyMike/CholeskySYCL
archive/CholeskyPrototype/src/main.cpp
#include <cassert> #include <cmath> #include <cstdio> #include <vector> // // Simple Square Matrix Implementation // class SquareMatrix { public: SquareMatrix(size_t n, std::vector<double> &&data) : m_n(n), m_data(std::move(data)) { assert(m_data.size() == m_n * m_n); assert(m_data.size() > 0); } ...
ALGO
0.999715
6.375912
c397e7ff-a18d-4e1a-8c8d-de6867058448
gremount/CRANA_Voting
Voting13/Voting13.cpp
#include"common.h" #include"app.h" #include"graph.h" #include"voting.h" #include "res.h" #include "network_te.h" #include "network_delay.h" const int Inf=9999; const int Rinf=0.001; const int APPNUM=5;//Ӧ /* //graph_t3 const int N=3;//еĵ const int M=6;// const int Maxreq=2;//һcase const int Maxpath=N-1;//ܵ·: N-1 co...
ALGO
0.998099
3.247673
17e443b1-1ade-42df-abf0-cfb259ac3387
Adi3220/Data_Structures_and_Algorithms
Guess The Number.cpp
// Guess The Number #include <bits/stdc++.h> /* The higherlower(int n) function can be called from guesser object @api: guesser.higherlower(n) return value will be -1 if n is lower, 0 is n is equal or 1 if n is higher. */ int numberGuess(int n, Guesser guesser){ // Write your code here. int where...
ALGO
0.999959
4.772233
b7dc9ba3-251c-4882-bcd8-aeeef2d1a42e
rafiulgits/ICPC-OJ
UVA/10424/9281963_AC_0ms_0kB.cpp
///love calculator #include<bits/stdc++.h> using namespace std; void ans(int a,int b); void digitsum(int n1,int n2); int main() { string n1,n2; while(getline(cin,n1) && getline(cin,n2)) { int s1=0,s2=0; for(int i=0;i<n1.size();i++) { if((n1.at(i)>='a' && n1.at(i)<='z')||...
ALGO
0.999255
4.469888
840a6134-9ff0-45f2-9f04-7c0d7aae00e8
irina-georgieva/SoftUni-Programming-Basics-with-Cplusplus
04 Conditional Statements Exercise/Conditional Statements Exercise/Godzilla vs. Kong/Godzilla vs. Kong.cpp
#include <iostream> using namespace std; int main() { double budget; int countComparse; double priceCloth; cin >> budget >> countComparse >> priceCloth; if (countComparse >= 150) { priceCloth -= priceCloth * 0.1; } double priceDecor = budget * 0.1; double priceClothes = ...
ALGO
0.996992
4.389622
8453323b-12e8-467c-b424-7be30db6acf6
dfmoura/C--
UberHub/neps/177.cpp
#include <iostream> using namespace std; int main(){ int X,Y,Z; cin >> X >> Y >> Z; int soma = 0; if((X%2==0)|(X%5==0)){ soma = 1; }if((Y%2==0)|(Y%5==0)){ soma += 1; }if((Z%2==0)|(Z%5==0)){ soma += 1; } cout<< soma << endl; }
ALGO
0.999908
3.849895
632f61b3-f49e-494a-81e5-8b23e6ce0e28
xdestiny110/Leetcode
172.阶乘后的零.cpp
/* * @lc app=leetcode.cn id=172 lang=cpp * * [172] 阶乘后的零 */ // @lc code=start class Solution { public: int trailingZeroes(int n) { int cnt = 0; while(n > 1){ n /= 5; cnt += n; } return cnt; } }; // @lc code=end
ALGO
0.999952
6.458402
1224abb1-a166-49ac-a231-32c480d59066
vmx/geos
src/operation/overlay/validate/FuzzyPointLocator.cpp
#include <geos/operation/overlay/validate/FuzzyPointLocator.h> #include <geos/geom/Geometry.h> #include <geos/geom/Point.h> // for Point upcast #include <geos/geom/GeometryFactory.h> #include <geos/geom/Location.h> // for Location::Value enum #include <geos/util.h> #include <cassert> #include <functional> #include <ve...
TOOL
0.85229
7.257966
5c25d636-54e4-483d-987a-0dc4b1edae69
Seo-Faper/Data_Structure_with_C
ProblemSolve/1138.cpp
#include <iostream> #include <vector> using namespace std; int N; int main() { cin >> N; vector<int> v; int arr[N + 1]; for (int i = 1; i <= N; i++) cin >> arr[i]; v.push_back(N); for (int i = N - 1; i > 0; i--) { // cout << arr[i] << "," << v.size() << "," << i; i...
ALGO
0.999955
3.501491
6bf56744-770e-41d0-9cfd-f2f40c17b987
vikash2021/DSA-GeeksforGeeks
DP/nCr(Pascal'sTriangle).cpp
#include<bits/stdc++.h> using namespace std; const int p = 1e9+7; int nCrModp(int, int); // Driver program int main() { int t, n, r; cin >> t; while(t--){ cin >> n >> r; cout << nCrModp(n, r) << endl; } return 0; } // } Driver Code Ends // Returns nCr % p int nCrModp(int n, int r)...
ALGO
0.99998
5.991377
abc5b96c-2df9-4f8e-b38a-2affefbffae0
ishandutta2007/codeforces
pranjal.ssh/normal/750/B.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> // #include <sys/resource.h> using namespace std; using namespace __gnu_pbds; template<class T, class U> ostream& operator<<(ostream& out, const pair<T, U>& a) {out << "[" << a.first << " " << a.second << "]"; retur...
ALGO
0.999752
3.750436
cc6910f4-4cba-41c0-ab25-b3284e504c2a
sourav9124/Data-Structure
subarray using unordered map.cpp
#include<bits/stdc++.h> using namespace std; void subArray(int ar[],int n,int sum) { int curr_sum=0; unordered_map<int,int> map; for(int i=0;i<n;i++) { curr_sum=curr_sum+ar[i]; if(curr_sum==sum) { cout<<0<<i<<endl; return ; } if(map.find(curr_sum-sum)!=map.end()) { cout<<map[curr_sum-sum]+1<<...
ALGO
0.999479
3.819372
f18b5621-afe1-4976-90af-3e75ba2f150a
Dicer-Zz/CodeingOnOJ
Others/shuixianhua.cpp
#include<stdio.h> int main() { int a,b,c; for(int i =153;i<1000;i++) { a=i/100; b=i/10%10; c=i%10; if(i==a*a*a+b*b*b+c*c*c) printf("%d\n",i); } return 0; }
ALGO
0.998625
3.343029
3e0eb593-edde-49a7-96b8-77c48fa8cccd
KDev-Huh/Turing-Lab
C++/ComputerHacking_(BFS)/main.cpp
#include <iostream> #include <sstream> #include <vector> #include <string> #include <queue> #include <algorithm> using namespace std; using VictimList = vector<int>; using Graph = vector<VictimList>; class VictimNetwork { private: int cntNode; Graph graph; public: VictimNetwork(int cnt) : cntNode(cnt), graph(cnt +...
ALGO
0.999944
4.903045
47c76947-ef4f-43fa-9bb0-4ad836455e0b
Shruti0512/DAA_2022_Shruti_Chaturvedi-41
Practical/Week9/week9q2.cpp
#include<iostream> using namespace std; struct Capa{ int value; int weight; float ratio; float unit_taken; int no; }; int main() { int n,capacity; cin>>n; Capa c[n]; for(int i=0;i<n;i++) { cin>>c[i].weight; c[i].unit_taken=0; c[i].no=i+1; } for(int...
ALGO
0.999982
3.503906
9477e808-6353-45a2-934b-70707f3d07b2
lattera/dd-wrt
trunk/src/others/squashfs-3.2-r2-lzma/CPP/Windows/FileFind.cpp
// Windows/FileFind.cpp #include "StdAfx.h" #include "FileFind.h" #ifndef _UNICODE #include "../Common/StringConvert.h" #endif #ifndef _UNICODE extern bool g_IsNT; #endif namespace NWindows { namespace NFile { #if defined(WIN_LONG_PATH) && defined(_UNICODE) #define WIN_LONG_PATH2 #endif bool GetLongPath(LPCWSTR f...
TOOL
0.949226
5.864143
a5fe5be0-d751-4e74-aca9-da97512ff6e1
joyjeetcoding/30-days-of-revision-code
Day 8/Spiral matrix (codestudio).cpp
vector<int> spiralPathMatrix(vector<vector<int>> matrix, int n, int m) { vector<int> ans; int scol = 0; int srow = 0; int erow = n - 1; int ecol = m - 1; int total = n * m; int count = 0; while(count < total) { for(int index = scol; count < total && index...
ALGO
0.999983
5.967009
1745315c-db26-4590-a740-30bac70c55f1
clusty/vision
stereo/MRF/MRF-benchmarks/MRF2.1/regions-maxprod.cpp
// (C) 2002 Marshall Tappen, MIT AI Lab <EMAIL> #include <limits> #include <stdio.h> #include "MaxProdBP.h" #include "assert.h" int numIterRun; // Some of the GBP code has been disabled here #define mexPrintf printf #define mexErrMsgTxt printf #define UP 0 #define DOWN 1 #define LEFT 2 #define RIGHT 3 OneNodeCluster...
ALGO
0.99992
4.870579
feece7d1-6ee4-44ce-bc13-70668fa2cebb
mascari4615/KarmoLab
Stuff/Study/Programmers/디스크_컨트롤러.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; bool compare(vector<int> v1, vector<int> v2) { if (v1[1] == v2[1]) return v1[0] < v2[0]; return v1[1] < v2[1]; } int solution(vector<vector<int>> jobs) { sort(jobs.begin(), jobs.end(), compare); bool* completed = new bool[jobs.size...
ALGO
0.999973
5.129763
09f1a559-5423-4587-aea8-687fc7a475b2
hjelmn/ompi-trunk
ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/otfprofile.cpp
#include <cassert> #include <iostream> #include <sstream> #include <stdarg.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/wait.h> #include "otf.h" #include "OTF_Platform.h" #include "collect_data.h" #include "collect_dispersion.h" #include "otfprofile.h" #include "process_dispersion.h...
TOOL
0.931367
5.448867
0bde8a65-0601-4ac0-b503-01fbbaae1764
JunHossain/Competitive-Programming
Codeforces/Doremy's Paint 3.cpp
#include<bits/stdc++.h> using namespace std; int distinct(int arr[], int n){ int different=0; for (int i = 0; i < n; i++) { while (i < n - 1 && arr[i] == arr[i + 1]){ i++; } different++; } return different; } int frequency(int arr[], int n){ multiset <int> s;...
ALGO
0.999971
4.117445
e7789b12-50dc-4d6c-9d09-ec392d4e1465
msiedlarek/minimal-linux
src/llvm/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
// This must be included after windows.h. #include <psapi.h> namespace fuzzer { static const FuzzingOptions* HandlerOpt = nullptr; static LONG CALLBACK ExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo) { switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPT...
TOOL
0.856156
5.974645
d6739c9e-77b4-4bc3-8777-debc3a94eedb
PeltX/solved
class2/10828.cpp
//10828, 20240731 #include<iostream> #include<string> #include<vector> using namespace std; int stack[10000]; int main() { int X, N, ins=0; string str; cin >> N; for (int i = 0; i < N; i++) { cin >> str; if (str == "push") { cin >> X; stack[ins++] = X; } else if (str == "pop") { if(ins=...
ALGO
0.999565
4.329135
df3c5542-c676-47c8-96fe-d8a999abd0b3
Warawreh/CP-Library
Contests/CF689/c.cpp
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define fast ios::sync_with_stdio(false);cin.tie(0); typedef long long ll; typedef long double ld; typedef unsigned long long ull; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int main(){ fast // cout ; int...
ALGO
0.999906
3.71937