uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
1d31a178-003a-4a02-82a8-33a55de109f7
ishandutta2007/codeforces
receed/normal/1327/A.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <vector> #include <algorithm> #include <cmath> #include <cstring> #include <cassert> #include <string> #include <set> #include <map> #include <random> #include <bitset> #include <string> #include <unordered_set> #include <unordered_map> #include <deque> ...
ALGO
0.999753
4.391365
553f04b9-d914-4526-9472-9a9dd32dba73
GersonCavalheiro/OpenMPSnapshot
May2023/RepCPP/268889840/omp_critical.cpp
#include <iostream> #include <omp.h> #include <unistd.h> #include <vector> int main() { int n_threads, thread_id; int size = 10; std::vector<double> a(size), b(size); std::fill(a.begin(), a.end(), 2); std::fill(b.begin(), b.end(), 3); double dot_prod = 0.0; double aux_dot = 0.0; #pragma omp parallel private(n_threa...
ALGO
0.999026
4.700468
35ecd014-7f5a-4c5b-8e29-dcc7606b5280
MDNROnik/DSA-Solves
329-longest-increasing-path-in-a-matrix/longest-increasing-path-in-a-matrix.cpp
class Solution { public: int fun(vector<vector<int>>& matrix, vector<vector<int>>& v, int i, int j, int n, int m){ if(i==n && j==m){ return 0; } if(v[i][j]!=-1){ return v[i][j]; } int left = 0, right = 0, up = 0, down = 0; //cout<<matrix[i][j]<...
ALGO
0.999992
5.489564
da6f6110-c5df-4674-a81a-ac1a45385f54
AkshitGarg24/LeetCode_solutions
1556-make-two-arrays-equal-by-reversing-subarrays/make-two-arrays-equal-by-reversing-subarrays.cpp
class Solution { public: bool canBeEqual(vector<int>& target, vector<int>& arr) { unordered_map<int,int> m; for(int i=0;i<target.size();i++){ m[target[i]]++; m[arr[i]]--; } for(auto x : m){ if(x.second!=0){ return false; ...
ALGO
0.99991
5.763557
9fcaef19-15e2-4637-947c-1a4e4dd4c426
codulluiandrei/pbinfo
pbinfo-169/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { int nr; cin >> nr; cout << nr / 100 + nr % 10 + nr / 10 % 10; return 0; }
ALGO
0.998312
4.077534
68d232de-bf40-49c0-8db6-e7216b6db905
ChiyoYuki/xcpc
cf/2069/binpow.cpp
long long binpow(long long base, long long exp, long long mod) { long long ans = 1; base %= mod; while (exp) { if (exp & 1LL) ans = ans * base % mod; base = base * base % mod; exp >>= 1; } return ans; } long long binpow(long long base, long long exp) { lo...
ALGO
0.99992
4.256083
8e661a29-6fc6-4a54-b953-65f84b03ae8c
hikjik/leetcode
solutions/minimum-time-to-revert-word-to-initial-state-i/test.cpp
#include <catch.hpp> #include <solution.hpp> TEST_CASE("Simple") { struct TestCase { std::string word; int k; int expected; }; std::vector<TestCase> test_cases{ { .word = "abcbabcd", .k = 2, .expected = 4, }, { .word = "abacaba", ....
TEST
0.977164
7.195195
b2b42546-9428-4e46-b91f-a464181d823a
CrAnish07/DSA-SQL
42-trapping-rain-water/trapping-rain-water.cpp
class Solution { public: int trap(vector<int>& height) { int n = height.size(); int total = 0; vector<int> prefixMax(n); vector<int> suffixMax(n); prefixMax[0] = height[0]; for(int i = 1; i < n; i++) { prefixMax[i] = max(prefixMax[i-1], height[i]); ...
ALGO
0.999988
6.982349
e3a40701-994c-4093-91e9-b629e144b8d4
firza-malik/C-C-DS
insertbottom.cpp
//Write a C++ program to insert new ITEM at Bottom of the array. Print all elements //of the array. #include <iostream> using namespace std; int main() { int capacity; cout << "Enter the array capacity: "; cin >> capacity; int num[capacity] = {1, 3, 4, 5, 6, 7, 8, 8}; int size = 9; if (size >...
ALGO
0.997762
4.864077
cd0fbc1a-175e-4957-bd09-eca53ac741db
er-prateek-tripathi/CP
DSA/Arrays/DuplicateElements.cpp
// Program to find and print duplicate elements in an array. // Problem Link: https://www.codingninjas.com/studio/problems/duplicate-in-array_893397?source=youtube&campaign=love_babbar_codestudio1&utm_source=youtube&utm_medium=affiliate&utm_campaign=love_babbar_codestudio1&leftPanelTabValue=PROBLEM #include<bits/stdc+...
ALGO
0.999907
4.278637
cf6d4ddb-5f0d-4860-9160-b158f3621a4c
cwang588/algorithms
cf zealots/CF Zealots Problem Set #25/C.cpp
#include<bits/stdc++.h> using namespace std; long long a[200005]; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; for(int i=1;i<=n;++i)cin>>a[i]; long long Max=0; for(int i=1;i<=n;++i)Max=max(a[i],Max); long long tot=0; for(int i=1;i<=n;++i)tot+=a[i]; long long ans=(n-1)*Max-tot; if(ans<0)ans...
ALGO
0.999953
4.08177
99ac0db0-95b2-47de-91fc-b48458685327
namansukhwani/ADA
DijkstrasMethod.cpp
#include<iostream> using namespace std; #define V 7 int mindistance(int distance[],bool mstset[]){ int min=INT_MAX,min_index; for(int v=0;v<V;v++){ if(mstset[v]==false &&distance[v]<min){ min=distance[v]; min_index=v; } } return min_index; } void printmst(int distance[],int n){ cout<<"Vertex Distance fr...
ALGO
0.999943
3.774642
f01848b9-c161-4a48-ae8f-3f8d05e6b7fc
Labhesh2406/Codeforces
practice/2007A.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int l, r; cin >> l >> r; int ans = (r + 1) / 2 - l / 2; cout << ans / 2 << endl; } int main(int argc, char const *argv[]) { int t; cin >> t; while (t--) { solve(); } return 0; }
ALGO
0.999857
4.645599
63f0bda8-e9ef-49ea-863a-bb997b8d0217
Ashraful-islam26/CPP
Array/Sorting/quickSort.cpp
#include <bits/stdc++.h> using namespace std; // Quick Sort Algorithm /*Quick Sort is a sorting algorithm based on the Divide and Conquer that picks an element as a pivot and partitions the given array around the picked pivot by placing the pivot in its correct position in the sorted array.*/ void quickSort(vector<...
ALGO
0.999979
5.278203
a16ac0fa-e04c-47f7-8557-6dd342c78fbf
srmalkan/CodeChef
APRILLONG/SQRDSUB.CPP
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ll; int main() { // your code goes here ll T; cin>>T; while(T--){ ll N,count=0; cin>>N; ll A[N]; for(ll i=0;i<N;i++){ cin>>A[i]; if(A[i]%2!=0){ count++; } } ll i=0,j=0,cntTw...
ALGO
0.999473
4.208763
b071b393-4d45-4dc8-8907-d43b82369a1f
carolus21rex/AgeOfTitanomachy
common/misc.cpp
#ifdef _WINDOWS // VS6 doesn't like the length of STL generated names: disabling #pragma warning(disable:4786) #endif #include "global_define.h" #include <string> #include <stdio.h> #include <stdlib.h> #include <map> #include <iostream> #include <zlib.h> #ifndef WIN32 #include <sys/time.h> #endif #include <time.h> ...
TOOL
0.88812
3.912955
274cc2f6-beed-425e-8f2b-7a9591d389df
wuzoo/Solving_problem
백준/실버/9375. 패션왕 신해빈/패션왕_신해빈.cpp
#include <iostream> #include <unordered_map> using namespace std; int main(){ int t; cin >> t; while(t--){ int n; cin >> n; unordered_map<string, int> m; for(int i = 0; i < n; ++i){ string a, b; cin >> a >> b; if(m[b]){ ...
ALGO
0.999819
4.306968
73d85703-45e6-40b7-aaa7-ec1453201cec
Amarnadh93/DSA0112-C-plus-plus
1020.cpp
#include <iostream> using namespace std; int main() { int n, sum = 0; cout << "Enter a number: "; cin >> n; while (n != 0) { sum += n % 10; n /= 10; } cout << "Sum of digits is: " << sum << endl; return 0; }
ALGO
0.998747
6.27891
6201ad41-3738-4f98-80f9-87f1f59332a3
YashMundankar/Leetcode
unique-morse-code-words/unique-morse-code-words.cpp
class Solution { public: int uniqueMorseRepresentations(vector<string>& words) { vector<string>v1={".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."}; unordered_set<string>s1; string...
ALGO
0.999928
6.44011
08175e32-8839-4fb1-acff-599f62b3f6f9
GaoGuangyong/LC
剑指Offer(第2版)/剑指Offer 68-I.【Easy】【递归】二叉搜索树的最近公共祖先.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ // 递归 // 1、若 p 和 q 都小于 root,则说明 p,q 都在 root 左侧,LCA 在 root 的左子树上,故递归搜索 root->left // 2、若 p 和 q 都大于 root,则说明 p,q 都在 root 右侧,...
ALGO
0.999985
6.372427
6c197688-2dee-4ced-a83a-e0bd7a50d306
ishandutta2007/codeforces
pinkrabbit/normal/1468/F.cpp
/* Author: QAQAutomaton Lang: C++ Code: F.cpp Mail: <EMAIL> Blog: https://www.qaq-am.com/ */ #include<bits/stdc++.h> #define int long long #define debug(...) fprintf(stderr,__VA_ARGS__) #define DEBUG printf("Passing [%s] in LINE %d\n",__FUNCTION__,__LINE__) #define Debug debug("Passing [%s] in LINE %d\n",__FUNCTION__,_...
ALGO
0.999829
3.561938
83c03832-35fe-40ca-af20-50b1c9cb3ebd
iamarghamallick/LeetCode-Solutions
1063-65-2594-minimum-time-to-repair-cars/1063-65-2594-minimum-time-to-repair-cars.cpp
class Solution { public: long repairCars(vector<int>& ranks, int cars) { int minRank = ranks[0], maxRank = ranks[0]; // Find min and max rank dynamically for (int rank : ranks) { minRank = min(minRank, rank); maxRank = max(maxRank, rank); } // Freque...
ALGO
0.999924
6.24921
6cebe30e-f66a-4c9f-8911-ea2d66aceb78
soyapo/Codeforces
General/A/C++/A-266.cpp
#include<bits/stdc++.h> using namespace std; int main() { string colors; int count, counter; cin>>count>>colors; for(int i = 0; i<colors.length();i++) if(colors[i] == colors[i+1]) counter++; cout<<counter; }
ALGO
0.99928
3.468865
72e97fa7-3188-407f-97f6-2c3a2f7152f6
mkp0/CP
CodeForce/1388A - Captain Flint and Crew Recruitment.cpp
#include <bits/stdc++.h> #define ll long long #define pi (3.141592653589) #define all(x) (x).begin(), (x).end() #define vi vector<int> #define vll vector<long long> #define pii pair<int, int> #define pll pair<long long, long long> #define pb push_back #define mp make_pair #define S second #define loop(i, a, b, c) for ...
ALGO
0.998992
3.388932
5c6a2d93-14c0-4fce-8ae9-308e09e814a4
deb8192/DeadlyDanceDeb
OpenGL_Tutoriales/Lighting/1-Iluminacion_Colores/librerias/reactphysics3d/src/collision/shapes/ConvexPolyhedronShape.cpp
// Libraries #include "ConvexPolyhedronShape.h" // We want to use the ReactPhysics3D namespace using namespace reactphysics3d; // Constructor ConvexPolyhedronShape::ConvexPolyhedronShape(CollisionShapeName name) : ConvexShape(name, CollisionShapeType::CONVEX_POLYHEDRON) { } // Find and return the index ...
ALGO
0.992999
6.959239
e5b1c3e5-949d-4162-bc96-b5cd36ff8290
WuXibin/practiceCode
leetcode/fullJustify.cpp
#include <iostream> #include <vector> #include <string> using namespace std; vector<string> fullJustify(vector<string> &words, int L) { vector<string> ans; int sz = words.size(); int wc = 0, wl = 0; for(int i = 0; i < sz; i++) { int ws = words[i].size(); if(wl + ws + wc > L) { ...
ALGO
0.999942
4.632626
4b58ffcd-37f6-4284-a9fb-cd0819a63919
ishandutta2007/codeforces
kort0n/normal/1185/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T &a, T b) { if(a > b) { ...
ALGO
0.999605
3.314209
aeaf7357-8678-437f-a6ab-51c4975f8060
arhuaco/junkcode
junk/magic-cube/cube.cpp
#include <stdio.h> #define VACIO -1 class Cubo { int C[51][51]; int N; public: /* Función que inicializa el problema */ Cubo(int N); /* Resuelve el problema */ void resuelve(); void imprime(); }; Cubo::Cubo(int _N) { N = _N; for (int i = 0; i < N; ++i) for (int j = 0; j < N; +...
ALGO
0.999896
4.173126
201d1af4-3a6b-475f-8c12-4ff3377b3692
VinhTungg/PTIT_C_PLUS_PLUS
CPP0355 - Xu Ly Van Ban.cpp
#include <bits/stdc++.h> #define ll long long #define foru(i,a,b) for(int i = a; i <= b; ++i) #define ford(i,a,b) for(int i = a; i >= b; --i) #define boost ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define pb push_back #define mk make_pair #define fi first #define se second #define endl "\n" #define sz size #de...
ALGO
0.999208
3.889711
840e3ab6-50aa-40b9-9d33-43adcb7de5de
paul2705/OI
contact/codeforces/cfR#589/D.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int MAXN=1e5+5; const int MAXM=6e5+6; int edge,head[MAXN],tail[MAXM],nex[MAXM]; int rd[MAXN]; int n,m,cnt[MAXN],id[MAXN]; int bel[MAXN]; void add(int u,int v){ edge++,nex[edge]=head[u],head[u]=edge,tail[edge]=v; rd[v]...
ALGO
0.999945
3.93701
0fd04f1e-e29a-4b63-8b68-a2c058dc30b7
HiGeuni/Problem-Solving
BaekJoon/10090_mergeSort.cpp
#include<cstdio> using namespace std; #define MAXN 1000001 //Merge Sort int A[MAXN + 10]; int sorted[MAXN + 10]; long long ans; void merge(int l, int m, int r) { int i, j, k; i = l; j = m + 1; k = l; while (i <= m && j <= r) { if (A[i] <= A[j]) sorted[k++] = A[i++]; else { ...
ALGO
0.999909
4.144898
af355c31-57f9-4230-8521-314faa72d5b3
shawwn/bootstrap
Engine/Common/UHuffman.cpp
// class header. #include "UHuffman.h" // project includes. #include "UBitReader.h" #include "UBitWriter.h" // std c++ includes. #include <algorithm> #include <set> struct SNode { // ctor. SNode() : parent( 0 ), score( 0 ), value( 0 ) { } // internal node data. SNode* parent; unsigned int score; unsigned char...
ALGO
0.998838
6.411766
afa86fe3-841e-48c9-b3b1-34d18d93fdc8
vigneshsnaik/leetcode-solutions
0048-rotate-image/0048-rotate-image.cpp
// https://leetcode.com/problems/rotate-image class Solution { public: void rotate(vector<vector<int>>& matrix) { int n=matrix.size(); if (n==1) return; for(int i=0;i<n;i++){ for(int j=0;j<i;j++){ int temp=matrix[i][j]; matrix[i][j]=matrix[j][i]; ...
ALGO
0.999978
6.727738
60c175f8-d1f5-48b3-98bd-23aeede80d86
rsrs2013/MilvusPGExpr
internal/core/src/exec/expression/BinaryRangeExpr.cpp
#include "BinaryRangeExpr.h" #include "query/Utils.h" namespace milvus { namespace exec { void PhyBinaryRangeFilterExpr::Eval(EvalCtx& context, VectorPtr& result) { switch (expr_->column_.data_type_) { case DataType::BOOL: { result = ExecRangeVisitorImpl<bool>(); break; } ...
TOOL
0.972668
7.789307
2402929c-22ba-4d4d-b720-e553aec68c81
ishandutta2007/codeforces
pointy/normal/1487/A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define mem(x) memset(x,0,sizeof(x)) const int N=100001; int n,m,T; int a[N]; inline int read() { char C=getchar(); int F=1,ANS=0; while (C<'0'||C>'9') { if (C=='-') F=-1; C=getchar(); } while (C>='0'&&C<='9') { ANS=ANS*10+C-'0'; C=getc...
ALGO
0.999665
4.24699
7cf8972f-4ad8-4685-9438-7784e4739223
ishandutta2007/codeforces
timmyfeng/normal/1400/D.cpp
#include <bits/stdc++.h> using namespace std; const int N = 3000; int cnt_l[N]; int cnt_r[N]; int a[N]; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; --a[i]; } int...
ALGO
0.999923
4.703088
d055dcd5-0ecd-4ad4-8e15-5b854190d436
DavidePiccinini/thesis_Kimera_Gazebo
gtsam/gtsam/linear/VectorValues.cpp
/** * @file VectorValues.cpp * @brief Implementations for VectorValues * @author Richard Roberts * @author Alex Cunningham */ #include <gtsam/linear/VectorValues.h> #include <boost/bind/bind.hpp> #include <boost/range/combine.hpp> #include <boost/range/numeric.hpp> #include <boost/range/adaptor/transformed.hpp> ...
TOOL
0.993819
7.628382
7f89333b-4131-4dc4-ac6e-c1b0fef687c3
AIxiaodi4Ever/leetcode_in_cpp
01f散列hash/0554.cpp
class Solution { public: int leastBricks(vector<vector<int>>& wall) { unordered_map<int, int> cnt; for (auto& brickRow : wall) { int sum = 0; int n = brickRow.size(); // 不能考虑最后一块砖的右边界,因为属于墙的右边界 for (int i = 0; i < n - 1; ++i) { sum += b...
ALGO
0.999848
6.097072
b97e2692-85a5-4fb1-b6cf-c71eaf839211
CorporaOS/android_frameworks_av
media/module/codecs/amrwb/dec/src/scale_signal.cpp
/* ------------------------------------------------------------------------------ Filename: scale_signal.cpp Date: 05/08/2004 ------------------------------------------------------------------------------ REVISION HISTORY Description: ------------------------------------------------------------------------...
ALGO
0.998826
5.946876
a75b929a-8e25-4d0a-9c0c-e54364d40f68
Raibows/NCEPU-CS-COURSES
Algorithm/CS/15NQueenProblem.cpp
#include <iostream> #include <algorithm> #include <cmath> int all = 13; //the max all queen int n = 0; //the first n queen using namespace std; //check if the kth queen could place in k row and x[k] column bool bPlace(int k, int *x){ for (int i = 0; i < k; i++) { if(x[k] == x[i]){ r...
ALGO
0.999627
3.985069
7057e903-20ce-4754-9f51-f71267b5d7df
amaan8302/gfg
Difficulty: Medium/Palindrome SubStrings/palindrome-sub-strings.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int leng(int left, int right , string &s) { int len = 0; while(left>=0 && right < s.length()) { if(s[left]==s[right]) { len++;lef...
ALGO
0.998877
6.105583
9a229df4-85b7-4b5d-bc21-144fc241718e
sarvex/leetcode-harbour
lcof2/剑指 Offer II 060. 出现频率最高的 k 个数字/Solution.cpp
using pii = pair<int, int>; class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { unordered_map<int, int> cnt; for (int v : nums) ++cnt[v]; priority_queue<pii, vector<pii>, greater<pii>> pq; for (auto& [num, freq] : cnt) { pq.push({freq, num}); ...
ALGO
0.999987
6.038544
6b3b92b1-43b5-4e42-be30-4fa05f3377f0
kohachiro/Orca
deps/tbb/src/test/test_lambda.cpp
#define NOMINMAX #include "tbb/tbb.h" #include "tbb/combinable.h" #include <cstdio> #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include <list> #if !...
TEST
0.93947
5.726674
a51c67f3-2d68-4c66-ba4b-803bcb416a70
Mohamed-Elsogher/Problem-solving
CodeForces/2043A - Coin Transformation.cpp
#include <bits/stdc++.h> using namespace std; #define all(v) v.begin(), v.end() #define pb push_back #define endl "\n" #define yes cout << "Yes " #define no cout << "No" #define sz(x) (x).size() #define ll long long int solve() { ll n ; cin >> n ; ll coins = 1 ; while(n > 3){ n /= 4; coins ...
ALGO
0.999852
4.879465
2078435b-658a-4b75-a48a-141ef90b109b
ishandutta2007/codeforces
fizzydavid/normal/387/A.cpp
#include<cstdio> #include<cstdlib> #include<iostream> using namespace std; int main() { int sh,sm,s,th,tm,t,ph,pm,p; scanf("%d:%d",&sh,&sm); scanf("%d:%d",&th,&tm); s=sh*60+sm;t=th*60+tm;p=s-t; if(p<0)p+=1440; ph=p/60;pm=p%60; if(ph>9)cout<<ph<<":";else if(ph>0)cout<<"0"<<ph<<":";else cout<<...
ALGO
0.995596
3.419728
81b1345a-2a3e-4567-8ee1-6862fb035bfc
403712387/abstract
src/module/base/FaceTrackModule/src/OpencvExtra/tracking/src/trackerBoostingModel.cpp
#include "trackerBoostingModel.hpp" /** * TrackerBoostingModel */ namespace cv { TrackerBoostingModel::TrackerBoostingModel( const Rect& boundingBox ) { mode = MODE_POSITIVE; Ptr<TrackerStateEstimatorAdaBoosting::TrackerAdaBoostingTargetState> initState = Ptr<TrackerStateEstimatorAdaBoosting::TrackerAd...
ALGO
0.994098
6.111649
3bf8a1dc-fe70-4d40-97b5-076388829c12
JustAG7/Competitive_Programming
VKU/2023/VKU Binary Search & Two Pointers/BuyCard.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pf push_front #define db double #define X first #define Y second #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define...
ALGO
0.999902
3.516974
5543882c-5b02-4d9f-ace0-de14d9041847
coolcoolercool/C-PrimePlus
SourceCode/6th/LogicOperation/condit.cpp
/** * author: zzw5005 * date: 2019/11/9 16:47 */ /* * ?: */ #include <iostream> int main06ah(){ using namespace std; int a, b; cout << "Enter two integers:"; cin >> a >> b; cout << "The larger of " << a << " and " << b; int c = a > b ? a : b; cout << " is " << c << endl; return ...
ALGO
0.998343
3.11791
eb65c30d-1555-407a-9d18-e75d9f908848
akshaygupta1407/Leetcode-Solutions
Word Break - Part 2 - GFG/word-break-part-2.cpp
// { Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: vector<string>res; void findHelper(int index,unordered_set<string>set,string curr,string s) { if(index==s.length()) ...
ALGO
0.999741
5.973099
1c55c3a1-4e7a-421f-854b-0e69103c3461
Soquer070/LiftingLoops
llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp
#include "llvm/Transforms/Utils/LowerMemIntrinsics.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/MDBuilder.h" #include "llvm/Support/Debug.h" #include "llvm/Transforms/Utils/BasicBlockUtils...
ALGO
0.974294
4.591602
7b748e91-0df4-4c41-a997-8c71309fc728
nhdhieuu2/Chuyen_De_De_Quy
Bai_080/Bai_080.cpp
#include <iostream> #include <iomanip> using namespace std; void Xuat(int[], int,int ,int); int main() { int n,x,y; cout << "Nhap so phan tu: "; cin >> n; int* a = new int[n]; for (int i = 0; i < n; i++) { cout << "Nhap a[" << i << "]: "; cin >> a[i]; } cout << "Nhap doan can xuat: " << endl; cout << "Nh...
ALGO
0.999467
3.316294
97dacc8a-1ce3-4020-85e8-eacd829930da
GuiFrancini/exercicios-em-cpp
08frase.cpp
/*NAME:08frase.cpp AUTHOR:Guilherme Francini de Oliveira DATE:14/11/2023 DESCRIPTION: algoritmo que conta quantas vezes a palavra AULA apararece na frase */ #include <iostream> #include <string> #include <algorithm> int contarpalavra(const std::string& frase) { const std::string palavramaiuscula = "AULA"; ...
ALGO
0.994473
5.812459
69d3652d-5c99-48d0-b464-2fafa5f63801
phoboslab/JavaScriptCore-iOS
JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp
#include "config.h" #include "DFGCPSRethreadingPhase.h" #if ENABLE(DFG_JIT) #include "DFGBasicBlockInlines.h" #include "DFGGraph.h" #include "DFGPhase.h" #include "Operations.h" namespace JSC { namespace DFG { class CPSRethreadingPhase : public Phase { public: CPSRethreadingPhase(Graph& graph) : Phase(g...
ALGO
0.884028
7.152846
6849d7bf-bd1d-4b9f-8f5e-cc26e5a37957
CleverRaven/Cataclysm-DDA
src/mission_util.cpp
#include <functional> #include <memory> #include <optional> #include <string> #include <string_view> #include <type_traits> #include <utility> #include <vector> #include "avatar.h" #include "cata_assert.h" #include "character.h" #include "city.h" #include "coordinates.h" #include "debug.h" #include "dialogue.h" #inclu...
TOOL
0.862132
3.018073
6caa18a4-a8bd-4d3e-ba88-b88f9c206970
NazmulRahul/CompetitiveProgrammingStuffs
DSA/Bit_masking/subset.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<ll, ll> pll; typedef pair<int, int> pii; #define endl '\n' #define print(b) for(auto &a:b) cout<<a<<' '; #define printN(b) for(auto &a:b) cout<<a<<endl; #define fastio ios::sync_w...
ALGO
0.999933
4.742133
49e04cb5-fc1f-4cb4-b40d-166055731884
surajshekhar/Leetcode
1034-subarrays-with-k-different-integers/subarrays-with-k-different-integers.cpp
class Solution { public: int slidingWindow(vector<int>&nums, int k){ int n = nums.size(); int i = 0, j = 0, count = 0; unordered_map<int,int>mp; while(j < n){ mp[nums[j]]++; while(mp.size() > k){ mp[nums[i]]--; if(mp[nums[i]] ==...
ALGO
0.99997
6.217253
3c753232-e827-4e94-82a9-ca4fdc1f4b8a
nvdmike/CPP-Primer-Plus-Stephen-Prata
class_work/chapter_07/7.18/fun_ptr.cpp
// fun_ptr.cpp -- указатели на функции #include <iostream> double betsy(int); double pam(int); // второй аргумент - указатель на функцию double, // которая принимает аргумент типа ште void estimate(int lines, double(*pt)(int)); int main() { using namespace std; int code; cout << "How many lines of code do you need?...
TOOL
0.9848
4.232791
e2a5cefe-9cce-4f1f-a4e2-aa60df199629
LSNXUV/C--
lesson/homework/Class/classCircle1.cpp
#include <iostream> using namespace std; class Circle { private: /* data */ public: int Radius; int IRadius; float GetArea(); void setR(int r,int r1); int GetI(); }; void Circle::setR(int r,int r1 = 0){ Radius = r; IRadius = r1; } float Circle::GetArea(){ return...
ALGO
0.992896
3.668092
4f248b4b-fd92-445f-85ee-a4d48525892c
rudradevmandal/practice_cpp
December2024/1LinkedList/1LinkedListInsert.cpp
#include <iostream> using namespace std; class Node { private: int data; Node *next_node; public: void InsertAtStart(Node **pointerToHead, int data) { Node *temp = new Node(); temp->data = data; temp->next_node = *pointerToHead; *pointerToHead = temp; (*pointer...
ALGO
0.998453
4.477147
66a57018-5191-4393-bda8-67e0ad209cb4
stefdasca/CompetitiveProgramming
Infoarena/euler.cpp
#include<bits/stdc++.h> #define OrezErami 262145 using namespace std; ifstream f("euler.in"); ofstream g("euler.out"); int n,dad[OrezErami],nr; int nrpasi,nrroots; deque<int>d; bool ok=1; int main() { f>>n; while(f>>nr) { if(d.empty()) d.push_back(nr),dad[nr]=-1; else { ...
ALGO
0.999926
3.902014
0542a440-7902-4fc1-ae25-333c992d5312
nowakkuba99/WaveFunctionCollapse
src/pickTiles.cpp
#include "pickTiles.h" #include <iostream> #include <algorithm> /* Variables */ std::vector<std::vector<Tile*> > Tiles::pickMap(GRID_SIZE_H,std::vector<Tile*>(GRID_SIZE_W)); std::vector<Tile*> Tiles::ListOfTilesToCollapse; std::set<std::pair<int,int> > Tiles::visitedSet; /* FUNCTIONS */ /* Desc: Function to creat...
ALGO
0.992068
5.076516
775bf3a7-bf6e-4a29-96b6-c6bdb2debf95
lindabustaman/Lesson1_Tasks
Lesson 1 Challenge/Main.cpp
#include <iostream> #include <cstdlib> using namespace std; int main() { int player1Num = rand() % 11; int player2Num = rand() % 11; int player1Guess; int player2Guess; //cout << player1Num << endl; //cout << player2Num << endl; for (int i = 0; i < 6; i++) { cout << "Player 1, guess a number between 1 a...
ALGO
0.913381
3.150275
67423ebd-6742-43ca-9113-88bacad3c490
warpem/warp
NativeAcceleration/liblion/mask.cpp
#include "mask.h" namespace relion { // Mask out corners outside sphere (replace by average value) // Apply a soft mask (raised cosine with cosine_width pixels width) void softMaskOutsideMap(MultidimArray<DOUBLE> &vol, DOUBLE radius, DOUBLE cosine_width, MultidimArray<DOUBLE> *Mnoise) { vol.setXmippOrigin(); ...
ALGO
0.971432
5.57755
154e8e20-3300-41ca-a7a0-2c96068aa684
ishandutta2007/codeforces
alternatingcurrent/normal/1547/B.cpp
#include<bits/stdc++.h> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; int cnt[33]; int main(){ ios::sync_with_stdio(false); int T; cin >> T; while(T--){ memset(cnt, 0, sizeof(cnt)); string s; cin >> s; int n = (int)s.size(); rep(i, n) cnt[s[i] - 'a']++; bool ok = 1; rep(i, n) ...
ALGO
0.999968
4.185307
d68140be-2620-4841-8e67-e7cd3bc3fee1
AlgoZenithNITC/GFG_POTD_Solutions_AlgoZenithNITC
10-09-2023_Height_of_the_Binary_Tree.cpp
class Solution{ public: //Function to find the height of a binary tree. int height(struct Node* node){ if(node == NULL){ return 0; } return 1 + max(height(node -> left), height(node -> right)); } };
ALGO
0.999396
5.521197
1b91d62f-fef9-4e04-aa14-ba81973759b1
ishandutta2007/codeforces
rainair/normal/587/F.cpp
#include <algorithm> #include <iostream> #include <cstring> #include <climits> #include <cstdlib> #include <cstdio> #include <bitset> #include <vector> #include <cmath> #include <ctime> #include <queue> #include <stack> #include <map> #include <set> #define fi first #define se second #define U unsigned #define P std::...
ALGO
0.999541
3.786335
867c77a4-6547-44ea-9067-33d711c9ec6b
sakshi324/CPP-Program
recursion6.cpp
#include<iostream> using namespace std; void replacePi(string s){ if(s.length()==0){ return ;//base case } if(s[0]=='p'&& s[1]=='i'){ cout<<"3.14"; replacePi(s.substr(2)); } else{ cout<<s[0]; replacePi(s.substr(1)); } } int main(){ replacePi("pipppippippppi"); return 0...
ALGO
0.999799
3.74508
64c9766f-0bf8-41df-96e6-5b0cca70b623
shivankar-p/codeforces
e114/Two_Dishes.cpp
#include<bits/stdc++.h> using namespace std; #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 int long long #define mod 1000000007 //vector<vector<int>> a(n , vector<int>(m, 0)); /*=======================*/ void solve() { int i, j, n, m, a, b, c; ...
ALGO
0.999694
3.675101
76108701-d568-49f0-99fd-f69c948af59c
JamilmFaris/snake-game
main.cpp
#include <bits/stdc++.h> #include <conio.h> const int RIGHTBORDER = 25; const int UPBORDER = 0; const int DOWNBORDER = 20; const int LEFTBORDER = 0; using namespace std; char gameArea[1000][1000]; map<char, char> opposite; void fillGameArea(){ for(int i = UPBORDER;i <= DOWNBORDER;i++){ for(int j = LEFTBOR...
ALGO
0.997599
3.373668
44a3a3f6-73b1-472c-b3be-12311e796787
vanphuc1208/string-nang-cao
B7Xaudoixung.cpp
#include <bits/stdc++.h> using namespace std; void lower(string &s) { for (char &x:s) { x=tolower(x); } } void upper(string &s) { for (char &x:s) { x=toupper(x); } } bool check(string s) { string m=s; reverse(s.begin(),s.end()); return m==s; } int main() { string s; cin>>s; if(check(s)) cou...
ALGO
0.999974
4.314435
892e007f-c09c-4121-baac-9f20450fc974
lukasmonk/lucaschess
Engines/Linux32/stockfish/src/movegen.cpp
#include <cassert> #include "movegen.h" #include "position.h" namespace { template<Color Us, CastlingSide Cs, bool Checks, bool Chess960> ExtMove* generate_castling(const Position& pos, ExtMove* moveList) { constexpr CastlingRight Cr = Us | Cs; constexpr bool KingSide = (Cr == WHITE_OO || Cr == BLACK_OO...
ALGO
0.973519
7.246873
3949bae2-def4-487c-ac8e-b373fa5bfa80
ShuoYangRobotics/ocs2
ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_interface/src/QuadrupedMpc.cpp
// // Created by rgrandia on 06.07.21. // #include "ocs2_quadruped_interface/QuadrupedMpc.h" #include <ocs2_ddp/GaussNewtonDDP_MPC.h> #include <ocs2_sqp/SqpMpc.h> namespace switched_model { std::unique_ptr<ocs2::MPC_BASE> getDdpMpc(const QuadrupedInterface& quadrupedInterface, const ocs2::mpc::Settings& mpcSettings...
TOOL
0.893001
5.602241
1311b5e3-d842-4fce-85e9-a5130031aebc
tankebuaa/OTBbenchmark-py3
trackers/LOT/TurboPixels64/lsmlib/doHomotopicThinning.cpp
/*=========================================================================== * * computeExtensionFields2d() computes a distance from an * arbitrary level set function using the Fast Marching Method. * * Usage: [distance_function, extension_fields] = ... * computeExtensionFields2d(phi, source_fields, dX,...
ALGO
0.99911
7.11615
92d56127-7f0e-441f-83ba-9e0e291bb61a
ehyeok9/Algorithm
BEAKJOON/5635.cpp
#include <iostream> #include <vector> #include <utility> #include <string> #include <algorithm> using namespace std; int main(){ int n; scanf("%d", &n); vector<string> name; vector<int> day; vector<int> month; vector<int> year; for (int i=0; i<n; i++){ string str; cin >> s...
ALGO
0.999234
4.137099
357ed462-22e4-4c93-9597-301618310962
qhoa256/PTIT-CODE-CPP
Toan roi rac 1/Quay_lui_hoan_vi.cpp
#include<bits/stdc++.h> using namespace std; int n; int x[100]; int check[100]; void print(){ for(int i=1;i<=n;i++){ cout<<x[i]; } cout<<endl; } void Try(int i){ for(int j=1;j<=n;j++){ if(check[j]==0){ check[j]=1; x[i]=j; if(i==n){ pr...
ALGO
0.999494
3.803343
ab33306f-bbed-4f0a-9c96-96f24edb319e
sestys/alg_puzzles
hackerrank/shapes.cpp
#include <iostream> #include <memory> #include <numeric> #include <vector> class Shape { public: virtual int GetArea() const = 0; virtual ~Shape() = default;; }; class Rectangle : public Shape { public: Rectangle(int height, int width) : height_(height), width_(width) {}; int GetArea() const override ...
ALGO
0.989259
5.477388
65e07ca1-a0e2-4e9a-9438-95bedeef31e4
ishandutta2007/codeforces
hank55663/normal/1132/E.cpp
#include<bits/stdc++.h> #define LL long long #define pii pair<int,int> #define x first #define y second #define pb push_back #define mp make_pair #define MEM(x) memset(x,0,sizeof(x)) #define MEMS(x) memset(x,-1,sizeof(x)) using namespace std; #define MXN 100005 LL a[10]; LL cal(int x,LL w){ if(x==1) return min(w,a[x]...
ALGO
0.999825
3.351033
2e7c160c-9e98-4150-ba36-10dfa7ba8786
priya2001/gfg_potd_AC
Easy/Delete nodes having greater value on right/delete-nodes-having-greater-value-on-right.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; struct Node { int data; Node* next; Node(int x){ data = x; next = NULL; } }; void print(Node *root) { Node *temp = root; while(temp!=NULL) { cout<<temp->data<<" "; temp=temp->next; ...
ALGO
0.999906
5.384701
3d185699-a4f4-40b3-9430-0eb109c4bed5
IlanPy/TAMU-classes
CSCE313 Intro to Computer Systems/class_code/week8/multithreading/primes.cpp
#include <stdio.h> #include <time.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <thread> #include <mutex> #include <sys/time.h> #include <math.h> #include <iostream> #define NUM_OF_CORES 8 #define MAX_PRIME 1000000 using namespace std; mutex m; int found_primes = 0; struct timeval start_time,...
ALGO
0.99973
4.04131
c82db571-d72e-483b-8de6-b0e447ffa685
Gustavofigura01/projeto-compilador
pilheitor.cpp
#include <iostream> #include <vector> #include <fstream> #include <stack> #include <stdio.h> using namespace std; struct operacao { string rot, instr, arg; }; vector<operacao> programa; bool temarg(string &op) { return (op=="PUSH" or op=="ATR" or op=="GOTO" or op=="GTRUE" or op=="GFALSE"); } int rotulo(str...
ALGO
0.868678
3.587607
79cde7d2-db7f-4d2a-b2d9-f5fa489a517d
amanBhawsar/Coding-Tree
CODECHEF/Problems/JOHNY.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--){ vector<int> arr; int n,k,z,c=0; cin >>n; for(int i=0;i<n;i++){ cin >> k; arr.push_back(k); } cin >> z; for(int i=0;i<n;i++){ if(arr[i]<arr[z-1]){ c++; ...
ALGO
0.999848
3.2464
b4dccbbc-3fb3-453e-89f4-db0f5f40ca05
vinay-kumar99/Hactoberfest2022
C++/Code Chef - Beginner Level Solutions/ARRAYBREAK.cpp
/* Problem link: https://www.codechef.com/problems/ARRAYBREAK */ #include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ long n; cin>>n; vector<long> arr; long e=0,f=0; for(int i=0;i<n;i++){ int temp; cin>>temp; arr.push_back(t...
ALGO
0.999722
4.819843
bbcdf5a0-baa2-477e-859c-d6c73a199c09
Kallaf/Codeforces
Codeforces Round #540 (Div. 3)/C - Palindromic Matrix.cpp
#include <bits/stdc++.h> using namespace std; int tc=1,n,in,numbers[1003]={0}; void preprocess(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } void input() { scanf("%d",&n); for(int i=0;i<n*n;i++) { scanf("%d",&in); numbers[in]++; } } void solve() { ...
ALGO
0.999944
4.111342
7bd4b4cf-5eac-4e76-ac95-157d828a9f48
C-mmon/New_Dawn
Leetcode/buddy_string.cpp
if (A.length() != B.length()) return false; if (A == B && set<char>(A.begin(), A.end()).size() < A.size()) return true; vector<int> dif; for (int i = 0; i < A.length(); ++i) if (A[i] != B[i]) dif.push_back(i); return dif.size() == 2 && A[dif[0]] == B[dif[1]] && A[dif[1]] == B[dif...
ALGO
0.999591
3.177166
05fe7d42-4f3e-4125-9952-8072115a25a9
kamranahmad786/399DaysofCodeChallenge
Day94.cpp
class Solution { public: double average(vector<int>& salary) { double ans; sort(salary.begin(),salary.end()); salary.pop_back(); salary.erase(salary.begin()); double sum=0; for(int i=0;i<salary.size();i++){ sum+=salary[i]; } ans=sum/salary...
ALGO
0.999551
5.376526
bb60aa33-2f34-45c4-8baf-01b394b7fcf5
yoonkeen88/codetree-TILs
240130/문자열 순서 바꾸기/change-order-of-strings.cpp
#include <iostream> #include <iomanip> #include <string> using namespace std; int main() { string a, b; cin >> a >> b; string temp = a; a = b; b = temp; cout <<a <<endl<<b; return 0; }
ALGO
0.999264
4.180429
67c58fef-8504-4508-b1e3-2d1b863fc050
user992199/Illuminati_PP_Oct22
31-12/sum_of_arr.cpp
#include<iostream> using namespace std; int sum_of_arr(int arr[], int n){ // base case if(n == 0) return 0; // recursive case return arr[n-1] + sum_of_arr(arr, n-1); } int sum_of_arr_2(int arr[], int i, int n){ // base case if(i == n) return 0; // recursive case return arr[i] + sum_of_arr_2(arr, i+1, n); } int ...
ALGO
0.999902
5.151498
0ec3311b-d03a-4f02-b43a-bc89a725bb9c
binbli/Virtual-Lane-Boundary-Generation
3rdParty/ICNet/PSPNet/densecrf/refine_pascal/dense_inference.cpp
/* * The code is modified from the NIPS demo code by Philipp Krähenbühl * * * * */ #include <cstdio> #include <iostream> #include <vector> #include <cmath> #include <cstdlib> #include <string.h> #include <fstream> #include <dirent.h> #include <fnmatch.h> #include "../libDenseCRF/densecrf.h" #include "../libDen...
DATA
0.962829
4.976602
23772b58-022d-4909-9c61-cb86fb0c2e8e
mash3-gt/cpp_algo_on_multi_platform
abc/366a.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, t, a; cin >> n >> t >> a; // a or t が過半数(n+1)/2以上をとっていれば確定 if (a >= (n + 1) / 2 || t >= (n + 1) / 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
ALGO
0.999925
3.868797
928caa1c-f466-47a6-877e-fcb45bf8b064
cmmmli/atcoder
ABC/079/a.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <iomanip> #include <cmath> #include <map> #include <set> #include <ctype.h> #include <numeric> using namespace std; typedef long long ll; typedef pair<int, int> P; const ll MOD = 1e9 + 7; const int INF = 1e9; int dx4[4] = { 0, -1, 1...
ALGO
0.999976
3.834138
e9e96652-147c-4543-85aa-e43a3d78f91a
ssyfj/Base64_DES
des.cpp
#include "table.h" #include "des.h" #include <string> #include <qDebug> using namespace std; void Des::Initial_Permutation(BIT pt[64]) { BIT tmp[64]; for (int i = 0; i < 64; i++) tmp[i] = pt[IP[i] - 1]; memcpy(pt, tmp, sizeof(tmp)); return; } void Des::Final_Permutation(BIT pt[64]) { BIT ...
ALGO
0.997854
3.792728
9ab8d0bc-f32b-4844-ac47-c21fd1c1fe60
SamueleVid/competitive_programming
olinfo/tulips/code.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, k; cin >> n >> k; vector<ll>v(n); for (auto &x:v) cin >> x; vector<vector<ll>>dp(k,vector<ll>(n,0)); dp[0][0]=v[0]; for (int i=0;i<n;i++) dp[0][i] = min...
ALGO
0.999961
4.248852
bf3ab92a-c6c4-42c4-8e57-918012d27faf
InwooLeeme/Algorithm
Boj/10517.cpp
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/rope> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_cxx; using namespace __gnu_pbds...
ALGO
0.999906
4.90778
7ca32642-620b-4cc7-9d94-a646aa7a7039
AnasRaxa/Data-Structure-Algo
2D Arrays/binarySearch2d.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int matrix[4][4] = { 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16 }; int target = 11; int n = 4 , m = 4; int start = 0, end = m*n-1, mid, row, col; while(start<=end){ mid = start+(end-start)/2...
ALGO
0.999703
4.414465
53917c3f-e9fd-4260-ac13-a63e4c7aeb01
singh-shreya6/Codes
Blind75/InvertBinaryTree.cpp
/** * https://leetcode.com/problems/invert-binary-tree * 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...
ALGO
0.999941
6.619325
bc34f2b5-52dc-41b0-81ea-cd6db431475d
SamOP105/RKS_Consultancy-
C++/Swap_Btw_2_Number.cpp
#include<iostream> using namespace std; int main() { int a, b, temp; cout << "Enter two numbers: "; cin >> a>> b; temp = a; a = b; b = temp; cout << "After swapping: " << a<< " " << b; return 0; }
ALGO
0.999464
4.413502
c83c66a6-bdfc-419a-8554-5b9a998f6444
KhushiSonkusare/LeetCode
Dungeon_Game.cpp
#include <vector> #include <algorithm> // for max and min functions using namespace std; class Solution { public: int calculateMinimumHP(vector<vector<int>>& dungeon) { int m = dungeon.size(); int n = dungeon[0].size(); // Create a 2D vector to store the minimum health required ve...
ALGO
0.999879
7.097588
f36df694-7289-4baa-81e3-267431f5fc9e
kicho/Ebon-Hold-Converted
contrib/extractor/libmpq/wave.cpp
#include "wave.h" /* Tables necessary dor decompression */ static unsigned long wave_table_1503f120[] = { 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0x00000004, 0xFFFFFFFF, 0x00000002, 0xFFFFFFFF, 0x00000006, 0xFFFFFFFF, 0x00000001, 0xFFFFFFFF, 0x00000005, 0xFFFFFFFF, 0x00000003, 0xFFFFFFFF, 0x00000007, 0xFFFFFFFF, 0x0000...
ALGO
0.911014
4.499835
d849658b-cbd5-4075-9bb4-f58d8a15b8f4
pranavsindura/CompetitiveProgramming
atcoder/abc182/e.cpp
#include <bits/stdc++.h> #define ll long long int #define ld long double #define pi pair<int,int> #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define sz(x) ((int)x.size()) #define ln(x) ((int)x.length()) #define mp make_pair #define pb push_back...
ALGO
0.999734
4.035747
21b6ba13-dd7b-4eff-870f-9d863a94bd71
ishandutta2007/codeforces
noam13/normal/1130/D2.cpp
#include <bits/stdc++.h> //#define int long long //#define vi vector<int> #define pb(x) push_back(x) #define mp(x,y) make_pair(x,y) #define ii pair<int,long long> #define x first #define y second #define all(x) x.begin(), x.end() using namespace std; int dis(int x,int y,int n){ return (y-x+((y-x>=0)?0:n)); } int ...
ALGO
0.999831
3.964237