uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
578811cc-543a-4777-b28f-29253267501b
Shahraaz/CP_S5
codeforces/practice/DIV2_57E.cpp
// Optimise #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; // #define MULTI_TEST #ifdef LOCAL #define db(...) ZZ(#__VA_ARGS__, __VA_ARGS__); #define pc(...) PC(#__VA_ARGS__, __VA_ARGS__); template <typename T, type...
ALGO
0.999964
4.090583
8c544d07-91b8-49ed-9059-c91b44f8fd39
archanabadagi/APS-2021
APS_Code_Library/81_n_queen_problem.cpp
#define N 4 #include <stdbool.h> #include <stdio.h> void printSolution(int board[N][N]) { for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) printf(" %d ", board[i][j]); printf("\n"); } } bool isSafe(int board[N][N], int row, int col) { int i, j; /* Check this row on left side */ for (i = 0; i < c...
ALGO
0.999818
4.980134
164b67b7-affc-43f9-80f8-aa57e7a02953
bioexcel/bioexcel-code-releases
GROMACS/gromacs-2018.3/src/gromacs/gmxana/gmx_wheel.cpp
#include "gmxpre.h" #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/writeps.h" #include "gromacs/gmxana/gmx_ana.h" #include "gromacs/gmxana/gstat.h" #include "gromacs/math/vec.h" #include "gromacs/utility/ar...
ALGO
0.957381
5.19162
4549e5f2-4e0a-4314-8e5c-04eb388cb608
toxeitova/informatics-solutions
ch3.6.cpp
#include <iostream> #include <iomanip> int main() { int n; std::cin >> n; double sum = 1.0; for (int i = 2; i <= n; ++i) { sum += 1.0 / (i * i); } std::cout << std::fixed << std::setprecision(6) << sum << std::endl; return 0; }
ALGO
0.999741
5.317668
de93133b-08a3-4565-b155-8b1b9b0700f8
d3b5/Beecrowd-URI-solutions
cpp+c/Busca_na_Internet.cpp
#include<bits/stdc++.h> using namespace std; int main() { int x; cin >> x; cout << 4*x << endl; return 0; }
ALGO
0.999328
3.22647
2d8fb8cb-7c51-4630-9397-471a4b237c47
ishandutta2007/codeforces
rednextcentury/normal/432/D.cpp
# include <iostream> # include <algorithm> # include <vector> # include <stdio.h> using namespace std; string s; int n; int a[1000000]; int p[1000000]; int is[1000000]; void PRE() { int i=0,j=-1; p[i]=j; while(i<n) { while (j>=0 && s[i]!=s[j]) j=p[j]; j++,i++; p[i]=j...
ALGO
0.99992
3.417061
2104da16-4613-4fcc-852d-e26ede2b92db
ras1234/geeks4geeks
DivideConquer/12_firstPositive.cpp
#include <bits/stdc++.h> using namespace std; int function(int x) { return (x*x -10*x -20); } int binarySearch(int start,int end) { if(start>end) return -1; if(start==end) return start; int mid=start+(end-start)/2; if(mid<end && function(mid)<0 && function(mid+1)>=0) return mid+1; else if(mid>start && fu...
ALGO
0.999363
3.855657
993702f4-68a3-48f9-93a5-487d2963f330
kwonhee1/c
program/2단계/당구 치기.cpp
//#include <string> //#include <vector> // //using namespace std; // //// 점이동으로 알고리즘 변경 => y축 기준으로 점이동 후 거리 측정! // //int get(int y1, int x1, int y2, int x2) { // return //} // //vector<int> solution(int x, int y, int startX, int startY // , vector<vector<int>> balls /*(x,y)*/ ) { // vector<int> answer; // ...
ALGO
0.999925
4.638612
fcaeac31-6b76-48e1-b756-5c2336bb252c
yangtengleo/DeepSPIN
lammps_DeepSPIN/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp
// clang-format off /* ---------------------------------------------------------------------- Contributing Author: Julien Devemy (ICCF) ------------------------------------------------------------------------- */ #include "pair_nm_cut_coul_cut.h" #include "atom.h" #include "comm.h" #include "error.h" #include "fo...
ALGO
0.971452
5.854013
9d4ed18e-2773-42b9-bcda-744efdfac675
krishnadhar00/13_All_Sorting
04_Merge_Sort.cpp
// 1. Merge Sort follows the Divide and Conquer Algorithm. // 2. Divide and Conquer : First divide the problem into sub problems then conquer(solve) the sub problems and finally combine sollutions to get the final output. // Merge sort is a sorting algorithm that follows the divide-and-conquer approach. It works by rec...
ALGO
0.999994
6.371933
8399b9ff-3603-44c1-a426-c71213617369
Valerion052/codeforces
training/Тренировки_Нижний_Новгород/ДП_1/A06/main.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n; string s; cin >> n >> s; int arr[n]{}; for (int i=0; i<n; ++i) { if (s[i]=='w') {arr[i] = -10000;} else if (s[i]=='"') {arr[i] = 1;} } int dp[n]{}; for (int j=1; j<n; ++j) { int val...
ALGO
0.999947
3.891054
e43087ca-d1ad-4434-89e9-3626994276cd
a920604a/leetcode
C_plus/398*_RandomPickIndex.cpp
class Solution { private: vector<int> vec; int size = 0; public: Solution(vector<int> &nums) { // option 1 水塘抽樣 // 從S中抽取首k項放入「水塘」中 // 對於每一個S[j]項(j ≥ k): // 隨機產生一個範圍從0到j的整數r // 若 r < k 則把水塘中的第r項換成S[j]項 this->vec = nums; size = vec.size(); } ...
ALGO
0.999765
5.264426
a7851a93-a908-4e3c-95b1-e8b730522623
CDPS/Competitive-Programming
URI/1079-Weighted Averages.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; scanf("%d",&t); while(t--){ double a,b,c; cin >> a >> b >>c; printf("%.1lf\n",( (a*2.0) + (b*3.0) + (c*5.0) )/10.0); } return 0; }
ALGO
0.996389
3.550575
a82cb018-a852-4e4b-9cc1-3cdcfebc9411
boostorg/graph
example/cuthill_mckee_ordering.cpp
#include <boost/config.hpp> #include <vector> #include <iostream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/cuthill_mckee_ordering.hpp> #include <boost/graph/properties.hpp> #include <boost/graph/bandwidth.hpp> /* Sample Output original bandwidth: 8 Reverse Cuthill-McKee ordering starting a...
ALGO
0.999993
5.910211
ab235e60-5de5-4c2f-b7f5-1123c9d1119b
xChang1021x/BIT
Y1S2/C语言程序设计/Coding/数字金字塔.cpp
#include<stdio.h> int main(){ int n; while(~scanf("%d",&n)){ int k=1; for(int i=0;i<n;i++){ k=1; for(int j=2*n-2-2*i;j>=0;j--){ printf(" "); } for(int j=0;j<2*i+1;j++){ if(j<i) printf("%d",k++); else printf("%d",k--); if(j!=2*i) printf(" "); } printf("\n"); } } }
ALGO
0.999875
3.158933
3baf1d1a-b28d-45e9-a7d3-1cb8c5d0055c
abdelrahman-ahmed-nassar/codeforces
assiut new comers/sheet-7/h.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; #define ll long long void pyramids(int n, int c) { if (c <= 0) { return; } double k = n * 2 - 1; for (int i = 1; i <= k; i++) { if (i <= ceil(k / 2) + (c - 1) && i >= ceil(k / 2) - (c - 1)) { cout << "*"; } else ...
ALGO
0.999987
4.071979
c71b8023-82a1-45a4-b52a-81b82c1da165
HappyTsing/EOSGuard
TestCases/tolls/tolls_driver.cpp
#include<bits/stdc++.h> #include <iostream> #include <cstdio> #include <ctime> #include <string.h> #include <stdio.h> /* printf, scanf, puts, NULL */ #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ using namespace std; int main() { //std::clock_t start; double duration; //start...
TOOL
0.883202
3.456453
eb4caa42-69a6-4be8-af62-170c684e8dc7
victorliking/Dream
Sort/Largest Number.cpp
/* Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. Note: The result may be very large, so you need to return a string instead of an integer. Credits: Special thanks to @ts for adding this problem a...
ALGO
0.999931
6.314854
3dc49317-7826-4827-8021-7bdba06f5ebc
sanketdisale871/DSA
3202-high-access-employees/high-access-employees.cpp
class Solution { public: // Function to find high-access employees based on access times. vector<string> findHighAccessEmployees(vector<vector<string>>& access_times) { // Create a map to store access times for each employee. map<string, vector<int>> when; // Populate the map with acce...
ALGO
0.999596
6.546313
d302a4c3-1a7f-428f-99e8-22b6330140ec
nkirov/nkirov.github.com
2021/CSCB325/lectures/sources/permute.cpp
// permute.cpp #include <iostream> using namespace std; #define MAXN 100 int n = 4; int used[MAXN]; int mp[MAXN]; void print() { for (int j = 0; j < n; j++) cout << mp[j] + 1 << " "; cout << endl; } void permute(int i) { if (i >= n) { print(); return; } for (int j = 0; j < n; j++) { if (use...
ALGO
0.99979
4.460929
1b9d2ecf-7d00-4238-a805-d64bcd648774
27-aditya/LeetSols
0101-symmetric-tree/0101-symmetric-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.999947
6.715381
f3446dac-9b48-412c-99eb-b14841d7b23d
arzuizza/ALPRO-4213
TUGAS2/05 Elemen Terkecil dari sebuah array.cpp
#include <iostream> using namespace std; float findMin(float arr[], int n) { float min = arr[0]; for(int i = 1; i < n; ++i) { if(arr[i] < min) { min = arr[i]; } } return min; } int main() { int n; float arr[100]; cout << "Masukkan jumlah total elemen (1 hingga...
ALGO
0.998282
4.834091
7a826edc-2795-4586-b0b8-a8fb1df86a03
saurav6719/my-codes
c++ dsa /graphs/floyd_warshall_algorithm.cpp
#include <iostream> #include <vector> #include <limits.h> using namespace std; #define INF INT_MAX // A function to print the solution matrix void printSolution(const vector<vector<int>>& dist) { cout << "The following matrix shows the shortest distances" << " between every pair of vertices\n"; for ...
ALGO
0.999991
5.152582
63588d7a-198e-4f7b-bfa4-d7a873c8e0a9
Sushil2002/Problem-Solving
A_Crossmarket.cpp
#include <bits/stdc++.h> #include <iostream> typedef long long ll; using namespace std; // ASCII of 'a'-97,'z'-123,'A'-65,'Z'-90,'0'-48,'9'-57 bool sortby(const pair<ll, ll> &a, const pair<ll, ll> &b) { return a.second < b.second; } ll solve(ll n, ll m) { ll a = min(n, m); ll cnt = 2 * a - 1; ll b = max...
ALGO
0.999978
4.950797
d0d7a4ba-a824-4e57-86c0-9f06154c4120
ishandutta2007/codeforces
fastmath/normal/1042/A.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 107; int a[MAXN]; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; for (int i = 0; i < n; ++i) cin >> a[i]; int mx = -1; for (int i = 0; i < n; ++i) mx = max(mx, a[i]); int sum = 0; ...
ALGO
0.999996
3.794748
e5c0e772-67b2-4271-a323-069f6ae195a6
bhawnajoshi1304/LeetCode-Submissions
1720-crawler-log-folder/1720-crawler-log-folder.cpp
class Solution { public: int minOperations(vector<string>& logs) { vector<string> s; for (const string& log : logs) { if (log == "../") { if (!s.empty()) { s.pop_back(); } } else if (log != "./") { s.push_bac...
ALGO
0.995649
5.65547
09cf036d-432d-4654-ad1f-e19ad0d15295
by-student-2017/lammps-couple
src/USER-MISC/fix_bond_react.cpp
/* ---------------------------------------------------------------------- Contributing Author: Jacob Gissinger (<EMAIL>) ------------------------------------------------------------------------- */ #include <mpi.h> #include <cmath> #include <cstring> #include <cstdlib> #include "fix_bond_react.h" #include "update.h" #...
ALGO
0.982442
6.375925
083b6816-3a77-4e51-90f9-ba3e9d20e791
vaibhavspande/BCT
D2.cpp
#include <bits/stdc++.h> using namespace std; struct Item { int weight; int value; double valuePerWeight; }; bool compareItems(const Item &item1, const Item &item2) { return item1.valuePerWeight > item2.valuePerWeight; } void fractionalKnapsack(int capacity, vector<Item> &items) { sort(items.beg...
ALGO
0.999014
5.801312
20b36daf-7a84-4cdc-ac57-9389525b5186
IamAnkit19/Codes
C++ Programs/Chapter2/ReverseNumber.cpp
// #include<Iostream> // using namespace std; // int main(){ // int n; // cout<<"Enter Number: "; // cin>>n; // int r=0; // while(n!=0){ // int ld=n%10; // r *= 10; // r += ld; // r /= 10; // } // cout<<r; // }
ALGO
0.999265
4.433148
50b00f62-b911-4dbf-8a53-c236351c2c20
nsrksreecharan/coding-practice
Arrays_practice/product_of_array_except_Self.cpp
#include <iostream> using namespace std; int main(){ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } int prefix[n],suffix[n]; prefix[0]=1; suffix[n-1]=1; for(int i=1;i<n;i++){ prefix[i]=prefix[i-1] * arr[i-1]; // product before i } for(int ...
ALGO
0.999992
4.119144
50f40396-fb1b-4878-ad69-1c01d0691df6
M45UDrana/DS-Algo-Problem-Solving
codeforces/1304B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<string, int> psi; #define ff first #define ss second #define pb(a) push_back(a) #define mp(a,b) make_pair(a,b) #define input freopen("input.txt","r",stdin) #define output freopen("output.txt","w",stdout) #def...
ALGO
0.999987
3.363065
185e0dde-2796-4c2b-a17e-17074385d6ac
zoumson/Challenge
Dynamic Programming/Counting Numbers.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxN = 20; bool tight[maxN]; ll dp[10][maxN]; ll solve(ll x){ if(x <= 10) return x; vector<int> D; memset(dp, 0, sizeof(dp)); memset(tight, 0, sizeof(tight)); for(int i = 0; x; i++){ D.push_back(x%10); ...
ALGO
0.999694
4.846033
d29554b0-f11f-4ca6-818a-005e365a4f05
NgTienHungg/PTIT-Source
SPOJ PTIT/DK09.cpp
// https://luyencode.net/problem/DK09 // DK09 - Kiểm tra năm nhuận #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; if (n <= 0 || n >= 1e5) cout << "INVALID"; else { if ((n % 4 == 0 && n % 100 != 0) || n % 400 == 0) cout << "YES"; else...
ALGO
0.99987
5.869349
d17b2693-9441-45f9-bef0-21af645f5d56
ahmedalhelale/assgiemnts
2.cpp
#include <iostream> #include <string> using namespace std; string change_letter(string str) { int char_code; for (int x = 0; x < str.length(); x++) { char_code = int(str[x]); if (char_code == 122) { str[x] = char(97); } else if (char_code == 90) { str[x] = char(65); } else if (char_code >=...
ALGO
0.94323
4.745124
3bbbf5c4-9813-4387-ba64-c74469121ebe
21111019Harry/CPP-Problems
all Problems/kth.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; void kth(int *brr, int length , int target); int main() { int size = 0, no = 0; int *arr = NULL; cout<< "Enter the size:-"; cin>>size; cout<< "Enter the target:-"; cin>>no; arr = new int[size]; for(int i = 0; i < size; ...
ALGO
0.999724
3.990134
c6db5faa-ef49-44e2-84c9-665429d2b1bf
abylikhsanov/model-predictive-control
src/Eigen-3.3/lapack/eigenvalues.cpp
#include "lapack_common.h" #include <Eigen/Eigenvalues> // computes eigen values and vectors of a general N-by-N matrix A EIGEN_LAPACK_FUNC(syev,(char *jobz, char *uplo, int* n, Scalar* a, int *lda, Scalar* w, Scalar* /*work*/, int* lwork, int *info)) { // TODO exploit the work buffer bool query_size = *lwork==-1;...
ALGO
0.990218
4.671507
c8c8a4d4-3ed3-480b-b706-5bff34b9223c
joan12222/algorithme
luogu/luogu-P1449.cpp
#include<bits/stdc++.h> using namespace std; string s; int num,x,y; stack<int> st; int main(){ cin>>s; for(int i=0;i<s.size()-1;i++){ if(s[i]!='+'&&s[i]!='-'&&s[i]!='*'&&s[i]!='/'&&s[i]!='.') num=num*10+s[i]-'0'; else if(s[i]=='.'){ st.push(num); num=0; }else{ x=st.top(); st.pop(); y=st.top(); ...
ALGO
0.999962
3.806004
460429fb-3ee9-4b9b-94fa-f8b100a09f16
Zu-rin/AtCoder
AtCoder_Beginner_Contest/ABC170/ABC170C.cpp
#include <iostream> #include <vector> #include <string> #include <list> #include <queue> #include <map> #include <algorithm> #define rep(i, n) for(i = 0; i < (n); i++) #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) #define MOD 1000000007 #define PI 3.14159265358979323846 #define INF 1 << 30 using ...
ALGO
0.999961
3.906609
eed76332-370e-4446-992e-de9f8174d488
JQCRAK/Trabajos-Estructura-de-Datos
TDA/Cola003.cpp
/*Cola03.cpp Programa que inserta y visualiza elementos de un dos TDA cola y los compara */ using namespace std; #include <iostream> #include "Cola.h" #define FIN 999999 int main(){ system("color f0"); Cola a,b; //instanciar el objeto del TDA void leerCola(Cola *c); //prototipo de funcion ingreso del TDA ...
ALGO
0.994947
4.843121
be9066d5-a287-4ea6-8b54-e279b60fd391
AnnTaiwan/ocean-sound-project-ubuntu
plot_mel_spec/on_ubuntu/cal_mel_spec_ver4_for_ocean.cpp
#include <iostream> #include <vector> #include <deque> #include <cmath> #include <fstream> // For file operations #include <gst/gst.h> #include <gst/app/gstappsink.h> #include <gst/audio/audio.h> #include <gst/fft/gstfftf32.h> #include <algorithm> #include <stdexcept> #include <numeric> #include <limits> #define SAM...
ALGO
0.967456
6.291836
529094ab-add7-4ff0-891c-7e26eaa38ea2
Sonjuan/algo-practice
greedy/1026-보물/1026.cpp
#include <iostream> #include <algorithm> using namespace std; int N; int arrA[52]; int arrB[52]; int main(void) { cin >> N; for(int i = 0; i < N; ++i) { cin >> arrA[i]; } for(int i = 0; i < N; ++i) { cin >> arrB[i]; } sort(arrA, arrA+N); sort(arrB, arrB+N, std::greater<in...
ALGO
0.999962
3.408516
21e9d58a-ecf4-4642-a8ce-74463046876a
Janhavibabber/DSA
Youtube lectures/Cllg wallah/3. Sorting/5_quickSort.cpp
#include<iostream> using namespace std; int partition(int arr[], int l, int r){ int pivot = arr[r]; int i=l; for (int j = l; j < r; j++) { if(arr[j]<pivot){ swap(arr[i], arr[j]); i++; } } swap(arr[i], arr[r]); return i; } void quickSort(int arr[], in...
ALGO
0.999971
5.277903
6f58d09b-bc99-454f-ab4c-46ffcb67577a
thisisnitish/cp-dsa
LinkedList/reorderlist.cpp
/* Leetcode Question 143. Reorder List https://leetcode.com/problems/reorder-list/ */ /** * 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 *nex...
ALGO
0.999912
6.269014
f0fd4376-ecb9-482b-a0a5-c0448d5eb255
quyinsong/aha-algorithm
kuaisupaixu.cpp
// ,Сõݹ˼ #include <iostream> int a[10]={1,10,2,3,100,3,44,33,24,18};//ȫ void quicksort(int left, int right);// int main() { using namespace std; for(int i=0;i<=9;i++) { cout<<a[i]<<" "; //δ } cout<<endl; quicksort(0,9); for(int i=0;i<=9;i++) { cout<<a[i]<<" "; // } cout<<endl; return 0; } // vo...
ALGO
0.999648
3.738215
64125df3-d77b-4abc-9ccf-125e0cba08d9
ishandutta2007/codeforces
vercingetorix/normal/1662/F.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <queue> #include <cstring> #include <set> #include <bitset> #include <map> #include <chrono> #include <random> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef long do...
ALGO
0.999496
4.123319
495ef6d8-7e16-47da-9618-78445c40273e
xyb7910/cpp_fire
hetaoOJ/CSP-J/模拟/NOIP2015普及组_金币.cpp
/* * @Author: Yanpb * @Date: 2025-04-22 23:02:11 * @Last Modified by: Yanpb * @Last Modified time: 2025-04-22 23:08:27 */ #include <iostream> using namespace std; int k, sum; int main() { cin >> k; for (int i = 1, days = 1; days <= k; i ++) { for (int j = 1; j <= i && days <= k; j ++, days ++) { sum += i;...
ALGO
0.999574
3.614854
e0191b5f-0cce-4a26-8b27-e4983ae6369d
Finderbots/finderbot
src/global_map_builder.cpp
#include <finderbot/global_map_builder.h> namespace global_mapping { const double default_p_occupied_laser = 0.9; const double default_p_occupied_no_laser = 0.3; const double default_max_log_odds = 100; const double default_belief_threshold = 20; GlobalMapBuilder::GlobalMapBuilder(int global_width...
TOOL
0.883224
5.782514
31111a37-a76c-4e52-9d15-07cfd56bff70
RealityVirtually2019/ComposAR
CNNServer/Fusion/3rdparty/libigl/include/igl/cotmatrix.cpp
// For error printing #include <cstdio> #include "cotmatrix_entries.h" // Bug in unsupported/Eigen/SparseExtra needs iostream first #include <iostream> template <typename DerivedV, typename DerivedF, typename Scalar> IGL_INLINE void igl::cotmatrix( const Eigen::PlainObjectBase<DerivedV> & V, const Eigen::PlainOb...
ALGO
0.99746
5.640656
1cb13523-f851-4653-aac4-15a0c712349f
JacobCWard/jacobward
week11/ratio05.cpp
// A Ratio class 3 #include <iostream> #include "ratio.h" using namespace std; int main() { Ratio x(22,7); cout << "x = "; x.print(); cout << " = " << x.convert() << endl; x.invert(); cout << "1/x = "; x.print(); cout << endl; int g = gcd(1111, 2222); cout << g << endl; x.setNu...
TOOL
0.958657
5.1181
60b6c2bd-96f4-446b-aa57-599eba47748f
amanSin1/DS-algo-s
array/raghavs arrayQ1/sex.cpp
#include<iostream> #include<limits.h> using namespace std; int main(){ // second largest number batao /* int arr[7] = {-10,-4, -200, -88, -19, -5, -12}; int max = INT_MIN; int smax = INT_MIN; for(int i=0; i<=6; i++){ if(max<arr[i]){ max = arr[i]; } } // cout<<max...
ALGO
0.999181
3.295552
dbe345ae-709d-4f95-83b2-0e8816eb9846
blip9/Codeforces
fenwick.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define all(x) (x).begin(), (x).end() #define F first #define S second #define fast_io \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); const int MOD = 1e9...
ALGO
0.999839
5.224226
84949f64-15cd-4e35-8a82-3913becebae0
nccaiteam/histopathology_annotation_nia
libs/boost_1_67_0/libs/graph/example/actor_clustering.cpp
// Authors: Douglas Gregor // Andrew Lumsdaine // This program performs betweenness centrality (BC) clustering on the // actor collaboration graph available at // http://www.nd.edu/~networks/resources/actor/actor.dat.gz and outputs the // result of clustering in Pajek format. // // This program mimics the B...
ALGO
0.998683
7.525654
48eae12f-aa7e-4137-a2d9-4939b0c83c68
denise030261/BaekjoonProblem
프로그래머스/1/172928. 공원 산책/공원 산책.cpp
#include <string> #include <vector> using namespace std; vector<int> solution(vector<string> park, vector<string> routes) { vector<int> answer; int row = park[0].length(); int col = park.size(); vector<int> curLoc; for(int i=0;i<col;i++) { for(int j=0;j<row;j++) { ...
ALGO
0.999897
4.056345
e08c5b74-80d3-470c-9212-45afa435135d
ahao214/Algorithm
Ahao.LeetCodeCPP/1959. K 次调整数组大小浪费的最小总空间.cpp
#include<vector> using namespace std; /* 1959. K εС˷ѵСܿռ һ̬顣һ± 0 ʼ nums nums[i] i ʱеԪĿ⣬㻹һ k ʾ С ÿζԵ С t ʱĴС sizet ڵ nums[t] ΪҪ㹻ĿռԪءt ʱ ˷ѵĿռ Ϊ sizet - nums[t] ˷ѿռΪ 0 <= t < nums.length ÿһʱ t ˷ѵĿռ ֮ ڵС k εǰ£㷵 С˷ѿռ ע⣺ʼʱΪ С СIJ */ class Solution { public: int minSpaceWastedKResizing(vector<int>& nums, int ...
ALGO
0.99995
5.10126
b67fa37e-4a80-4668-9b88-e933b66b0a97
clhexdumpyard/device_xiaomi_vayu-1
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
eba29896-b2e1-4a32-a6e0-9b65273b1d32
atbaird/ProceduralSystemsForNonCombatRPG
Thesis/RPGWithNoCombat/Code/Game/Collision/LineCollision.cpp
#include "Game/Collision/LineCollision.hpp" #include <cmath> //Constructors LineCollision::LineCollision(Vector2 startPt, Vector2 endPt) : Collision(LINE_COLLISION), m_DistDir(endPt) { m_position = startPt; m_DistDir -= startPt; } void LineCollision::SetEndPoint(Vector2 endPt) { m_DistDir = endPt - m_position; }...
ALGO
0.926184
5.319052
250da16a-ce24-40bb-bfeb-9099dfc3f6f0
Somprakash04/LeetCode
18-4sum/4sum.cpp
class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { int n=nums.size(); vector<vector<int>>ans; sort(nums.begin(), nums.end()); for(int i=0; i<n-3; i++){ if(i>0 && nums[i]==nums[i-1]) continue; for(int j=i+1; j<n-2; j++){ ...
ALGO
0.999977
5.990662
9e74d688-d76e-4019-90fb-67d25aa6f4cc
mrshiposha/EditedUE4
Engine/Source/ThirdParty/openexr/OpenEXR-1.7.1/ilmbase-1.0.3/ImathTest/testJacobiEigenSolver.cpp
#include "ImathMatrix.h" #include "ImathMatrixAlgo.h" #include <iostream> #include <math.h> #include <cmath> #include <ctime> #include <cassert> #include <limits> #include <algorithm> using namespace std; using namespace Imath; const Matrix33<double> A33_1 ( 1, 0, 0, 0, 1, 0, 0, 0, 1 ); const Matrix33<double> A33_2 (...
TEST
0.997232
6.508254
db9a8d0a-66f0-4fe6-a59b-e91a862b6814
khbminus/code2020
itmo/20210301/src/d.cpp
#include <bits/stdc++.h> #include <ostream> using namespace std; using ll = long long; #define SZ(x) (int)((x).size()) #define ALL(x) (x).begin(), (x).end() #define RALL(x) (x).rbegin(), (x).rend() #define TMAX(type) numeric_limits<type>::max() #define TMIN(type) numeric_limits<type>::min() #ifdef LOCAL #define ass(...
ALGO
0.999758
3.389007
7cced9a2-6ab9-42c3-8d29-7363ff973c34
shriramkv/SYCLwithIDC
Publications/GPU-Opt-Guide/jitting/stream-triad-modified-constant.cpp
#ifndef NTIMES #define NTIMES 10 #endif class regular_constant_kernel; constexpr int num_runs = NTIMES; constexpr size_t scalar = 3; cl_ulong triad(size_t array_size, size_t inner_loop_size) { cl_ulong min_time_ns0 = DBL_MAX; sycl::queue q = sycl::queue(sycl::property::queue::enable_profiling{}); std::cout <<...
ALGO
0.991155
5.669595
4fea36e1-f1ac-4292-91d9-e6d401bd617d
sethdivyansh/cp
yarik_and_array2.cpp
// // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ // / _ _ _ | | _ _ _ _| |_ _ _ _ _| | | | | // | | _ _ _ | | _ _ _ | | | |_ _| | // \ _ _ _ \ | _ _ _| | | | _ _ | // _ _ _ _| | | | _ _ __ | | | | | | // |_ _ _ _ / |_ _ _ _ _| |_| |_| |_| // #in...
ALGO
0.999889
4.625732
7ce7ca47-32a6-46f1-9b22-baaa70a2c479
itsvanshika/Leetcode
1915-number-of-wonderful-substrings/1915-number-of-wonderful-substrings.cpp
typedef long long ll; class Solution { public: long long wonderfulSubstrings(string word) { unordered_map<ll,ll>mp; ll result=0; int cum_xor=0; mp[0]=1; for(char &ch:word){ int shift = ch-'a'; cum_xor^=(1<<shift); result+=mp[cum_xor]; ...
ALGO
0.999975
4.951343
2e363596-c76f-4f57-836b-5f7f3b596b59
taiskey/c-
konovalovaKR/Source.cpp
#include <iostream> #include <cstdlib> #include <ctime> // void fillArray(int** array, int rows, int cols) { srand(time(0)); for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { array[i][j] = rand() % 70 + 1; // 1 70 } } } // void printArray(int**...
ALGO
0.996614
5.044835
416bc62f-87ce-4a1e-a92e-ba77f156d3af
jsbrittain/KuramotoUKF
src/MetropolisChain.cpp
#include "MetropolisChain.hpp" MetropolisChain::MetropolisChain( MetropolisChainParams mcmcparams ) : state0(mcmcparams.state0), statedim(mcmcparams.statedim), covarProposal(mcmcparams.covarProposal), tuneProposal(mcmcparams.tuneProposal), tuningiters(mcmcparams.tuningiters), prior(mcmcpa...
ALGO
0.998337
6.077775
7e5f44e7-dad8-4c0f-a934-49ba2d98d813
Nitishr5/DSA
Programize-solution/ex2.cpp
// Program to Find Largest Number Among Three Numbers #include<iostream> using namespace std; int main(){ int num1,num2,num3; cout<<"Enter Three NUmber"; cin>>num1>>num2>>num3; if(num1>num2 && num1>num3){ cout<<"Num1 is Largest number"; } else if(num2>num1 && num2>num3){ cout<<"Num2 is largest number"; } ...
ALGO
0.999894
3.830091
e2c9ec06-df72-4d7b-b460-12942814f442
xinyuang/9_chapter_cpp_algorithm
FLAG/Microsoft/1579. Alphabetic string calculation.cpp
//1579. Alphabetic string calculation //1. use unordered_map store freq, set store freq times, queue store duplicate times //2. while loop till find the empty times, count += (cur - times[next]) then times[next]++ class Solution { public: /** * @param aString: letter string * @return: the Minimum times */ int ...
ALGO
0.999752
5.331614
836dccfe-b6e8-44c3-bc7d-832885bf50c3
mohammadshayegh/algorithmDesign-buildingBridges
city.cpp
#include "city.h" city::city(int size, QWidget *mainWindow, const Ui_MainWindow *ui) : m_size(size),m_ui(ui),m_mainWindow(mainWindow) { m_map = dynamicArray_2D(m_size+1,m_size+2); m_path = new int [m_size+1]{0}; initializer(); m_maxBridge = maxBridgeNumber(); m_ui->label_3->setText(QString::num...
ALGO
0.97273
4.428972
ed373811-6d80-40be-81eb-bb25786a55c6
Dot4diw/MachineLearningWithCpp
Perceptron/eigen-3.4.0/test/denseLM.cpp
#include <iostream> #include <fstream> #include <iomanip> #include "main.h" #include <Eigen/LevenbergMarquardt> using namespace std; using namespace Eigen; template<typename Scalar> struct DenseLM : DenseFunctor<Scalar> { typedef DenseFunctor<Scalar> Base; typedef typename Base::JacobianType JacobianType; typed...
TEST
0.979581
5.868442
0e0fa190-191d-49c4-b738-18198996c201
markverick/ioi-training
skgrader/istree.cpp
#include<bits/stdc++.h> using namespace std; vector<int> adj[1200000]; int chk[1200000]; set<int> st; set<int> ::iterator it; queue<int> q; int main() { int n; int i,j,k; scanf("%d",&n); for(i=0;i<n-1;i++) { int a,b; scanf("%d %d",&a,&b); adj[a].push_back(b); st.inse...
ALGO
0.999975
3.991043
b555368b-fa6f-4266-9f5f-078238b23db3
Locheir/DSA_IN_CPP
10_Sorting_Algorithms/count_sort.cpp
#include <iostream> using namespace std; void printArr(int arr[], int n) { for (int i=0; i<n; i++) { cout << arr[i] << " "; } cout << endl; } void countingSort(int arr[], int n) { int freq_arr[100000] = {0}; int minVal = INT8_MAX, maxVal = INT8_MIN; for(int i=0; i<n; i++) { fr...
ALGO
0.999954
5.837063
330a22d1-a715-46c6-ac57-86fdb8767061
sandeshkhadase/Leetcode-Solutions
Leetcode Solutions/solution/2300-2399/2385.Amount of Time for Binary Tree to Be Infected/Solution.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.99993
6.047144
abd82bd4-0412-4979-a01d-55e8cd212ce7
FayesSabry/News_App
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
d0785e8a-83d4-4d9a-9317-65a98315fd22
abhishek-217/DSA_Questions
2493-reverse-odd-levels-of-binary-tree/2493-reverse-odd-levels-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.999977
6.274014
2a5f78cc-c5a3-43c7-9c44-cfd391ae695f
chuminjae/cpp
delete.cpp
# include <iostream> int main(){ int *a = new int; *a = 10; std::cout << *a << std::endl; delete a; int arr_size; std::cin >> arr_size; int *arr = new int[arr_size]; for(int i = 0; i < arr_size; i = i + 1){ std::cin >> arr[i]; } for(int i = 0; i < arr_size; i = i + 1){ ...
TOOL
0.955749
3.448599
c451c41e-3c89-4e25-a32a-ef845af40db4
Im4lish/PAT
Advanced level/1102.Invert a Binary Tree.cpp
#include<iostream> #include<vector> #include<cstdio> #include<algorithm> #include<queue> using namespace std; vector<int> in; vector<int> level; struct Node { int left; int right; }; Node node[10]; bool exist[10]; void levelorder(int root) { queue<int> q; q.push(root); while(!q.empty()) { int now = q.front()...
ALGO
0.999988
3.307069
73a00abb-0709-4f75-a251-43a84ecdc5f8
AdvaitAxiom/CPP-DSA
BasicMath/EvenlyDevide.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; //it counts how many digits of a number N divide N evenly (ignoring zero digits). // } Driver Code Ends class Solution{ public: int evenlyDivides(int N){ //code here int digit=0; int number = N; int counter = 0; ...
ALGO
0.999782
6.297146
316bea2c-0357-4755-9b35-62603049cfa5
sukantadutta123/C-codes-with-DSA
FtoC.cpp
#include<iostream> using namespace std; int main(){ int n; float temperature; float f; cout<<"Enter no of temperatures you want to convert"<<endl; cin>>n; for(int i=1;i<n;i++){ cout<<"your temperature in farenheit"<<endl; cin>>f; temperature = ((f-32)*5)/9; ...
TOOL
0.998421
3.516669
fd83b65d-d4fd-400e-80c3-9f72fceb3574
crystal9210/AtCoder
tessoku/a40.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, m, x) for (int i = m; i < (x); i++) #define rep_ll(i, m, x) for (ll i = m; i < (x); i++) typedef long long ll; typedef long double lb; // 3つのことなる入力値をvector aから選んで正三角形が作れるかどうかを判定 int main() { int n; ll cnt = 0; cin >> n; vector<int> a(101); rep(i, 0...
ALGO
0.999954
4.027553
71fa8524-6eca-4d01-af84-0c3f2bcf53ce
horbyn/Roadmap
OJ/PAT/PAT A/A1123.cpp
#include <iostream> #include <queue> #include <vector> #include <algorithm> using namespace std; typedef struct node_t { int data, height, idx; struct node_t* left, * right; }node_t; const int maxn = 20; int n, idx; node_t node[maxn]; vector<int > level; /* AVL 三件套一: 获取高度 */ int get_height(node_t* t) { if (t == N...
ALGO
0.999995
4.124456
eab16ac5-ac0c-4e23-9974-68931fd7a0b3
Squirrelcoding/usaco-problems
codeforces/104417g/main.cpp
#include<iostream> #include<vector> #include<map> #include<set> #include<algorithm> using namespace std; #define all(x) begin(x), end(x) int nxt() { int n; cin >> n; return n; } int main() { // freopen("input", "r", stdin); int t = nxt(); for (int _i = 0; _i < t; ++_i) { int n = nxt(); vector<int> nu...
ALGO
0.99933
4.330249
e0ac3bb3-1a76-4afe-abcc-37e7205ef7c4
raincross7/code-similarity
codes/train_code/problem034/problem034_322.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vll = vector<long long>; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; constexpr long long mod = 1000000007; template <typename T> T _gcd(T a, T b) { return b ? _gcd(b, a % b) : a; } template <typename T> ...
ALGO
0.999969
5.307702
94b6afed-03aa-4888-80ae-30233aafc564
samyak1512/coding
C++ Code/permutation_swap.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define int long long signed main() { int t; cin >> t; while (t--) { int n; cin >> n; int arr[n]; for (int i = 0; i < n; ++i) { cin >> arr[i]; arr[i] = abs(arr[i] - (i + 1...
ALGO
0.999981
4.805894
418fb1fb-88b2-4544-8d72-a738dd6a1674
ColorfulsKite/THCS2
C03011_SoStrongTrongDoan.cpp
#include<stdio.h> #include<math.h> #include<string.h> long long giai_thua(long long n){ long long i, kq = 1; for(i = 1; i <= n; i++){ kq *= i; } return kq; } int so_strong(long long n){ long long temp = n, sum = 0; while(n != 0){ sum += giai_thua(n%10); n /= 10; } if(sum == temp) return 1; else return ...
ALGO
0.999871
3.873068
f5bf22dd-86a7-42df-849e-798f63164855
Modding-Zaibatsu/ue4-tekkengame
Engine/Source/ThirdParty/hlslcc/hlslcc/src/hlslcc_lib/opt_dead_code.cpp
/** * \file opt_dead_code.cpp * * Eliminates dead assignments and variable declarations from the code. */ #include "ShaderCompilerCommon.h" #include "ir.h" #include "ir_visitor.h" #include "ir_variable_refcount.h" #include "glsl_types.h" static bool debug = false; /** * Do a dead code pass over instructions and ever...
ALGO
0.897055
7.909886
fe466e68-048a-45bb-a517-7a5d70dea1a5
sempuki/code
exercises/codeeval/easy/rightmost-char.cpp
#include <iostream> #include <fstream> #include <sstream> int main (int argc, char **argv) { if (argc != 2) { std::cout << "input must be a valid filename" << std::endl; return -1; } std::ifstream file (argv[1]); if (!file) { std::cout << "input must be a file" << std:...
TOOL
0.927937
4.486263
2f67231e-6732-4379-9df3-7d00928580e7
BBBBchan/C_CPP_ACM
算法设计与程序分析/分治算法3.cpp
/* 输入包含n个整数是数组A和整数x,求出满足A[i] + A[j] = x的i和j,如果没有这样的元素和,则返回-1和-1. */ #include <cstdio> #include <algorithm> using namespace std; struct node { int num; int index; }a[1000]; bool cmp(node a, node b){ return a.num < b.num; } int main(int argc, char const *argv[]){ int n, x; scanf("%d %d", &n, &x); for(int i = 0; i <...
ALGO
0.999962
4.519986
280c0fd8-4fee-4e27-8e54-766fde05b7a9
omarmorle/codeforces
1195B.cpp
#include <bits/stdc++.h> using namespace std; int main (void) { int n, k; cin >> n >> k; long long a = floor(sqrt(k * 2)); long long b = a * (a + 1) / 2; while (b - n + a != k) { a++; b = a * (a + 1) / 2; } cout << n - a << endl; }
ALGO
0.999967
4.073709
5945365b-f00e-4f87-8435-0f068610451a
shelltdf/osgall
prebuild/boost_1_71_0/libs/metaparse/example/compile_to_native_code/main.cpp
#include <boost/metaparse/repeated.hpp> #include <boost/metaparse/sequence.hpp> #include <boost/metaparse/lit_c.hpp> #include <boost/metaparse/last_of.hpp> #include <boost/metaparse/space.hpp> #include <boost/metaparse/int_.hpp> #include <boost/metaparse/foldl_reject_incomplete_start_with_parser.hpp> #include <boost/me...
ALGO
0.946294
6.728292
37e5b2d6-95cb-4b02-9cd5-ca8f39846727
mayanjain/Codeforces
Round #839/A_A_B.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long #define ld long double #define ull unsigned long long #define mod 1000000007 #define mod1 998244353 #define ordered_set tree<ll, null_type,less<ll>...
ALGO
0.999658
5.447042
25a6a9e4-a3da-4ac7-b614-53a341d3b64d
NafiHasan/HabiJabi
C++/Practice/All Junior Training sheet solutions/A/uva10452.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) bool valid(int ro, int col, int n){ if(ro < 0 || col < 0 || col >= n)return 0; return 1; } int main() { fast_io(); int tc; cin >> tc; while(tc--){ int m, n; cin >> m >> n...
ALGO
0.99997
3.289391
14c3d005-2255-4e6f-86af-7a62e1936151
Art3m1sHun/DSA
Binarysearch-linearsearch/linearsearch5.cpp
#include <iostream> #include <climits> using namespace std; #define maxn 100000 void nhap(int arr[], int n) { for (int i = 0; i < n; i++) { cin >> arr[i]; } } void trongso(int arr[], int n) { if (n < 2) { cout << 0 << endl; return; } int max1 = arr[0]; int min1 = arr...
ALGO
0.999264
4.588601
b9f9063c-181b-484c-82ad-1d83f8c9feb3
devanshdalal/CompetitiveProgrammingAlgos
devanshdalal/codeforces/454-C/454-C-7316179.cpp
#include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> #include<cmath> #include<cstdlib> #include<queue> #include<map> #define DD ios_base::sync_with_stdio(false) #define maxx 10000001 #define PI 3.14159265358979323846264338327950288419716939937510 #define eps 0.0000001 typedef long long ll; typede...
ALGO
0.999863
3.285993
00eda13d-4b43-4bc0-83af-dac45894ddff
1804054Miraz/Codeforces-solutions
Cow and Haybales.cpp
#include<iostream> #include<cstdio> using namespace std; int main(){ int t,d,n,daybale=0; scanf("%d",&t); for(int i=0;i<t;i++){ scanf("%d%d",&n,&d); int ar[n]; for(int j=0;j<n;j++){ scanf("%d",&ar[j]); } daybale=ar[0]; //cout<<daybale<<endl; for(int j=1;j<n;){ if(ar[j]>0){ int p = j; ...
ALGO
0.999796
3.132879
450dfb4e-1dbe-4d43-b2cf-b57714bb914a
tin10401/CodeForces
CodeForces/E_Linear+Kingdom_Races.cpp
//████████╗██╗███╗░░██╗██╗░░░░░███████╗ //╚══██╔══╝██║████╗░██║██║░░░░░██╔════╝ //░░░██║░░░██║██╔██╗██║██║░░░░░█████╗░░ //░░░██║░░░██║██║╚████║██║░░░░░██╔══╝░░ //░░░██║░░░██║██║░╚███║███████╗███████╗ //░░░╚═╝░░░╚═╝╚═╝░░╚══╝╚══════╝╚══════╝ // __________________ // | ________________ | // || ____ || // ||...
ALGO
0.99994
4.887017
fdac49ed-e3fb-41c0-81f0-131cd47b5c58
dendisuhubdy/blaze
blazemark/src/main/TMat6TMat6Add.cpp
//================================================================================================= //================================================================================================= //************************************************************************************************* // Includes //****...
ALGO
0.940711
6.677329
2fac0419-f058-4b16-ac25-4beff41f74f4
protez/tesseract-ocr
textord/devanagari_processing.cpp
#include "devanagari_processing.h" #include "allheaders.h" #include "tordmain.h" #include "img.h" #include "statistc.h" // Flags controlling the debugging information for shiro-rekha splitting // strategies. INT_VAR(devanagari_split_debuglevel, 0, "Debug level for split shiro-rekha process."); BOOL_VAR(devana...
TOOL
0.98437
4.529312
4ead2fe9-ddfe-4c44-8252-f28c189830fc
Spetsnaz-Dev/CPP
Array/min_swaps_to_sort_array.cpp
// https://www.geeksforgeeks.org/minimum-number-swaps-required-sort-array/?ref=rp #include "bits/stdc++.h" using namespace std; int minSwaps(int arr[], int n){ int res = 0, i; pair<int, int> p[n]; for(i=0; i<n; i++) p[i] = make_pair(arr[i], i); sort(p, p+n); i=0; w...
ALGO
0.999892
5.09405
25ecc86a-3012-438b-831f-c35cbc10ab8e
MirrasHue/URI-Solutions
URI_3089.cpp
#include <iostream> #include <vector> int main() { int n{}, price{}, mostCostly{}, cheapest{}; std::vector<int> giftPrice; // Already given in descending order std::vector<int> pairPrice; while(std::cin>>n && n) { giftPrice.reserve(2*n); pairPrice.reserve(n); ...
ALGO
0.999929
4.209532
2185e70f-3c92-4155-b280-8ed36581dfbf
AmineAroua/Competitive-programming-solutions
CodeForces/GNU C++17/546C | Soldier and Cards/172291432.cpp
#include <bits/stdc++.h> using namespace std; #define vi vector<int> #define vl vector<long long> #define vii vector<pair<int,int>> #define vll vector<pair<long long,long long>> #define pb push_back #define ll long long #define ld long double #define nl '\n' #define boost ios::sync_with_stdio(false) #define mp make_pai...
ALGO
0.999885
3.528682
3ccb8669-3e00-46f4-bb69-1681532fc647
MK2112/CarND-Highway_Path_Planner
src/Eigen-3.3/bench/quat_slerp.cpp
#include <iostream> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; template<typename Q> EIGEN_DONT_INLINE Q nlerp(const Q& a, const Q& b, typename Q::Scalar t) { return Q((a.coeffs() * (1.0-t) + b.coeffs() * t).normalized()); } template<typename Q> EIGEN_DONT_INL...
ALGO
0.993077
6.251058