uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
dd6cf70f-6481-4605-ae66-301365793e32
niqhmd/sandbox
apps/start/menu.cpp
//--------------------------------------------------------------------------- // Start Menu //--------------------------------------------------------------------------- #include "stdafx.h" #include "common/defines.h" #include "common/list.h" #include "core/dll/sbiedll.h" #include "msgs/msgs.h" #include "common/my_ve...
TOOL
0.891044
5.488951
6c308ee6-a3eb-4d52-96c8-0b2ce456c7ff
lehuyngo/LapTrinh
DSA/Tree/avl.cpp
#include <iostream> #include <math.h> #include <queue> using namespace std; #define SEPARATOR "#<ab@17943918#@>#" enum BalanceValue { LH = -1, EH = 0, RH = 1 }; void printNSpace(int n) { for (int i = 0; i < n - 1; i++) cout << " "; } void printInteger(int &n) { cout << n << " "; } templa...
ALGO
0.999667
4.618764
1e5aea22-8bc1-44fd-bed4-b93758b89187
AyuTUL/AyushTuladhar2ndCSIT
DS/Lab/13.cpp
#include<iostream> #include<stdlib.h> using namespace std; int gcd(int a,int b) { if(b==0) return(a); return(gcd(b,a%b)); } int modInverse(int M,int mod) { int i=1; while((M*i)%mod != 1) i++; return(i); } int CRT(int n,int a[],int m[]) { int M=1; for(int i=0;i<n;i++) M*=m[i]; int result=0; for(int i=0;i<...
ALGO
0.999875
3.30571
783d5a15-2acc-4b7b-8ac2-2e5a3d39877a
BhryanS2/studying-programming
Neps-Academy/fase0 - SBC - 2025/test.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N; long long K; cin >> N >> K; vector<long long> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } vector<int> B(N); for (int start = 0; start <...
ALGO
0.999991
4.67489
2821465e-1cfa-4966-af6e-910bcd621739
jangseop-park/CAPRI-Net
PyMesh/third_party/libigl/python/py_doc.cpp
const char *__doc_igl_active_set = R"igl_Qu8mg5v7(// Known Bugs: rows of [Aeq;Aieq] **must** be linearly independent. Should be // using QR decomposition otherwise: // http://www.okstate.edu/sas/v8/sashtml/ormp/chap5/sect32.htm // // ACTIVE_SET Minimize quadratic energy // // 0.5*Z'*A*Z + Z'*B + C with co...
ALGO
0.992441
4.658619
6bd85e2b-a710-4fcc-945c-5d225f1ce9a6
pgRouting/vrprouting
src/problem/fleet.cpp
/** @file */ #include "problem/fleet.hpp" #include <iostream> #include <vector> #include <numeric> #include <limits> #include <utility> #include <algorithm> #include "cpp_common/vehicle_t.hpp" #include "cpp_common/short_vehicle.hpp" namespace vrprouting { namespace problem { void Fleet::invariant() const { m_msg...
ALGO
0.986334
7.071333
3b6bbc35-6da3-4ea3-a7b9-7b3542314044
Manasvi8274/Manasvi
1language-C/0_class/2nd_YR/4th_SEM/lec_2_DSA/ST_3_Practice/ST_3_Practice/strings/String_compression.cpp
#include<iostream> #include<string> #include<map> using namespace std; int main(){ string s; cin >>s; char last=s[0]; int count=1; for(int i=1;i<s.size();i++){ if(s[i]==last) count++; else { cout << last; if(count>1) cout << count; count=1; ...
ALGO
0.999938
3.615642
6155f8e9-3f67-4254-aba5-4fa6e1856224
shoaibrayeen/Course-Work
Data Structure/Linked List/Circular Singly/exchange_first_last.cpp
// CPP program to exchange first and // last node in circular linked list #include<bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; }; struct Node *addToEmpty(struct Node *head, int data) { // This function is only for empty list if (head != NULL) return head; /...
ALGO
0.999047
5.086786
bd4e688e-ad94-48c0-ba77-5c6aefcb3da0
shu8Cream/atcoder-archive
atcoder.jp/abc145/abc145_d/Main.cpp
/** * author: shu8Cream * created: 27.12.2020 17:41:33 **/ #include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) using ll = long long; using P = pair<int,int>; using vi = vector<int>; using vvi = vector<vi>; const int mod = 1e9+7; struct mint{ ll x; // typedef long long ...
ALGO
0.99998
4.120525
fb0f04ac-68d5-44b9-a098-29359f7abf20
kovid-sharma/LeetCode
1658-minimum-operations-to-reduce-x-to-zero/1658-minimum-operations-to-reduce-x-to-zero.cpp
class Solution { public: int minOperations(vector<int>& nums, int x) { ///]find the subarray first int tofind=0; for(auto it:nums) tofind+=it; tofind-=x; /* [/////.........//////] increasing dots*/ int len=INT_MIN; if(tofind<0) ...
ALGO
0.999983
5.640577
f0f16797-c464-47fa-8827-8021520d4749
skenzhegulov/UNIST_CSE
Object Oriented Programming/assign1.cpp
//Including needed libraries #include<iostream> //To use basic C++ functions as 'cin' #include<string> //To use data type of strings #include<algorithm> //To use 'tolower' function using namespace std; //Declaring global variables string c[100], s; //Variables for our grids and words int n,m,k,...
ALGO
0.999858
3.840144
b7d5fe4e-1828-4298-803f-c6e9e5631c87
kmelnikovmh/TestSys-Cpp
acm08/Task A. Скобки [0.1 s].cpp
// Created 13.11.2024 by Melnikov Kirill #include <iostream> #include <string> void psp(int n, int balance, std::string& str) { if (str.size() == n) { if (balance == 0 && n != 0) { for (auto s : str) { std::cout << s; } std::cout << "\n"; } ...
ALGO
0.998776
5.089016
de049d45-20ec-416f-8fbe-6b4e29ba5193
Bakapio/Labs
No_exp/Cycles/While_A.cpp
#include <iostream> using namespace std; int main() { int k; cout << ""; cin >> k; int sum = 0; while (k > 0) { sum += k % 10; k = k/ 10; } cout << sum << endl; return 0; }
ALGO
0.999654
4.514138
7120def7-a07d-4fd6-b6b1-c183a1398e72
sarvex/leetcode-mini-kanren
solution/0100-0199/0149.Max Points on a Line/Solution.cpp
class Solution { public: int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } int maxPoints(vector<vector<int>>& points) { int n = points.size(); int ans = 1; for (int i = 0; i < n; ++i) { int x1 = points[i][0], y1 = points[i][1]; unordered_map...
ALGO
0.999987
5.610247
ec33c1d4-dc4f-4553-b40e-80197f049f9a
Iskachun/randome-cpp-koder
43.cpp
#include <iostream> #include <algorithm> using namespace std; int main(){ long long n; cin >> n; while(n % 2 == 0) n/=2; while (n%3==0) n/=3; if (n == 1) cout << "Yes"; else cout << "No"; }
ALGO
0.999973
3.545028
e1cfaf17-bf32-466a-992b-dd02d0620917
keqhe/leetcode
round1/leetcode6.cpp
class Solution { public: string convert(string s, int numRows) { if (numRows <= 1) return s; vector<string> v (numRows, ""); string res; int t = 0; int direction = 1;//1 up, 0 down for (int i = 0; i < s.length(); i++) { if (t == 0) { ...
ALGO
0.999996
6.225629
fe9fec5e-ae10-4212-a672-9eb2aad0b52b
ericliuu/flux
FLUX/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
// UNSUPPORTED: c++03 // <algorithm> // template<class T, class Compare> // pair<T, T> // minmax(initializer_list<T> t, Compare comp); // // Complexity: At most (3/2) * t.size() applications of the corresponding predicate. #include <algorithm> #include <functional> #include <cassert> #include "test_macros.h" #...
TEST
0.994901
6.344262
e7bce27e-3a77-42f8-a3d1-ca786fcdc213
ttnhathuy313/cp-career
Codeforces/Contest1762/TaskA.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 55; int n, a[N]; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); freopen("TaskA.INP", "r", stdin); freopen("TaskA.OUT", "w", stdout); int tc; cin >> tc; while (tc--) { cin >> n; int odd = 0; for (int i = 1; i <= ...
ALGO
0.999878
5.07073
864c298d-e090-4943-8287-fee58b8f60a0
shivnathyadav/ProblemSolving
Medium/Find the string in grid/find-the-string-in-grid.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int dx[8] = {-1,0,-1,-1,1,1,1,0}; int dy[8] = {0,-1,-1,1,-1,0,1,1}; bool dfs(int i,int j,vector<vector<char>> grid,string word){ // cout<<grid[i][j]<<" "<<i<<" "<<j<<" "<<ind<<" "<...
ALGO
0.999783
5.83564
cf194532-347b-40b1-abf5-8caa180dc405
zenith82114/boj-solve
src/13511.cpp
/* * Q13511 - Edge sum and k-th vertex on a tree path using LCA * Date: 2021.8.25 */ #include<iostream> #include<bitset> #include<tuple> #include<vector> using namespace std; #define ll long long constexpr int maxN = 100000, maxlgN = 16; int N, lgN; vector<pair<int, int>> tree[maxN + 1]; int parent[maxlgN + 1][max...
ALGO
0.999979
4.914623
536ebaac-925f-4b9f-a963-bb25d9f89cde
JinYeJin/algorithm-study
June~October, 2020/2020-10-09/1328_진예진_고층 빌딩.cpp
/* [1328 고층 빌딩] https://www.acmicpc.net/problem/1328 https://ksj14.tistory.com/entry/BackJoon1328-%EA%B3%A0%EC%B8%B5-%EB%B9%8C%EB%94%A9 */ #include <stdio.h> #include <iostream> #define MOD 1000000007 using namespace std; int n, l, r; int dp[101][101][101]; int main(){ FILE *stream =freopen("S2\\18\\input\\1328....
ALGO
0.999965
4.336175
5933b349-4bd3-43d2-b2e9-1d6763d14a8a
Prateek-Srivastava1001/Assignment-192007-DSA
First-Assignment/1-5.cpp
/* Roll No. 192007 */ #include <bits/stdc++.h> #include <string> using namespace std; int main() { char line[1000]; char toDelete[80],word[80]; int i,j,n=0,m; cout<<"\nEnter String : "; cin.getline (line, 1000, '\n');//'\n' (new line) is delimeter cout<<"\nEnter Word to be deleted : "; cin>...
ALGO
0.999407
4.284949
422bfa75-301e-470e-bfd1-832077ff119f
ishandutta2007/codeforces
shadowlight/normal/864/A.cpp
#include <bits/stdc++.h> #define ll long long #define TASKNAME "" using namespace std; const int INF = 1e9 + 7; const int MAXN = 1e6 + 7; const double EPS = 1e-8; int main() { #ifdef MY freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); #else //freopen(TASKNAME"....
ALGO
0.99999
4.018935
b0a256be-92d4-45d1-ac04-8d521b81dd49
k-sharma2332/Programming-in-cpp
10.Pointer/Assignment/Question01.cpp
// Write a program to find the product of two numbers using pointers. #include<iostream> using namespace std; int main(){ int x,y; cout<<"Enter the value: "; cin>>x>>y; int* p1 = &x; int* p2 = &y; int product; int *productAns = &product; *productAns = (*p1)*(*p2); cout<<*productAns<<...
ALGO
0.999864
4.939854
f35b0b03-608c-445a-af51-ef1653ebef92
feal-ca/Class-Code
ExercisesCpp/~/Documents/Code/ExercisesCpp/~/Documents/Code/ExercisesCpp/~/Documents/Code/ExercisesCpp/~/Documents/Code/ExercisesCpp/~/Documents/Code/ExercisesCpp/~/Documents/Code/ExercisesCpp/~/Documents/Code/ExercisesCpp/Campanar2.cpp
#include <iostream> #include <cmath> using namespace std; void mas_un_minuto(int& h, int& m){ m += 1; if (m==60) { m = 0; h += 1; if (h == 24) { h = 0; } } } int main(){ int h,m,t; while(cin >> h >> m >> t){ //11 veces cada vuelta entera int campanadas = 0; campanadas = c...
ALGO
0.99974
3.982297
443d86c0-f7ca-4c78-820d-3fa1597605a6
pnookala/X-OpenMP
lldb/test/API/python_api/thread/main2.cpp
#include <stdio.h> #include <stdlib.h> int a(int); int b(int); int c(int); int a(int val) { if (val <= 1) return b(val); else if (val >= 3) return c(val); return val; } int b(int val) { int rc = c(val); void *ptr = malloc(1024); // thread step-out of malloc into function b. i...
TOOL
0.975292
3.954445
793811ef-11ae-4fde-b7ff-c476bed05db5
ishandutta2007/codeforces
wild_hamster/normal/1634/C.cpp
#include <utility> #include <iostream> #include <cmath> #include <deque> #include <string> #include <time.h> #include <stack> #include <vector> #include <map> #include <set> #include <sstream> #include <algorithm> #include <bitset> #include <fstream> #define pii pair<ll,ll> #define mp make_pair #define X first #define...
ALGO
0.999741
3.342764
cba44828-5158-48eb-baa4-5d987ba114a7
RaymonHE/visualSLAM14
ch7/orb_cv.cpp
#include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/highgui/highgui.hpp> #include <chrono> using namespace std; using namespace cv; int main(int argc, char **argv) { if (argc != 3) { cout << "usage: feature_extraction img1 img2" << endl; return...
ALGO
0.989867
5.71453
c48505c7-744b-4f82-a2bd-379f3249a8b7
sziccardi/RRT_Data_Generator
rrt_data_generator/data_utils.cpp
#include "data_utils.h" std::size_t hash<Vec2>::operator()(const Vec2& k) const { using std::size_t; using std::hash; using std::string; // Compute individual hash values for first, // second and third and combine them using XOR // and bit shifting: return ((hash<float>()(k.mData[0][0]) ^ (hash<float>()(k.m...
ALGO
0.998471
5.142834
84cda7d7-5919-4145-87b7-3c5c622137aa
Lim-YongKwan/Algorithm
백준/BOJ_1264.cpp
#include <iostream> #define endl "\n" using namespace std; int main(){ string s; while(getline(cin,s)){ if(s == "#"){ break; } int answer = 0; for(int i = 0;i<s.size();i++){ if(s[i] == 'a' or s[i] == 'o' or s[i] == 'u' or s[i] == 'i' or s[i] == 'e' or s[i...
ALGO
0.999333
4.009763
3becc2b1-380a-4dc5-8a26-abca91498fb7
SumitTeerthani/DSA-Solutions
recursion/printCodingNinja.cpp
// https://www.codingninjas.com/studio/problems/-print-n-times_8380707?utm_source=striver&utm_medium=website&utm_campaign=a_zcoursetuf&leftPanelTabValue=PROBLEM void print(vector<string> &s, int n, string p) { if (n == 0) return; s.push_back(p); print(s, n - 1, p); } vector<string> printNTimes(int...
ALGO
0.999644
4.593019
11acbd43-748f-44a1-b7e0-d96452ea2179
VarickQ/ACM
HaveDone/HDU/哈夫曼编码2527.cpp
#include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <algorithm> using namespace std; #define min(a,b) ((a)<(b)?(a):(b)) #define max(a,b) ((a)>(b)?(a):(b)) const int inf = 1000000000; const int M = 100000; const int N = 305; struct cmp{ bool operator()(const int &x,co...
ALGO
0.999797
4.349844
3d90d5ca-d7ad-4cd0-a95f-4e5bc79386c1
XifanYu/codeforces
1037/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef double db; typedef complex<db> cd; ll qpow(ll x,ll k,ll mod) { ll ret=1; while(k) { if(k&1) { ret=ret*x; ret=ret%mod; } x=x*x; x=x%mod; k=(k>>1); }...
ALGO
0.999988
3.380383
af01ba55-188f-4eed-9dcf-7d987ed57605
ishandutta2007/codeforces
asuka/normal/1270/A.cpp
#include<bits/stdc++.h> #define ll long long #define N #define rep(i,a,n) for (int i=(a);i<=(n);i++) #define per(i,a,n) for (int i=(n);i>=(a);i--) #define inf 0x3f3f3f3f #define infll 0x3f3f3f3f3f3f3f3f #define pb push_back #define mp make_pair #define pii pair<int,int> #define fi first #define se second #define lowbit...
ALGO
0.999804
3.184883
f04202eb-ec8f-47a1-b89d-45f9acb45ca8
yashtekade21/LeetCode_Solved
3330_Find_the_Original_Typed_String_I.cpp
class Solution { public: int possibleStringCount(string word) { int ans = 1; for (int i = 1; i < word.length(); i++) { if (word[i] == word[i - 1]) ans++; } return ans; } }; static const auto kds = []() { ios::sync_with_stdio(false); cin.tie(nu...
ALGO
0.999915
5.690024
60a36259-e3c0-4fa0-81f2-e5aa7d08adb5
Ghauoor/Questions_CPP
Recursion/sub_string.cpp
#include <vector> #include <iostream> using namespace std; void solve(vector<string> &ans, string str, string output, int i) { // base case if (i >= str.length()) { if (output.length() > 0) ans.push_back(output); return; } // exclude solve(ans, str, output, i + 1); // include output.pus...
ALGO
0.999949
5.487391
602d8249-3d78-42b6-91a1-ff71efde90da
Ashsifat1511/CP-Solves
B_Triangles_on_a_Rectangle.cpp
#include<bits/stdc++.h> using namespace std; #define all(x) x.begin(),x.end() #define forn for(int i = 0; i < n; i++) typedef long long int ll; int main(){ int t; cin>>t; while(t--) { int w, h; cin >> w >> h; int c_x1; cin >> c_x1; vector<int> x1(c_x1); for...
ALGO
0.999736
3.334235
7456a059-427e-49a1-bcae-9fd360a327d7
its-puneet/DSA-Practice
201-bitwise-and-of-numbers-range/201-bitwise-and-of-numbers-range.cpp
class Solution { public: int rangeBitwiseAnd(int left, int right) { if(!left || !right) return 0; int checker = left | right, mask = 1; while(checker != 1) checker >>= 1, mask <<= 1; int val = left & right, res = 0; while(ma...
ALGO
0.999971
5.972414
663a50fc-8b18-4574-8f2c-df2f428320ab
SuprDewd/CompetitiveProgramming
code/data-structures/kd_tree.cpp
#define INC(c) ((c) == K - 1 ? 0 : (c) + 1) template <int K> struct kd_tree { struct pt { double coord[K]; pt() {} pt(double c[K]) { rep(i,0,K) coord[i] = c[i]; } double dist(const pt &other) const { double sum = 0.0; rep(i,0,K) sum += pow(coord[i] - other.coord[i], 2.0); return sqrt...
ALGO
0.999933
4.487245
c3af9b1e-8366-4c88-bbd0-fcfcdcead7ba
akash-suklabaidya/Strivers-SDE-Sheet-Challenge
Stack_using_queue.cpp
#include <bits/stdc++.h> class Stack { // Define the data members. public: queue<int> q, q1; Stack() { // Implement the Constructor. } /*----------------- Public Functions of Stack -----------------*/ int getSize() { return q.size(); } bool isEmpty() { ...
ALGO
0.999514
4.811604
f26a9ed4-b1d6-49c4-a7e9-9839dd43c972
hantwofish/my_leetcode
datastruct_learn/leetcode/2048.cpp
#include"../STLCOMMON.h" #include"../COMMONALO.h" #include<stdio.h> #include<stdlib.h> #include<math.h> #include<iostream> #include<vector> #include<string> #include<algorithm> #include<set> #include<unordered_set> #include<map> #include<unordered_map> #include<stack> #include<queue> #include<deque> #include <iterato...
ALGO
0.998992
4.393104
0987e5be-6048-44de-b58a-61fb74cedf45
ZYCSwing/hiho
1486.cpp
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <stack> #include <queue> #include <algorithm> #include <list> #include <cstdio> #include <cstdlib> #include <climits> #include <memory.h> using namespace std; typedef pair<int, int> pii; int d...
ALGO
0.999858
3.456099
b79a55fd-e0df-43d9-908b-66acf4a50348
tykr0001/algorithm
BOJ/2839.cpp
#include<iostream> using namespace std; int main(void){ int N, kilogram, five=0, three=0; cin >> N; kilogram = N; while(kilogram>=5){ kilogram -= 5; five++; } if(kilogram==0){ cout << five << endl; return 0; } do{ while(kilogram>=3){ kilogram -= 3; three++; } if(kilogram==0) break...
ALGO
0.999957
3.796795
167d1750-9d31-4c7d-82fe-0c0a8161c795
v-o-y-a-g-e-r00/OOPLabs
Lab5/Lab5_1Pr_final/main.cpp
#include <iostream> #include "Rational.h" using namespace std; int main() { Rational<long> Rat1; Rational<long> Rat2; // Rational Rat1(6, 5); // Rational Rat2(-6, 5); Rat1.Scan(); Rat2.Scan(); Rat1.Print(); Rat2.Print(); /* + - * / */ cout << "Rat3=Rat1+Rat2="; Rational<long...
TOOL
0.981927
4.185465
af2ddab2-944c-4769-882d-310a7d0ba146
PainterHalver/INT2215
Bai tap tuan/BT01/B20.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long x, y; cin >> x >> y; if (x%7==0 && y%7==0) cout << "true"; else cout << "false"; }
ALGO
0.999843
3.977401
b09ed531-6cd1-4be0-b44c-4e795c8767ca
lmarti95/AdventOfCode2024
day15/mainp2.cpp
#include <algorithm> #include <ctype.h> #include <fstream> #include <iostream> #include <map> #include <stdio.h> #include <sstream> #include <string> #include <utility> #include <vector> #include <chrono> #include <thread> void part1(); void part2(); int main() { part1(); part2(); } class Object { public: ...
ALGO
0.999343
5.046312
e42b2362-8335-4cad-b1e9-cdcc12f1fd48
Ashish-kushwaha01/DSA-Questions
Bubble_Sort_Ascending.cpp
/* Ascending order of an array by bubble sort using least no. */ #include<iostream> using namespace std; int main(){ int arr[1000]; int n; cout<<"How many no. you have ? : "; cin>>n; for(int i=0;i<n;i++){ cout<<"Enter no. "<<i+1<<" : "; cin>>arr[i]; } for(int i=0;i<n-1;i++)...
ALGO
0.999797
4.377675
fb50ad13-ea80-4d82-af3a-42cc5b244020
guadarramaJASMIN/CSC370-
HW#2-accessLevel.cpp
#include <iostream> using namespace std; //working with strings #include <string> //access level class class AccessLevel { //public class public : //method string //parameters: // array for privilege levels for users // number of users //min permission required string accessL(int right[], int users, int m...
ALGO
0.982341
4.061033
98b83e6b-4636-45d0-8528-3cc35ccddb3c
protez/tesseract-ocr
textord/tablerecog.cpp
#include "tablerecog.h" namespace tesseract { // The amount of space required between the ColPartitions in 2 columns // of a non-lined table as a multiple of the median width. const double kHorizontalSpacing = 0.30; // The amount of space required between the ColPartitions in 2 rows // of a non-lined table as multipl...
TOOL
0.894424
6.222054
f64a9032-a57c-41f5-b40f-ab0e53562ba2
Flare-k/Algorithm
동적프로그래밍/인접한비트의개수_DP_2698.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <cmath> using namespace std; int arr[101][101][2]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int t, n, k; cin >> t; arr[1][0][0] = 1; arr[1][0][1] = 1; for (int i = 2; i < 101; i++) { ...
ALGO
0.999417
4.068403
4564ece0-2d32-4bb1-a807-8defc1f80cb6
Fisher87/leetcode
cplus/count-hills-and-valleys-in-an-array.cpp
// Time: O(n) // Space: O(1) // simulation, array class Solution { public: int countHillValley(vector<int>& nums) { int result = 0, inc = -1; for (int i = 0; i + 1 < size(nums); ++i) { if (nums[i] < nums[i + 1]) { result += static_cast<int>(inc == 0); in...
ALGO
0.999993
5.756613
b228e153-5439-4169-9975-cbb231b8773f
SuyashJoshi179/ProgramsForProblems
codeforces/744/C.cpp
#include <bits/stdc++.h> #include <random> #include <fstream> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<double, double> pd; typedef vector<ll> vl; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<vector<ll...
ALGO
0.999971
4.303176
bf9dbe4e-fa85-4edd-86d1-b14edb6e2819
prachiMeshram/Data-Structures-and-Algorithm
Practice/Stacks/twoStacks.cpp
// https://www.codingninjas.com/codestudio/problems/two-stacks_983634?leftPanelTab=0&campaign=YouTube_CodestudioLovebabbar5thfeb&utm_source=youtube&utm_medium=affiliate&utm_campaign=YouTube_CodestudioLovebabbar5thfeb #include <bits/stdc++.h> using namespace std; class TwoStack { int size; int* arr; int t...
ALGO
0.999605
5.141485
06391fde-27f7-486c-8dbc-3ee7caca0400
aanupam29/codeforces-problems
493C - Vasya and Basketball.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ulli unsigned long long int #define li long int #define ff(i,a,b) for(int i=a;i<b;i++) #define fb(i,b,a) for(int i=b;i>=a;i--) #define l(s) s.length() #define ci(n) cin>>n; ...
ALGO
0.999994
3.365128
9ff9aa86-2645-4bbe-8022-1b8ab757de68
hyul77/Algorithm
백준/C++/2420.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long N, M; cin >> N >> M; if (N > M) { cout << N - M<<"\n"; } else { cout<<M - N << "\n"; } return 0; }
ALGO
0.999973
3.282825
b1674240-cce5-4097-97db-62dfb25e6275
romeokil/c-prac
l-16.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"enter the no of elements\n"; cin>>n; int arr[n]; cout<<"enter the no of elements\n"; for(int i=0;i<n;i++){ cin>>arr[i]; } int i,j; for(i=0;i<n-1;i++){ for( j=i+1;j<n;j++){ if(arr[i]>arr[j]){ int temp=arr[i]; arr[i]=arr[j]; arr...
ALGO
0.999561
3.340867
496d0440-5620-4d9d-bc6b-5fd031cde0a8
ishranga11/Competetive_coding
imp_bf_77A.cpp
#include <iostream> #include <algorithm> #include <math.h> #include <vector> #include <string> #include <stdio.h> #include <bits/stdc++.h> using namespace std; typedef vector< int > vi; typedef vector< vi > vvi; typedef pair< int,int > ii; typedef map<int,int> mii; typedef map< long long int, long long int> mll; #de...
ALGO
0.999691
3.684712
d290c8c1-947b-440d-9b4e-81fc7cdaccb1
than0112/learning_hub
01-basics/small-practice/判斷小寫大寫 特殊字元.cpp
//判斷輸入的字元是小寫字母 大寫字母 或數字 如果都不是 輸出"特殊字元" #include <iostream> #include <cctype> // 引入 cctype 函式庫,用來處理字元分類 using namespace std; int main() { char input_char; cout << "請輸入一個字元:"; cin >> input_char; // 使用 if-else if-else 結構來進行判斷 // 1. 判斷是否為小寫字母 if (islower(input_char)) { cout << "小寫字母...
TOOL
0.989332
4.385419
97f597c3-f2d2-4340-a15c-6cc9f9b20fbe
Adhmkty99/Vayu
clang-tools-extra/clangd/DecisionForest.cpp
#include "Features.inc" #if !CLANGD_DECISION_FOREST #include "Quality.h" #include <cstdlib> namespace clang { namespace clangd { DecisionForestScores evaluateDecisionForest(const SymbolQualitySignals &Quality, const SymbolRelevanceSignals &Relevance, float Base) { llvm::errs() << "Clangd was ...
ALGO
0.888398
7.057827
f00a20e0-5c21-4f55-9964-e84f6f895f61
thebesttv/00.ACM
02.LuoGu/3939.cpp
// Tag: 二分 #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<climits> #include<cmath> #include<ctime> #include<vector> #include<queue> #include<stack> #include<list> #include<set> #include<map> #include<utility> #include<algorithm> using namespace std; #define FOR(i,a,b) for(int i=(a);i<...
ALGO
0.999946
4.095339
d010cfd6-eab0-43db-a34d-74082daca341
0x1306e6d/algorithm
baekjoon/4673.cpp
/* 4673 : 셀프 넘버 URL : https://www.acmicpc.net/problem/4673 Input : Output : 1 3 5 7 9 20 31 42 53 64 | | <-- a lot more numbers | 9903 9914 9925 9927 9938...
ALGO
0.99787
4.065746
0587de69-560e-463b-8776-cc596123e1f2
raincross7/code-similarity
codes/train_code/problem134/problem134_89.cpp
#include <stdio.h> #include <string> #include <iostream> #include <algorithm> using namespace std; //I can't understand,so I imitated yutaka watabe's book. //I think this problem has 5 star rank difficulty. void calc(char X[],char Y[]){ int X_length=0,Y_length=0; int table[1001][1001]; for(int i = 0; i < 1001; i+...
ALGO
0.999894
3.795128
54be42cd-8ec1-4e99-84a7-fc1797416286
FedeGauna16/C-
Ejercicios/Ejercicio 1.2.1.23.3.cpp
#include <iostream> using namespace std; // Dados 100 valores enteros, informar cuál es el mayor. int main() { int n, a = -99999, cantN = 0; cout << "Ingresar 100 valores enteros" << endl; while (cantN != 5) { cin >> n; cantN++; if (n > a) { a = n; } } cout << "...
ALGO
0.994824
3.380526
7b155c41-305b-4f8f-a890-7db5e2957236
Loopwise/a_little_about_ros
src/topics02_motion/turtlesim/polar/turtlesim_four_petal_rose.cpp
#include "ros/ros.h" #include "geometry_msgs/Twist.h" #include <cmath> // Global Variables const int freq = 10; // Frecuencia de Publicación (Hz) const double dt = 1.0/freq; // Paso del tiempo (s) const double a = 3; // Tamaño del lazo const double w = 2*M_PI*dt; // Frecuencia angular // Function Definition inline do...
ALGO
0.998629
5.508084
fcacc402-d9af-4d38-ad0a-22eb4b814949
AkshatSharma1/DSA
Graph/bfs.cpp
#include<bits/stdc++.h> using namespace std; // V -> no. of nodes, adj[]->graph vector<int> bfs(int V, vector<int> adj[]){ vector<int> bfsTraversed; //traversed nodes array vector<int> visited(V+1,0); //visited array //outer for loop for traversing all the components for(int i=1;i<V;i++){ //if...
ALGO
0.999995
4.938023
cbf9ea44-401c-48db-bdac-e0317d55401d
cadcoin-project/cadcoin
src/hash.cpp
#include "hash.h" inline uint32_t ROTL32 ( uint32_t x, int8_t r ) { return (x << r) | (x >> (32 - r)); } unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash) { // The following is MurmurHash3 (x86_32), see http://code.google.com/p/smhasher/source/browse/trunk/MurmurH...
ALGO
0.987379
6.215198
003f00d2-28f3-4c24-93af-d0584a86b76a
saquibjawedbit/cp
C_Two_TVs.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); ll tc = 1; // cin >> tc; for(ll t = 1; t <= tc; t++) { // Code here ll n; cin >> n; vector<pair<ll,ll>> arr(n); f...
ALGO
0.999952
4.688314
9115f181-1924-46eb-b90c-5214d4176a56
AshishKhatkar/Codechef
PSYC2015/SWEET.cpp
/* ID: ashish1610 PROG: LANG: C++ */ #include<bits/stdc++.h> using namespace std; #define ll long long int #define vi vector<int> #define vl vector<ll> #define pii pair<int,int> #define pil pair<int, ll> #define pll pair<ll, ll> #define pli pair<ll, int> #define pb(v, a) v.push_back(a) #define mp(...
ALGO
0.99953
3.86378
db4c9bc4-8016-4815-8e79-8be7c31f0ed8
tienit150198/ACM
20181020/proH/main.cpp
#include <bits/stdc++.h> #define ll long long int #define ipair pair<ll,ll> #define Max 1000 using namespace std; ll n, m; bool matrix[Max][Max]; ll l[Max][Max]; ipair s,e; ll dx[] = {0,1,0,-1}; ll dy[] = {1,0,-1,0}; void init(){ for(int i = 0 ;i < Max; i++){ for(int j = 0 ; j < Max; j++){ l...
ALGO
0.999887
4.12195
99f82f47-02e6-4b4f-9ba5-2fd4fad17139
lusergit/Esercizi-P1
2014-2015/Appello 2 (14-07-2015) + SOL/main-14-07-2015.cpp
#include<iostream> #include<fstream> using namespace std; struct nodo{int info; nodo* next; nodo(int a=0, nodo* b=0){info=a; next=b;}}; struct nodoT{int info; nodoT* left,* right; nodoT(int a=0, nodoT* b=0, nodoT* c=0){info=a; left=b;right=c;}}; void F0(nodo*L, bool & b) { if(!L) b=false; else { F0(L->nex...
ALGO
0.998827
3.264706
96850f06-526a-40f1-8302-8e153b158d31
CarlosBurrlos/Apache_Variance_Debugger
pi/partC/src/Invar.cpp
#include "../include/Invar.h" #include "../include/Globals.h" #include <iostream> void compute_support(func * scope) { auto funcs = scope->funcs; std::unordered_map<std::string_view, func *>::iterator i; std::unordered_map<std::string_view, func *>::iterator j; for (i = funcs.begin(); i != funcs.end...
TOOL
0.855286
4.99722
7c3c21eb-6773-4174-a7a4-707fd11ae956
MastarB/leetcode
ReverseLinkedList.cpp
class Solution { public: ListNode* reverseList(ListNode* head) { ListNode* prev = NULL; ListNode* cur = head; while(cur != NULL) { ListNode* tmp = cur->next; cur->next = prev; prev = cur; cur = tmp; } return prev; } };
ALGO
0.999296
5.36208
c2ef5f6c-c259-48f5-accd-e993f7091332
mayanksinha963/DSA
input/practice/paranthesis_matching.cpp
i#include<iostream> //#include<stack> using namespace std; class stack { public : int size; int top; string *arr ; }; int isempty (stack *ptr) { if (ptr->top == -1) { return 1; } else { return 0; } } int isFull (stack *ptr) { if (ptr->top == ptr->size-1) ...
ALGO
0.999856
3.998317
187fdd1b-cf84-489a-9b89-6a9cd0a06120
SiddhantGujrathi1/CG
ASSIGNMENT 5.CPP
/* Problem Statement: Write C++ program to generate fractal patterns by using Koch curves. */ //============================================================================ // Name : Assignment_5.cpp // Author : Gujrathi Siddhant //====================================================================...
ALGO
0.998589
5.387801
3635cdc6-dbbf-4d1a-a15b-5f8ed7b7457a
FusionSid/NZOI
solved/practice_problems/perimeters.cpp
#include <bits/stdc++.h> using std::cin, std::cout, std::string; int main() { int x, y, c, d; cin >> x >> y >> c >> d; int manhattan_dist = abs(x - c) + abs(y - d); cout << manhattan_dist * 2; return 0; }
ALGO
0.999334
3.645454
8f069076-3b48-49af-935f-15cc1d7f0715
kjiawei/workCode
优良设计代码段.cpp
全局变量的替换方案 1. inline提高效率 函数需要短小精悍 看编译器优化处理 编译时替换 inline int add(int x,int y,int z){ return x + y + z; }//类似template #include <iostream> #include <string> //模板是类和对象的蓝图--泛型编程 //交换两个数 template <class T>//字母T将在接下来的函数里代表一种不确定的数据类型 void swap(T &a,T &b) { T temp = a; a = b; b = temp; } int main() { int i1 = 100; in...
TOOL
0.966477
3.717965
77f02866-eab2-4d23-a879-49dafae98019
kpratyush12345/6Companies30days
Intuit/2_Word_Search.cpp
//https://practice.geeksforgeeks.org/problems/word-search/1/ class Solution { public: bool dfs(vector<vector<char>> &board, string word, int i, int j, int index) { if (index == word.size()) return true; if (i < 0 || j < 0 || i > board.size() - 1 || j > board[0].size() - 1 || board[i...
ALGO
0.999744
5.925587
2ff9773c-d4ec-4b21-bdc6-94da998f567e
hash-brow/Competitive-Programming
Sgp NOI/paint.cpp
// #define _GLIBCXX_DEBUG // #pragma GCC optimize "trapv" #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> // #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") // pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native"...
ALGO
0.999793
3.881128
cc7065b8-c852-4b92-b9e6-34601ecb1652
Shorya1835/Kactl
stress-tests/geometry/SegmentIntersection.cpp
#include "../utilities/template.h" #include "../../content/geometry/SegmentIntersection.h" namespace oldImpl { template<class P> int segmentIntersection(const P& s1, const P& e1, const P& s2, const P& e2, P& r1, P& r2) { if (e1==s1) { if (e2==s2) { if (e1==e2) { r1 = e1; return 1; } //all equal else return...
ALGO
0.998704
4.644179
b2c47bab-210e-438a-97b8-30ec48cc8bbc
MartinMeng/robotGame
utilities.cpp
#include <cstdlib> #include <algorithm> #include <cctype> #include <iostream> #include "Arena.h" /////////////////////////////////////////////////////////////////////////// // Auxiliary function implementation /////////////////////////////////////////////////////////////////////////// // Return a uniformly distrib...
ALGO
0.998591
6.088346
118726e0-c57c-4643-99d5-cf4c705ae758
KunalGehlot/Cpp-programming
ST 07/main.cpp
/* * main.cpp * * Created on: 23-Jul-2017 * Author: Kunal */ #include <iostream> using namespace std; int main() { int x = 20; cout << ++x << endl; cout << x << endl; }
TOOL
0.900946
3.452449
d14d588f-7caa-466e-9936-20c3c1625336
andreiarnautu/Algorithmic-Problems-Part-2
secv9.cpp
#include <fstream> using namespace std; ifstream in("secv9.in"); ofstream out("secv9.out"); int n,i; int main() { in>>n; if(n<9) out<<"0"; else if(n==9) out<<"8"; else { out<<"72"; for(i=10;i<n;i++) out<<"0"; } return 0; }
ALGO
0.997405
3.335137
02e32b61-cd05-4af0-b544-8e94ba8b6b64
shivgupta198922/HACKEREARTH-MASTER
Algorithms/Graphs/Breadth first search/Graphs.cpp
#include <bits/stdc++.h> using namespace std; int bfs(long long int r, vector<long long int> a[]) { map<long long int, long long int> vis; vis[r] = 1; long long int ans = 1; queue<long long int> q; q.push(r); while(!q.empty()) { long long int k = q.front(); q.pop(); for(auto child : a[k]) { if(...
ALGO
0.999925
4.32051
9eeabf57-846c-430e-8b84-7f2d4c700b05
million-t/competitive-programming
ford-bellman.cpp
#include <iostream> #include <vector> #include <climits> int main() { int n, m; std::cin >> n >> m; std::vector<std::vector<std::pair<int, int>>> graph(n); std::vector<int> dist(n, INT_MAX); dist[0] = 0; for (int i = 0; i < m; i++) { int u, v, w; std::cin >> u >> v >> w; ...
ALGO
0.999961
4.986308
82fdf33b-87a6-46ef-8bc2-891310949657
Ramanagamani1/Striver-Sde-Sheet-Challenge
BitManipulation & Maths/DivisorsOFNumber.cpp
void print_divisors(int n) { // Code here. vector<int> ans; for(int i=1;i*i<=n;i++) { if(n%i==0) { ans.push_back(i); if (i!=n/i) ans.push_back(n/i); } } sort(ans.begin(),ans.end()); ...
ALGO
0.99989
5.039235
cdb6f830-9f25-453d-a791-db1ecd0826bd
tsingfa/Cpp-Primer-5-ProblemSet-StudyNote
ch03_Strings_Vectors_and_Arrays/ex01_3.cpp
#include <iostream> using std::cout; using std::cin; using std::endl; int main() { int small = 0, big = 0; cout << "please input two integers:"; cin >> small >> big; if (small > big) { int tmp = small; small = big; big = tmp; } while (small <= big) { // 输出从 small到 big...
ALGO
0.993072
3.723855
76bcad18-cbcb-40d1-87e3-4489ed522a7a
Garvit-1/DSA
74-search-a-2d-matrix/search-a-2d-matrix.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int n=matrix.size(),m=matrix[0].size(); int r=0; int c=m-1; while(r<n && c>=0){ if(matrix[r][c]<target){ r++; } else if(matrix[r][c]>target){ ...
ALGO
0.999975
6.130685
7ac4e915-7d7e-4424-b498-c4869ae8c6bf
giumanuz/cses
Introductory Problems/Palindrome Reorder.cpp
#include <bits/stdc++.h> #ifdef Giulio #include <bits/debug.h> #else #define dbg(...) #endif using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using pi = pair<int, int>; using pll = pair<ll, ll>; ...
ALGO
0.999988
5.26757
e7a7dd73-d252-4c9b-95e9-5bbedabd3318
polarr/competitive-programming
Codeforces/1930/E.cpp
/** * Solution by Charles Ran (polarity.sh) * Date: 2025-07-05 * Contest: Codeforces 1930 * Problem: E **/ #include <bits/stdc++.h> using namespace std; using ull = unsigned long long; using ll = long long; using vi = vector<int>; using vl = vector<ll>; using pii = pair<int, int>; #define pb push_back #define rep...
ALGO
0.999876
4.78476
6cca272b-dcce-46ff-9f43-fa8b8a71f55e
stefanos1316/Rosetta-Code-Research
Scripts/Task/luhn-test-of-credit-card-numbers/c++/luhn-test-of-credit-card-numbers-3.cpp
#include <iostream> #include <type_traits> template<size_t I, int... Args> struct find_impl; template<int A, int... Args> struct find_impl<0, A, Args...> { using type = std::integral_constant<int, A>; }; template<int A, int B, int... Args> struct find_impl<0, A, B, Args...> { using type = std::integral_const...
ALGO
0.872824
6.327944
fe056caa-3a8c-48e1-8a37-47ccb2e87393
hugo-juarez/dsa-learn
binary-tree/binary-tree/binary-tree/binary-tree.cpp
// // binary-tree.cpp // binary-tree // // Created by Hugo Juarez on 4/8/25. // #include "binary-tree.hpp" #include "../queue/queue.hpp" #include "../stack/stack.hpp" #include <memory> #include <iostream> BinaryTree::BinaryTree(){ int root; std::cout << "Please enter root element: "; std::cin >> root; ...
ALGO
0.98797
4.855737
c5d8a04a-e86c-4673-98d2-0f9759365703
Bonaparto/CPP-Codes
stepik/yandex/std/3.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool partis(pair<int,int> a, pair<int,int> b){ if(a.first == b.first) return a.second < b.second; else return a.first > b.first; } int main(){ int n; cin >> n; vector <pair<int,int> > v; for(int i = 0; i < n; ++i){...
ALGO
0.999883
4.559572
550a9616-fd5c-41be-b242-263f0fab6e7f
GoyalRohan/DSA-Topiwise-Practice
Queue/QUEUE_USING_ARRAY.CPP
#include<iostream> using namespace std; struct queue { int size; int front; int rear; int *Q; }; void create(queue *q) { cout<<"Enter the size of queue : "; cin>>q->size; q->front = q->rear = -1; q->Q = new int[q->size]; } void enqueue(queue *q , int x) { if(q->rear == q->size-1)...
ALGO
0.995818
4.123471
c2058fb7-51e5-4fa8-8337-c0c70e662c99
vss021/365-Day-Coding-Challenge
Day-30/problem2.cpp
#include <bits/stdc++.h> using namespace std; // Assuming the definition of the Node class class Node { public: int key; Node* left; Node* right; Node(int val) : key(val), left(nullptr), right(nullptr) {} }; class Solution { public: // Helper function to calculate the number of moves needed to di...
ALGO
1
6.9736
ad9595a8-7c5c-4b80-b81a-3c78c2ecd001
opehn/codetree-TILs
240919/왔다 갔던 구역 2/area-been-to-and-from2.cpp
#include <iostream> #include <vector> using namespace std; #define MAX_R 2000 #define OFFSET 1000 int main() { int n; cin >> n; vector<int> line(MAX_R + 1, 0); int num; string command; int start, end; int cur = OFFSET; for(int i = 0; i < n; i++){ cin >> num >> command; ...
ALGO
0.999902
4.143887
b2b7c460-f169-47fe-99b4-ebaf293ada9a
alexandraback/datacollection
solutions_6404600001200128_1/C++/gloompisces/pA.cpp
#include <stdio.h> int main() { /* freopen("A-small-attempt0.in", "r", stdin); freopen("A-small-attempt0.out", "w", stdout);*/ freopen("A-large.in", "r", stdin); freopen("A-large.out", "w", stdout); int num[1005]; int cases, N; scanf("%d", &cases); for (int c = 1; c <= cases; ...
ALGO
0.999258
3.115923
308080d9-c8d4-4b30-9f78-831a503dc622
Akm007git/Coding-questions
Easy/Boundary traversal of matrix/boundary-traversal-of-matrix.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to return list of integers that form the boundary //traversal of the matrix in a clockwise manner. vector<int> boundaryTraversal(vector<vector<int> > matrix, int n, int ...
ALGO
0.999949
5.934391
97988906-855d-4aa2-bf32-6af8e849d7a5
outrageousaddy76000/LeetCode-GeeksforGeeks
215. Kth Largest Element in an Array/Solution.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { priority_queue <int,vector<int>, greater<int>> pq; for(int i=0;i<k;i++) pq.push(nums[i]); for(int i=k;i<nums.size();i++){ if(nums[i]>pq.top()){ pq.pop(); pq.push(nums[i]); ...
ALGO
0.999993
5.182139
79a35656-fc9a-4b8f-986d-f35039688b56
kirbydyson/Intro-to-Computer-Science-1
SnakeProject/snake.cpp
#include "snake.h" void start(Snake& snake, Cord tail[], Cord fruits[], string fileName){ ifstream loadFile; string temp; // Choosing file to load, will make in plotter eventually loadFile.open(fileName); loadFile >> snake.gameType >> snake.SPEED >> snake.SIZE; getline(loadFile, temp); ...
TOOL
0.952291
4.877056
a4ec894a-7fc3-4a43-b6cb-d5f645cadbd9
shifou/leetcode
Merge Two Sorted Lists.cpp
class Solution { public: ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { // Note: The Solution object is instantiated only once and is reused by each test case. ListNode * h1 = l1; ListNode * h2 = l2; ListNode * root=NULL; ListNode * temp; if(h1==NULL) ...
ALGO
0.999929
5.772906