uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
a3a44978-7e01-4961-891e-0c7ad7f34a57
Zaborovnet/Dip
Client/map/proj-9.2.0/src/projections/putp5.cpp
#define PJ_LIB_ #include <errno.h> #include <math.h> #include "proj.h" #include "proj_internal.h" namespace { // anonymous namespace struct pj_opaque { double A, B; }; } // anonymous namespace PROJ_HEAD(putp5, "Putnins P5") "\n\tPCyl, Sph"; PROJ_HEAD(putp5p, "Putnins P5'") "\n\tPCyl, Sph"; #define C 1.01346 #d...
TOOL
0.966754
6.051681
4bbb14b1-aec9-4a19-a2f5-8de1cedaeeb6
tdubourg/filezilla-encrypted
cryptopp/safer.cpp
// safer.cpp - modified by by Wei Dai from Richard De Moliner's safer.c #include "pch.h" #include "safer.h" #include "misc.h" #include "argnames.h" NAMESPACE_BEGIN(CryptoPP) const byte SAFER::Base::exp_tab[256] = {1, 45, 226, 147, 190, 69, 21, 174, 120, 3, 135, 164, 184, 56, 207, 63, 8, 103, 9, 148, 235, 38, 168,...
ALGO
0.997318
6.930218
0af54e86-3c6e-496a-818b-c5ae7f844a63
yash3001/Competitve-Programming
Codechef/3) Febraury Long Challenge 2021/baba.cpp
/* @author -> gamma30 */ #include <algorithm> #include <bits/stdc++.h> #define pb push_back #define eb emplace_back #define x first #define y second #define endl "\n" #define EPS 1e-9 #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forf(t,i,n) for(t i=0;i<n;i++) #define forr(t,i,...
ALGO
0.999954
5.143925
26589a0b-c0a7-4bd7-9641-0e1c39811fa8
ryanzhang15/RJ_HKOI
S101.cpp
#include <cstdio> #define ef else if typedef int _; typedef const long long constant; constant maxn = 3E3+8; constant maxc = 6E4+8; _ n, m, d[maxn], p[maxn], a[maxc], b[maxc], s, x, y, t; char c; inline _ read(); int main() { n = read(); m = read(); for(_ i = 1; i <= n; ++i) { d[i] = read()...
ALGO
0.999804
3.637549
3f560027-3e37-4dd9-a75b-b309727650cb
SMiles02/CompetitiveProgramming
Codeforces/CF 1600 - 1699/CF1616/CF1616D.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n, x, b = 0; cin >> n; int a[n + 1]; for (int i = 1; i <= n; ++i) cin >> a[i]; cin >> x; vector<int> dp(n + 1); // dp[i] = maximum answer for a[1 ... i] in which i is selected for (int i = 1; i <= n; ++i) { ...
ALGO
0.999912
4.423058
923a34b7-799a-42ff-b937-0384157bc997
krnlx/ccminer-xevan
ccminer.cpp
#include "cpuminer-config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <inttypes.h> #include <unistd.h> #include <math.h> #include <sys/time.h> #include <time.h> #include <signal.h> #include <curl/curl.h> #include <openssl/sha.h> #ifdef WIN32 #include <windows.h> #inclu...
CONFIG
0.919157
5.383832
2cd1aa20-c696-472f-b053-aea3fafc5a4c
manthan0x23/Data-Structures-and-Algorithms
graphs/prev/shortest-paths/shortest_path_from_src.cpp
#include <bits/stdc++.h> #include <climits> #include <queue> #include <vector> using namespace std; class Solution { public: vector<int> shortestPath(vector<vector<int>> &edges, int N, int M, int src) { vector<int> nodes(N, INT_MAX); vector<vector<int>> adj(N); for (auto it : edges) { if (it[0] >...
ALGO
0.999987
5.799496
5733c6b7-1d17-49fa-84dd-12a2f0d3d4d8
Rahul-Malakar/problem-solving
B_Chat_Online.cpp
// Rahul Malakar 2112022 #include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(false); int a, b, l, r; cin >> a >> b >> l >> r; vector<int> vz, vx; for (int i = 0; i < a; i++) { int x1, x2; cin >> x1 >> x2; vz.empla...
ALGO
0.999835
3.616077
c7967a8f-2f89-4558-b0b8-967425d2536b
tecwds/Algorithm2024
AlgContest1582/Y/PYv1.cpp
// // Created by wpan on 12/5/24. // #include <cstring> #include <iostream> using namespace std; int n; int x; int cnt; int w[200]; int dp[45005]; int main() { ios::sync_with_stdio(false); cout.tie(nullptr); cin.tie(nullptr); while (cin >> n) { cnt = 0; memset(dp, 0, sizeof dp); ...
ALGO
0.999449
4.408555
564770ee-02b2-49e8-87dd-593a5c41aaf6
Ashutosh-1012/LeetCode
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid/1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid.cpp
class Solution { public: bool isValid(int i,int j,int n,int m){ return i>=0 && i<n && j>=0 && j<m; } int minCost(vector<vector<int>>& grid) { vector<pair<int,int>>mov={{-1,0},{0,1},{0,-1},{1,0}}; int ans=1e9; priority_queue<pair<int,pair<int,int>>,vector<pair<int,pair<in...
ALGO
0.999895
5.709547
2598a674-aa62-47d4-91e6-946a2c721a4c
salamandraSalamandra/git-diplom
Rectangle.cpp
#include "stdafx.h" #include "Rectangle.h" #include <iostream> #include <algorithm> #include <math.h> #ifndef PI #define PI 3.14159265 #endif typedef std::pair<double, double> MyPair; double Rectangle::angle(0); double Rectangle::deltaStep(0); int Rectangle::count(0); MyPair Rectangle::norma = std::make_pair(10.0, ...
ALGO
0.998569
3.590093
49e72dd4-cf72-4532-be9c-8275a6da01b7
Nur-Alam-Limon/Competitive-Programming
Ruet_HobekiHobena/Collaboration 5/Triangle.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll t; cin>>t; while(t--) { ll n,c1,l,r,d,b,c,x=0; double ans1=0,s=0,ans=0; cin>>n>>c1; vector<ll>a; for(ll i=0;i<n;i++) { cin>>x; a.push_back(x); ...
ALGO
0.999599
3.371161
dd57f755-04a5-4d6d-9591-6874da7e0d97
SinghRajan41/code
MYJAVA/randomcodes/quickSort.cpp
#include <iostream> using namespace std; void printArray(int arr[], int n); int partition(int arr[], int low, int high, int pivot) { int i = low; int j = high; while (i < j) { while (arr[i] <= pivot && i <= high) { i++; } while (arr[j] > pivot) { j--; } ...
ALGO
0.999971
5.311245
86fd4a26-f982-4fb7-94d7-1f48280229de
xutter/MRS
mrs/deps/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Eigen::MatrixXf m(2,4); Eigen::VectorXf v(2); m << 1, 23, 6, 9, 3, 11, 7, 2; v << 2, 3; MatrixXf::Index index; // find nearest neighbour (m.colwise() - v).colwise().squaredNorm()...
ALGO
0.999973
4.138078
c28b36b6-26ff-4df2-8bc1-0fd8aef36455
franfill1/cses.fi-solutions
src/Additional Problems/1677-Network Breakdown.cpp
/* Task: 1677 Network Breakdown Sender: franfill Submission time: 2022-12-04 17:48:08 Language: C++17 Result: ACCEPTED */ #include<bits/stdc++.h> using namespace std; struct dsu { vector < int > p, s; dsu(int n) : p(n) , s(n, 1) { iota(p.begin(), p.end(), 0); } int...
ALGO
0.999966
4.041251
6eeae1e1-db70-44ea-aea2-dcfecb9e94a1
Wild-Donkey/Code
ybt/ybt1300-1349/ybt1323 活动安排.cpp
#include<iostream> #include<cstring> #include<algorithm> #include<cstdio> using namespace std; int n, l[1005], r[1005], ans = 1, at; struct ms { int l, r; }a[10005]; bool cmp(ms x, ms y) { if (x.r == y.r) { return (x.l > y.l); } return (x.r < y.r); } int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >...
ALGO
0.999963
3.947642
d4ac9ee2-6179-4817-842b-a0aab588e2c0
Sayemahamed/cpp
B_Flag_of_Berland.cpp
#include <bits/stdc++.h> using namespace std; //----------------------------------------------------------------// // definitions // #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define endl '\n' //----------------------------------------------------------------// // preDefined functions// ...
ALGO
0.999883
4.214638
de943e07-6428-4066-8bbb-24e0c1cf67ab
tridibsamanta/Codeforces_Solutions
160A.cpp
/* ~ Author : @tridib_2003 */ #include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define PI 3.1415926535897932384626 #define MOD 1000000007 #define vi vector<int> #define pb ...
ALGO
0.999794
4.169486
4df7ce33-f7a8-41d5-9b5b-60a6b9777c7d
tony-t-tang/LeetCode
1254-number-of-closed-islands/1254-number-of-closed-islands.cpp
class Solution { public: int closedIsland(vector<vector<int>>& grid) { int m = grid.size(); int n = grid[0].size(); int res = 0; for(int i = 0; i < m; i++) { if(grid[i][0] == 0) { dfs(grid, i, 0); } if(grid[i][n-1] == 0) { ...
ALGO
0.999951
6.469498
e5817026-afce-42ff-8eee-c60068ca6e11
CyanMARgh/rfoegl
source/demos/demo_5.cpp
#include "demo_5.h" #include "window.h" #include "primitives.h" #include "shader.h" #include "defer.h" #include "image.h" void demo_5() { u32 width = 1200, height = 800; Window main_window(width, height); set_default_key_callback(&main_window); Image buf_tex(width, height); auto& quad_mesh = get_primitive(Primi...
ALGO
0.96623
5.299352
4841f739-7b44-4d2c-a988-a00ca748a044
spex66/RTSP-Camera-for-Android
RtspCamera/jni/avc_h264/dec/src/vlc.cpp
#include "avcdec_lib.h" #include "avcdec_bitstream.h" //#define PV_ARM_V5 #ifdef PV_ARM_V5 #define PV_CLZ(A,B) __asm{CLZ (A),(B)} \ A -= 16; #else #define PV_CLZ(A,B) while (((B) & 0x8000) == 0) {(B) <<=1; A++;} #endif #define PV_NO_CLZ #ifndef PV_NO_CLZ typedef struct tagVLCNumCoeffTrail { int trailing; ...
ALGO
0.987264
3.365598
efb5be7e-694f-4fac-b4fe-f69772452264
Algorithm-Study-SSAFY/Algorithm_CPP
ohsopp/20240424/백준 1520 내리막 길.cpp
#include <iostream> using namespace std; int n, m, v[501][501]; int dx[] = { -1,1,0,0 }, dy[] = { 0,0,-1,1 }; int memo[501][501]; int dfs(int x, int y) { if (x == n && y == m) return 1; if (memo[x][y] > -1) return memo[x][y]; memo[x][y] = 0; for (int i = 0; i < 4; i++) { int nx = x + dx[i], ny = y + dy[i];...
ALGO
0.999938
3.808206
d8157898-a591-447f-a14f-3256e45113c4
Pepecuz/P1
Ejercicio_01_07.cpp
// Materia: Programacin I, Paralelo 1 // Autor: Jose Maria Cruz LLnos // Fecha creacin: 14/08/2023 // Fecha modificacin: 15/08/2023 // Nmero de ejericio: 7 // Problema planteado: Numero amigo #include <iostream> using namespace std; int main() { int numero, i, resto; cout << "Este programa muestra los divisores de...
ALGO
0.993038
3.768711
bb285729-ef1c-40af-9c17-e1d1111ceea8
Armaan42/CPP
array_PQs/max_min_1.cpp
#include<iostream> #include<climits> using namespace std; int getmax(int arr[], int size){ int max = INT_MIN; for(int i=0;i<size;i++){ if(arr[i] > max){ max = arr[i]; } } //returning maximum value return max; } int getmin(int arr[], int size){ int min = INT_MAX; for(int i=0;i<size;i++){ if(arr[i] < mi...
ALGO
0.967526
3.761882
1f5bb496-8803-41be-91d3-49deb712b69a
jaxanc/CarND-Path-Planning-Project
src/Eigen-3.3/bench/perf_monitoring/gemm/gemm.cpp
#include <iostream> #include <fstream> #include <vector> #include <Eigen/Core> #include "../../BenchTimer.h" using namespace Eigen; #ifndef SCALAR #error SCALAR must be defined #endif typedef SCALAR Scalar; typedef Matrix<Scalar,Dynamic,Dynamic> Mat; EIGEN_DONT_INLINE void gemm(const Mat &A, const Mat &B, Mat &C) {...
TEST
0.963626
5.689105
1a1e58c5-32b4-4207-9362-7c21061e414d
XsenIva/tasks_1_course
maths2.15.cpp
#include <iostream> #include <math.h> using namespace std; int main() { setlocale(LC_ALL, "Russian"); int n; float s, a; cout << "Введите n= "; cin >> n; s = 1; if (n > 0) { for (int i = 1; i <= n; i++) { s += pow(cos(i),2) ; } cout << "s =" << s << endl; } else cout << " Данные существуют "; return...
ALGO
0.998614
3.482822
1582990b-fc82-4d72-99c2-3afc9c50ef6c
ashwinnair10/LeetCode
2096-step-by-step-directions-from-a-binary-tree-node-to-another/2096-step-by-step-directions-from-a-binary-tree-node-to-another.cpp
class Solution { public: vector<vector<int>> res; vector<string> direction; void findpath(TreeNode* root,vector<int>& path,string& dir,int& target){ if(root==nullptr) return; if(root->val==target){ path.push_back(target); res.push_back(path); direc...
ALGO
0.999983
6.547279
6b28da87-8537-43f9-a781-823dd693d968
shamanthhegde2/data_structure_c-
Merge Two Sorted Lists.cpp
ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { if(l1==NULL) return l2; if(l2==NULL) return l1; ListNode *c; if(l1->val<=l2->val) { c=l1; c->next=mergeTwoLists(l1->next,l2); } else { c=l...
ALGO
0.999777
4.699935
a2aab1d0-2eb4-4a77-adf0-df562350a87f
ishandutta2007/codeforces
aid/normal/1161/B.cpp
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; typedef long double ld; #ifdef DEBUG #define eprintf(...) fprintf(stderr, __VA_ARGS__), fflush(stderr) #else #define eprintf(...) ; #endif #define sz(x) ((int) (x).size()) #define TASK "text" const int inf = (int) 1.01e9; con...
ALGO
0.999989
4.371922
d38da7ee-906f-4844-be27-4118df2cd1c5
SyedMa3/CP
C_OKEA.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define PI 3.1415926535897932384626 #define rep(n) for (int i = 0; i < n; ++i) #define repc(i, n) for (ll i = 0; i < n; i++) #define fore(i,x1,x2) for(ll i=x1; i<x2; ++i) #define pb push_back #define mp make_pair #define F first #define S second #define...
ALGO
0.999184
3.208865
ac0a8c5c-4026-40a3-9b8d-ba6825075e54
lukehot/leetcode_practice
C++/find-k-closest-elements.cpp
// Time: O(logn + k) // Space: O(1) class Solution { public: vector<int> findClosestElements(vector<int>& arr, int k, int x) { auto i = distance(arr.begin(), lower_bound(arr.begin(), arr.end(), x)); int left = i - 1, right = i; while (k--) { ...
ALGO
0.999998
5.66822
64e9f41d-35dc-40fe-b4dc-adba2c100ad1
MusshcaB/lynx_cplus
python_cpp/opencv-4.5.1/opencv-4.5.1/modules/video/src/tracking/detail/tracker_sampler.cpp
#include "../../precomp.hpp" #include "opencv2/video/detail/tracking.private.hpp" namespace cv { namespace detail { inline namespace tracking { TrackerSampler::TrackerSampler() { blockAddTrackerSampler = false; } TrackerSampler::~TrackerSampler() { // nothing } void TrackerSampler::sampling(const Mat& imag...
TOOL
0.873321
6.128741
0875c612-873d-4cdb-8edc-d56bf8e8e4f2
xsun89/leecode
3nPlus1/main.cpp
#include <iostream> using namespace std; #define MAXSIZE 10000 int cache[10000]; int counting(long long number) { if(number == 1) return 1; if(number & 1){ number += (number << 1) + 1; } else{ number >>= 1; } if(number < MAXSIZE) { if(cache[number] == 0) { ...
ALGO
0.999919
3.696961
de45191b-1cb7-4691-94d3-8db2fc82d435
dikkisetiawan/dispenduk
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.998859
6.785645
3503a8db-3c5e-4d0d-a89d-99e12cbe71f7
AvinandanBose/C_Plus_Plus_Intermediate_II
arrays_13.cpp
// insert an element into the first index of an array #include <iostream> using namespace std; int main() { int n, value, options; cout << "Enter the size of the array: "; cin >> n; int a[n]; cout << "Enter the elements of the array: " << endl; for (int i = 0; i < n; i++) { cout << "...
ALGO
0.999236
4.326444
81620823-473f-43da-bf29-1ac948c51bdf
manojz18/Data-Structure-Algoritms
Arrays/swap_alternate_in_array.cpp
#include<iostream> using namespace std; void Swap_Alternate(int arr[], int n){ for(int i = 0; i < n; i+=2){ if(i+1 < n){ swap(arr[i], arr[i+1]); } } for(int i = 0; i < n; i++){ cout << arr[i] << " "; } cout << endl; } int main(){ int arr[]= {1, 2, 3, ...
ALGO
0.999841
4.333687
d4c29d62-218a-4be6-afb3-0c09b05e8d90
shaikriyan/Coding-Practice
Longest_Common_Prefix.cpp
#include<bits/stdc++.h> using namespace std; #define deb(x) cout<<#x<<" = "; print(x); cout<<endl; template<class T> void print(T a){ cout<<a;} template<typename T> void print(vector<T> v){ cout<<"[ "; for(int i=0;i<v.size();i++){ print(v[i]); cout<<" "; } cout<<"]"; } string findCommonPrefix(string &a, strin...
ALGO
0.999417
3.204748
5117d82b-f707-4011-b578-e9946ac5172a
mayurbandil/Leet
0150-evaluate-reverse-polish-notation/0150-evaluate-reverse-polish-notation.cpp
class Solution { public: int evalRPN(vector<string>& tokens) { stack<int> st; int ans = 0; for(auto i : tokens){ if(i=="+"){ int op2 = st.top(); st.pop(); int op1 = st.top(); st.pop(); int res = op1+op2; ...
ALGO
0.999875
6.005969
a3d31bd6-a73a-4c33-ad05-afd4294d08d9
MadhavMadan336/personal-program
C++/Reverse an Array.cpp
#include <iostream> #include <algorithm> using namespace std; void reverseArray(int arr[], int n) { reverse(arr, arr + n); } int main() { int arr[] = {1, 2, 3, 4, 5}; int n = sizeof(arr) / sizeof(arr[0]); reverseArray(arr, n); for (int i = 0; i < n; i++) { cout << arr[i] << " "; } ...
ALGO
0.999742
5.053062
f950d25a-f3b3-44b7-b9d9-e4003ff3916a
shivang17d/DSALGO
Stack/1.4 (Infix to Postfix).cpp
#include <bits/stdc++.h> using namespace std; int precedence(char c) { if (c == '^') { return 3; } else if (c == '/' || c == '*') { return 2; } else if (c == '+' || c == '-') { return 1; } else { return -1; } } string InfixToPostfix(string infix) { stack<ch...
ALGO
0.999566
5.046226
ae5cd3df-82f0-4625-9aac-f91f694c628f
prathampithalia/CP
LeetCode/54. Spiral Matrix.cpp
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& a) { int top = 0, left = 0, right = a[0].size() - 1, bottom = a.size() - 1; vector<int> ans; while (top <= bottom && left <= right) { for (int i = left; i <= right; i++) { ans.push_back(a[to...
ALGO
0.999988
5.799464
127557df-f034-4215-9939-a932367a3c4c
thinkum-contrib/kompozer-svn
mozilla/extensions/universalchardet/src/CharDistribution.cpp
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ #include "CharDistribution.h" #include "JISFreq.tab" #include "Big5Freq.tab" #include "EUCKRFreq.tab" #include "EUCTWFreq.tab" #include "GB2312Freq.tab" #define SURE_YES 0.99f #define SURE_NO 0.01f #define MINIMUM_DATA_THRESHOLD 4 //...
ALGO
0.894761
5.874213
4b07cb3a-9466-44ea-979e-28c84e918c50
seo-rii/ps
src/baekjoon/10814/10814.cpp
#include <ios> #include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; struct Person { int age; string name; bool operator<(const Person& p) const { return age < p.age; } }; int main() { ios_base::sync_with_stdio(false); cin.tie(0); c...
ALGO
0.99962
4.868573
10c8573b-2252-42d3-b4b7-9c75db6836ee
mhsilverio/PEDA
cod/parenteses.cpp
#include <iostream> #include <string> using namespace std; int main() { string exp; cout << "Digite a expressao: "; cin >> exp; int cont = 0; for(int i=0; i<exp.size(); ++i){ switch(exp[i]){ case '(': ++cont; break; case ')': ...
ALGO
0.998374
4.934112
40bf7acf-e236-42e4-8253-c94ce5cd3cb5
baeng72/Compiler
Compiler design in c/C/orig/lex/lex/hash.cpp
#include <stdio.h> #include <ctype.h> #include <signal.h> #include <stdlib.h> #include <string.h> #include "debug.h" #include "hash.h" PUBLIC void* newsym(int size) { //Allocate space for a new symbol; return a pointer to the user space BUCKET* sym; if (!(sym = (BUCKET*)calloc(size + sizeof(BUCKET), 1))) { fprin...
TOOL
0.873172
4.604047
ea6731aa-b65b-41a0-a49f-6f22ef4074b7
DreadArceus/Codeforces
Contests/Global Round/#14/B.cpp
#include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <algorithm> #include <cmath> #include <cstring> using namespace std; #define int long long #define pii pair<int, int> void solveCase() { int n = 0; cin >> n; if (n % 2) { cout << "NO\n"; retur...
ALGO
0.99973
5.35504
cd175735-779f-41b0-bd26-9489c2483cbd
tridibsamanta/Codeforces_Solutions
1657A.cpp
/* ~ Author : @tridib_2003 */ #pragma GCC optimize("O3") // #pragma GCC optimize("Ofast") // #pragma GCC target("avx,avx2,fma") #include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_orde...
ALGO
0.999961
5.089169
a8e5c4d2-d10f-4138-8db8-0cbb1c117e8c
Ankar-Kumar/OSLab
OPTIMAL.cpp
#include<bits/stdc++.h> using namespace std; int fault=0; void LRU(vector<int>&pages,int siz) { set<int>tmp; for(int i=0; i<pages.size(); i++) { map<int,int>ind; int val=pages[i]; if(tmp.size()<siz) { if(tmp.find(val)==tmp.end()) //not found { ...
ALGO
0.999769
3.270446
d9a14584-ccdf-4ca7-aaf7-5342c8989193
kidclone3/CP
OnlineJudge/uCode.vn/LeftOf2Diagonal.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define vi vector<int> #define ll long long #define all(x) x.begin(), x.end() #define F_OR(i, a, b, step) for (int i=(a); (step)>0? i<(b) : i>(b); i+=(step)) #define EACH(x, a) for(auto& x: a) #define BUG(x) \ { ...
ALGO
0.999978
3.654746
89777235-7191-43e0-b533-aae46f19ff42
AlcivanLucas/Beecrowd
ad-hoc/1318/1318.cpp
#include <iostream> #include <cstring> using namespace std; int main(){ int bilhetes[10001]; int N, M, T, resposta; while(cin >> N >> M){ if(!N && !M) break; resposta = 0; memset(bilhetes, 0, sizeof(bilhetes)); for(int i = 0; i < M; ++i){ cin >> T; ...
ALGO
0.999629
3.693188
511a30f1-bc66-48f7-9ef1-1d42de74b9bf
ishandutta2007/codeforces
umqra/normal/644/A.cpp
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; const int N = 200; int n, a, b; int table[N][N]; bool trySit(int t) { int odd = 1, even = 2; for (int i = 0; i < a; i++) { for (int s = 0; s < b; s++) { if ((i + s) % 2 == t && odd <= n) { table[i][s] = odd; odd += 2; ...
ALGO
0.999824
3.155709
2eac8912-a52a-4894-aec1-a8afe8f772bf
Merisho/comprog
codeforces/round-682-div-2/c.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; vector<vector<int>> a; int main() { int T; cin >> T; for (int test_case = 1; test_case <= T; ++test_case) { int n, m; cin >> n >> m; a = vector<vector<int>>(n + 1, vector<int>(m + 1, -1)); for (int i = 0; i < n; ++i) { for (int j = 0;...
ALGO
0.999871
3.762244
56bdd2fe-b2c4-4508-b103-7273953f5a98
surajmate007/700_Topicwise_DSA_Solved_Problems
01_Arrays/Extra_19_Continuous_subarray_Sum.cpp
// Basically you want to create an array of the accumulated sum, but instead of the sum, you have the sum%k. If you just go through it normally // and return on sum%k == 0, then that only accounts for (n) possibilities out of (n^2) possibilities. However, if you find duplicated sum%k values, // then that the sub array ...
ALGO
0.999922
5.958453
9c3d5fc0-7efa-4f6d-9531-155ca018a82b
koosaga/olympiad
POI/Potyczki/pa11_egz.cpp
#include <bits/stdc++.h> const int MAXN = 100005; using namespace std; typedef pair<int, int> pi; int n, a, b, x[MAXN], y[MAXN], r[MAXN], ret[MAXN]; struct pnt{ int x, y, r; bool operator<(const pnt &p)const{ return pi(x, y) < pi(p.x, p.y); } }; struct bit{ int tree[MAXN]; void add(int x, int v){ x++; whi...
ALGO
0.999886
3.299661
6f52438b-0be2-4b1e-b838-44159f67688c
ve2102388688/leetcode
doublePointer/_524.cpp
#include <bits/stdc++.h> using namespace std; string findLongestWord(string& s, vector<string>& dictionary) { string answer = ""; for (const auto& str : dictionary) { for (int i = 0, j = 0; i < s.size(); ++i) { if(s[i] == str[j]) ++j; /**<相等时子串,移动即可 */ if(j =...
ALGO
0.999931
4.485785
c7955afa-1079-4116-bd5c-4b3a4380cc93
paul2705/OI
contact/usaco/2019.02.22-25/A_0.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; const double M=1e6; const int MAXN=1e6+6; double n,p[MAXN]; double mul=1,sum=0,ans=0; int main(){ freopen("cowdate.in","r",stdin); freopen("cowdate.out","w",stdout); scanf("%lf",&n); for (int i=1;i<=...
ALGO
0.999936
3.317489
da19d6b2-0307-4c98-bf2e-964b5b63a3f0
hustwcw/CPPStandardLibraryExample
fo/sort1.cpp
#include <iostream> #include <string> #include <deque> #include <set> #include <algorithm> using namespace std; /* class Person */ class Person { private: string fn; // first name string ln; // last name public: Person() { } Person(const string& f, const string& n) : fn(f), ln(n) { ...
ALGO
0.976322
5.097195
16d6059b-6d44-4844-b43d-69f6c26c5428
JoGist/Technology-Team
dev_stt_2019/embedded_system_surprisy/embedded_system/library_cpp/imu_cpp/RTIMULib/RTFusionKalman4.cpp
#include "RTFusionKalman4.h" #include "RTIMUSettings.h" // The QVALUE affects the gyro response. #define KALMAN_QVALUE 0.001f // The RVALUE controls the influence of the accels and compass. // The bigger the value, the more sluggish the response. #define KALMAN_RVALUE 0.0005f #define KALMAN_QUATERNION_LENGTH 4 ...
ALGO
0.997995
6.152037
653abde6-79ef-4250-ba77-8fd2caa5a20d
kai-1208/nhk2025-team-a-R1-Unit3-main
src/lib/QEI/QEI.cpp
/** * @author Aaron Berk * * @section LICENSE * * Copyright (c) 2010 ARM Limited * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation t...
TOOL
0.89339
7.4492
0f220945-69c5-4f45-ae42-07d81980f125
machuiwen/LeetCode-Solutions
Easy/ReverseBits.cpp
class Solution { public: uint32_t reverseBits(uint32_t n) { uint32_t result = 0; for (int i = 0; i < 32; i++) { result |= (n & 1) << (31 - i); n = n >> 1; } return result; } };
ALGO
0.999761
6.094591
8a21f8ad-3cf1-4825-b3a0-125694fc6cb1
manishbisht/Competitive-Programming
Codeforces/Codeforces Round #402 (Div. 2)/Dishonest Sellers.cpp
#include <bits/stdc++.h> using namespace std; bool compare(const pair<long long int, int>&a, const pair<long long int, long long int>&b){ return a.first-a.second < b.first-b.second; } int main() { long long int n, k, i, ans; vector< pair<long long int, long long int> > v(200005); cin>>n>>k; for(i = ...
ALGO
0.999974
3.130083
64b8d031-8354-4bb5-a510-2ec944dff627
Rohankharate52/DSA-Program-file
Recursion27.cpp
//BS //Linaerseach........ #include<iostream> using namespace std; bool linearseach(int arr[],int X, int index,int N) { //Base case if(index==N) return 0; if(arr[index]==X) return 1; return linearseach(arr,X,index+1,N) ; } int main () { int arr[] = {2,3,6,7,1,5}; int X = 7; ...
ALGO
0.999787
3.863951
e1f4a31c-d082-4191-bcfc-57453226f746
VishardMehta/DAA
DAA code/kmp.cpp
#include <iostream> #include <vector> #include <string> using namespace std; // Build LPS (Longest Prefix Suffix) array void buildLPS(const string& pat, vector<int>& lps) { int len = 0; // length of the previous longest prefix suffix int i = 1; lps[0] = 0; // lps[0] is always 0 while (i < (int)pat.si...
ALGO
0.999991
6.956317
179d1f4d-ba6b-4c7e-a918-427a3c7d62f2
almishra/metadirective
clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp
#include "FindAllSymbolsAction.h" #include "STLPostfixHeaderMap.h" #include "SymbolInfo.h" #include "SymbolReporter.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" #include "clang/Lex/Pre...
TOOL
0.967213
7.603081
1b697e33-0de0-4940-ae41-0618f43e54ea
ttsshh1990/Tetris
cocos2d/cocos/base/ZipUtils.cpp
// FIXME: hack, must be included before ziputils #ifdef MINIZIP_FROM_SYSTEM #include <minizip/unzip.h> #else // from our embedded sources #include "unzip.h" #endif #include "base/ZipUtils.h" #include <zlib.h> #include <assert.h> #include <stdlib.h> #include "base/CCData.h" #include "base/ccMacros.h" #include "platfo...
TOOL
0.901286
6.661436
0c3b88c2-8aae-4df2-8616-8a4eb3345899
LMonteys/tp2-metnum
libs/eigen3/bench/sparse_cholesky.cpp
// #define EIGEN_TAUCS_SUPPORT // #define EIGEN_CHOLMOD_SUPPORT #include <iostream> #include <Eigen/Sparse> // g++ -DSIZE=10000 -DDENSITY=0.001 sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/lin...
ALGO
0.993023
4.147974
79dc249f-5c65-4697-a704-e1b311bc57c3
0xEbrahim/LeetCode-Grind
2583. Kth Largest Sum in a 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.999945
5.778963
5f582c2a-9a74-4711-acb3-75eb91a95add
sarvex/leetcode-bash
solution/1800-1899/1817.Finding the Users Active Minutes/Solution.cpp
class Solution { public: vector<int> findingUsersActiveMinutes(vector<vector<int>>& logs, int k) { unordered_map<int, unordered_set<int>> d; for (auto& log : logs) { int i = log[0], t = log[1]; d[i].insert(t); } vector<int> ans(k); for (auto& [_, ts] :...
ALGO
0.999784
6.32269
6f7d4912-9e2f-43c8-b6d0-9ab894430ac9
ChinoMars/Data_Structure_PAT
SpringDataStructPAT/01-2.cpp
#include <iostream> using namespace std; int main() { int maxsize = 0; cin >> maxsize; int data[maxsize]; int begin = 0, maxbegin = 0, maxend = maxsize-1; int tmpsum = 0, maxsum = -1; for(int i = 0; i<maxsize; i++) { cin >> data[i]; tmpsum += data[i]; if(tmpsum > maxsum) { maxsum = tmpsum; max...
ALGO
0.999831
3.815777
2ea58b78-ff0c-43a6-8b81-2bc680881afb
suhas4122/Competitive-Programming
Educational Codeforces Round 130/D_Guess_The_String.cpp
#include <bits/stdc++.h> using namespace std; string to_string(string s) { return '"' + s + '"';} string to_string(char s) { return string(1, s);} string to_string(const char* s) { return to_string((string) s);} string to_string(bool b) { return (b ? "true" : "false");} template <typename A> string to_string(A); tem...
ALGO
0.999918
3.259631
dbf077f5-95a2-46dc-8a1e-cce2cdc332ba
raincross7/code-similarity
codes/train_code/problem016/problem016_366.cpp
#include<bits/stdc++.h> using namespace std; void __print(int x) {cerr << x;} void __print(long x) {cerr << x;} void __print(long long x) {cerr << x;} void __print(unsigned x) {cerr << x;} void __print(unsigned long x) {cerr << x;} void __print(unsigned long long x) {cerr << x;} void __print(float x) {cerr << x;} void...
ALGO
0.999975
4.037326
25f334dc-c914-40a9-8321-196125fc2131
Zedonboy/Fusion-Wallet
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.998799
6.776823
71b5797b-1604-48a0-afcf-7c190282f343
Sagarbha1991/com.example.trilinos
packages/stokhos/example/dimension_reduction/gram_schmidt_example3.cpp
#include <iostream> #include <iomanip> #include "Stokhos.hpp" #include "Stokhos_Sacado.hpp" #include "Stokhos_ReducedBasisFactory.hpp" #include "Teuchos_CommandLineProcessor.hpp" #include "Teuchos_TabularOutputter.hpp" // quadrature methods enum Quadrature_Method { TENSOR, SPARSE }; static const int num_quadrature_m...
ALGO
0.998917
5.724036
f0984c9b-bb8c-4508-be3d-2ea7658356cb
ishandutta2007/codeforces
lhic/normal/1544/E.cpp
#ifndef BZ #pragma GCC optimize "-O3" #endif #include <bits/stdc++.h> #define ALL(v) (v).begin(), (v).end() #define rep(i, l, r) for (int i = (l); i < (r); ++i) using ll = long long; using ld = long double; using ull = unsigned long long; using namespace std; /* ll pw(ll a, ll b) { ll ans = 1; while (b) { while ...
ALGO
0.999984
4.556314
f12b72f6-ee88-4afa-9f6c-10d29fb9ebd5
suu-K/AlgorithmPractice
Beakjoon/12856 평범한 배낭.cpp
/* 문제 : 평범한 배낭(https://www.acmicpc.net/problem/12865) 풀이 유명한 knapsack 알고리즘 문제다. cache[i][j]를 i번째 보석까지 탐색하여 j의 무게를 채웠을 때 최대 가치라고 정의하면 cache[i][j]는 두가지 경우가 있을 수 있다. i번쨰 물건을 획득할 때와 획득하지 않을 때. 획득할 때는 i-1번쨰 물건까지 탐색해여 j - w[i]무게를 획득한 경우에 i번째 물건의 가치를 더한 값이고, 획득하지 않을 때는 i-1번째 물건까지 j무게를 획득한 경우의 가치와 같다. 따라서 다음 점화식이 성립한다. ...
ALGO
0.999991
4.721502
385216b2-f400-49f8-a0fd-67e373a5fa9e
Diaz-adrianz/Algoritma-dan-Pemrograman-SMT-2
pertemuan-4/contoh/34.cpp
// Tanggal berikutnya di bulan Februari #include <iostream> using namespace std; struct Tanggal { int dd, mm, yy; }; int main() { Tanggal t; t.mm = 2; cout << "Hari ke-berapa? "; cin >> t.dd; cout << "Tahun ke-berapa? "; cin >> t.yy; if (t.dd < 28) t.dd += 1; else { ...
ALGO
0.984386
4.0711
76e77bd1-69e8-4390-b45a-22f3a802c6fe
wsn1226/FEM-Cloth
extern/libigl/include/igl/orientable_patches.cpp
template <typename DerivedF, typename DerivedC, typename AScalar> IGL_INLINE void igl::orientable_patches( const Eigen::PlainObjectBase<DerivedF> & F, Eigen::PlainObjectBase<DerivedC> & C, Eigen::SparseMatrix<AScalar> & A) { using namespace Eigen; using namespace std; // simplex size assert(F.cols() == 3...
ALGO
0.99622
3.965466
b8517cfd-6474-4742-b50f-8e0f8829a6a4
muhammadadilbankar/LeetCode-grind
0001-two-sum/0001-two-sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { unordered_map<int, int> hash; int n = nums.size(); for(int i=0; i<n; i++){ int comp = target - nums[i]; if(hash.find(comp) != hash.end() && hash[comp] != i) return {i, hash[comp]}; ...
ALGO
0.999891
6.318042
2584936e-6da5-4265-aeeb-24766c05e0bd
InwooLeeme/Algorithm
Boj/14709.cpp
#pragma GCC target("avx,avx2,fma") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/rope> #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; using namespace __gnu_cxx; #define X first #define Y second #define int int64_t #define...
ALGO
0.999969
4.261388
5f9b544e-66b5-41cc-98a2-5462edf88226
Rakib1958/DSA
Graph/flood_fill.cpp
#include<bits/stdc++.h> using namespace std; void dfs(vector<vector<int>> &graph, vector<vector<int>> &ans, int row, int col, int newColor, vector<int> &xMove, vector<int> &yMove, int iniColor) { ans[row][col] = newColor; int n = graph.size(); int m = graph[0].size(); for (int i = 0; i < n; i++) { ...
ALGO
0.999697
5.131984
f24a23a8-1aa6-4d7e-8d03-36ff285666f4
sky-bro/AC
leetcode.com/1320 Minimum Distance to Type a Word Using Two Fingers/main.cpp
#include <iostream> #include <vector> using namespace std; class Solution { private: inline int c_dis(char c1, char c2) { // 'A' -- 0, 'Z' -- 25 return abs((c1 / 6) - (c2 / 6)) + abs((c1 % 6) - (c2 % 6)); } int _minimumDistance(const string &word, int idx, int i, vector<vector<int>> &dp) {...
ALGO
0.999903
5.610661
1f69529c-88c9-472e-9ac9-b19de887e285
eggag32/Competitive-Programming
Codeforces/Tree Array.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef pair<int, int> pi; #define debug(x) cerr << #x << ": " << x << '\n' #define debug2(x, y) debug(x), debug(y) #define repn(i, a, b) for(int i ...
ALGO
0.999578
4.636921
43ce6795-b9e9-4db7-9423-8b0dbd24dc58
yzzupgo/MFTCG
Data/abc170_b/RyumaIto/wa/14310642.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int X, Y; cin >> X >> Y; int kame = (4 * X - Y) / 2; int tsuru = (Y - 2 * X) / 2; if(kame + tsuru == X && (4 * X - Y) % 2 == 0 && (4 * X - Y) / 2 >= 1 && X > 0 && Y > 0){ cout << "Yes" << endl; return 0; } cout << "No" << endl; }
ALGO
0.999975
3.257755
b990a322-2fc5-40aa-beac-cd3275543064
hirakuuuu/kyopro
ABC/282/abc282_d.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for(int i = a; i < n; i++) #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> const int MOD = 1000000007; const int mod = 998244353; template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;} template<class t,class u> void chmin(t...
ALGO
0.99993
4.732872
08de4f29-8079-4f86-b168-c5f11c4a5827
kkm431/CSES
Introductory Problems/5. Permutations.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <map> #include <algorithm> #include <cmath> #include <string> #include <utility> #include <set> #include <list> #include <deque> #include <queue> #include <stack> #include <bitset> #include <iomanip> #include <iterator> using namespace std; int m...
ALGO
0.998619
3.822474
be754195-922f-446e-b43a-6ef92cb21614
xsaulnie/computorv1
main_bonus.cpp
#include <stdlib.h> #include <iostream> #include <map> #include <vector> #include <string> #include <sstream> #include <algorithm> #include <cmath> void factorized(float b, float a, float delta); int pgcd(int a, int b) { int r ; if (b == 0) return a; r = a % b; while (r != 0) { a =...
ALGO
0.9991
3.545347
a43d4d3b-d10a-40e2-af9f-5d69a6b1653f
Nafyaz/my-codes
Codeforces/1194C.cpp
#include<bits/stdc++.h> using namespace std; int main() { int q, i, flag; string s, t, p; map<char, int> mp; scanf("%d", &q); while(q--) { mp.clear(); flag = 1; cin >> s >> t >> p; for(i = 0; i < p.size(); i++) mp[p[i]] ++; flag = 1; ...
ALGO
0.999824
3.924299
471cb65d-b34f-4e8a-b553-0a06b503c03c
P9057/15_apr-SE
Assignment/Basic logic program/7..cpp
// Area of rectangle formula #include<stdio.h> int main(){ int w,l,area; printf("\n Enter the width of rectangle:"); scanf("%d",&w); printf("\n Enter the lenght of rectangle:"); scanf("%d",&l); area=w*l; printf("\n The area of rectangle is %d",area); }
TOOL
0.999393
3.271917
a6d032dd-f569-40fa-8ff1-065522f5d818
limon2009/ACM-UVA-Online-Judge-solution
10000.cpp
#include<iostream> #include<queue> #include<vector> using namespace std; #define maxn 102 struct ss { int u, cost; }; queue<ss>Q; vector<int>link[maxn]; int N, S, maxx, res; int Cost[maxn]; void BFS() { ss t, d; int i, v; t.u = S; t.cost = maxx = res = 0; Q.push(t); while(!Q.empty()) { t = Q.front(); Q....
ALGO
0.999822
3.43613
94160648-3fae-489d-9002-385b73985e1e
Corycle/OI-Codes
Bashu OnlineJudge/4749.cpp
#include<algorithm> #include<iostream> #include<iomanip> #include<cstring> #include<cstdlib> #include<complex> #include<cstdio> #include<vector> #include<ctime> #include<cmath> #include<stack> #include<queue> #include<map> #define ll long long using namespace std; const int inf=0x3f3f3f3f; const int N=100005; int read(...
ALGO
0.999827
3.217005
b38e5b5f-d849-47ae-a100-1d484d549d62
miiitomi/atcoder
mayocon/20240709/1.cpp
// https://atcoder.jp/contests/abc139/tasks/abc139_c #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; const ll INF = 2e+18; const ll MOD = 998244353; void solve() { int N; cin >> N; vector<int> H(N); for (i...
ALGO
0.999865
5.425993
ac5130b7-a102-4c04-b41e-2c90010831f4
Bibechan08/CPP_assignment
19.cpp
#include <iostream> #include <cmath> using namespace std; int main(){ string binary; cout << "Input a binary number: "; cin >> binary; int decimal = 0; for(int i = 0; i < binary.length(); i++){ decimal += (binary[i] - '0') * pow(2, binary.length() - i - 1); } cout << "The decimal nu...
ALGO
0.990352
4.967948
2964c4dd-454d-4569-ac63-b0428d024075
esl000/CustomUE4VolumeRaymarching
Engine/Source/ThirdParty/IntelTBB/IntelTBB-4.4u3/examples/graph/som/som.cpp
// // Self-organizing map in TBB flow::graph // // we will do a color map (the simple example.) // // serial algorithm // // initialize map with vectors (could be random, gradient, or something else) // for some number of iterations // update radius r, weight of change L // for each ex...
ALGO
0.999949
5.545004
dc29c61d-3eb3-4224-a73e-ed037731f84e
kuailedeguisu/GeneralKnowledgeSummary
sourceCode/cpp1xy_code/ModifyingAlgorithms/Remove.cpp
#include <functional> #include <algorithm> #include <string> #include <vector> #include <iostream> using namespace std; void removeEmptyStrings(vector<string>& strings) { auto it = remove_if(strings.begin(), strings.end(), [](const string& str){return str.empty();}); // erase the removed elements strings.erase(i...
ALGO
0.985176
5.867451
5bbcb1d3-3413-4466-a59e-a1dd91886ef4
prasannabantu/Code-100-days
LC921 Minimum Add to Make Parentheses Valid.cpp
//LC921 Minimum Add to Make Parentheses Valid class Solution { public: int minAddToMakeValid(string s) { stack<char> st; for(auto c:s) { if((!st.empty()) && st.top()=='(' && c==')') { st.pop(); continue;} st.push(c); } return st.size(); ...
ALGO
0.999505
6.056837
21322e48-c688-4681-9801-aba8ad044eb0
brechka-dm/ProgrammingTechnologiesCPP
BitString3/BitString3/Source.cpp
#include <iostream> #include "MyBitString.h" //including class header using namespace std; int main(int argc, char* argv[]) { MyBitString bs1, bs2; //creatong 2 bit strings if (argc < 3) { //check arguments count cout << "Not enough parameters" << endl; cout << "BitString a.txt b.txt c.txt" << endl; exit(0); ...
ALGO
0.990918
3.761469
22f13461-31bc-43ab-a720-89b16692207b
PaukIsUha/optimizing_formating_code
predictions/supersonic_predicted_submissions/Codenet/p02250/964041015/original.cpp
#include <bits/stdc++.h> using namespace std; class suffix_array { void create_begin_bucket(vector<int> &v, vector<int> &bucket) { fill(bucket.begin(), bucket.end(), 0); for (int i = 0; i < v.size(); i++) bucket[v[i]]++; int sum = 0; for (int i = 0; i < bucket.size(); i++) { bucket[i] += s...
ALGO
0.999984
5.468298
f310ac3b-be84-46c5-831a-39469a5277d1
suman6517/LeetCode_Solutions
0326-power-of-three/0326-power-of-three.cpp
class Solution { public: bool isPowerOfThree(int n) { if(n == 1) { return true; } if(n==0 || n%3 !=0) { return false; } return isPowerOfThree(n/3); } };
ALGO
0.9996
5.93457
8a903cd3-92af-44ad-bc9d-db7e5e8a8b18
Jaemin-c/coding-test-practice
새싹/10998.cpp
#include <iostream> using namespace std; int main() { int a; int b; cin >> a >> b; cout << a * b; return 0; }
ALGO
0.88328
3.775506
3f16da77-9b52-4298-b5f0-8192a1d7ead7
leejuye/coding-test
beakjoon/5585.cpp
#include <cstdio> int main() { int money, i=0, count=0; int coin[]={500,100,50,10,5,1}; scanf("%d", &money); money=1000-money; while(money){ if(money>=coin[i]){ money-=coin[i]; count++; } else{ i++; } } printf("%d\n", count)...
ALGO
0.998969
3.830422