uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
1ea3cdac-3f34-48a8-9141-4e09ce14b295
salonijaiswal7412/DSA
DP/SubSeq/CoinChange2.cpp
//memoization class Solution { public: int f(int i,int t,vector<int>& arr,vector<vector<int>>& dp){ if(i==0){ return (t%arr[i]==0); } if(dp[i][t]!=-1) return dp[i][t]; int np=f(i-1,t,arr,dp); int p=0; if(arr[i]<=t) p=f(i,t-arr[i],arr,dp); return ...
ALGO
0.999971
5.834301
5a41980a-8a66-464e-8f5b-80a0132168e1
SwotiSara973/CPP_Assignment-
Q5.cpp
/*5. Write a C++ program that uses function overloading to: a. Calculate the area of a triangle when the three sides are given. b. Calculate the area of the triangle (when base and height are given) Note: for (b), make use of default argument We’ll use Heron’s formula to find the area of a triangle in terms of the leng...
ALGO
0.989311
6.772522
fb31e97c-a7d3-4e57-a116-624a364fc3b1
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1688_10.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int cnt[26]; int temp[26]; memset(cnt, 0, sizeof(cnt)); memset(temp, 0, sizeof(temp)); string a, b; cin >> a >> b; int la = a.length(); int lb = b.length(); bool flag = false; if (lb <...
ALGO
0.999994
4.893495
f0fefdbd-201d-402d-86b3-5dceac4ae9bd
sahrawatvinay/DSA
Recursion/tempCodeRunnerFile.cpp
#include <iostream> using namespace std; int getSum(int n) { if(n == 0) return 0; return n + getSum(n-1); } int main() { int num; cout << "enter a number" << endl; cin >> num; cout << getSum(num); return 0; }
ALGO
0.999626
4.235503
5accb48f-68e9-4faf-8429-c756a5ec6f85
zaidtech786/c-Placement-Series
Numbers/AutomorphicNo.cpp
#include <iostream> using namespace std; int main() { int no = 5; int sq = no * no ; if(sq % 10 == no % 10 ) { cout << "Automorphic Number"; } else{ cout << "Not an Automorphic Number"; } return 0; }
ALGO
0.998481
3.842586
e9a7b2db-e2c4-4fde-9b2e-f5eefebf10b7
jh9amn/Master-DSA
GRAPH/find_center_of _star.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int findCenter(vector<vector<int>>& edges) { int a = edges[0][0]; int b = edges[0][1]; int c = edges[1][0]; int d = edges[1][1]; return (a==c || a == d) ? a : b; } }; int main(){ }
ALGO
0.999912
4.277905
3841f771-5693-4f0a-9e29-c943008e388c
ishandutta2007/codeforces
darkkcyan/normal/600/A.cpp
#include <iostream> #include <queue> using namespace std; bool isInAWord(string& str, int index) { return ( index >= 0 and index < str.size() and str[index] != ',' and str[index] != ';' ); } int skipToNextWord(string& str, int index) { while (isInAWord(str, index)) { ++index; ...
ALGO
0.995811
3.519902
52ee1563-5525-4df9-ae99-d97f80e0c3fb
hljeong/cp
cf/1878c.cpp
#include <bits/stdc++.h> #define A first #define B second #define vc vector #define pb push_back #define endl '\n' using namespace std; using ll = long long; using ld = long double; using vi = vc<int>; using vll = vc<ll>; using si = set<int>; using sll = set<ll>; using pi = pair<int, int>; using pll = pair<ll, ll>; usi...
ALGO
0.999893
4.299862
6dca8737-3661-4269-a0f1-df0353b40934
b-chae/AlgorithmStudy
baekjoon/단기간성장/11401.cpp
#include <iostream> using namespace std; long long N, K; long long A = 1; long long B = 1; int getpow(long long base, int exp) { if (exp == 0) return 1; else if (exp == 1) return base; if (exp % 2 == 0) { return getpow(base * base % 1000000007, exp / 2); } else { return base * getpow(base, exp - 1) % 100000...
ALGO
0.999979
4.186279
bcb188a5-7958-4dbe-a5a0-7bc8197e2b29
Abinesh-Jain-23/vid_summary
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
336605f6-0678-4548-a0c5-e184ec6d5aba
conansherry/tiny-opencv
tiny-opencv/modules/imgproc/src/undistort.cpp
#include "precomp.hpp" #include "opencv2/imgproc/detail/distortion_model.hpp" cv::Mat cv::getDefaultNewCameraMatrix( InputArray _cameraMatrix, Size imgsize, bool centerPrincipalPoint ) { Mat cameraMatrix = _cameraMatrix.getMat(); if( !centerPrincipalPoint && cameraMatrix.type() =...
ALGO
0.96255
6.957794
bf41f242-52b7-41d1-910f-18c64a8e23f3
jbsilva/Programming_Challenges
UVa/00136-ugly_numbers.cpp
// ============================================================================ // // Filename: 00136-ugly_numbers.cpp // // Description: 136 - Ugly Numbers // // Version: 1.0 // Created: 09/23/2012 05:29:56 PM // Revision: none // Compiler: g++ // // Author: Julio Bati...
ALGO
0.999868
4.984667
9c7435b8-525c-46e7-ae30-1667eec7b3a7
ducthangbui/Learning
Cau truc du lieu & giai thuat/On Thi/Bai31b.cpp
/*Tim tong cua n so tu nhien bang de quy*/ #include <iostream> using namespace std; int Tong(int n) { if(n==1) return 1; else return (n+Tong(n-1)); } main() { int n; cout<<"Nhap n:"; cin>>n; cout<<"Tong:"<<Tong(n); }
ALGO
0.999743
3.624651
6a777725-172a-461b-af4f-d7f8a22eaa7e
darlenepetal/csc-5
HMWK/Savitch_9thEd_Chap2_Prob2_Pay/main.cpp
/* * File: main.cpp * Author: Noah Garthwaite * Created on January 11, 2024, 3:03 PM * Purpose: Savitch_9thEd_Chap2_Prob2_Pay */ //System Libraries #include <iostream> //Input/Output Library #include <iomanip> using namespace std; //User Libraries //Global Constants, no Global Variables are allowed //Math/P...
ALGO
0.997022
3.680173
4a401c4e-0d78-40ae-ae6c-0b2ecb390ae5
Johannyjm/c-pro
AtCoder/othercontests/old/cakesAndDonuts.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; bool flg = false; for(int c = 0; c <= N / 4; ++c){ for(int d = 0; d <= N / 7; ++ d){ if(c * 4 + d * 7 == N) flg = true; } } if(flg) cout << "Yes" << endl; else cout << "No" << endl; }
ALGO
0.999833
3.325965
d85f394c-7619-4e65-bab1-560ef6704574
shaoshuai-luo/Pangolin
src/utils/file_utils.cpp
#include <pangolin/platform.h> #include <pangolin/utils/file_utils.h> #ifdef _WIN_ # define WIN32_LEAN_AND_MEAN # include <Windows.h> # include <Shlobj.h> #else # include <dirent.h> # include <sys/types.h> # include <sys/stat.h> # include <sys/signal.h> # include <stdio.h> # include <string.h> # include <un...
TOOL
0.99271
5.985718
90bbf08f-cb3e-4cc3-ba75-c66e302f5ed4
mertpasacukur/riscv_llvm
llvm/lib/Transforms/Scalar/ADCE.cpp
#include "llvm/Transforms/Scalar/ADCE.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #...
TOOL
0.954334
5.510627
75196778-99c1-4a51-918d-1f394948082f
Husainbw786/GeeksForGeeks
Heap/Adding Array Elements.cpp
class Solution{ public: int minOperations(int arr[], int n, int k) { // code here priority_queue<int,vector<int>,greater<int>>pq; for(int i=0;i<n;i++) { pq.push(arr[i]); } int count = 0; while(! pq.empty()) { if(pq.top() >= k...
ALGO
0.99997
4.80067
6af41e93-6f4c-42a3-b510-7a98ed49d517
NephrenCake/Algorithm
AcWing/清华大学考研机试题/3373. 进制转换.cpp
#include <iostream> #include <vector> using namespace std; int div(vector<int> &a) { int t = 0; for (int i = a.size() - 1; i >= 0; i--) { t = t * 10 + a[i]; a[i] = t / 2; t %= 2; } while (a.size() > 1 && a.back() == 0) a.pop_back(); return t; } int main() { cin.sync_wi...
ALGO
0.999889
5.217969
b9986b09-df08-4c7a-915f-2b70a9df8741
dhruvilcodes/CSES_Problem_Set
Introductory Problems/Trailing_Zeros.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define MOD 1000000007 ll mod_add(ll a, ll b, ll m = MOD) { a = a % m; b = b % m; return (((a + b) % m) + m) % m; } ll mod_mul(ll a, ll b, ll m = MOD) { a = a % m; b = b % m; return (((a * b) % m) + m) % m; } ll mod_sub(ll a, l...
ALGO
0.999744
4.218626
48293efe-0df4-47fb-89ea-a2666168d241
avinashz14/DSA-Problems
Competitive-Programming-Problems-master/SITTING ARRANGEMENT AT CODING BLOCKS.cpp
#include<bits/stdc++.h> #include<unordered_set> using namespace std; #define fio ios_base::sync_with_stdio(false) #define ll long long int #define s(x) scanf("%lld",&x) #define s2(x,y) s(x)+s(y) #define s3(x,y,z) s(x)+s(y)+s(z) #define p(x) printf("%lld\n",x) #define p2(x,y) p(x)+p(y) #define p3(x,y,z) p(x)+p(y)...
ALGO
0.999544
3.563698
4993c893-f341-4fb0-8f92-f7387beb31af
kingarthur11/leetcode
solution/0500-0599/0568.Maximum Vacation Days/Solution.cpp
class Solution { public: int maxVacationDays(vector<vector<int>>& flights, vector<vector<int>>& days) { int n = flights.size(); int K = days[0].size(); int f[K + 1][n]; memset(f, -0x3f, sizeof(f)); f[0][0] = 0; for (int k = 1; k <= K; ++k) { for (int j = 0...
ALGO
0.999869
5.454934
4b5b0609-b086-4010-b400-985cad28eb7b
MaheshSharan/LeetCode_Automation
solutions/1700-1799/1732.Find the Highest Altitude/Solution.cpp
class Solution { public: int largestAltitude(vector<int>& gain) { int ans = 0, h = 0; for (int v : gain) h += v, ans = max(ans, h); return ans; } };
ALGO
0.99991
6.082428
edfecea5-703b-40fa-83e6-90a19f911f42
freebsd/freebsd-src
contrib/llvm-project/openmp/runtime/src/kmp_taskdeps.cpp
/* * kmp_taskdeps.cpp */ //#define KMP_SUPPORT_GRAPH_OUTPUT 1 #include "kmp.h" #include "kmp_io.h" #include "kmp_wait_release.h" #include "kmp_taskdeps.h" #if OMPT_SUPPORT #include "ompt-specific.h" #endif // TODO: Improve memory allocation? keep a list of pre-allocated structures? // allocate in blocks? re-use li...
ALGO
0.978448
5.959032
e2a2043e-a684-4ed0-b462-821571258bdb
muhammad-zain-f16/PF-Assignments
number_to_words.cpp
#include <iostream> using namespace std; // Integer to English words 123 -> One Hundred Twenty Three // 1 -> One // 10 -> Ten // 11 -> Eleven // 0 -> Zero // less than 20 // 21 -> Twenty One 21 % 10 = 1 20 % 10 = 0 Twenty const char one_to_nineteen[][12] = { "", "One", "Two", "Three", "Four", "Five", "Six"...
TOOL
0.990948
5.194055
a653ce44-7e8c-4a84-b2e9-53fe92ef2922
ishandutta2007/codeforces
fedoseev.timofey/normal/1039/A.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <ctime> #include <random> #include <cmath> #include <bitset> #include <iomanip> #include <list> #include <unordered_set> #include <unordered_map> #include <cassert> using...
ALGO
0.999998
3.884426
84224a94-439c-4375-a396-910a3b0bf2e8
tanrun0/C-learning
【2025-03-14】通讯录(单链表+文件保存)/Contact.cpp
#include"Contact.h" void menu() { printf("**********************************\n"); printf("*****1.Add 2.del ********\n"); printf("*****3.Search 4.modify ********\n"); printf("*****5.show 6.exit ********\n"); printf("**********************************\n"); } contact::contact() :head(new PerInfo...
TOOL
0.964186
3.144056
fccdffa2-bfbd-4531-9d7f-7dacee34f961
nhywieza/acm-icpc
code/HeifeiRegion/e.cpp
/************************************************************************* > File Name: e.cpp > Author: nhywieza > Mail: <EMAIL> > Created Time: 二 11/17 16:45:41 2015 ************************************************************************/ #include <cstdio> #include <cstring> #define SIZE 102 int ma...
ALGO
0.999917
4.122427
7c8503dc-56d1-46fe-a237-21a8524281a3
SauravPadghan011/DSA-Batch-Unisoft-Tech
Tree_1/BinaryTree/BinaryTree.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *left, *right; Node(int val) { data = val; left = NULL; right = NULL; } }; Node* createTree() { int data; cout << "Enter Data: "; cin >> data; Node *root = NULL; ...
ALGO
0.99876
5.254224
54626c03-f9cb-4bb3-91d5-368a41456a5e
yash2411-cmd/placement_prep
queues/implement-queue-using-stacks.cpp
#include<bits/stdc++.h> using namespace std; class MyQueue { public: stack<int>input; stack<int>output; MyQueue() { } void push(int x) { input.push(x); } int pop() { if(!output.empty()){ int ele = output.top(); output.pop(); ...
ALGO
0.980384
4.666733
07feebeb-f5a1-4564-895c-49fd3bbffa99
openharmony-gitee-mirror/third_party_boost
libs/dynamic_bitset/example/example3.cpp
#include "boost/dynamic_bitset.hpp" #include <ostream> #include <iostream> int main() { boost::dynamic_bitset<> mask(12, 2730ul); std::cout << "mask = " << mask << std::endl; boost::dynamic_bitset<> x; std::cout << "x.size() = " << x.size() << std::endl; std::cout << "Enter a bitset in binar...
TOOL
0.916781
5.873268
7d7efd64-79ce-4e5f-a923-4541d16547db
shivanshsanoria1/LeetcodeSolutions
CPP [1001-1500]/1026.maximum_difference_between_node_and_ancestor [2].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.999913
6.222273
3f5f638b-5feb-47bf-97a4-86f644300860
fanjinfei/virtualBox-ose
src/VBox/Runtime/common/sort/RTSortIsSorted.cpp
/* $Id: RTSortIsSorted.cpp 62477 2016-07-22 18:27:37Z vboxsync $ */ /** @file * IPRT - RTSortIsSorted. */ /********************************************************************************************************************************* * Header Files ...
ALGO
0.99877
6.41766
54110ad6-a4b3-4cb2-bc3e-fd6883134406
michaelarakel/local-trainings-and-upsolvings
13.12.12/A.cpp
#include <iostream> #include <string> using namespace std; void distributing (string& s1, string& s2, string&s, int n) { for (int i = 2; i < n; i += 2) s1 = s[i] + s1; for (int i = 3; i < n; i += 2) s2 = s[i] + s2; } void mixing (string& s) { string s1, s2; s1 = s[0]; s2 = s[1]; int n = s.size(), i; distr...
ALGO
0.999865
3.804271
d9274f42-21de-46c6-99bc-686e9892015f
Sunny-Daze/Codechef_Solutions
Codechef_Solutions/iplandrcb.cpp
#include<bits/stdc++.h> using namespace std; // inline void debugMode() { // #ifndef ONLINE_JUDGE // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); // #endif // } int main(){ // debugMode(); ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; ...
ALGO
0.999925
4.588201
8b32bc91-211e-4485-8bf0-5cf9b90fb6de
vuthanhlan/Subjects
LAP TRINH HUONG DOI TUONG/practice/De4/cau2.2.cpp
#include<bits/stdc++.h> using namespace std; class CHUSOHUU; class XE{ protected: char mauson[20]; char bienso[20]; char noidk[20]; int namdk; public: XE(); XE(char *a, char *b, char *c, int d); void nhap(); void xuat(); }; class CHUSOHUU:public XE { private: char tencsh[20]; char cmt[20]; publ...
TOOL
0.972014
3.390687
0a7b8b8e-987a-4d02-bc6b-8dbe897ecab4
rachit77/DSA-solutions
45-jump-game-ii/45-jump-game-ii.cpp
class Solution { public: //method-1 memoization // int find(int i, vector<int>& nums, int dp[]) // { // if(i>=nums.size()-1) return 0; // if(dp[i]!=-1) return dp[i]; // int temp=100000; // for(int t=1;t<=nums[i];t++) // { // temp=min...
ALGO
0.999973
5.620249
404a437f-b61d-461b-83cf-b5ed0b4060f6
polossk/Code-Archive
CodeForces/codeforces766E.cpp
// <!--encoding UTF-8 UTF-8编码--!> /***************************************************************************** * ----Stay Hungry Stay Foolish---- * * @author : Shen * * @name : Codeforces Round #396 (Div. 2...
ALGO
0.999677
3.695785
6f973611-3de2-4730-9513-3032467e364b
shincekbaby/lab5wrks
lab5_q27.cpp
//include the library files and start with the main #include<iostream> using namespace std; int main() {//declare summing varible ,collector varible and loop running variable int s=0,n,i=1; cout<<" Enter natural number till you want to find the sum of "; cin>>n; //loop while(i<=n) {s=s+i;i++; } //display sum cou...
ALGO
0.992897
3.082201
0cc0b07a-f9b1-4c21-90d9-3fb9d05f751a
SongXueZhi/jdk
src/hotspot/share/opto/coalesce.cpp
#include "precompiled.hpp" #include "memory/allocation.inline.hpp" #include "opto/block.hpp" #include "opto/c2compiler.hpp" #include "opto/cfgnode.hpp" #include "opto/chaitin.hpp" #include "opto/coalesce.hpp" #include "opto/connode.hpp" #include "opto/indexSet.hpp" #include "opto/machnode.hpp" #include "opto/matcher.hp...
ALGO
0.98957
5.19504
c6a8b305-5e49-4758-8b72-22b4387055e9
AksshayMathew/Leetcode-problems
2195-time-needed-to-buy-tickets/time-needed-to-buy-tickets.cpp
class Solution { public: int timeRequiredToBuy(vector<int>& tickets, int k) { int res = 0; for(int i=0; i<tickets.size(); i++) { if(i<=k) { res += min(tickets[i],tickets[k]); } else { res += min(...
ALGO
0.99997
6.192674
95fab560-f436-4084-98a6-951a0a898618
urban-jungle/Code_Sprint
프로그래머스/0/181904. 세로 읽기/세로 읽기.cpp
#include <string> #include <vector> using namespace std; string solution(string my_string, int m, int c) { string answer = ""; for(int i = c-1; i < my_string.size(); i += m){ answer += my_string[i]; } return answer; }
ALGO
0.999607
4.799427
648b1fc3-7720-424f-8b7d-6e88174b5576
YeWR/EfficientZero
core/ctree/cminimax.cpp
#include "cminimax.h" namespace tools{ CMinMaxStats::CMinMaxStats(){ this->maximum = FLOAT_MIN; this->minimum = FLOAT_MAX; this->value_delta_max = 0.; } CMinMaxStats::~CMinMaxStats(){} void CMinMaxStats::set_delta(float value_delta_max){ this->value_delta_max = value_...
ALGO
0.990334
6.297628
af9a21aa-8963-41b4-9023-bb9d8f5fc006
kaloronahuang/KaloronaCodebase
Contests/Vijos-QZTraining-8/B.cpp
// B.cpp #include <bits/stdc++.h> using namespace std; const int MAX_N = 1e5 + 200, mod = 1e9 + 7; int n, head[MAX_N], current, fa[20][MAX_N], prefix[MAX_N], val[MAX_N], dep[MAX_N]; int mem[MAX_N], order[MAX_N], anses[MAX_N]; pair<int, int> diameters[MAX_N]; struct edge { int from, to, nxt; } edges[MAX_N << 1],...
ALGO
0.999993
3.872603
f9e47e5c-e41f-4015-b90f-fd2c30ef83a5
ankit-345/dsa_problems
Recursion/Recursion 3( best problem on Recursion)/generate_all_substrings_of_a_string.cpp
#include <iostream> using namespace std; void subseq(string s, string ans) // ans string is to store the answer { if(s.length()==0){ cout<<ans<<endl; return; } char ch=s[0]; string ros = s.substr(1); subseq(ros, ans); // in this we are returning the empty string. subseq(r...
ALGO
0.999985
4.470958
3241db90-899e-4816-98a6-35009f27e487
jon012906/SoCS1_binus_file_temp1
Aritmatic_and_Operation/prob_s_AriO.cpp
#include <stdio.h> int main (){ double l,b,h,lp,lsgtg,lpp; scanf("%lf %lf %lf", &l, &b, &h); lpp = b*l; lsgtg = h*b/2; lp = lpp*3 + lsgtg*2; printf("%.3lf\n", lp); return 0; }
ALGO
0.99595
3.322155
8f154283-16e9-4895-a9eb-16bd73dab732
shrinivas-patil/Data-Structure-Algorithms
03 Arrays, Time complexity and Space complexity/Array class-2/triplets.cpp
#include<iostream> using namespace std; //print all triplets void printAllTriplets(int arr[], int n){ int count=0; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ for(int k=0;k<n;k++){ cout<< arr[i]<<", "<<arr[j]<<", "<<arr[k]<<endl; count++; } ...
ALGO
0.992554
4.285806
60326209-f644-47cb-ac1e-6af9717a3c02
cucapra/gem5-mesh
src/systemc/tests/systemc/misc/user_guide/chpt4.4/stage1.cpp
/***************************************************************************** stage1.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*****************************************************************************...
ALGO
0.953363
5.858161
83ad4349-0fb9-4129-a423-6bfdb55823a5
Vaibhavk0192/daa
DAA_practice/obst.cpp
// optimal SUbstructure #include <bits/stdc++.h> using namespace std; int sum(int freq[], int i, int j) { int s = 0; for (int k = i; k <= j; k++) { s += freq[k]; } return s; } int optCost(int freq[], int i, int j) { if (j < i) { return 0; } if (j == i) { ...
ALGO
0.999956
5.246943
85420c17-b52b-490e-ad90-cf9e68d681ff
kaivis-liu/LeetCode
moveZeroes/moveZeroes.cpp
class Solution { public: void moveZeroes(vector<int>& nums) { int len = nums.size(); for(int i=0;i<len;i++){ if(!nums[i]) { int j; for(j=i+1;j<len;j++){ if(nums[j]) { nums[i]=nums[j]; nums[j]=0; break; } } if(j==len) break; } } } };
ALGO
0.999931
6.470049
c788adba-ca62-49e8-a980-3a29acf167aa
XOR-op/cronet-rs
chromium/third_party/libc++/src/test/std/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp
// UNSUPPORTED: c++03 // <algorithm> // template <class T> // T // max(initializer_list<T> t); #include <algorithm> #include <cassert> #include "test_macros.h" int main(int, char**) { int i = std::max({2, 3, 1}); assert(i == 3); i = std::max({2, 1, 3}); assert(i == 3); i = std::max({3, 1, 2...
TEST
0.978247
5.856247
c8526e0c-2303-42c3-a51b-46801e9fd721
Moyu0730/CP-Question-Record
TCIRC/d048. AP325 P-4-7. Yue Buquns Two-Way Merge(*).cpp
/* Question : TCIRC d048. AP325 P-4-7. Yue Buquns Two-Way Merge(*) */ #include<bits/stdc++.h> using namespace std; #define opt ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define priq(type) priority_queue<type, vector<type>, greater<type>> #define mem(x, value) memset(x, value, sizeof(x)); #define pii ...
ALGO
0.999977
3.747127
ede8a61d-6ab6-4fae-b7aa-ab0270ac7769
rkretsch/PK_research
RNA_structure_programs/RNAstructure/CycleFold/turbo_calculation.cpp
#include "turbo_calculation.h" #include "alignment.h" #include "mainloop.h" #include "extrinsic.h" #include "constraints.h" #include <map> using std::map; using std::vector; using std::string; using std::cout; using std::cerr; using std::endl; map<int,vector<alignment>> setup_alignments(const vector<sequence>& seqs){...
ALGO
0.999461
5.01145
6785d3bc-a04c-4563-bbad-73aa1d258b7e
Doubty/List-of-question-on-language-C
exercicio_28.cpp
#include <stdio.h> #include <stdlib.h> #include <locale.h> int* inversa(int * vetor, int tamanho){ int * v = (int*) calloc(tamanho, sizeof(int)); int i; int j = tamanho-1; for(i = 0; i<tamanho; i++){ v[i] = vetor[j--]; } return v; } int main(){ setlocale(LC_ALL,"Portuguese"); int numeros[] = {...
ALGO
0.999178
4.281783
d7d2f32b-6f09-4998-b386-065bb9b66886
artmih24/LongDoubleClass
ConsoleApplication1/LongDouble.cpp
#include "LongDouble.h" #include <algorithm> using namespace std; void LongDouble::initFromString(const string& s) { size_t index; if (s[0] == '-') { sign = -1; index = 1; } else { sign = 1; index = 0; } exponent = s.length() - index; while (index < s.length()) { if (s[index] == '.') exponent = ...
ALGO
0.994427
4.091266
860bcbda-3034-4434-bac7-8f69b9287349
geoffrey-anto/leetcode-solutions
0583-delete-operation-for-two-strings/solution.cpp
class Solution { public: int minDistance(string word1, string word2) { int n = word1.length(); int m = word2.length(); vector<vector<int>> dp(n+1, vector<int>(m+1, 0)); for(int i=1; i<=n; i++) { for(int j=1; j<=m; j++) { dp[i][j] = word1[i-1] == ...
ALGO
0.999994
6.022988
b37ad405-9c72-4816-bb85-799060c84a06
kaner918/competitive-programming
online judge.kaner murillo/c++/11629.cpp
//https://onlinejudge.org/external/116/11629.pdf //11629 #include<cstdio> #include<iostream> #include<deque> #include<string> using namespace std; struct Candidato{ string nombre; double votos; Candidato(){} Candidato(string nom, double vot){ nombre = nom; votos = vot*10; } };...
ALGO
0.998984
3.131657
3c2e0131-1581-4667-b0ac-090505b0b41b
raincross7/code-similarity
codes/train_code/problem212/problem212_62.cpp
// https://atcoder.jp/contests/abc106/tasks/abc106_b #include <iostream> #include <vector> using namespace std; #define int long long #define REP(i, n) FOR(i, 0, n) #define REPR(i, n) for (int_fast32_t i = n - 1; i >= 0; i--) #define FOR(i, s, n) for (int_fast32_t i = (s), i##_len = (n); i < i##_len; ++i) #define ALL(o...
ALGO
0.999887
3.947488
4d6f61b7-ed17-4f9b-923e-c5fef29bbc65
Pulkito4/DSA
prev stuff non categorized properly/numberSystem_conversions/Binary_to_Decimal.cpp
#include<iostream> #include<math.h> using namespace std; int main(){ int n; cout<<"Enter a binary number"<<endl; cin>>n; int i=0,ans=0; while(n!=0){ int digit=n%10; if (digit==1){ ans+=pow(2,i) ; } n=n/10; i++; } cout<<ans<<endl; retu...
ALGO
0.999934
4.234914
ca8d3cf2-a601-4ef7-92f8-8d0499774fdd
olgunozoktas/c-
Lab2/q18.cpp
#include <iostream> using namespace std; int main() { for(int i=1; i<=10; i++){ cout << i << "\t" << i * i * i << endl; } return 0; }
ALGO
0.973633
3.257541
95cb632a-7283-4921-971c-4f9e7604c516
yanshui177/HandWritten-Analisys
测试/单独功能测试/0-DLL测试(实际没有部署)/dll-goal完整版/OpenCV/cvaux/src/cvmorphing.cpp
#include "_cvaux.h" #include <assert.h> static CvStatus icvMorphEpilines8uC3( uchar * first_pix, /* raster epiline from image 1 */ uchar * second_pix, /* raster epiline from image 2 */ uchar * dst_pix, /* raster epiline from dest image */ ...
ALGO
0.998904
4.65963
6844c69f-106a-4fab-8adb-7241c8be3d36
MaiESHA0001/DSA_-CodingNinja_cpp
Linklist/Eliminate Dublicates.cpp
Problem statement You have been given a singly linked list of integers where the elements are sorted in ascending order. Write a function that removes the consecutive duplicate values such that the given list only contains unique elements and returns the head to the updated list. Detailed explanation ( Input/output fo...
ALGO
0.999992
5.219541
37aea067-aedb-44cf-8515-1b44e87c8521
HarshitMongre/Problem-Solving
aPowerB.cpp
#include<bits/stdc++.h> using namespace std; int power(int a, int b){ if(b == 0) return 1; if(b == 1) return a; int ans = power(a,b/2); if(b%2 == 0) return ans * ans; else return a * ans * ans; } int main(){ int a = 2; int b = 10; int ans = power(a,b); cout << ans << endl; }
ALGO
0.999855
4.469758
ff4c1536-e112-463d-b741-b08a7ac579f2
Olyadtemesgen/Flutter_Practice_Projects
bmi_calculator/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.998516
6.783439
da2ea1de-bde7-4882-b62c-4e2e5928f556
LilDevsy0117/ProblemSolving
프로그래머스/0/181897. 리스트 자르기/리스트 자르기.cpp
#include <string> #include <vector> using namespace std; vector<int> solution(int n, vector<int> slicer, vector<int> num_list) { vector<int> v; if(n==1){ vector<int> answer(num_list.begin(), num_list.begin()+slicer[1]+1); v = answer; }else if(n==2){ vector<int> answer(num_list.begi...
ALGO
0.99836
4.834777
6c033fcd-87d9-4f85-8a86-5dd46d156345
PixelBuildsROM/android_frameworks_av
media/module/codecs/mp3dec/src/pvmp3_crc.cpp
/* ------------------------------------------------------------------------------ PacketVideo Corp. MP3 Decoder Library Filename: pvmp3_crc.cpp Functions: getbits_crc calculate_crc Date: 09/21/2007 ------------------------------------------------------------------------------ REVI...
TOOL
0.998966
6.677954
61c2323b-1399-48f8-bfea-881198bbbcbe
syedtazyeen/Data_structure_cpp
Merge2SortedArray.cpp
#include<iostream> using namespace std; int main(){ int arr1[]={1,5,7,11},arr2[]={2,4,9,13},arr3[100]; int n1=4,n2=4,n3=8; int i=0,j=0,k=0; while(i<n1 && j<n2){ if(arr1[i]<arr2[j]) arr3[k++]=arr1[i++]; else arr3[k++]=arr2[j++]; } while(i<n1){ arr3[k++]=arr1[i++]; ...
ALGO
0.999946
3.598912
b7886f58-835c-4c93-93d4-b954189e6a63
satyendra9580/C-Codes
petr_and_book.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int>v(7); for(int i=0;i<7;i++){ cin>>v[i]; } int sum=0; while(true){ for(int i=0;i<7;i++){ sum += v[i]; if(sum>=n){ cout<<i+1<<endl; return 0; } ...
ALGO
0.999871
3.086256
66bc36d5-5de5-4ae9-8549-a0f80fb42d4f
Shubhamp6/CP_Codes_Cpp
codeforces/A_Unit_Array.cpp
#include<bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL),cout.tie(NULL); int t; cin >> t; while(t--){ int n; cin >> n; unordered_map<int,int> m; for(int i = 0;i < n;++i){ int a; cin >> a; ++m[a]; } int operation = 0; if(m[-1] > m[1]){ operation ...
ALGO
0.998695
4.501686
deea438f-b513-4a6c-8c3f-66da52b224e2
heliastorres/Programing-cpp-Ifpr
LISTAS ORLANDO (BeeCrowd)/LISTA 05 - For Básico/Contador 02.cpp
#include <iostream> using namespace std; int main() { int num, i, pares = 0, valor; cin >> num; for (i = 1; i <= num; i++) { cin >> valor; if (valor %2 == 0) { pares++; } } cout << pares << endl; return 0; }
ALGO
0.999339
4.706135
9b59581e-1e99-4cab-be7a-81b8c0275a47
Braurbeki/hopfield
src/sources/neural_network.cpp
#include<.\headers\neural_network.hpp> #include<.\headers\vector_helper.hpp> #include<iostream> NeuralNetwork::NeuralNetwork(int num_w) { _siz = num_w; _weights = vector<vector<double>>(num_w, vector<double>(num_w, 0)); } void NeuralNetwork::learn() { auto learning_vec = _reader.get_learn_data(); for(a...
DATA
0.958313
3.30708
e60abb3e-cdba-4fb3-9d6f-5d411616b4ab
onixcoin-io/onix
src/node/psbt.cpp
#include <amount.h> #include <coins.h> #include <consensus/tx_verify.h> #include <node/psbt.h> #include <policy/policy.h> #include <policy/settings.h> #include <tinyformat.h> #include <numeric> PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx) { // Go through each input and build status PSBTAnalysis ...
ALGO
0.888151
6.027668
dde75463-df90-4d70-b093-ae965285becb
CelestineW/cwsm_karatsubas
posint/driver.cpp
#include <iostream> #include "posint.h" using namespace std; int main() { // Set base to 16^3 // This causes numbers to display in hex. // However, base must be no greater than 2^15 when // using 32-bit integers, so we can only fit 3 hex // digits (or 12 bits) per 32-bit int. It is more // space-effic...
ALGO
0.925896
3.719868
a17c7532-984d-4c65-b8cf-c1e6a6d068e2
AniketAgra/CPP
PainterPartition Problem.cpp
bool ifPossible(vector<int> &boards, int k,int mid){ int position = 0; int studentCount =1; for(int i=0;i<boards.size();i++){ if(position+boards[i]<=mid){ position+=boards[i]; } else{ studentCount++; if(studentCount>k||boards[i]>mid){ ...
ALGO
0.999986
4.866436
6da908c9-f54a-4f34-8566-f1109b199579
KevinD03/rigid-body-physics-simulation
extern/libigl/python/py_igl/py_comb_cross_field.cpp
m.def("comb_cross_field", [] ( const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::MatrixXd &PD1in, const Eigen::MatrixXd &PD2in, Eigen::MatrixXd &PD1out, Eigen::MatrixXd &PD2out ) { return igl::comb_cross_field(V,F,PD1in,PD2in,PD1out,PD2out); }, __doc_igl_comb_cross_field, py::arg("V"), py::...
ALGO
0.969658
5.713884
698daf2a-c713-4c0a-b688-a989a35a038d
YouYeDam/codetree-TILs
240722/함수를 이용한 369 게임/369-games-using-functions.cpp
#include <iostream> #include <string> using namespace std; int Count369(int a, int b) { int cnt = 0; for (int i = a; i <= b; i++) { if (i % 3 == 0) { cnt++; } else { string str_i = to_string(i); for (int j = 0; j < str_i.length(); j++) { ...
ALGO
0.999594
4.78402
72fdbcb9-3528-43db-9e45-8a24382e0b42
mohammedjasam/Technical-Interview-Guide
LintCode/lintcode_binary-tree-zigzag-level-order-traversal.cpp
/* * * Tag: BFS * Time: O(n) * Space: O(n) */ /** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right = NULL; * } * } */ class Solution { /** * @param root: Th...
ALGO
0.999998
5.731926
d5c4c2b1-34e1-48cc-9695-edcf00696293
komori-n/KomoringHeights
source/engine/user-engine/komoring_heights.cpp
#include "komoring_heights.hpp" #include "../../usi.h" #include "mate_len.hpp" #include "search_result.hpp" #include "typedefs.hpp" namespace komori { namespace { /// GC で削除するエントリの割合 constexpr double kGcRemovalRatio = 0.5; static_assert(kGcRemovalRatio > 0 && kGcRemovalRatio < 1.0, "kGcRemovalRatio must be greater th...
ALGO
0.999937
4.97511
eea647bb-f5d9-4168-a1b2-b7fb1ddbd151
biancaziliotto/SPM_TSP
code/tsp_sequential.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <filesystem> #include <fstream> #include <iomanip> #include <iostream> #include <numeric> #include <random> #include <sstream> #include <string> #include <thread> #include <vector> #include "src/utimer.hpp" #include "src/genetic.h" us...
ALGO
0.999783
5.788331
9907eff8-9306-4a38-81b7-28f9986080ca
ShiYu0318/CP-Code
AP325/1-1.cpp
#include <bits/stdc++.h> using namespace std; #define ShiYu ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define int long long #define vi vector<int> #define pii pair<int,int> #define F first #define S second #define EB emplace_back #define nl cout << '\n' #define SZ(x) ((int)x.size()) #define all(x) x.begin()...
ALGO
0.999585
3.745101
10dd24fe-060d-4a98-935a-df6b2ba5dc13
RVCEprabhakar/Leetcode
0011-container-with-most-water/0011-container-with-most-water.cpp
class Solution { public: int maxArea(vector<int>& height) { //here we are applying the two pointer approches int n=height.size(); int maxarea=0; int left=0; int right=n-1; while(left<right){ maxarea=max(maxarea, (right-left) * min(height[left],height[right]));...
ALGO
0.999974
6.655371
fb3ca972-42ca-4022-be9b-1454bdb5bd6c
chanda739/Programming
268-missing-number/268-missing-number.cpp
class Solution { public: int missingNumber(vector<int>& nums) { int i, res = 0, n = nums.size(); for(i=0;i<nums.size();i++){ res = res^i^nums[i]; } return res^n; } };
ALGO
0.999983
5.506576
fb80b437-97c9-4b92-bc83-ac569caae16d
mahmud841/introduction_to_algorithm_depth_first_search_m03
dfs.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; vector<int> v[N]; bool vsit[N]; void dfs(int src) { cout << src << endl; vsit[src] = true; for (int child : v[src]) { if (vsit[child] == false) { dfs(child); } } } int main() { int n, e; ...
ALGO
0.999935
4.669065
5886a336-532d-49e9-a8c5-a5ae507c56f5
ishandutta2007/codeforces
lyc_music/normal/209/C.cpp
//QwQcOrZ yyds!!! #ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include...
ALGO
0.999871
4.437718
26feaf73-2f79-4387-8013-4015693985fc
LonxunQuantum/Lammps_for_PWMLFF
lammps_neigh_mlff_20230508/src/KOKKOS/pair_hybrid_kokkos.cpp
// clang-format off #include "pair_hybrid_kokkos.h" #include <cstring> #include "atom_kokkos.h" #include "force.h" #include "pair.h" #include "neighbor.h" #include "neigh_request.h" #include "update.h" #include "memory_kokkos.h" #include "respa.h" #include "atom_masks.h" #include "kokkos.h" using namespace LAMMPS_NS;...
ALGO
0.978272
7.154233
e92c22e1-d6c3-44ec-b6fd-780cda127568
aggarwaldeepanshu/Algorithms_DS
String/check whether a given string is interleaving of two other given strings/string.cpp
#include<iostream> #include<cstring> #define max 50 using namespace std; class String { public: int CheckInterleaving(char [],char[],char []); }; int CheckRecur(char str1[],char str2[],char str[],int n1,int n2,int n) { int i; for(i=0;i<n;i++) { if(n1>0 && str1[0]==str[i]) { str1=str1+1; n1--; } e...
ALGO
0.999232
3.454386
73b2b28a-19bc-487d-a725-85239abd4515
bhuppidhamii/myLeetCode
Difficulty: Medium/Next Greater Element in Circular Array/next-greater-element-in-circular-array.cpp
class Solution { public: vector<int> nextLargerElement(vector<int> &arr) { // Jai Shri Ram int N = arr.size(); stack<int>st; vector<int> ans(N, -1); // 1st pass for(int i=0; i<N; i++){ while(st.size() > 0 && arr[i] > arr[st.top()]){ ...
ALGO
0.999859
5.356452
f5d24853-ba27-4a62-acb0-85af79ab65e0
ishandutta2007/codeforces
nantf/normal/1148/D.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> PII; const int maxn=2222222; #define MP make_pair #define PB push_back #define lson o<<1,l,mid #define rson o<<1|1,mid+1,r #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define ROF(i,a,b) for(int i=(a);i>=(b);i--) #define MEM(x,v) m...
ALGO
0.999961
3.289493
55362986-bb85-4527-827f-9594b1208027
kwakjames5/USC_CSCI_104_FALL2020
Repositories/prestudy-2020/015_Compare_array_DHW/compare_array.cpp
/* source array = {'a','p','r','u','o','t','c','e','w','z'}; copied array = {'a','t','c','e','p','u','o','w','z'}; when find missed character(s). hint keyword: sum, ascii code 8:04 some characters are missed during copy, find missed characters in copied array by comparing source array. Runtime: 2(n) while(){ while()...
ALGO
0.999487
3.428155
11dc90f8-2c3d-4f0a-894a-35cc08f54fb1
aelk/leetcode
src/summaryRanges.cpp
/* * LeetCode Problem #228 * https://leetcode.com/problems/summary-ranges/ */ class Solution { public: string range_to_str(const int start, const int end) { if (start == end) { return to_string(start); } else { return to_string(start) + "->" + to_string(end); ...
ALGO
0.999958
6.621306
1926578e-9f09-4e0a-b406-5b46e85ba97a
uier/online_judge_code
uncategorized/cf1029E.cpp
#include <iostream> #include <vector> #define maxn 200005 using namespace std; vector<int> G[maxn]; int S[maxn], F[maxn]; void dfs(int x, int dep) { if ( dep <= 2 ) S[x] = 1; for ( int i : G[x] ) { if ( i != F[x] ) { F[i] = x; dfs(i,dep+1); } if ( S[x] == 2 ) S[i] = max(S[i],1); } if ( S[x] == 0 ) { S...
ALGO
0.997096
4.506433
8178b926-4b1c-4b20-82bf-065f5bdf6ec6
KrishnaTulasiSatti/GFG
Basic/Max Min/max-min.cpp
//{ Driver Code Starts /* Driver program to test above function */ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: int findSum(int A[], int N) { //code here. int max = *max_element(A,A+N); int min = *min_element(A,...
ALGO
0.999323
6.110376
6907c1e4-1eda-4567-95fb-310f49fbd588
rhazari/Modern-Cpp
Move-Semantics/Josuttis-Tutorial/emailTest.ex2.cpp
#include "perf.h" #include "email.ex2.h" #include "emailTestHelpers.h" #include <iostream> #include <string> #include <vector> #include <algorithm> Email nextEmail() { static int id = 0; return Email{"User" + std::to_string(++id) + "@mynicedomain.com"}; } // helper to call print() for a full collection: templ...
TEST
0.854525
6.117025
39240e0a-d308-48c4-811a-c363f5fde191
raincross7/code-similarity
codes/train_code/problem499/problem499_211.cpp
#include <iostream> #include <string> #include <algorithm> #include <cmath> #include <deque> #include <queue> #include <stack> #include <vector> #include <utility> #include <iomanip> #include <bitset> #include <set> #include <map> #include <stdio.h> #include <numeric> #include <cstring> #define rep(i,n) for (int i = 0...
ALGO
0.999987
4.542599
375a33e2-7446-4418-8097-4ecd787f729b
Dattupagar/Cpp
which number is greater.cpp
#include <iostream> using namespace std; int main() { int a; int b; int c; cout<<"put any three numbers:"<<endl; cin>>a; cin>>b; cin>>c; if(a>=b&&a>=c){ cout<<"The largest number is:"<<a; } if(b>=a&&b>=c){ cout<<"The largest number is:"<<b; } if(c>=a&&c>=b){ cout<<"The largest n...
ALGO
0.994901
3.229449
abb6fad9-6a1c-40a8-a706-efc49576f82b
sberoch/MicromachinesTaller
src/3rd-party/Box2D/Collision/b2CollideCircle.cpp
#include "Box2D/Collision/b2Collision.h" #include "Box2D/Collision/Shapes/b2CircleShape.h" #include "Box2D/Collision/Shapes/b2PolygonShape.h" void b2CollideCircles( b2Manifold* manifold, const b2CircleShape* circleA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB) { manifold->pointCou...
ALGO
0.998746
7.761623
ad35d7bc-3882-4c39-890f-b854c48eb08e
kasa021/atcoder-archives
typical90/typical90_af_29495117_TLE.cpp
/* * Author: kAsA02 * Submission URL: https://atcoder.jp/contests/typical90/submissions/29495117 * Submitted at: 2022-02-20 07:12:35 * Problem URL: https://atcoder.jp/contests/typical90/tasks/typical90_af * Result: TLE * Execution Time: 5513 ms */ #include <bits/stdc++.h> using namespace std; int n; int a[12][...
ALGO
0.999982
4.483809
c0f8d376-301c-4fab-9a05-5c778f369df9
snehapaul2005/c-program
assignment44.cpp
#include<stdio.h> int sum_of_squares(int n) { int sum=0; for(int i=1;i<=n;i++) { sum+=i*i; } return sum; } int main() { int n; printf("Enter a number:"); scanf("%d",&n); printf("Sum of squares of first %d natural numbers is:%d\n",n,sum_of_squares(n)); return 0; }
ALGO
0.994384
4.117215
759e8c14-fcdc-4144-9050-35f9ba16c0d6
gosth/MyLeetcodeOpen
1019.MonotoneStack.AC.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: vector<int> nextLargerNodes(ListNode* head) { ListNode* currentNode = head; std::deque<int> indexStore; std:...
ALGO
0.999961
6.022492
70245ff0-1be9-45b4-86d6-da60abcd6592
Amr-Abdelazim/competetive-programming
USACO_training/chapter 3/Magic_Squares.cpp
/* ID: amr_abdelazim LANG: C++ TASK: msquare */ #ifndef LOCAL #include <bits/stdc++.h> // For ordered_set #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define debug(...) 8 #else #include "precompiled.h" #include "debug.h" #endif using namespace std; using namespace __gnu_pbds; using ll...
ALGO
0.999941
3.684446