uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
472c042f-e271-4bb3-9c4e-917b61aa2632
Sughandhan/Competitive-Programming
codeforces/217/A.cpp
// BATMAN WAS HERE #include<bits\stdc++.h> using namespace std; #define all(v) (v).begin(), (v).end() #define tr(v, it) for(vector<int> ::iterator (it) = (v).begin(); it!= (v).end() ; it++) #define deb(x) cout<< #x <<" "<< x #define fr(d, n) for(long long int d=0;d<n;d++) void dfs(const vector< vector<int> >& v, ve...
ALGO
0.99966
4.083419
58949d5a-217d-46e0-8ef6-7ab011108a60
rahulyadav-20/cpp_practice
max_frequncy_element.cpp
#include<bits/stdc++.h> using namespace std; int max_fre(vector<int> arr){ map<int,int> count; int maxf=-1; int maxans=-1; for(int i=0; i<arr.size(); i++){ count[arr[i]]++; maxf=max(maxf,count[arr[i]]); } for(int i=0; i<arr.size(); i++){ if(maxf==count[arr[i]]){ ...
ALGO
0.999813
4.342353
cff38ef7-5468-421e-94e5-29f21c1bdcb6
Lethe0616/day-by-day
86.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace::std ; struct node { int w ; int h ; } ; bool cmp( node first, node next ) { if ( first.w != next.w ) return first.w < next.w ;//شС else return first.h > next.h ;//ͬʱ߸ߵķǰ } int main() { int n ; w...
ALGO
0.999812
4.159039
a01f1e71-3c39-40af-a428-8f26a2811318
muhammadakfz/Algorithm-Adventures
codeforces/1941B1.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { int n; cin >> n; vector<int> a(n); for(int i = 0; i < n; i++) cin >> a[i]; int tmp = 0; for (int i = 1; i < n - 2; i++) { if (a[i] < 0 or a[i - 1] < 0 or a...
ALGO
0.999801
4.226898
4b36c458-f55c-4768-bf83-fe5e4d7321cf
aferikoglou/GNWSIS
data/ApplicationDataset/rodinia_lc_gicov_1_tiling_0/lc_gicov.cpp
#include"lc_gicov.h" extern "C" { void lc_gicov(float result[TILE_ROWS * GRID_COLS], float grad_x[(TILE_ROWS + 2 * MAX_RADIUS) * GRID_COLS], float grad_y[(TILE_ROWS + 2 * MAX_RADIUS) * GRID_COLS], int tX[NCIRCLES][NPOINTS], int tY[NCIRCLES][NPOINTS], float sin_angle[NPOINTS], float cos_angle[NPOINTS], int which_bound...
ALGO
0.947392
3.219741
0c12b34a-98fc-4380-a9b9-5f4a43df09b5
NguyenMinhThuan24112001/Data_structures_and_Algorithms_PTIT
go ban phim.cpp
#include <bits/stdc++.h> #define author "CODE BY KQamazing" #define faster \ ios_base::sync_with_stdio(0); \ cin.tie(); \ cout.tie() #define ll long long #define ld long double #define pii pair<int, int> #define pll pair<ll, ll> #define pld pair<ld, ld> #define matrix v...
ALGO
0.999949
3.91722
2c405736-9025-43cb-b883-3593cbf8a72f
coderheck/learning-programming-languages
why-am-i-learning-cpp-now/grade-9/ThayKien/july 11th 2024/doixung.cpp
#include"iostream" #include"algorithm" #include"string" #include"vector" using namespace std; int main(){ int n;cin>>n;vector<string>res; while(n--){ string a,b;cin>>a;b=a; reverse(a.begin(),a.end()); if(a==b){res.push_back(b);} } for(int i=0;i<res.size();i++){cout<<res[i]<<" ";} }
ALGO
0.999056
3.455806
069a31fc-0565-4d59-8595-b78ff7007b21
UET-2425HK2-INT2210-01/23020358-CTDL-GT
Week 1/Task 5.cpp
#include<iostream> using namespace std; int main(){ int a[5]; cin>>a[0]; int min = a[0],max = a[0]; for(int i = 1; i < 5; ++i){ cin>>a[i]; if (min > a[i]) min = a[i]; if (max < a[i]) max = a[i]; } cout<<min+max; }
ALGO
0.999881
3.10048
88134c95-bf7e-44e3-9462-4af3ca151585
quaeast/DataStructure_2018
bjfu269.cpp
//bjfu269 // #include <iostream> using namespace std; typedef struct Node{ char datum; struct Node *L; struct Node *R; }Node,*BiTree; int init(BiTree &root){ char t; cin>>t; if(t=='0'){ root = NULL; return 0; } else{ root = new Node; root->datum=t; i...
ALGO
0.999766
3.888928
7efc8813-0ada-4cbe-a3e9-c1d5c441ade6
ARAFATH-SH/Problem-Solving
Codechef/Football.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t;cin>>t; while(t--){ int n; cin>>n; int maximum_point = 0; int a[n]; for(int i=1; i<=n; i++){ cin>>a[i]; } int b[n]; for(int i=1; i<=n; i++){ cin>>b[i]; } ...
ALGO
0.999793
3.29961
55f146d8-b5c9-4055-98e8-8a0ead6fa8a5
zeropoint-t/GCSDD
Data Structures & Algorithm I/Project7/BinaryTree.cpp
#include "BinaryTree.h" template<class K, class V> BinaryTree<K,V>::BinaryTree(){} template<class K, class V> BinaryTree<K,V>::BinaryTree(shared_ptr<BinaryNode<K,V>> rt){ this->root = rt; } template<class K, class V> BinaryTree<K,V>::BinaryTree(const K& k, const V& v){ this->root = make_shared<BinaryNode<K,V...
ALGO
0.998012
4.695642
a6fe75ac-bc4c-4ab7-a22e-ab179f750f70
C-2024-1-3/240104congfeifan
4.2.2.3.cpp
#include <iostream> #include <algorithm> using namespace std; void sortArray(int* arr, int size) { sort(arr, arr + size); } int main() { int* arr; int len; cout << "输入数组元素个数:"; cin >> len; arr = new int[len]; cout << "输入" << len << "个元素的数组:"; for (int i = 0; i < len; i++) cin >> arr[i];...
ALGO
0.999021
3.743405
4f6411a7-d630-47a9-a2ad-1f10fccd31fa
vsricharan16/cp
practise/patrick.cpp
#include<iostream> #include<string> #include<bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int x,y,z,steps=0; cin>>x>>y>>z; if(x<y) { steps=steps+x; if(z<x+y) { steps=steps+z; if(z+x<y) { steps=steps+z+x; } else steps=steps+y; } else { ...
ALGO
0.99968
3.446894
ce14d365-e3a9-4ef2-b9e5-d672e668a42e
jih189/fixtureless_fixturing_place_and_pick_re-grasping
perception/include/igl/is_edge_manifold.cpp
#include <algorithm> #include <vector> template < typename DerivedF, typename DerivedBF, typename DerivedE, typename DerivedEMAP, typename DerivedBE> IGL_INLINE bool igl::is_edge_manifold( const Eigen::MatrixBase<DerivedF>& F, Eigen::PlainObjectBase<DerivedBF>& BF, Eigen::PlainObjectBase<DerivedE>& E, ...
ALGO
0.979331
6.971268
ecd1a2cd-10ee-408e-91d9-f624b1d94ed1
hyunrice98/moonhaegi
mid_term/Week6_1_12171712_JaehyunCho.cpp
// // W6_1: Checkout_Timer // Created by 조재현 on 2021/10/08. // #include <iostream> #include <queue> #include <algorithm> using namespace std; struct customerInfo { int useTime; int cost; }; struct counterInfo { int endTime; int number; }; struct compare { bool operator()(counterInfo a, counterI...
ALGO
0.99986
4.353285
b28dbf0a-8d6e-4f5a-9fcd-1e99e4766648
ADI13579/Sorting-And-BST-Visualizer
sorting/src/merge_sort.cpp
#include"sort.h" bool mergesort::merge_sort() { if (event1) { if (merge_begin==-1 && merge_end== -1) event1 = 0; else { for (int i = merge_begin; i <= merge_end; i++) { event1 = animate->moveDown(&array[i]); } } if (!event1) { if (merge_begin == 0 && merge_end!=number-1 &...
ALGO
0.999714
3.511213
866580da-d118-4ecd-9d58-cc50f00e0171
kartikchoubisa/DSA-CPP
Aggressive_cows.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; class Node{ public: int val; Node* left = NULL; Node* right = NULL; Node(int val){ this->val = val; } }; Node* build(vector<int>& v){ int val = v.back(); v.pop_back();...
ALGO
0.999982
4.543086
6c8f82e3-6602-4cad-b36c-abf7f6b1ce99
anidub/CPP
Array/MinNumberKConsecutivrBitFlips.cpp
#include <iostream> #include <stdio.h> #include <vector> #include <cstring> #include <climits> #include <algorithm> #include <numeric> #include <math.h> #include <utility> #include <queue> using namespace std; /*https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/ *You are given a binary array num...
ALGO
0.999946
5.658215
57bfccf9-84c2-41a9-8d93-14bf2d23023f
Dinhlu24/LuNhutDinh_KS24A_C_Session16
B9.cpp
#include <stdio.h> int n=10; void inMang(int a[]); void addArray(int a[],int newValue,int addIndex); int main(){ int a[n] = {1,2,3,4,5,6,7,8,9,10}; printf("Mang truoc khi them:\n"); inMang(a); int newValue=-3,addIndex=5; addArray(a,newValue,addIndex); printf("\nMang sau khi them gia tri %d tai vi tri %d:\n",ne...
ALGO
0.998623
4.184095
d88c964c-f96f-496a-b10a-7a779e076dc6
taey16/caffe-v0.0.1
src/caffe/parallel.cpp
#ifndef CPU_ONLY #include <cuda_runtime.h> #endif #include <glog/logging.h> #include <stdio.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/stat.h> #include <cstdlib> #include <sstream> #include <string> #include <vector> #include "boost/thread.hpp" #include "caffe/caffe.hpp" #include "caffe/parallel.hp...
TOOL
0.858424
7.544841
55effd3b-ef95-403e-a424-a5bc4c07b862
KZ1R2N/My-C-CPP-Programs
Classes, Lab, Exams & Assingment/binarycheck.cpp
#include <iostream> using namespace std; class binary { string s; public: void checkbinary(); void readbinary(); void swapbinary(); void displayswapbinary(); void displaybinary(); }; void binary ::readbinary() { cout << "Please Input your binary number: " << endl; cin >> s; } void binar...
ALGO
0.995263
5.444695
53f689ee-506e-4fe9-a491-7a66ef38d22d
ishandutta2007/codeforces
omer223/normal/1537/E1.cpp
#define fast ios::sync_with_stdio(false); cin.tie(0); #define foru(i, k, n) for (ll i = k; i < n; i++) #define ford(i, k, n) for (ll i = k; i >= n; i--) #define ff first #define ss second #include <iostream> #include <algorithm> #include <vector> #include <string> #include <cmath> #include <bitset> #include <set> #in...
ALGO
0.99994
3.419244
0fb81194-7eb5-42f0-9c01-0ec21e4b8bc5
poroh/freewebrtc
src/stun/details/stun_fingerprint.cpp
#include <cstdint> #include <numeric> #include "util/util_binary_view.hpp" namespace freewebrtc::stun { // // Polynomial 0xEDB88320 // static uint32_t CRC32_TABLE[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d...
ALGO
0.95393
6.727992
e5b49738-ad57-4473-888f-cefdb2e5fc28
lenseling/moodverse
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
b613291c-6408-4330-982f-5482efec7707
anubhav-bhard/Competitive-Programming-June-Course-
Tanweer/Graphs/Number of Island/solution.cpp
class Solution { private: void dfs (vector<vector<char>>& grid , int i , int j) { if(i<0 || i>=grid.size() || j<0 || j>=grid[0].size()) { return; } else if (grid[i][j] == '0') { return; } grid[i][j] = '0'; dfs(grid , i+1 ...
ALGO
0.999941
6.798651
3df740e3-a2c3-44df-a0f2-c81446a7fcd9
WAVM/Wavix
libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/default.pass.cpp
// UNSUPPORTED: c++98, c++03, c++11, c++14 // XFAIL: c++17, c++2a // <functional> // boyer_moore_horspool searcher // template<class RandomAccessIterator1, // class Hash = hash<typename iterator_traits<RandomAccessIterator1>::value_type>, // class BinaryPredicate = equal_to<>> // class boyer_moore_h...
TEST
0.855767
6.554373
1b28630f-8153-4173-8541-07ca8bec3270
Brandon-Winkler/LeetCode
C++/Arrays/Easy/RotateArray.cpp
#include <vector> #include <iostream> class Solution { public: void rotate(std::vector<int>& nums, int k) { // modulus K to ensure it can't be bigger than the size of the array k = k % nums.size(); std::reverse(nums.begin(), nums.end()); std::reverse(nums.begin(), nums.begin() + k)...
ALGO
0.999362
6.558778
33429f45-f951-4abb-bdee-3a76882c0b47
dev-amber/LeetcodeProblems
104-maximum-depth-of-binary-tree/maximum-depth-of-binary-tree.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.999774
6.445845
cc3c3282-9d52-498c-8196-b7d77095bb70
PriyanshuNaredi/LeetCode
Difficulty: Easy/Missing And Repeating/missing-and-repeating.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: vector<int> findTwoElement(vector<int>& arr) { // code here // return betterSol(arr); // return betterSolHashMap(arr); // return opt1(arr); return opt2(arr...
ALGO
0.998406
5.407775
4e48cc39-e6c4-4bdf-b5df-3252db2dbf84
AshHasib/my-last-stand
Problem Solving/UVa/495.cpp
/** * Basic template * Author : AshHasib */ #include<bits/stdc++.h> #define MAX 5001 using namespace std; vector<string>fibs(MAX, "0"); string add(string a, string b) { if(a.size()>b.size()) { swap(a,b); } reverse(a.begin(), a.end()); reverse(b.begin(), b.end()); int n1= a.size(); ...
ALGO
0.99959
4.28914
3fadae21-210d-416a-93b8-8bbfe874d02e
Rahul-IITG/DSA
n_queens.cpp
#include <unordered_set> #include <vector> using namespace std; bool isRowSafe(int row, int col, int n, vector<vector<string>> &board) { for (int i=0;i<n;i++) { if (board[row][i]!="") { return false; } } return true; } bool isColSafe(int row, int col, int n, vector<vector<stri...
ALGO
0.999589
5.369474
e33f6160-bf82-4654-9fc1-dfd5be0caaca
sifakis/CS639S23_Demos
LaplaceSolver/LaplaceSolver_0_1/Utilities.cpp
#include "Utilities.h" #include <fstream> #include <sstream> #include <iostream> #include <iomanip> #include <stdexcept> void Clear(float (&x)[XDIM][YDIM][ZDIM]) { #pragma omp parallel for for (int i = 0; i < XDIM; i++) for (int j = 0; j < YDIM; j++) for (int k = 0; k < ZDIM; k++) x[i][j][k] = 0.;...
TOOL
0.924984
5.966407
940eebe6-374f-41f3-b60b-aeac5bb89baf
TomasKenny/Advent-of-code-2020
day10.1.cpp
#include <iostream> #include <sstream> #include <fstream> #include <vector> #include <string> #include <algorithm> #include <map> #include <set> #include <stdlib.h> #include <numeric> int main(int argc, const char * argv[]) { std::ifstream stream("/Users/naplava/Downloads/input.txt"); std::string str; ...
ALGO
0.998952
4.142327
38c26947-04ba-43d4-a17c-b777213aa955
zenglenn42/programming-abstractions
03-strings/readerEx.03.14/main.cpp
#include <iostream> using namespace std; // Function prototypes string addCommas(string digits); int main() { while (true) { string digits; cout << "Enter a number: "; getline(cin, digits); if (digits == "") break; cout << addCommas(digits) << endl; } return 0; } ...
ALGO
0.939503
6.866445
d03bbcba-e9f9-41fe-b91b-7470998460db
George204/inf
c1/1.10.cpp
#include <iostream> #include <cstdlib> #include <iomanip> #include <conio.h> #include <cmath> #include <unistd.h> #include <locale.h> #define ndk cout<<endl<<"nacinij dowolny klawisz";getch();cout<<"\r \r\n"; using namespace std; int main() { while(true){ setlocale(LC_CTYPE, "P...
TOOL
0.924261
3.007113
084a5dc2-abdc-4e1a-a6fb-4e8c35608273
chelsey0527/TECHIN514_Final
ml-model/src/edge-impulse-sdk/tensorflow/lite/micro/kernels/arg_min_max.cpp
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/reference/arg_min_max.h" #include "edge-impulse-sdk/tensorflow/lite/c/builtin_op_data.h" #include "edge-impulse-sdk/tensorflow/lite/c/common.h" #include "edge-impulse-sdk/tensorflow/lite/kernels/internal/reference/comparisons.h" #include "edge-impulse-sdk/ten...
ALGO
0.99847
7.58299
143f6193-70b6-43eb-81c9-d627ddf0edf6
jwelyl/ps
kakao/220117/순위검색_fail.cpp
// https://programmers.co.kr/learn/courses/30/lessons/72412 #include <string> #include <vector> #include <utility> #include <cstring> #include <iostream> #include <algorithm> using namespace std; vector<vector<string> > applicants, queries; vector<int> solution(vector<string> info, vector<string> query) { vector...
ALGO
0.999504
4.681803
be50b503-04dc-44e3-9911-4e44581ec8c9
Mr-Phoebe/ACM-ICPC
比赛源码/2016 Multi-University Training Contest 04/1007.cpp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N = 1000010; const int M = 100010; const int inf = 0x37373737*2; int dp,pre[N],p[N],tt[N],L[N],R[N],id,value[N]; int jump[M][18],deep[N],n,m,i,a,b,c,cnt,sum; int v[N],s[N]; struct G{ int x,l,r,v; void set(int a,int b,int c,int d) {...
ALGO
0.999976
4.277431
99164b03-2c84-49a4-ba26-401f9021428e
gfh16/StudyNotes
CPP/C++学习资料/C++入门经典/书本例题/Code From the 2271 Book/ch08/prog8_03.cpp
// Program 8.3 Failing to modify the original value of a function argument #include <iostream> #include <iomanip> using std::cout; using std::endl; double change_it(double it); // Function prototype int main() { double it = 5.0; double result = change_it(it); cout << "After function execution, it ...
ALGO
0.97483
6.432597
b9665c3a-53c0-425c-a22c-a4a319f22cc9
Mingda-Ma/CS225
lab_hash/lphashtable.cpp
/** * @file lphashtable.cpp * Implementation of the LPHashTable class. * * @author Chase Geigle * @date Spring 2011 * @date Summer 2012 */ #include "lphashtable.h" using hashes::hash; using std::pair; template <class K, class V> LPHashTable<K, V>::LPHashTable(size_t tsize) { if (tsize <= 0) tsize =...
ALGO
0.881763
5.954566
4044e531-d725-4df9-ae06-72772896d9fb
chandranshh/DSA_GFG_PR
Medium/Subset Sums/subset-sums.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code End class Solution { public: void findSum(int idx, int sum, vector<int>& ans, vector<int>& arr, int n) { if (idx == n) { ans.push_back(sum); return; } findSum(idx + 1, sum + arr[id...
ALGO
0.999714
6.788194
3b01b274-16e4-45b1-83d0-7d73e5810235
shentoumengxin/2024Autumn
Data Structure and Algorithm Anlysis/CS203 DSAA Code/.history/lab9/A_20241227160226.cpp
#include<iostream> #include<vector> #include<climits> using namespace std; class point { public: int num; vector<point*> neibor; // 邻接节点 vector<long long> wei; // 边的权重 point(int num) : num(num) {} }; class node { public: node* parent = nullptr; long long num; point* p; long long dist...
ALGO
0.999973
4.77326
4c90c62f-9613-471c-8e1a-a29f46963f04
zjsxzy/HackerRank
Problem Solving/Algorithms/Warmup/Chocolate Feast/main.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <queue> #include <stack> #include <bitset> #include <vector> #include <cstdio> #include <string> #include <sstream> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define PB push_back #define MP ...
ALGO
0.999938
3.721249
11021542-3b2c-452b-9268-e3f6d7f8b0bc
flpdsc/basic_algorithm
cpp/49.cpp
//블록의 최댓값 #include <iostream> #include <vector> using namespace std; int main() { int i, j, n, sum=0; cin >> n; vector<vector<int> > a(n+1, vector<int>(n+1, 0)); for(i=1; i<=n; ++i) cin >> a[0][i]; for(i=n; i>=1; --i) cin >> a[i][0]; for(i=1; i<=n; ++i){ for(j=1; j<=n; ++j){ ...
ALGO
0.999971
3.138829
548c68d3-6d30-4a6b-855a-0938f8149f5d
NikitaUssyukin/PP1_2024_Summer
Lectures/G1/Week4/L2/bin_search/binsearch.cpp
#include <iostream> using namespace std; void binarySearch(int n, int a[], int target) { int steps = 0; int l = 0, r = n - 1; int m = r / 2; while(l <= r) { ++steps; if(target == a[m]) { cout << "Target found at index " << m; cout << " in " << steps << " ste...
ALGO
0.999659
5.897448
ee32566b-9dce-48e6-9a1d-a8e93aea9bc8
ishandutta2007/codeforces
juzek/normal/1307/D.cpp
#ifndef LOCAL #pragma GCC optimize("O3") #endif #include <bits/stdc++.h> using namespace std; #define sim template <class c #define mor > muu & operator<<( #define ris return *this #define R22(r) sim>typename enable_if<1 r sizeof(dud<c>(0)),muu&>::type operator<<(c g) { sim> struct rge { c b, e; }; sim> rge<c> r...
ALGO
0.999966
4.297133
f9ef60de-308a-4de8-aff5-e922d7743aec
Hou-Xiaoxuan/AlgorithmCompetition
algorithm_contest_2020/new coder/3_27_pictic60/A.cpp
//#include<bits/stdc++.h> #include<iostream> using namespace std; typedef long long LL; int main() { int n;cin>>n; LL cnt[30]={0}; LL a[30]; for(int i=0;i<=27;i++) a[i]=(1<<i); int x=-1; for(int i=1;i<=n;i++) { cin>>x; int t=27; for(;x;) { ...
ALGO
0.999388
3.047395
4d229eff-7247-41fc-aec5-b01c6f98d5f5
younghoonyou/Hoon-LeetCode
2419-longest-subarray-with-maximum-bitwise-and/2419-longest-subarray-with-maximum-bitwise-and.cpp
class Solution { public: int longestSubarray(vector<int>& nums) { int max_num = nums[0]; for(int &num : nums){ max_num = max(max_num, num); } int ans = 0; int sequence = 0; for(int &num : nums){ if(num == max_num) sequence++; ...
ALGO
0.999929
5.91748
2401063d-01c6-4a03-8944-03f306fceb45
khaiqalsatrio/InsertionShort_115_C
InsertionShort/InsertionShort.cpp
#include <iostream> using namespace std; int arr[20]; // Membuat array dengan panjang data 20 // Membuat variable inputan n int n; void input() { // Procedure input while (true) { cout << "Masukan jumlah data pada array : "; // membuat inputan element array cin >> n; ...
ALGO
0.997318
3.714023
68c23f0e-196a-4519-b897-af1892b92817
p-dros/university
sem-6/obiektowe_cpp/class_4/task_4/main.cpp
#include <iostream> #include <iterator> #include <vector> template <typename T> struct sum_traits { typedef T sum_type; static sum_type zero() { return sum_type(); } }; template <> struct sum_traits<double> { typedef double sum_type; static sum_type zero() { return 0.0; } }; template <> struct sum_tr...
ALGO
0.998992
6.390341
55a2c007-baf4-455a-97e8-f1143848fbe8
Siddu96/C-and-CPP-Programs
3rd Semester Programs/Function_Overloading.cpp
#include <iostream> #include <conio.h> using namespace std; int area(int s){ return s*s; } int area(float r){ return 3.14159*r*r; } int main(){ int l, h, r; cout << "Enter side : "; cin >> l; cout << "Area of Square = " << area(l,); cout << "\n\nEnter raduis : "; cin >> r; cout << "Area of Circle = " << ...
ALGO
0.94094
3.110828
3557c247-19de-4a92-a5e7-c46ca0d0ed75
AkiTomoya10023/future-vision-ros_nav-2024ynurmvision-2.0
detector/inference.cpp
#include "inference.h" using namespace nvinfer1; using namespace yolox_detector; static inline int argmax(const float *ptr, int len) { int max_arg = 0; for (int i = 1; i < len; i++) { if (ptr[i] > ptr[max_arg]) max_arg = i; } return max_arg; } /** * @brief 海伦公式计算三角形面积 * * @...
ALGO
0.992593
5.462924
e677e13c-a8e5-486d-89e2-10dad692bd46
milkv-duo/eigen
bench/eig33.cpp
#include <iostream> #include <Eigen/Core> #include <Eigen/Eigenvalues> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; template <typename Matrix, typename Roots> inline void computeRoots(const Matrix& m, Roots& roots) { typedef typename Matrix::Scalar Scalar; co...
ALGO
0.999843
5.71425
31ee06a0-f439-47d9-bf3e-0f6cac06ea68
baishali1/Codes-practiced-in-Leetcode
Leaders in an array - GFG/leaders-in-an-array.cpp
// { Driver Code Starts // C++ program to remove recurring digits from // a given number #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ //Function to find the leaders in the array. public: vector<int> leaders(int a[], int n){ // Code here int i,j; ...
ALGO
0.999965
5.914894
ffbd4815-9eed-4404-9eec-157f3740f778
nzinov/home_tasks
semester4/contest/a.cpp
#include <iomanip> #include <fstream> #include <iostream> #include <cmath> struct Point { long long x; long long y; Point(long long x = 0, long long y = 0) : x(x), y(y) { } Point operator+(const Point& other) const { return Point(x + other.x, y + other.y); } Point operator-(const...
ALGO
0.994112
4.073255
7a80b1f9-80b1-4f91-a79e-19f8b2d05f7f
ademylmz34/Data-Structures-Second-Homework
G191210305/src/Split.cpp
/** * @file VeriYapılarıOdev2 * @description MinGW C++ ile yazılacak program, açıldığı gibi sayilar.txt dosyasını okuyacaktır. Bu dosyada her satırda 3 ün katı olacak şekilde sayi adedi vardir. Bu sayilar aytrıştırılıp her noktanın orjine olan uzaklığı öncelikli kuyruk listesine eklenecek. Sonrasında ise her satırda...
ALGO
0.958416
3.405252
946505e4-5dd7-4a15-8e70-88200116328c
Manishgupta200/Strivers-A2Z-DSA
C++ Test/test78.cpp
// https://www.codingninjas.com/codestudio/contests/love-babbar-contest-l/3189127/problems/14804?leftPanelTab=1 #include<bits/stdc++.h> using namespace std; long long appleAndCoupon(int n, int m, vector<int> arr){ // Write your code here. if(m > n) return -1; sort(arr.begin(), arr.end()); int freeAppl...
ALGO
0.999858
4.499381
35ebf273-66ec-4baf-b8c9-e0c309cf4f33
pupipatsk/Data-Structures
d64_q2a_vector_block_swap/main.cpp
#include <stdexcept> #include <iostream> #include "vector.h" #include "student.h" int main() { std::ios_base::sync_with_stdio(false);std::cin.tie(0); CP::vector<int> v; int round,n; std::cin >> n; for (int i = 0;i < n;i++) { int x; std::cin >> x; v.push_back(x); } int a,b...
ALGO
0.99833
3.708432
b3b2b02e-6940-4d19-a4e4-802e5a0f2c92
hjiang13/LLMs-in-IR
POJ-104/50/1643.cpp
#include <iostream> using namespace std; int main() { int xingqi,yue,zong=0,panduan; cin >> "%d",&xingqi); for(yue=1; yue<13; yue++){ panduan=(zong+12)%7+xingqi; if(panduan>7) panduan=panduan-7; if(panduan==5) cout << "%d\n",yue); if(yue==1||yue==3||yue==5||yue==7||yue==8||yue==10||yue==12) zong=zong+31; else if(yue==4...
ALGO
0.999915
3.010823
c98b9e6b-60b7-47fa-a378-c90c14bc617b
qrtc/webrtc.third_party
WebKit/Source/core/editing/SelectionModifierCharacter.cpp
#include "core/editing/SelectionModifier.h" #include "core/editing/EditingUtilities.h" #include "core/editing/InlineBoxPosition.h" #include "core/editing/InlineBoxTraversal.h" #include "core/editing/VisiblePosition.h" #include "core/editing/VisibleUnits.h" #include "core/layout/api/LineLayoutAPIShim.h" #include "core/...
ALGO
0.999863
6.847713
8e3626b7-96e2-4062-b06a-079431a0e201
Devanoper/Leetcode
easy/704.cpp
class Solution { public: int search(vector<int>& nums, int target) { int start = 0, end = nums.size() - 1, mid = (start + end) / 2; while (start <= end) { mid = (start + end) / 2; if (nums[mid] == target) { return mid; } else if (nums[mid] > target...
ALGO
0.999894
6.307978
1721242b-f036-4857-869e-7004a3258109
LingNc/LingNc
school/暑假集训/算法/数据结构/二叉树/P4715淘汰赛.cpp
#include<bits/stdc++.h> template<typename iii> iii gcd(iii a,iii b){return b==0?a:gcd(b,a%b);} template<typename iii> iii lcm(iii a,iii b){return a/gcd(a,b)*b;} #define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0) #define foe(i,a,b) for(int i=(a);i<=(b);i++) #define fod(i,a,b) for(int i=(a);i>=(b);i--) #define al...
ALGO
0.999941
4.108814
70ad2ed4-2fa3-493f-9769-1a8fdc49d016
mdunggggg/SPOJ-PTIT
BCSTACK.cpp
#include<bits/stdc++.h> #define faster() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define pi 2*acos(0) #define MOD 1000000007 using namespace std; typedef long long ll; void solve (){ stack<int>a; string s; int i = 0; ll x; do{ cin >> s; if ( s == "init") { ...
ALGO
0.999439
4.160704
38f94715-bf84-43ee-acb3-2bc61d87e938
il999/CompetitiveProgramming
codeforces/1143/B.cpp
// Example program #include <bits/stdc++.h> using namespace std; int main() { long long n; cin>>n; vector<int> v; long long no=1; while(n>0) { v.push_back(n%10); n/=10; no*=9; } long long pre[v.size()+1]; pre[0]=0; pre[1]=v[0]; long long nine[v.size()]; nine[0]=1; for(i...
ALGO
0.999985
4.472118
45f517d1-674b-40cd-b35b-389963604a88
RajatSran/dsapractice
stack/stockspanproblem.cpp
#include<bits/stdc++.h> using namespace std; vector<int> nextLargestElement(vector<int> arr) { vector<int> v; stack<pair<int, int>> s; //traverse left to right; for (int i = 0; i <= arr.size() - 1 ; ++i) { if (s.size() == 0) { v.push_back(-1); } else if (s.top().first > arr[i]) { v.push_back(s.top().sec...
ALGO
0.999869
4.09834
ff07b4f5-a57f-4609-bd31-bf50003632b5
quangcrazymen/IT002-Object-Oriented-Programming-UIT-
test/main.cpp
//#include "PhanSo.cpp" #include <vector> #include <iostream> #include<algorithm> // class Dummy{ // public: // Dummy(){cout<<"Enter";} // ~Dummy(){cout<<"Exit";} // }; // Dummy A; using namespace std; // vector <int> test(){ // vector<int> a{1,2,3,4}; // return a; // } int main() { vector<int> numbers{4,564,64,...
TOOL
0.937479
3.234735
c1dd7ce5-6091-4a64-9c50-9cc7136e6996
Eusmilus/cocos2dx-qt
Box2D/Dynamics/Joints/b2DistanceJoint.cpp
#include <Box2D/Dynamics/Joints/b2DistanceJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // 1-D constrained system // m (v2 - v1) = lambda // v2 + (beta/h) * x1 + gamma * lambda = 0, gamma has units of inverse mass. // x2 = x1 + h * v2 // 1-D mass-damper-spring system // m (v2 - v1...
ALGO
0.996801
7.196852
fc921c3a-d0ae-458f-a468-a21d68674c9b
ishandutta2007/codeforces
mr_spade/normal/1515/C.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e5+5; int n,m,x; int h[N],sum[N]; priority_queue<pair<int,int> > Q; inline void solve() { register int i; cin>>n>>m>>x; for(i=1;i<=n;i++) cin>>h[i]; cout<<"YES"<<endl; for(i=1;i<=m;i++) printf("%d ",i),sum[i]=h[i],Q.push(make_pair(-sum[i],i)); for(i=m+...
ALGO
0.999969
3.26313
c4fb42a7-f8e4-40b7-bbbe-9e589befad0b
danyuanwang/XuanWuGame_C
boost/libs/numeric/ublas/doc/samples/assignment_examples.cpp
#include <boost/numeric/ublas/assignment.hpp> #include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/vector_proxy.hpp> #include <boost/numeric/ublas/matrix_proxy.hpp> #include <boost/numeric/ublas/vector_sparse.hpp> #include <boost/numeric/ublas/matrix_sparse.hpp> #include <boost/numeric/ublas/io.hpp> ...
TOOL
0.922992
3.670881
7765ead5-ba0d-41be-912a-bda9b417c530
raphaeell-XI9/Fungsi
ProgramMembuatFungsiPermutasi_Davin_XI_9.cpp
#include <cstdlib> #include <iostream> using namespace std; int Permutasi (int x, int y) { int Nilai_Permut, selisih; int faktorial = 1; selisih = x - y; while (x > 0) { faktorial = faktorial * x; x = x-1; } Nilai_Permut = faktorial/selisih; return(Nilai_Permut); } int main () { int n, r; cout << "Masu...
ALGO
0.99805
4.7808
34459c36-aab9-411a-9f89-23c9332a57cf
hjiang13/LLMs-in-IR
POJ-104/76/1657.cpp
#include <iostream> using namespace std; int main (){ int n,a[50000][2],sz[10000],s,t,st=0; int i,j,k; cin >> "%d",&n); for(i=1; i<=n; i++){ cin >> "%d%d",&a[i][0],&a[i][1]); } for(i=1; i<=10000; i++){ sz[i]=0; } for(j=1; j<=n; j++){ for(k=a[j][0]+1; k<=a[j][1]; k++){ sz[k]=1; } } t=1,s=...
ALGO
0.999949
3.338504
ae0dfa7a-49a2-44bf-8207-994bf62c8177
liyijiax/HZOJ
2.入门组/53.cpp
/************************************************************************* > File Name: 53.cpp > Author: > Mail: > Created Time: 2019年09月10日 星期二 13时58分15秒 ************************************************************************/ #include<iostream> #include <cmath> using namespace std; #define max_n 1000000 int...
ALGO
0.999795
4.244609
42125e08-f5a0-4b5a-8714-acba14189c91
OSLL/slam-constructor
src/utils/sm_runner.cpp
#include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <algorithm> #include <iterator> #include "../core/states/robot_pose.h" #include "../core/states/sensor_data.h" #include "properties_providers.h" #include "init_scan_matching.h" #include "init_occupancy_mapping.h" #include "map_dumpers...
TOOL
0.883671
5.786959
e5d750a6-36ba-4ca8-8cd8-fe24ed7c2e0f
daeunchung/cplusplus
boj1922.cpp
//// Ʈũ :: ׷ ̷ , ּҽдƮ(mst minimum spanning tree) //// ̵ ũ罺Į(Ž:Ͽε + 켱ť) < (Ž:켱ť) //#include <iostream> //#include <queue> //using namespace std; //// n (1 n 1000) m (1 m 100,000) c (1 c 10,000) // //int n, m, a, b, c; //int parent[1001]; // //// pq ü Ȱ - δ //struct data { // int node1, node2, weight; /...
ALGO
0.999981
5.084177
ee416678-9a22-43df-a6e4-d1b2dbd5d416
dyzsr/top100url
src/reduce.cpp
#include "../include/reduce.h" #include "../include/input.h" #include "../include/output.h" #include "../include/utils.h" #include "../include/config.h" #include <algorithm> Reduce::Reduce() {} std::pair<size_t, size_t> Reduce::operator() (Input *in, Output *out) { char *str = new char[MAX_URL_SZ + 1]; for (;;) { ...
ALGO
0.985971
4.587668
e1b21b9d-dcb2-46f7-a713-b74f8b1552f6
YoloApple/PTITLOL2003
CapPhanTucoTongBangK.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; int n,k; while(t--) { cin>>n>>k; int a[1001]; map<int,int>mp; for(int i=0;i<n;i++) { cin>>a[i]; mp[a[i]]++; } long long ans=0; for(int i=0;...
ALGO
0.999873
3.5317
492d1a20-b22e-4642-9a5b-0eea14d3cd50
aaakshit/Leetcode-solutions
0784-letter-case-permutation/0784-letter-case-permutation.cpp
class Solution { public: vector<string>ans; void solve(string s, int i){ if(i>=s.size()){ ans.push_back(s); return; } if((s[i]>='a' && s[i]<='z')){ string t=s.substr(0,i)+char(s[i]-32)+s.substr(i+1); solve(s,i+1); solve(t,i+1); ...
ALGO
0.9998
6.074898
cdc3cd03-2af0-4c50-b8a0-0a3ef223d981
ishandutta2007/codeforces
slime/normal/1110/A.cpp
#include <bits/stdc++.h> #define maxn 100005 #define ll long long #define mod 998244353 using namespace std; int b, k; int a[maxn]; int main() { scanf("%d%d", &b, &k); int ns = 0, mt = 1; for(int i = 0; i < k; i++) scanf("%d", &a[i]), ns = ns * b + a[i], ns %= 2; if(ns == 0) printf("even"); else printf("od...
ALGO
0.999974
4.180525
593bbe63-2ef5-482d-99b7-7ae3aa44c3f1
zenfone-legacy/platform_frameworks_av
media/libstagefright/codecs/amrnb/enc/src/levinson.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/levinson.c Funtions: Levinson_init Levinson_reset Levinson_exit Levinson ------------------------------------------------------------------------------ MODULE DESCRIPTI...
ALGO
0.998827
6.290952
7cf21102-7a60-4722-87c5-26b4a5219cd7
ishandutta2007/codeforces
nweeks/normal/982/C.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, n) for (int i(j); i < n; ++i) #define FORR(v, c) for (auto &v : c) #define F first #define S second #define SQ(x) (x)*(x) #define pb push_back #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define dbg(x) cerr<<#x<<" = " <<...
ALGO
0.999906
4.435982
89539c6b-0d26-4717-b6d8-65217ada4364
Preetpalsidhu/SubSpaceAssignment
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
d226da1e-0448-4e1f-9147-c6947216ec90
Faione/tailbench
moses/moses/LM/Ken.cpp
// $Id$ #include <cstring> #include <iostream> #include <memory> #include <stdlib.h> #include "lm/binary_format.hh" #include "lm/enumerate_vocab.hh" #include "lm/left.hh" #include "lm/model.hh" #include "Ken.h" #include "Base.h" #include "moses/FFState.h" #include "moses/TypeDef.h" #include "moses/Util.h" #include "m...
ALGO
0.963236
7.38309
57d34764-5a81-4d9d-ab27-3e4902a3e61e
GambitBSM/gambit_1.0
ColliderBit/src/analyses/Analysis_CMS_1LEPDMTOP_20invfb.cpp
#include <vector> #include <cmath> #include <memory> #include <iomanip> #include <iostream> #include "gambit/ColliderBit/analyses/BaseAnalysis.hpp" #include "gambit/ColliderBit/ATLASEfficiencies.hpp" #include "gambit/ColliderBit/mt2w.h" using namespace std; // The CMS 1 lepton DM + top pair analysis (20fb^-1) // b...
DATA
0.964627
3.301517
a5bf3226-3a45-470b-b63e-4e7724769eeb
AamiinHassanAhmed/c-
swich-case app/swich.cpp
// // Online C++ compiler to run C++ program online // Online C++ compiler to run C++ program online #include <iostream> using namespace std; int main() { cout << "Welcome" << endl; int a; int b; int c; cout << "Enter a number: " << endl; cin >> a; cout << "Enter a second number: ...
TOOL
0.955176
3.651242
48d78507-1593-4b1e-89d2-5fc026f011f3
manan-shxrma/dsalgo
Sorting/radixsort.cpp
// C++ implementation of Radix Sort #include <iostream> using namespace std; // A utility function to get maximum value in arr[] int getMax(int arr[], int n) { int mx = arr[0]; for (int i = 1; i < n; i++) if (arr[i] > mx) mx = arr[i]; return mx; } // A function to do counting sort of arr[] according to // th...
ALGO
0.999992
6.248118
a57fbda5-f40c-4b76-a328-4e5d78b1b1c0
akms-limon/Contest_Problem_Solving
Codechef/ChefDrinksTea.cpp
#include<iostream> using namespace std; int main(){ int t; cin>>t; while(t--){ int x, y, z, a; cin>>x>>y>>z; if(y>=x) cout<<z<<endl; else{ a=x/y; if (a*y==x) cout<<a*z<<endl; else cout<<(a+1)*z<<endl; } } return 0; }
ALGO
0.999964
3.271973
46a2b503-86b9-4df9-b074-be771ef1a503
sagpant/cryptominisat
src/toplevelgauss.cpp
#include "toplevelgauss.h" #include "time_mem.h" #include "solver.h" #include "occsimplifier.h" #include "clauseallocator.h" #include <m4ri/m4ri.h> #include <limits> #include <cstddef> #include "sqlstats.h" using namespace CMSat; using std::cout; using std::endl; TopLevelGauss::TopLevelGauss(Solver* _solver) : so...
ALGO
0.999734
3.272839
266ae0a4-4add-474e-9149-91f24c804544
kyle355469/109NS-IC
DP/d253.cpp
#include <iostream> using namespace std; int main(){ int ans; long long dp[7490] = {1}, add[5] = {1, 5, 10, 25, 50}; for(int i = 0; i < 5; i++) { for(int j = add[i]; j < 7490; j++) { dp[j] += dp[j - add[i]]; } } while(cin >> ans) cout << dp[ans] << endl; return 0; }
ALGO
0.999143
3.447445
81dec3d8-a815-4280-bad9-41a236c589cc
PedroMMDMFernandes/CMakeTemplate
CMSIS/NN/Examples/ARM/arm_nn_examples/gru/arm_nnexamples_gru.cpp
/** * @ingroup groupExamples */ /** * @defgroup GRUExample Gated Recurrent Unit Example * * \par Description: * \par * Demonstrates a gated recurrent unit (GRU) example with the use of fully-connected, * Tanh/Sigmoid activation functions. * * \par Model definition: * \par * GRU is a type of recurrent neura...
ALGO
0.92948
7.471897
9e6c8c3b-17a3-4789-8271-fb56ae80fede
theorist17/programming-problem-solving
cpp/baekjoon-algorithm-basic/014-400-11052-카드구매하기-DP-S1.cpp
#include<iostream> #include<vector> using namespace std; int main() { int n; cin >> n; vector<int> P(n+1), D(n+1); for (int i = 1 ; i <= n ; i++) cin >> P[i]; D[1] = P[1]; for (int i = 2 ; i <= n; i++) { int M = 0, m; for (int j = 1; j <= i; j++) { ...
ALGO
0.999954
3.54245
8a2d383c-4646-4543-9d1c-08047e4b98be
shuvokr/OnlineContest
OnlineContest/CodeJam/Code jam 2016/counting_sheep.cpp
#pragma comment(linker, "/stack:64000000") #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ctype.h> #include <string> #include <iostream> #include <sstream> #include <vector> #include <queue> #include <deque> #include <stack> #include <map> #include <list> #include <set> #include...
ALGO
0.999784
4.45255
83499d1c-d1ba-4024-84bd-e354b02e9088
Anubhav12345678/competitive-programming
minamttogetallcoins.cpp
// C++ program to acquire all n coins #include<bits/stdc++.h> using namespace std; // function to calculate min cost int minCost(int coin[], int n, int k) { // sort the coins value sort(coin, coin + n); // calculate no. of // coins needed int coins_needed = ceil(1.0 * n / (k + 1)); // calcul...
ALGO
0.99991
5.331957
cf25d251-303e-4fda-b38b-99afb33b71bf
zaforf/competitiveprogramming
codeforces/1846G.cpp
#include <bits/stdc++.h> using namespace std; int apply(int S, int R, int A) { S ^= S&R; S |= A; return S; } void solve() { int N,M;cin>>N>>M; vector<int> dist(1024,1<<30); vector<bool> vis(1024,false); string start; cin>>start; dist[stoi(start,0,2)]=0; vector<vector<int>> edges(M,vector<int>(3)); for (int ...
ALGO
0.999914
4.695426
e780186d-7dd5-4f0b-b19b-4aa7a0455897
scivision/ffilesystem
src/permissions.cpp
#include <string> #include <string_view> #include "ffilesystem.h" #include <system_error> #if defined(HAVE_CXX_FILESYSTEM) #include <filesystem> namespace Filesystem = std::filesystem; #else #include <sys/types.h> #include <sys/stat.h> // chmod, permissions constants #endif #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN...
TOOL
0.929057
7.239939
99806e72-8d34-4c0b-9602-675556fe91dd
tchung17/terminaltictactoe
board.cpp
#include<iostream> #include<cstdlib> #include<map> #include<vector> using namespace std; class Board { public: char tac[3][3]; Board(){ for (int i = 0; i < 3; i++){ for (int j = 0; j < 3; j++){ tac[i][j] = '-'; } } ...
TOOL
0.977538
3.968019
e831f8af-5b14-46ee-8ed7-0d889449faf8
vgcerda/minesweapers_minesweaperAI
Minesweeper_Cpp/src/MyAI.cpp
// ====================================================================== // FILE: MyAI.cpp // // AUTHOR: Jian Li // // DESCRIPTION: This file contains your agent class, which you will // implement. You are responsible for implementing the // 'getAction' function and any helper met...
ALGO
0.981119
4.27509
3f7ad932-5833-467d-892c-55b1b44a3bbe
urstrulyharshx/LeetCode
Missing number in array - GFG/missing-number-in-array.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution{ public: int missingNumber(vector<int>& array, int n) { // Your code goes here long long sum=(n*(n+1))/2; long long dem...
ALGO
0.99988
5.581207
7975ee42-fc71-40ab-922c-2bbb6f3ab5a9
dirtyfilthy/llvm-project-14.0.6
pstl/test/std/algorithms/alg.sorting/partial_sort.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14 #include "support/pstl_test_config.h" #include <cmath> #include <execution> #include <algorithm> #include "support/utils.h" using namespace TestUtils; static std::atomic<int32_t> count_val; static std::atomic<int32_t> count_comp; template <typename T> struct Num { T val; ...
TEST
0.991865
7.027101
3170b3bd-cb62-460f-8784-aa9453b1a646
yinyajun/Sundries
Algorithm-Data-Structure/heap/main.cpp
#include <iostream> #include <string> #include <stdlib.h> #include <algorithm> #include <ctime> #include <cmath> #include <cassert> using namespace std; template <typename Item> class MaxHeap { private: Item *data; int count; int capacity; void shiftUp(int k) { // 父节点小于当前节点,交换 /...
ALGO
0.998096
3.851127
f4abe09c-ed7d-4547-b325-27284e6f2965
ishandutta2007/codeforces
cheetose/normal/526/C.cpp
#include<cstdio> #include<cstdlib> #include<iostream> #include<vector> #include<queue> #include<bitset> #include<string> #include<stack> #include<set> #include<unordered_set> #include<map> #include<unordered_map> #include<cstring> #include<complex> #include<cmath> #include<iomanip> #include<numeric> #include<algorithm>...
ALGO
0.999948
3.342192