uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
fcd6a2fc-1f4c-4f5b-9430-25b1024adb8d
kamalnathdhekwar/competitive-programming
486A.cpp
// *** ... जय श्री राम ... ***// #include<bits/stdc++.h> using namespace std; #define ll long long int #define all(x) x.begin(),x.end() #define rall(x) x.begin(),x.end() #define for(i,a,b) for(ll i = a ; i<b ; i++) #define forr(j,c,d) for(ll j = c ; j>=d ; j--)...
ALGO
0.999903
3.228648
d5f0d8ff-a1cf-48f4-bd2c-6591907fbc9c
raincross7/code-similarity
codes/train_code/problem061/problem061_335.cpp
#include<bits/stdc++.h> #define ll long long int #define mk make_pair #define pb push_back #define INF (ll)1e18 #define pii pair<ll,ll> #define mod 1000000007 //998244353 #define f(i,a,b) for(ll i=a;i<b;i++) #define fb(i,a,b) for(ll i=a;i>b;i--) #define ff first #define ss second #define PI 3.141592653589793238 #define...
ALGO
0.999943
4.681792
092b6726-5d2d-434a-8d7f-a190e1354090
Mn-Rafi/Netflix-Clone
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.998693
6.797273
b156e74e-e6c4-412b-8648-6502ef459f7b
bossxu/acm
比赛/队内赛/额外/c.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<queue> #include<stack> #include<vector> #include<cmath> #include<set> #include<cstdlib> #include<functional> #include<climits> #include<cctype> #include<iomanip> using namespace std; typedef long long ll; #define INF 0x3...
ALGO
0.999914
3.60295
ce865c05-6942-4c8a-a1d3-6530b37662b1
sirAdarsh/CP-files
CSES/DP-1636.cpp
/*----- || Hare Krishna || -----*/ /* "WHY DO WE FALL, BRUCE?" */ //#pragma GCC optimize("Ofast") //#pragma GCC target("avx,avx2,fma") #include<bits/stdc++.h> #define ll long long #define endl '\n' #define elif else if #define pb push_back #define pf push_front #define PI 3.1415926535897932384 #define MOD 10000000...
ALGO
0.999987
4.836173
4b753c98-5612-4836-b550-8c49fe1e181b
GSedi/ACM-2-At
2at/graphD.cpp
#include <iostream> #include <fstream> #include <vector> using namespace std; long long int n,m,src, dest, b, e, w; long long int a[2002][2002]; long long int cd[100000]; long long int used[100000]; long long int d[100000]; const int INF = 1e9; int main(){ // freopen("path.in", "r", stdin); // freopen("pa...
ALGO
0.999973
3.318223
2ded2e78-ec4f-49f0-826e-3f21393197e5
Arindam2003/Take-U-Forward-Plus-Sheet
2_String_16/sort_char_freq.cpp
#include<iostream> using namespace std; bool comparator(pair<char, int> p1, pair<char, int> p2) { if (p1.second > p2.second) return true; // freq desc if (p1.second < p2.second) return false; return p1.first < p2.first; // char asc } int main() { string s="tree"; unordered_map<cha...
ALGO
0.999971
4.753635
8466e6c8-ccad-4193-89dd-81ba368b0ff8
Connolyn/consultaPAP
Aulas/aula06/Aula06-11.cpp
//============================================================================ // Name : Aula06-11 // Author : Prof. Alexandre Donizeti Alves //============================================================================ //**************************************************************************** // 1) C...
ALGO
0.904291
4.59182
bc39816a-5818-459c-98fa-27273cc97823
shash42/Competitive-Programming
Other Contests/CC Cookoff July'19/A.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define pb push_back #define F first #define S second #define lint long long #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define sz(x) (int)x.size() #define all(x) begin(x), end(x) #define SET...
ALGO
0.999669
4.212072
7562b011-86c5-4a22-981b-489c41eafef3
jingninc/algorithm
largestNumber/largestNumber/main.cpp
#include <iostream> #include <vector> #include <stack> #include <sstream> #include <queue> #include <unordered_set> #include <unordered_map> using namespace std; struct MyClass{ bool operator() (int m, int n){ vector<int> nums1; vector<int> nums2; while(m > 0){ nums1.insert(nums1.begin(), m%10); ...
ALGO
0.999898
5.430793
0879df8d-38dc-42b0-889e-1b8bf6020532
Prithviraj2118/Leetcode_Problems
0169-majority-element/0169-majority-element.cpp
class Solution { public: int majorityElement(vector<int>& nums) { unordered_map<int, int> m; for(auto x:nums){ if(m[x]>=nums.size()/2) return x; m[x]++; } return -1; } };
ALGO
0.999949
5.532752
75b65db8-cad6-47da-b73b-b06f9997f3d5
ishandutta2007/codeforces
mhq/normal/1028/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; set < pair < int, int > > for_mn_x, for_mn_y, for_mx_x, for_mx_y; int n; const int maxN = 2 * (int)1e5; int x[maxN][2], y[maxN][2]; int main() { srand(time(0)); ios_base::sync_with_stdio(false); //freopen("input.txt"...
ALGO
0.999896
3.536998
0377d058-b0c9-4f86-8775-cf83bd5fa0f2
saurabhsoodpec/selfdriving
CarND-MPC-Quizzes/polyfit/src/Eigen-3.3/doc/examples/tut_arithmetic_scalar_mul_div.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { Matrix2d a; a << 1, 2, 3, 4; Vector3d v(1,2,3); std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl; std::cout << "0.1 * v =\n" << 0.1 * v << std::endl; std::cout << "Doing v *= 2;" << std::endl; v *= 2; std::cout << ...
ALGO
0.982399
3.669638
6e808d94-7a1a-4a49-b364-45a44121459d
KiraLSN/aulaOpenCV
testeocv/OpenCV/modules/imgproc/src/intersection.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.999788
7.53141
22cf44ad-f1ba-482d-aaa2-ee420e353043
susmita413/Phitron_C_PlusPlus_basic
module 003-5__pp/Q1_class_.cpp
// Create 3 static objects with the help of the constructor . // print who got the highest math_marks and print his/her name. // ekhane char name jhamela kore. #include<bits/stdc++.h> using namespace std; class Student{ public: char name[100]; int roll; char sec; double math_mark; int cls ; ...
ALGO
0.978551
3.977377
f05f828d-6d3c-4450-b9b1-72ae2eacc4b5
mehta08rohan/OpenCv
OpenCv/opencv-master/modules/stitching/src/stitcher.cpp
#include "precomp.hpp" namespace cv { #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900/*MSVS 2015*/) // Stitcher::ORIG_RESOL is initialized in stitching.hpp. #else const double Stitcher::ORIG_RESOL = -1.0; #endif Ptr<Stitcher> Stitcher::create(Mode mode) { Ptr<Stitcher> stitcher = makePtr<Sti...
TOOL
0.923339
6.308089
9a79aa56-e103-4087-a518-57bb28d816f7
tier3guy/TREE
buidWithPost.cpp
#include<iostream> using namespace std; class node{ public: int data; node* left; node* right; node(int val){ data = val; left = NULL; right = NULL; } }; node* buildTree(int post[],int in[],int st,int end,int &key){ int element = post[key]; key--; node* root = new node(element); if(st == end){ retu...
ALGO
0.999994
5.303313
21a817fe-f1f5-4998-b4ec-d8b5d3c7f6ae
WYQ3333/light_server
everday/baidu_test.cpp
#include <iostream> #include<vector> #include<stdio.h> #include<errno.h> using namespace std; int Solution(size_t n, vector<vector<int>> array){ int result = 0; if(array.size() != n){ perror("size if false!!!"); return -1; } for(size_t i = 1; i < n; ++i){ int max_l = 0; ...
ALGO
0.999353
3.926857
93084e4d-907f-4c45-9d00-d5bf05f9e194
bogusdeck/c-practice
inlinef.cpp
#include<iostream> using namespace std; inline int cube(int s) { return s * s * s; } int main() { int x; cout<<"enter the number : "; cin>>x; cout << "The cube of "<<x<<" is: " << cube(x) << "\n"; return 0; }
TOOL
0.952356
3.731007
9d933d0a-6ffb-4bd2-baee-b7c766f9133f
obada-yahya/IEEEXtreme-Training-camp
Topics/Two Pointer/B.The Chosen One.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ll; typedef unsigned long long ull; typedef pair<ll, ll> pll; #define sz(x) ll((x).size()) #define endl '\n' #define fst ios::sync_with_stdio(0);cin.tie(0); #define MOD 1000000007 #define all(v) v.begin(), v.end() /* * negative numbers * special...
ALGO
0.999993
4.351831
d2dfcb8a-f5a2-4235-8224-fad4f02bac11
1779296311/leetcode
TY.cpp
/********************************************* * ------------------------ * ------------------------ * file name: TY.cpp * author : @ JY * date : 2020--04--21 **********************************************/ #include <iostream> #include <vector> #include <stdlib.h> using namespace std; class ...
ALGO
0.99993
4.436711
321d068b-9164-44a8-a6e3-7b22618bff97
machta/Alenka
libraries/cluster/codegen/lib/spike_cluster_cpp/eml_rand.cpp
// Include Files #include "eml_rand.h" #include "eml_rand_mt19937ar_stateful.h" #include "rt_nonfinite.h" #include "spike_cluster_cpp.h" // Variable Definitions static unsigned int method; #pragma omp threadprivate(method) static boolean_T method_not_empty = false; #pragma omp threadprivate(method_not_empty) stat...
ALGO
0.998419
4.608486
a04eb506-01f2-4a93-8acb-6dd72c08b6fe
sudheer0108/Sorting-Algorithms
linkedlist/ReverseBysizeinLL.cpp
#include <iostream> #include <string> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; void Print(struct Node **head) { struct Node *temp = *head; while (temp != NULL) { cout << temp->data << " "; ...
ALGO
0.999838
3.978449
9e67fdab-4c56-4ca2-9741-11a9fee8449c
SakodaShintaro/kaitei_history
kaitei_WCSC28/usi.cpp
#include"usi.hpp" #include"move.hpp" #include"position.hpp" #include"searcher.hpp" #include"usi_options.hpp" #include"learn.hpp" #include"shared_data.hpp" #include"eval_params.hpp" #include"load_game.hpp" #include"learn_self.hpp" #include<iostream> #include<string> #include<thread> USIOption usi_option; void USI::loo...
TOOL
0.871648
5.0367
d0a6be92-c21e-4cde-bbb3-ea715c7e9fcd
Georgio-N/Geo
Hmwk/Assignment1 - ExampleNamingConventions/Savitch_9thEd_Chap1_Prob3_Change_V1/main.cpp
/* * File: main.cpp * Author: Dr. Mark E. Lehr * Created on January 7, 2020, 11:10 PM * Purpose: Savitch Homework 1 Chapter 1 Problem 3 * Add up the change, display the total * Number of Coins represented as Characters */ //System Libraries #include <iostream> using namespace std; //User Libraries //Globa...
ALGO
0.977246
4.305448
609b725f-aac9-4c0c-b1b9-5c0912c6f7fe
laniakea1990/Accelerated-Cplusplus
Accelerated C++_exercise/chapter06/6-2.cpp
#include <algorithm> #include <cctype> #include <iostream> #include <string> #include <vector> #include "urls.h" using std::cout; using std::cin; using std::endl; using std::find_if; using std::getline; using std::string; using std::vector; int main() { string s; while (getline(cin, s)) { vector<string> v = ...
TOOL
0.966402
4.766115
205c14da-08bd-47b3-9c96-ccc2674f0d57
edutb/LeetCode-Weekly-Contest-404
3203. Find Minimum Diameter After Merging Two Trees.cpp
class Solution { public: int border, diameter; void dfs(vector< vector<int> >& graph, int v, int p, int d){ if(d > diameter){ border = v; diameter = d; } for(auto&u: graph[v]){ if(u == p) continue; dfs(graph, u, v, d + 1); ...
ALGO
0.999716
5.499577
f3bdcc11-0488-4694-9c19-31e37e0f603c
Md-Merazul-Islam/Codeforces-1000-problems-Solving
The_Escaping_Goblins.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int a,b,k;cin>>a>>b>>k; if (abs(a-b)>k)cout<<"YES"; else cout<<"NO"; return 0; }
ALGO
0.999913
3.446037
5bcf990a-0d81-4d4c-a101-458b0b9d06c3
ishandutta2007/codeforces
autumnkite/normal/938/A.cpp
#include <cstdio> #include <cstdlib> #include <cctype> #include <ctime> #include <cstring> #include <string> #include <cmath> #include <algorithm> #include <set> #include <map> #include <queue> #include <stack> #include <bitset> #include <vector> #define LL long long #define For(i,a,b) for(int i=(int)(a);i<=(int)(b);i+...
ALGO
0.999864
3.301674
023e3f2d-c6c1-4396-b55c-b7896e9f8dfc
Mr-Tony-Lee/CP_Road
CSESproblem/Part1_Introductory_Problems/8_Two_set.cpp
#include<iostream> #include<vector> using namespace std; using ll = long long ; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n ; ll sum_1 = 0 ; ll sum_2 = 0 ; vector<ll> push_1; vector<ll> push_2; for(int i = n ; i >= 1 ; i-- ){ if(sum_1 >= sum_2){ ...
ALGO
0.999699
3.252644
885dc127-2bdd-4c6a-a1b2-41876d3843bb
lssfau/pe
examples/mpistair/MPIStair.cpp
//================================================================================================= //================================================================================================= //************************************************************************************************* // Platform/compil...
TOOL
0.972337
6.184267
afffd3ec-04b4-4ccf-8c25-87d506aea969
edge555/Online-Judge-Solves
Codeforces/1200/1200-B.cpp
#include <bits/stdc++.h> #define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define pf printf #define sc scanf #define sf(num) scanf("%d",&num) #define sff(num1,num2) scanf("%d %d",&num1,&num2) #define sfff(num1,num2,num3) scanf("%d %d %d",&num1,&num2,&num3) #define sl(num) scanf("%lld",&num) #...
ALGO
0.999582
3.392494
d29913e2-0d2c-4077-bdba-2500891a6555
AKD-01/DSA-LeetCode
94-binary-tree-inorder-traversal/94-binary-tree-inorder-traversal.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.999949
6.451855
4621e59c-dfe0-4124-8c9e-391cae6fafd7
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_8058_1.cpp
#include <bits/stdc++.h> using namespace std; int v[100001], w[100001]; bool c[100001]; int main() { int n, m, x; cin >> n >> m; for (int i = 1; i <= n; i++) cin >> v[i]; for (int i = n; i > 0; i--) if (c[v[i]] == false) { c[v[i]] = true; w[i]++; } for (int i = n; i > 0; i--) w[i] += w[i +...
ALGO
0.999956
4.037174
c5ae23f7-1f59-495b-9d17-849ee61ed9a8
CustomRomSources/aosp_frameworks_av
media/libstagefright/codecs/amrnb/enc/src/enc_lag6.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/enc_lag6.c Functions: Date: 02/05/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template used to PV coding template. ...
ALGO
0.998972
7.382874
38040eea-a1e9-4cc4-a1e6-2e8dc4c5092f
turneja123/competitive-programming-library
Problem/Graph/Coloring Edges.cpp
//https://codeforces.com/contest/1217/problem/D #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define endl "\n" #define IOS ios_base::sync_with_stdio(false); cin.tie(nullptr); using ll = long long; const int N = 5005; int ans[N]; vector<int> adj[...
ALGO
0.999978
4.077235
1666714f-66fe-41c3-9877-2e582444d8d2
chltkdgns1/Algorithm_first
사탕 가게.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; int n, p; double d; int dp[10001]; // ε Įθ vector <pair<int, int>> v; int dfs(int m) { int &res = dp[m]; if (res != -1) return res; res = 0; for (int i = 0; i < v.size(); i++) { if (m - v[i].first >= 0) { int t...
ALGO
0.999816
4.082749
10f61dc7-a700-43cb-b374-26d6966c5d4f
xbhoneybee/ACM_ICPC
算法竞赛入门经典/xt9/1220.cpp
//#include <bits/stdc++.h> #include<cstdio> #include<cstdlib> #include<cstring> #include<string> #include<iostream> #include<algorithm> #include<queue> #include<cmath> #include<stack> #include<set> #include<vector> #include<map> #include<sstream> #include<ctime> #define ll long long #define LL long long #define iosfals...
ALGO
0.999974
3.617675
abadd5b8-ff32-46b0-8973-28597778a2c1
esix/competitive-programming
e-olymp/7xxx/7403/main.cpp
#include <iostream> #include <iomanip> #include <utility> #include <vector> #include <string> #include <sstream> #include <algorithm> #include <map> #include <set> using namespace std; int n, m; bool is_valid(int i, int j){ return 0 <= i && i <= n && 0 <= j && j <= m; } vector<string> level(n); char lvl(int i, i...
ALGO
0.999958
3.871642
f1ac1e25-9e63-462e-bfba-243015fc3e87
saurabh00031/Striver-SDE-Sheet
day 15 strings/2 Longest palindrome in string.cpp
class Solution { public: string longestPalindrome(string A) { int n = A.length() , len = A.length(); while(len > 0){ int j = 0; while(j+len <= n){ int start = j,end = j+len-1; while(start < end){ if(A[start] != A[end]) break; start++; end--; ...
ALGO
0.999968
5.87434
22843445-4ded-4bd6-aa8e-7f28b5270724
MSami625/GFG-Problem-Solutions
Difficulty: Easy/Sum of all divisors from 1 to n/sum-of-all-divisors-from-1-to-n.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: long long sumOfDivisors(int N) { // Write Your Code here long long sum=0; for(int i=1;i<=N;i++){ sum+=i*(N/i); } ...
ALGO
0.999852
6.410163
9ba70357-e99f-4a5d-bbc7-9cf238746d56
TheVidz/Cp-Codes
A_Everything_Nim.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define all(v) v.begin(), v.end() #define forn(i, k, n) for(int i = k; i < n; i++) typedef long long ll; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vll; const int INF = 1e9; const ll mod = 1000000007; void solve(){ ...
ALGO
0.999976
4.525656
9283d89d-054f-4cc5-a7e1-e5eb1b689f2c
IsaevPavelcpp/search_engine
src/InvertedIndex.cpp
#include "../header/InvertedIndex.h" std::shared_mutex mtx; void lineDivider(std::vector<std::string>& docs, const std::string& input_docs) { std::string word; std::stringstream ss(input_docs); docs.clear(); while (getline(ss, word, ' ')) { docs.push_back(word); } } //принимает запро...
ALGO
0.951435
4.222728
7e78db4f-bf54-49b6-9357-068dbedf0bdb
deviant101/Data-Structures-Lab
Lab-03/List.cpp
#include "List.h" #include <iostream> using namespace std; List::List(){ cout << "Enter Array Size: "; cin >> size; arr = new int[size]; cout << "Enter " << size << " values:\n"; for (int i = 0; i < size; ++i) cin >> arr[i]; } //----------------------------------------// void List::insert_start(int val){ i...
TOOL
0.859324
3.358871
5629bc25-ae3b-44ee-889a-f9a13308f517
peterhyun1234/Algorithm_team_BOJ
JS/0717/11053.cpp
#include <iostream> #include <vector> using namespace std; int main() { int N; cin>>N; vector<int> A; vector<int> d(N, 0); for(int i=0; i<N; i++){ int num; cin>>num; A.push_back(num); } for(int i=0; i<N; i++){ d[i] = 1; for(int j=0; j<i; j++...
ALGO
0.99978
4.2704
d89167fb-6acc-4a46-9482-61c2f2cdec13
thegamer1907/Code_Analysis
contest/1542582928.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int n,k; int check[20],num[10]; int main(){ scanf("%d%d",&n,&k); for(int i=0;i<n;i++){ int tmp = 0; for(int j=0;j<k;j++){ int l; cin >> l; tmp = tmp*2+l; } ch...
ALGO
0.999953
3.483355
7bd5cefb-0391-48b3-9d7a-0bcc9ebfdc09
Arunim313/LeetCode-Solutions
0387. First Unique Character in a String/387.cpp
class Solution{ public: int firstUniqChar(string s) { unordered_map<char,int> m; //Map to store the frequency of the characters for(int i=0;i<s.size();i++){ m[s[i]]++; //Updating map w.r.t. to s[i] as a key and its value is frequency(its occurance) } ...
ALGO
0.999849
5.727445
77d44f64-4728-4b75-b076-52f0c2c7bfa1
redwanpp/oj
beecrowd/prob1188.cpp
//inferio area #include <iostream> #include <iomanip> #define endl "\n" using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout << fixed << setprecision(1); //declaring variables int i, j, count, count2; double sum, avg; double table[12][12]; c...
ALGO
0.997955
3.809108
22794b76-d5ee-4d74-a83e-a433164fc04a
arvind-kharwal/OBJECT-ORIENTED-DESIGN-AND-PROGRAMMING
Unit 1/reference.cpp
#include<iostream> using namespace std; /* data type & reference-variable = varibale-name; */ int main() { int m = 10; int & n = m; cout<<n<<" "<<m<<endl; n = n+10; cout<<n<<" "<<m<<endl; }
ALGO
0.909282
3.516507
0a455597-ec13-4430-9564-ed7c646e14a5
sarvex/leetcode-beef
solution/0400-0499/0447.Number of Boomerangs/Solution.cpp
class Solution { public: int numberOfBoomerangs(vector<vector<int>>& points) { int ans = 0; for (const auto& p : points) { unordered_map<int, int> cnt; for (const auto& q : points) { ++cnt[(p[0] - q[0]) * (p[0] - q[0]) + (p[1] - q[1]) * (p[1] - q[1])]; ...
ALGO
0.999907
6.215004
c12dbd2a-a4bd-4a82-b5c0-02fd0b133ab3
pisan343/carrano7e
Chapter09/Section9.2.3/remove.cpp
template<class ItemType> bool LinkedList<ItemType>::remove(int position) { bool ableToRemove = (position >= 1) && (position <= itemCount); if (ableToRemove) { Node<ItemType>* curPtr = nullptr; if (position == 1) { // Remove the first node in the chain curPtr = headPtr; // Sa...
TOOL
0.942787
5.634449
aed39910-bc39-41de-a34e-1f287276736b
memaneAnil/CPP-Program
Program303.cpp
#include <iostream> using namespace std; void swap(int no1,int no2) { int temp=0; temp=no1; no1=no2; no2=temp; } int main() { int a=11,b=10; cout<<"Value of "<<a<<"\n"; cout<<"Value of "<<b<<"\n"; swap(a,b); cout<<"Value of "<<a<<"\n"; cout<<"Value of "<<b<<"\n"; return...
ALGO
0.999272
4.245965
f43c5a53-f846-4b81-9424-37823aba9c40
SabinaRachev/Graphics-Scene-Editor
igl/deform_skeleton.cpp
void igl::deform_skeleton( const Eigen::MatrixXd & C, const Eigen::MatrixXi & BE, const std::vector< Eigen::Affine3d,Eigen::aligned_allocator<Eigen::Affine3d> > & vA, Eigen::MatrixXd & CT, Eigen::MatrixXi & BET) { using namespace Eigen; assert(BE.rows() == (int)vA.size()); CT.resize(2*BE.rows(),C.co...
ALGO
0.993132
5.389054
dabf6e68-7b77-4aa4-9636-c20bdefbd40b
RachitJain-Learner/DSA-Practice
63-unique-paths-ii/63-unique-paths-ii.cpp
class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { int m = obstacleGrid.size() , n = obstacleGrid[0].size(); vector<vector<int>> dp(m+1,vector<int>(n+1,0)); dp[0][1] = 1; for(int i = 1 ; i <= m ; ++i) for(int j = 1...
ALGO
0.999732
6.12873
1d3981f8-72b6-4bfe-a5b7-f2831f8024cd
Khushiraturi1234/Khushiraturi1234
program5.cpp
Write a program to display the product of two numbers using single inheritance where numbers are declared inside the base class. Function of product both numbers defined in the derived class. #include <iostream> using namespace std; class Base { protected: int num1, num2; public: Base(int a, int b) : nu...
TOOL
0.988321
6.184582
801370b8-d8c2-48ee-a781-f6155732ea56
asyrofiabdusani/flutter-http
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
d058b459-1bd5-4c0d-ae9b-5e227ee2c7db
joshua16266261/184-water-sim
ext/nanogui/ext/eigen/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.999949
4.138078
66143434-5996-4a50-b26d-3b62ed36223f
dhs347/Dream
Template/DataStructure/动态dp_树链剖分.cpp
int n, a[N]; vi g[N]; namespace DP { int sz[N], wson[N], top[N], dep[N], id[N], _, par[N], who[N], leaf[N]; ll f[N][2], F[N][2]; struct Mat { ll a[3][3]; inline Mat operator * (const Mat &c) const { Mat r; rep(i, 0, 3) rep(j, 0, 3) { r.a[i][j] = a[i][0] + c.a[0][j]; rep(k, 1, 3) r.a[i][j] = max(r.a[i]...
ALGO
0.999529
3.546828
552e2d2f-31aa-4979-84f5-153ca24a1ecb
luigibonati/plumed2-devel
src/opes/OPESmetad.cpp
#include "bias/Bias.h" #include "core/PlumedMain.h" #include "core/ActionRegister.h" #include "core/Atoms.h" #include "tools/Communicator.h" #include "tools/File.h" #include "tools/OpenMP.h" namespace PLMD { namespace opes { //+PLUMEDOC OPES_BIAS OPES_METAD /* On-the-fly probability enhanced sampling (\ref OPES "OPES...
ALGO
0.998336
6.826809
07b248a5-808c-459c-917b-0839e258dcbf
daviscoder/2016_Leetcode_Pass2
200. Number of Islands.cpp
/** * O(m * n), O(1) * 空grid, 没有island,全1 grid,部分为1 grid */ class Solution { public: void DFS (vector<vector<char>>& grid, int i, int j) { if (i < 0 || j < 0 || i >= grid.size() || j >= grid[0].size() || grid[i][j] != '1') return; grid[i][j] = '2'; DFS (grid, i - 1, j); ...
ALGO
0.999871
6.168681
3ed7d027-b1b6-4625-92a7-0097961be042
Tanya19Singh/-CrackYourPlacement
implement2stack.cpp
#include<bits/stdc++.h> using namespace std; class twoStacks { public: stack<int>st1,st2; twoStacks() {} // Function to push an integer into the stack1. void push1(int x) { st1.push(x); } // Function to push an integer into the stack2. void push2(int x) { st2.push(x); ...
ALGO
0.999762
4.57706
5ab2998f-7565-47b2-bd02-9af584ee2fc1
fayaz-cusat/CPPLab
SEM2/Cycle1/binary_tree.cpp
class Node { public: int item; Node *left; Node *right; Node(int data) { item = data; left = NULL; right = NULL; } } class BinaryTree { Node *head = NULL; Node *add_item(int data) { if (!head) { head = new Node(data); ...
ALGO
0.99997
5.168892
16db060a-366d-4c34-b759-a1e480fab760
ttl2004/PTIT-CODE
DSA - PTIT/DSA04019 - Cap diem gan nhat.cpp
#include <bits/stdc++.h> #define __Tieu_Long__ int main() #define Fast(); ios_base :: sync_with_stdio (0); cin.tie(0); cout.tie(0); #define Tests() int t; cin >> t; while (t --) #define Test() int t = 1; while (t --) #define ll long long #define pb push_back #define endl '\n' #define fi first #define se second using na...
ALGO
0.999906
4.39069
377f06b7-8a8f-4691-aeb7-f5f824288268
ishandutta2007/codeforces
mjhun/normal/143/B.cpp
#include <bits/stdc++.h> using namespace std; char s[128],t[128]; int ns,nt; int main(){ bool neg=false; char c=getchar(); if(c=='-')neg=true,c=getchar(); while(c>='0'&&c<='9')s[ns++]=c,c=getchar(); if(c=='.'){ c=getchar(); while(c>='0'&&c<='9')t[nt++]=c,c=getchar(); } while(nt<2)t[nt++]='0'; t[2]=0; if(...
ALGO
0.999633
3.164618
41277f23-bf30-4e20-afc4-c718acfd23bc
bollu/w
forces/ladder/450b.cpp
#include <iostream> #include <string> #include <vector> #include <map> #include <algorithm> #include <assert.h> using namespace std; using ll = long long; // how to notice? //(fi+1, f) = (1 -1) fi // (1 0) fi-1 // m is transition matrix. // In [33]: m ...
ALGO
0.999984
4.881896
3f84ce01-776b-482e-bc5f-bfda34894567
Priyanshu4650/Daily-Problems-LeetCode
813-all-paths-from-source-to-target/all-paths-from-source-to-target.cpp
class Solution { void dfs(vector<vector<int>>& graph, set<vector<int>>& s, int n, vector<int>& temp, vector<bool>& visited, int v) { temp.push_back(v); visited[v] = true; if(v == n - 1) { s.insert(temp); } for(int i=0;i<graph[v].size();i++) { if(visite...
ALGO
0.999889
6.206729
ac6eead5-50ba-464e-83d9-99f45312b1bd
anubhavrb/dynamicProgramming
PartB/PartB/change.cpp
// // change.cpp // p3 // // P3 Part B. Optimal change making. // Arthur Chen and Anubhav Roy Bhattacharya // #include <iostream> #include <vector> using namespace std; void getInput(int*, int); int greedyChange(const int*, const int, const int); int optimalChange(const int*, const int, const int, vector<vector<i...
ALGO
0.999123
4.6106
51e2bf86-5ad1-492f-8d91-b80e5b19316c
vickykr26941/Data-structure-And-algorithm
leetcode-cf-cc/divide-concor/Closest Subsequence Sum.cpp
// https://leetcode.com/problems/closest-subsequence-sum/submissions/ // using meet in the middle algorithm class Solution { public: const int inf = 1e9 + 10; int minAbsDifference(vector<int>& arr, int goal) { int n = arr.size(); vector<int> L = {0}, R{0}; int l = n/2, r = n -...
ALGO
0.999993
6.148866
9fc29e25-e6fc-4adf-8c46-1e2ec9cacf31
getdebarghya07/Competitive-Programming-Problems
Codeforces/A_Ice_Skating.cpp
#include<bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define REP(i,a,b) for (i = a; i <= b; i++) #define fo(i,n) for(i=0;i<n;i++) #define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1) #define ll long long #define si(x) scanf("%d",&x) #define sl(x) scanf("%lld",&x) #define ss(s) scanf("%s",s) #define ...
ALGO
0.999906
4.463663
c2eb0d2c-e375-433a-9788-ad052a425af1
helenjw/CSC317
lab3/src/Triangle.cpp
#include "Triangle.h" #include "Ray.h" #include <Eigen/Geometry> #include <iostream> using namespace Eigen; using namespace std; bool Triangle::intersect( const Ray & ray, const double min_t, double & t, Eigen::Vector3d & n) const { // Ch. 4.4.2 - intersection with triangle // Corners Vector3d A = get<0>(corne...
ALGO
0.91313
6.530545
bf080551-c72d-40ba-b833-d49e13276562
star-admin/LE3Avionics
MODULAR TESTING/ETHERNET_ADS1263_BOARD/ADS1263 DAQ TEST ESP-IDF/ADS_DAQ_1/managed_components/espressif__esp-dsp/modules/support/snr/float/dsps_snr_f32.cpp
#include "dsps_snr.h" #include "dsps_fft2r.h" #include "dsp_common.h" #include <math.h> #include <limits> #include "esp_log.h" static const char *TAG = "snr"; float dsps_snr_f32(const float *input, int32_t len, uint8_t use_dc) { if (!dsp_is_power_of_two(len)) { return 0; } float *temp_array = new...
ALGO
0.991596
5.525732
5abaf480-2712-44dd-a7b8-8846f1ac032d
Lakshk25/DS-algo
Recursion/RatInMazeERORRRRR.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{ private: bool isOpen(vector<vector<int>> &m, int n , int x , int y , vector<vector<int>> visited){ if((x < n && x >= 0) && (y < n &&...
ALGO
0.999942
6.558741
257fc0c3-8fcc-43ed-86c1-ee438d53d00e
Jackfrost2639/ex
ladder.cpp
#include <bits/stdc++.h> using namespace std; int n, m; int lad[100001]; int incr[100001]; int decr[100001]; int main() { cin >> n >> m; lad[0] = -1; for(int i = 1; i <= n; i++) { cin >> lad[i]; incr[i] = i; decr[i] = i; } for(int i = n; i >= 1; i--) { if(...
ALGO
0.999999
4.16027
e6710e5e-6f07-4be3-9802-5f70f73f9cfa
josemleonr/openholdembot
SymbolDumperUserDll/minIni.cpp
#if (defined _UNICODE || defined __UNICODE__ || defined UNICODE) && !defined MININI_ANSI # if !defined UNICODE /* for Windows */ # define UNICODE # endif # if !defined _UNICODE /* for C library */ # define _UNICODE # endif #endif #define MININI_IMPLEMENTATION #include "minIni.h" #if defined NDEBUG #define ass...
TOOL
0.964822
6.112026
7030c3cc-7ae7-4717-9dbe-9289930100f3
charanyaram/harry-potter-quiz-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.9988
6.76073
eeaba460-385b-4ccd-bb9e-5e1414698fa8
jaydeep-pro/My-LeetCode-solutions
binary-tree-preorder-traversal/binary-tree-preorder-traversal.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.999966
6.121301
25c30ae0-3e8a-4a12-981f-039d0036fea4
maheshkattel/11_chat_app_Flutter_from-Appbrewery.com
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.998762
6.786404
1f3e1e12-aa4f-42a5-9122-896419868dc7
varun82004/DSA_Practice
activity_selection.cpp
#include<iostream> using namespace std; void greedy_act_sel(int s[],int f[],int n) { int *arr = new int [n]; arr[0]=1; int k=0; for(int m=1;m<n;m++) { if(s[m]>=f[k]) { arr[m]=1; k=m; } } cout<<endl; for(int i=0;i<n;i++) { if(arr...
ALGO
0.999615
3.642889
5fb78f2d-df66-4362-ad1d-75aec8cbe4f4
phuong-dinhmai/Cpp
CHD2/CHD2D.cpp
#include <bits/stdc++.h> using namespace std; main() { int n; while (cin >> n){ int res = 0; for (int i = 0; i < n; i++) { int a, b; cin >> a >> b; if (a % 2) res++; } if (res % 2) cout << "Thanh" << endl; else cout << "Bach" << endl; } }
ALGO
0.999199
3.629519
95aaea15-9124-4972-8464-40066485d715
Marcux777/Programacao_Competitiva
Beecrowd/Organizar/BEE1171.CPP
#include <bits/stdc++.h> using namespace std; void inicializa(int v[]) { for (int i = 0; i < 2001; i++) { v[i] = 0; } } int main() { int n, v[2001]; inicializa(v); cin >> n; int vet[n]; for (int i = 0; i < n; i++) { cin >> vet[i]; } for (int i = 0; i < n; i++) { int k = vet[i]; v[k]++; } for (i...
ALGO
0.999901
4.262059
f4f65cec-6398-4791-a96a-6364b191fea4
REEF3D/REEF3D
ThirdParty/eigen-3.3.8/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; using namespace Eigen; int main() { VectorXf v(2); MatrixXf m(2,2), n(2,2); v << -1, 2; m << 1,-2, -3,4; cout << "v.squaredNorm() = " << v.squaredNorm() << endl; cout << "v.norm() = " << v.norm() << endl; cout << "v.lpN...
ALGO
0.99681
4.034017
e80f2d1d-9416-4c53-81a6-b5bee5d8b6a0
deliangyang/Data-Structure
chapter9/0/9.11/CountKey.cpp
#include <iostream> #include "../Node.h" using namespace std; template<class T> void CountKey(Node<T> * head, T key) { Node<T> * ptrCurrent=head; int count=0; while(ptrCurrent!=NULL) { if(key==ptrCurrent->data) count++; ptrCurrent=ptrCurrent->NextNode(); } std::cout<<key<<": "<<count<<" times"<<std::en...
ALGO
0.984604
3.889498
e4a9aaf3-6429-433a-8d69-a169cdadb854
NaCl-1374/perceptive_legged_control
OCS2_ws/src/pinocchio/unittest/contact-dynamics-derivatives.cpp
#include "pinocchio/algorithm/jacobian.hpp" #include "pinocchio/algorithm/rnea.hpp" #include "pinocchio/algorithm/rnea-derivatives.hpp" #include "pinocchio/algorithm/kinematics-derivatives.hpp" #include "pinocchio/algorithm/contact-dynamics.hpp" #include "pinocchio/algorithm/joint-configuration.hpp" #include "pinocchio...
TEST
0.910598
6.521987
4ab1c811-719f-4e75-bfd3-944898fd06e2
nayemuddinn/Competitive-programming
Codeforces/Digit Minimization 1684A.cpp
/** . author-> NATE . **/ #include<bits/stdc++.h> using namespace std; #define first_in_out ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define For(i,n) for(int i=0;i<n;i++) #define For2(i,n) for(int i=1;i<=n;i++) #define For3(i, j, n) for (int i = j; i <= n; i++) #...
ALGO
0.999737
4.555644
db6cbc7f-4707-4db5-ad9d-7ec3dd4ab646
miragexxy/sdr-
decoder_modules/vor_receiver/src/vor_decoder.cpp
#include "vor_decoder.h" #define STDDEV_NORM_FACTOR 1.813799364234218f // 2.0f * FL_M_PI / sqrt(12) namespace vor { Decoder::Decoder(dsp::stream<dsp::complex_t>* in, double integrationTime) { rx.init(in); reshape.init(&rx.out, round(1000.0 * integrationTime), 0); symSink.init(&reshape.out...
ALGO
0.988542
5.70631
a3655b3e-913a-43c2-b71f-2bf974e28f1b
linbird/MessageRouter
copy.cpp
#include <iostream> // 声明通用的模板 template <typename T> struct MyClassWrapper; template <typename Ret, typename Class, typename... Args> struct MyClassWrapper<Ret(Class::*)(Args...)> { using ReturnType = Ret; using ClassType = Class; using FuncType = Ret(Class::*)(Args...); }; // // 模板特化,匹配 MyClass 类的成员函数 /...
TOOL
0.866194
7.236095
e3d4e9d0-0729-4642-9bc9-d83bab2c9d80
DongDaYo/My-Data-Structure
Data Structure/Data Structure Project/Exercise - DFSTraverse to find loop.cpp
#include "MGraph.cpp" bool visited[MaxVertexNum]; int connect = 0; int connectivity[MaxVertexNum] = { 0 }; MGraph<char> graph(DG); map<char, int> mp; int loop = 0; bool back = false; template<typename T> void DFS(MGraph<T>& graph, int i) { visited[i] = true; connectivity[i] = connect; for (int j = graph.firstneighb...
ALGO
0.999723
3.595524
550a2266-8cae-468e-b995-158ab6929775
HurayraIIT/competitive-programming
codeforces/random/A_Even_Substrings.cpp
// Abu Hurayra (HurayraIIT) // IIT, Jahangirnagar University #include <iostream> #include <string> #include <vector> #include <algorithm> #include <queue> #include <deque> #include <bitset> #include <list> #include <stack> #include <map> #include <set> #include <math.h> #include <stdio.h> #include <string.h> using nam...
ALGO
0.999862
3.606052
98e20d4a-b885-4404-9511-a5f5dc89094b
dtwkac/leetcode
src/92-reverse-linked-list-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* reverseBetw...
ALGO
0.999995
5.734561
d882177b-531d-40ca-866f-cb984a5117c3
deygithub/udemy
C++/codechef/trial2.cpp
#include <iostream> using namespace std; int main(){ int t; cin >> t; for (int i=0; i<t ;i++) { int x,y; cin >> x >> y; if(x < y) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
ALGO
0.999965
4.134383
954a801d-da89-4e46-bca0-f9c2f7b25384
yixiangLuo/CandleCG
ext/assimp/code/IFCOpenings.cpp
/** @file IFCOpenings.cpp * @brief Implements a subset of Ifc CSG operations for pouring * holes for windows and doors into walls. */ #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER #include "IFCUtil.h" #include "PolyTools.h" #include "ProcessHelper.h" #include "../contrib/poly2tri/poly2tri/poly2tri.h" #include "../con...
TOOL
0.893428
3.666782
52214c52-d49a-4aae-a176-bcba06b4aac7
ishandutta2007/codeforces
okrut/normal/1261/F.cpp
#include <bits/stdc++.h> #define rep(i,a,b) for (int i=a; i<b; i++) #define mp make_pair #define pb push_back #define fi first #define se second #define debug printf using namespace std; typedef long long ll; typedef long double ld; const ll mod = 998244353; ll pot (ll a, int wyk) { ll ret = 1LL; while (wyk>0) { ...
ALGO
0.999877
4.084111
edae9b32-1135-42f5-80a7-eea8792ae2c7
LordSerg/LearnCppLang
some trash/task1/task1/io.cpp
#include <iostream> int readNumber() { std::cout << "Input integer: "; int a; std::cin >> a; return a; } void writeAnswer(int chislo) { std::cout << "Sum of those two numbers is " << chislo << std::endl; }
TOOL
0.925595
3.753403
7eea08e2-72c9-4cf1-920e-dbce643bdc2e
myc0603/CodingTestStudy
week6/O2565.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int line_cnt, a, b; vector<pair<int, int>> v; int main() { cin >> line_cnt; for (int i = 0; i < line_cnt; i++) { cin >> a >> b; v.push_back({ a, b }); } sort(v.begin(), v.end()); vector<int> lis; ...
ALGO
0.999742
4.374787
0b8f4e90-28b0-4739-9931-6b8e8e57e844
GarageGames/Qt
qt-5/qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/text/StringTruncator.cpp
#include "config.h" #include "platform/text/StringTruncator.h" #include "platform/fonts/Font.h" #include "platform/text/TextBreakIterator.h" #include "platform/text/TextRun.h" #include "wtf/Assertions.h" #include "wtf/unicode/CharacterNames.h" namespace blink { #define STRING_BUFFER_SIZE 2048 typedef unsigned Trunc...
TOOL
0.919227
7.283996
c298582a-1162-4217-83d8-d1144b0f240d
UTEC-PE/sparse-matrix-Guillermo598
main.cpp
#include <iostream> #include "matrix.h" using namespace std; int main(int argc, char *argv[]) { Matrix<int> a(5, 5); Matrix<int> b(5, 5); a.set(4,1,4); a.set(3,3,7); b.set(0,0,3); b.set(2,2,8); Matrix<int> c(2, 2); Matrix<int> d(2, 2); c.set(0,0,1); c.set(1,0,1); c.set(1,...
ALGO
0.99756
3.902272
ec43ce51-672c-4d16-9b3d-97f60d37d3c6
noko206/AtCoder
abc/51-100/65/a.cpp
// clang-format off #include <bits/stdc++.h> using namespace std; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif #define _overload3(_1,_2,_3,name,...) name #define _REP(i,n) REPI(i,0,n) #define REPI(i,a,b) for(int i=int(a);i<int(b);++i) #define REP(...) _overload3(__VA_ARGS__,R...
ALGO
0.995885
4.812497
065c4fd8-c704-46db-9a60-b448f96618ec
2013612/CP-algorithm
codeforces/1358/1358D.cpp
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; long long N, ans, a[400006], X, d[400006], sum[400006]; int main() { scanf("%lld %lld", &N, &X); for (int i = 0; i < N; i++) { scanf("%lld", &a[i]); a[N + i] = a[i]; } d[0] = 0; sum[0] = 0; for (int i = 1; i <= 2*N;...
ALGO
0.99988
3.541941
a42db6c9-910f-4208-8917-b8dde64261ac
openUC2/Marlin-2.0.9.6
Marlin/src/feature/meatpack.cpp
/** * MeatPack G-code Compression * * Algorithm & Implementation: Scott Mudge - <EMAIL> * Date: Dec. 2020 * * Character Frequencies from ~30 MB of comment-stripped G-code: * '1' -> 4451136 '4' -> 1353273 '\n' -> 1087683 '-' -> 90242 * '0' -> 4253577 '9' -> 1352147 'G' -> 1075806 'Z' -> 34...
TOOL
0.940993
5.899114
94c1769e-2cb6-4184-bb36-0ea9ad46c1ac
redscientistlabs/Flycast52X-Vanguard
core/deps/xbyak/sample/bf.cpp
#define XBYAK_NO_OP_NAMES #include "xbyak/xbyak.h" #include <stdio.h> #include <stdlib.h> #include <stack> #include <fstream> #ifdef _MSC_VER #pragma warning(disable : 4996) // scanf #define snprintf _snprintf_s #endif class Brainfuck : public Xbyak::CodeGenerator { public: int getContinuousChar(std::istream& is, c...
TOOL
0.909163
5.95297