uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
6b8186a2-3de8-4e7b-81f7-1446ed8ce908
sailfishos-mirror/qtlocation
src/location/maps/qgeocameratiles.cpp
#include <QtGui/QMatrix4x4> #include <QList> #include <QMap> #include <QPair> #include <QSet> #include <QSize> #include <QtPositioning/private/qwebmercator_p.h> #include <QtPositioning/private/qdoublevector2d_p.h> #include <QtPositioning/private/qdoublevector3d_p.h> #include <QtPositioning/private/qlocationutils_p.h> ...
TOOL
0.918768
5.210386
70c0a9ba-da82-41ee-81f3-cd598c76fe6c
7dngur7/baekjoon
helloworld/2252.cpp
#include <iostream> #include <vector> #include <deque> #include <queue> using namespace std; vector< vector<int> > arr(32001); deque<int> ans; int chkarr[32001] = {}; int indegree[32001] = {}; queue<int> q; int main(void){ ios::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; // 간선 정보 입...
ALGO
0.999994
4.438
c1d98a76-977b-409b-b550-55ee75db158a
Gui0r/condicionaisEmCpp
ExerciciosAula08abril/classificacaoTriangulo4.cpp
#include <iostream> #include <locale.h> using namespace std; int main(){ setlocale(LC_ALL, "pt_BR.UTF-8"); int a, b, c; cout << "Digite os três lados de um triangulo em ordem com espaço"; cin >> a, b, c; if(a == b == c){ cout << "O seu triangulo é um triângulo equilátero!"; }else if(...
ALGO
0.999243
4.429177
b041a273-24ad-4334-ad29-520aa26fc202
sharad2307/Competitive_Programming
Codeforces/Practice/1215B.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double typedef unsigned long long ull; #define loop(i,a,b) for(ll i=a;i<b;i++) #define f(i,a,b) for(ll i=a;i<=b;i++) #define testcases ll t;cin>>t;while(t--) #define dec(x) greater<x>() /*** Define Values ***/ #define mx 200005 #define m...
ALGO
0.999981
3.359339
3a4c645d-5680-44c0-a76e-48f6fddbce41
dhwanisanmukhani/competitive-coding
codeforces/bank.cpp
#include <iostream> using namespace std; int main() { int n; std::cin >> n; int last,slast; last=n/10; slast=(last/10)*10+(n%10); if(last>slast) { if(last>n) { std::cout << last << std::endl; } else { std::cout << n << std::endl; } ...
ALGO
0.99865
3.50695
ab13da5b-2884-46f9-81d8-b43e6b41b508
tfg1434/cp
Codeforces/2003A.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #endif #define f first #define s second template<class T> using V = vector<T>; using vi = V<int>; #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define pb push_back #define lb lower_bound #define ub upper_bound ...
ALGO
0.999853
5.060738
a0ef5b10-704d-45a2-897d-9c64e05c94a5
shubhamnegi9/MyLeetCodeSolutions
460-lfu-cache/lfu-cache.cpp
class Node { public: int key, value, cnt; Node* prev; Node* next; Node(int _key, int _value) { key = _key; value = _value; cnt = 1; } }; class List { public: Node* head; Node* tail; int size; List() { head = new Node(0, 0); tail = new...
ALGO
0.999857
6.031161
dd3d2e86-ceea-4d79-97ab-f35695155f00
guigo789/Prototipos_app
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
fb0238d2-7c77-430d-a9f4-a628b726eee2
BilalAS173/24k-0701
OOP Lab 5/c.w task 3.cpp
#include <iostream> #include <vector> using namespace std; class Book { public: string title; string author; string isbn; Book(string t, string a, string i) : title(t), author(a), isbn(i) {} void display() const { cout << "Title: " << title << ", Author: " << author << ", ISBN: " << isbn <...
TOOL
0.991556
6.882332
9418ecc5-ef62-4236-a45f-e56ba6d7d009
oussama3422/chat-app
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998693
6.797273
96cdeba5-0c2c-440b-b031-a45fc1d54af8
geek-studios/programs
c++/IncomeTax_Rate_Calculator.cpp
#include <stdio.h> #include <iostream> #include <cmath> #include <map> #include <iomanip> double TaxesDue(double &income); double HighestRate(double &income); std::map<double, std::string> taxRate = { {0.35, "499999"}, {0.31, "349999"}, {0.25, "249999"}, {0.21, "169999"}, {...
ALGO
0.999545
4.853841
3a32286e-b8eb-418f-ab33-ff6163a712ad
adityanjr/code-DS-ALGO
CodeForces/misc/Queen.cpp
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define pie 3.14 typedef long long int ll; /* .d8b. d8888b. db db .d8b. d8b db d8' `8b 88 `8D `8b d8' d8' `8b 888o 88 88ooo88 88oobY' `8bd8' 88ooo88 88V8o 88 88~~~88 88`8b 88 88~~~88 88 V8o88 88 88 88 `88. 88 88 88 ...
ALGO
0.999555
3.660102
54bb05ac-d59d-4a7a-9498-a98ba7e72259
nefrttPrabhu/leetstore
2280-count-good-triplets-in-an-array/count-good-triplets-in-an-array.cpp
class Solution { public: class BIT { vector<int> tree; int n; public: BIT(int size) : n(size), tree(size + 1, 0) {} void update(int i, int val) { for (++i; i <= n; i += i & -i) tree[i] += val; } int query(int i) { ...
ALGO
0.999958
5.345175
f977b332-f898-4b24-beee-421dc3c029f5
jihoho/Algorithm
stack_queue/(prog)다리를지나는트럭.cpp
#include <string> #include <vector> #include <queue> using namespace std; struct car{ int w; int d; }; int solution(int bridge_length, int weight, vector<int> truck_weights) { int answer = 0; vector <car> q; int time=1; car c; c.w=truck_weights[0]; c.d=1; truck_weights.erase(truck_w...
ALGO
0.999868
5.044055
28edaecd-2a82-4026-99fc-f0546d9e42b2
Antonc3/Competitive-Programming
codeforces/practice/edu/Two Pointers/checity.cpp
#include <bits/stdc++.h> #include <climits> using namespace std; typedef long long ll; int main(){ int n; ll s; cin >> n >> s; vector<ll> arr(n); for(auto &x : arr) cin >> x; ll ans = 0; int r = 0; for(int l = 0; l < n; l++){ while(r < n && arr[r]-arr[l] <= s){ ...
ALGO
0.999851
3.706518
7aa5770d-8c6d-4f3e-b8b4-d6ae889978d2
sarvex/cpp-leetcode
1333.Filter Restaurants by Vegan-Friendly, Price and Distance.cpp
class Solution { public: vector<int> filterRestaurants(vector<vector<int>>& restaurants, int veganFriendly, int maxPrice, int maxDistance) { sort(restaurants.begin(), restaurants.end(), [](const vector<int>& a, const vector<int>& b) { if (a[1] != b[1]) { return a[1] > b[1]; ...
ALGO
0.999859
5.69432
a559e724-cb48-4281-9ffa-11ec33255c1a
Jedar/MIA4PSMs
src/psms/FuzzyPSM/fuzzypcfg_all_pw_p.cpp
#include<iostream> #include<fstream> #include<queue> #include<time.h> #include<algorithm> #include<iomanip> #include<math.h> #include<cstring> using namespace std; #include "Trie.h" //#define MIN3(a, b, c) ((a) < (b) ? ((a) < (c) ? (a) : (c)) : ((b) < (c) ? (b) : (c))) //#define FILE_DICT "F://testdic.txt" //字典文件的路径 ...
DATA
0.969734
3.193265
25f075e2-e629-47b1-bdc1-e90fb74bc070
yhimanshu22/DSA-summers
arrays/removeDuplicates.cpp
#include <iostream> using namespace std; int removeDuplicates(int arr[], int n) { int result = 1; for (int i = 1; i < n; i++) { if (arr[i] != arr[result - 1]) { arr[result] = arr[i]; result++; } } return result; } int main() { int nums[] = {1, 2...
ALGO
0.999648
6.273582
f59de854-a249-435a-b703-8e004a3dc360
1carusalwayswa/adventOfCode2024
2.cpp
#include <iostream> #include <sstream> #include <vector> #include <string> int main() { std::string line; int ans = 0; int cnt = 0; while(std::getline(std::cin, line)) { std::stringstream ss(line); std::vector<int> numbers; std::vector<int> numbers_ori; int num; ...
ALGO
0.999914
3.539821
65336980-5dba-4f1f-97dc-7eb6f31be80d
lupeng25/ls
---Others---/带最小值操作的队列/minqueue.cpp
#include <iostream> #include <vector> #include <math.h> #include <algorithm> #include <time.h> #include <stdio.h> #include <string> #include <vector> #include <set> #include <sstream> #include <stack> using namespace std; //这个lintcode 里面minstack的代码 class MinStack { stack<int> num; stack<int> minnum; p...
ALGO
0.999846
4.812986
da17404a-db49-42bb-ae59-742be76d21dd
scnb/Cpp-learningChapter7and8
8-12/8-12.cpp
// 8-12.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include <iostream> using namespace std; template <typename T> void Swap(T &a, T &b); //ģ template <typename T> void Swap(T a[], T b[], int n); void Show(int a[]); const int Lim = 8; int main() { int i = 10, j = 20; cout << "i = " << i << " j = " << j << endl; Swap(i, j...
ALGO
0.936884
3.297893
8d8676bb-a92a-4f0c-a22f-b94569295eb2
leviaici/NFA
main.cpp
#include <iostream> class NFA { std::vector<int> currentStates = {0}; std::vector<int> finalStates; std::vector<char> sigma; std::vector<int> states; std::vector<std::tuple<int, char, int>> transitions; public: NFA(std::vector<int> finalStates, std::vector<char> sigma, std::vector<int> states,...
ALGO
0.999218
5.823598
2d86eb43-4f4d-4148-837c-055caebb187c
rohanag03/OOPs-Lab-3rd-SEM
Week 4/q3_a.cpp
#include <iostream> using namespace std; void print(char ch, int n); void print(char ch); void print(void); int main() { int opt; cout<<"Choose the desired option:\n1.Give the character and no. of times you want to print it.\n2.Give only character.\n3.No value will be given."<<endl; cin>>opt; if(opt==1)...
ALGO
0.885915
3.084371
8488f57e-fc36-44a4-929a-2c04ccbb8187
ishandutta2007/codeforces
gyh20/normal/1313/B.cpp
#include<bits/stdc++.h> #include<windows.h> #define re register using namespace std; inline int read(){ re int t=0; re char v=getchar(); while(v<'0')v=getchar(); while(v>='0'){ t=(t<<3)+(t<<1)+v-48; v=getchar(); } return t; } int t,a,b,c,ans,d,e,f,g,h,k; int main(){ t=read(); while(t--){ a=read(); b=rea...
ALGO
0.999543
3.026909
d5fa1304-78e8-4628-8d6b-59f89010032b
clingfei/LeetCode
1282.用户分组.cpp
/* * @lc app=leetcode.cn id=1282 lang=cpp * * [1282] 用户分组 */ #include <vector> #include <unordered_map> #include <iostream> using namespace std; // @lc code=start class Solution { public: vector<vector<int>> groupThePeople(vector<int>& groupSizes) { vector<vector<int>> res; unordered_map<int, v...
ALGO
0.999922
6.336668
7bbaeb5f-6654-4e4a-89d6-9eaf92ae94db
Rahul21146/Problem-Solving
Homework/Graph-5/1514. Path with Maximum Probability.cpp
/* You are given an undirected weighted graph of n nodes (0-indexed), represented by an edge list where edges[i] = [a, b] is an undirected edge connecting the nodes a and b with a probability of success of traversing that edge succProb[i]. Given two nodes start and end, find the path with the maximum probability of su...
ALGO
0.999987
5.949565
33ce6426-29eb-4e63-a533-70cc0cb82766
newsoftmx/CODIGOS-C-MAS-MAS
estructuras-datos/arbol_profe_modificado.cpp
/* Figura 12.19: fig12_19.c 02 Crea un rbol binario y lo recorre en 03 preorden, inorden, y en postorden */ #include <stdio.h> #include <stdlib.h> #include <time.h> /* estructura autorreferenciada */ struct nodoArbol { struct nodoArbol *ptrIzq; /* apuntador al subrbol izquierdo */ int dato; /* valor del nodo */...
ALGO
0.999938
5.5636
967b5dde-7443-4a4e-9633-3aa2e0997f64
shreyatpandey/Coding-Challenges
C++/Set/missing_number.cpp
/*Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1: Input: [3,0,1] Output: 2*/ class Solution { public: int missingNumber(vector<int>& nums) { int temp = nums.size(); /* i= 0 and i = 1 will make a difference */ ...
ALGO
0.999775
5.18931
ca417970-2970-404c-8d39-76c9c3d18fc5
louistone/Leetcode
133.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> neighbors; Node() {} Node(int _val, vector<Node*> _neighbors) { val = _val; neighbors = _neighbors; } }; */ class Solution { public: Node* cloneGraph(Node* node) { if(!node) return NULL; No...
ALGO
0.999902
6.237162
1c59612b-2491-4389-8950-9a50f946f870
mido-Jr/Junior-Training-Sheet-V7.0
Category A/A. Team.cpp
/* * This file is a test case you may use and change to check your code * Ahmad Elnassag */ #include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int x; cin >> x; int nuo = 0; int three[3]; for (int i = 0; i < x; i++) { int bi = 0; for (int s = 0; s < 3; s++) { cin >> three[...
ALGO
0.99988
3.602883
0bf25d8e-d2f3-4f97-a9f8-157b476344bc
anjaekwang/SW-Algorithm
An/그래프/10451_순열사이클.cpp
/*#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> using namespace std; vector<int> G[1001]; int check[1001] = { 0, }; void DFS(int x) { check[x] = 1; for (int i = 0; i < G[x].size(); i++) { int temp = G[x][i]; if (check[temp] == 0) DFS(temp); } } int main() { int N, t, temp, result...
ALGO
0.999727
5.19044
456bd701-c360-4acb-922b-06941b134155
mealsOrder/SW
baekJoon/02231_분해합.cpp
#include <iostream> #include <vector> #include <tuple> #include <cmath> #include <algorithm> #include <numeric> using namespace std; vector<int>ans; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int N; cin >> N; for(int i=N;i>=1;i--){ int res = i; int k = i...
ALGO
0.999979
5.306151
89fefe77-cd48-475b-b6d7-08ed4685a784
mrmotabar/Coding_Problems
CodeChef/BigQueries.cpp
/*mohammadreza motabar*/ #include <bits/stdc++.h> using namespace std; #define F first #define S second #define ll long long #define pb push_back typedef pair<int, int> pii; typedef pair<long long int, long long int> pll; const ll MAX_N = 1e6, INF = 1e9; ll t, n, m, a[MAX_N]; pll qyek[4 * MAX_N], layek[4 * MAX_N], qdo[...
ALGO
0.999941
4.317608
24b41844-7e34-4217-9214-633a970705f2
CarlsonZhuo/primal_dual_frank_wolfe
ell_1/Eigen/bench/benchCholesky.cpp
// g++ -DNDEBUG -O3 -I.. benchLLT.cpp -o benchLLT && ./benchLLT // options: // -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3 // -DEIGEN_DONT_VECTORIZE // -msse2 // -DREPEAT=100 // -DTRIES=10 // -DSCALAR=double #include <iostream> #include <Eigen/Core> #include <Eigen/Cholesky> #include <bench/BenchUtil.h> using na...
TEST
0.979704
5.938015
5d46d34c-67a9-4625-98a8-851a6a9a1d7f
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-cot-gpt35/Codenet/p00487/225407128/response_4.cpp
#include <iostream> #include <vector> using namespace std; typedef long long ll; int main() { cin.tie(0); std::ios::sync_with_stdio(0); int n; cin >> n; vector<ll> a(n), b(n); vector<bool> use(n, false); for (int i = 0; i < n; i++) { cin >> a[i] >> b[i]; } int ans = 0; ll sum = 0; ...
ALGO
0.999874
3.918056
502f6d7a-a400-4567-b435-afe1d33200cc
bugybon/FMI_UP
deleteElem.cpp
#include <iostream> void populateArr(int* arr, int size){ for(int i = 0; i < size; i++){ std :: cin >> *(arr + i); } } void printArr(int* arr, int size){ for(int i = 0; i < size; i++){ std :: cout << *(arr + i) << " "; } } void deleteElement(int *arr,int &size, int index){ for(int...
ALGO
0.999915
4.34364
aa9c497a-c16d-4439-84fe-d669e3af1c27
ashishgupta02/cfdsolutions
Trunk/Mesh2D/MESHER/src/TriangleMeshSLK.cpp
/******************************************************************************* * File: TriangleMeshSLK.cpp * Author: Ashish Gupta * Revision: 4 ******************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math....
ALGO
0.99802
6.563448
29e9b46d-98ce-4eca-bf22-4f782c0035ff
Gloix/Camaron
SelectionStrategies/MouseSelection/mouseselection.cpp
#include "mouseselection.h" #include "Utils/shaderutils.h" #include "Utils/openglutils.h" #include "Utils/framebufferobjecthandle.h" #include "SelectionStrategies/Selection.h" #include "Model/Element/Vertex.h" #include "Model/Element/Polygon.h" #include "Model/Element/Polyhedron.h" #include "Rendering/RModel/rmodel.h" ...
TOOL
0.853876
5.589235
b946ea23-5af7-4def-bc65-c7ab4d3bdc70
moulik-roy/SPOJ
SAMER08A.cpp
#include <iostream> #include <vector> #include <queue> #include <set> #include <utility> using namespace std; set <pair<int, int>> shortestPathEdges; int dijkstraShortestPath(vector <pair<int, int>> graph[], int N, int src, int dest){ int i, j, u, v, w; vector <int> dist(N, -1), visited(N, 0), prev[N]; priority_qu...
ALGO
0.999916
4.28393
f3b0c999-4fb4-43a7-95eb-563f2a18a5c6
ssatendra790/CP
C_Pull_Your_Luck.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long typedef unsigned long long ull; #define pb push_back #define eb emplace_back #define mk make_pair #define all(x) x.begin(), x.end() #define fo(i, n) for (i = 0; i < n; i++) #define foo(i, n) for (i = 1; i <= n; i++) #define F first #define S second #def...
ALGO
0.999645
3.679499
5d87f6ae-2696-44e4-bd3f-b86926b33cc0
ahmedoshelmy/Competitive-Programming-Practice
LeetCode/Dynamic Programming Study Plan/Day 7/1014. Best Sightseeing Pair.cpp
class Solution { public: int maxScoreSightseeingPair(vector<int>& a) { int n = (int)a.size(); int mx = a[0] ;int ans = INT32_MIN; for (int i = 1; i < n; ++i) { ans = max(ans , mx - i+a[i]); mx = max(mx , a[i] + i); } return ans ; } };
ALGO
0.999957
5.853163
fd2971fd-7591-499b-9738-149c193366a0
YangJJHH/Cpp-Study
백준 문제풀이/N과 M(1)(15649번)/소스.cpp
#define _CRT_SECURE_NO_DEPRECATE #include <iostream> #include <algorithm> #include <vector> #define fastio cin.tie(NULL)->sync_with_stdio(false); using namespace std; int N, M; vector<int> arr; vector<int> visited; void print() { for (auto& ele : arr) { cout << ele << " "; } cout << "\n"; } void findArr() { if ...
ALGO
0.999761
3.771616
a395bd11-122f-4430-adcc-dde4c1cec26f
Exalibur77/Data-Structure-and-Algorithm
Arrays/array09.cpp
#include<iostream> using namespace std; // Using prefix sum approach max_subarray sum is being calculated. // Time Complexity => O(n^2 + n) = O(n^2) // Space Complexity => O(n) int MaxSubarray(int temp[],int n){ int maxi=INT_MIN; for (int i = 0; i < n; i++) { for (int j = i; j < n; j++) {...
ALGO
0.999913
4.719181
ab7e63cc-89d7-494b-ad17-ad59e354e03b
bpbpublications/Comprehensive-Data-Structures-and-Algorithms-in-C-Plus-Plus
Chapter 04/Chapter4_Exercise/Ex3.cpp
//Ex3.cpp : Implement a stack in an array such that the stack starts from the last position of array. #include <iostream> using namespace std; static const int maxSize = 5; class Stack { private: int stackArray[maxSize]; int top; public: Stack(); bool isEmpty(); bool isFull(); void push(int data); ...
ALGO
0.993607
4.856602
6e90286a-28a6-4454-af0b-47d98060f45e
dreamjh20/C
백준 평균 점수 10039.cpp
#include <stdio.h> int main(void){ int a, b, c, d, e; scanf("%d\n%d\n%d\n%d\n%d", &a, &b, &c, &d, &e); if(a<40){ a=40; } if(b<40){ b=40; } if(c<40){ c=40; } if(d<40){ d=40; } if(e<40){ e=40; } printf("%d", (a+b+c+d+e)/5); }
ALGO
0.999883
3.40221
b6533d7d-0c21-4b40-9caa-72cb2f8599bb
SepehrGanji/LeetCode-Solutions
Solutions/0129-sum-root-to-leaf-numbers/solution.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.999983
6.454263
b818d3d7-6d9b-4efe-86c3-4f7a6228b1ef
ICraZZyBoY/Algorithms-Trainings
LYCEUM (contests, homework, etc.)/CPP TRAININGS/nears/test2.cpp
#include <iostream> #include <cmath> using namespace std; int main() { cout << floor(sqrt(5)) + abs(floor(-8.1)); return 0; }
ALGO
0.999676
3.423486
0c613208-ae4b-4597-a6a3-588fa0d869b6
Atomtomate/MSC_Thesis
src/test_Memoization.cpp
#include "Memoization.hpp" #include <cmath> #include <complex> #include <cstdlib> #include <ctime> #include <iostream> #include <boost/timer/timer.hpp> // timers #include "boost/iostreams/stream.hpp" #include "boost/iostreams/device/null.hpp" typedef std::complex<double> cdT; using boost::timer::cpu_timer; using boos...
TEST
0.976777
5.573384
29a22188-689d-4132-b71c-ee3900983cdd
RooTinfinite/LeetCode-75-Solutions
0. All Solutions/450-delete-node-in-a-bst/delete-node-in-a-bst.cpp
class Solution { public: TreeNode* deleteNode(TreeNode* root, int key) { if (!root) return nullptr; if (key < root->val) { root->left = deleteNode(root->left, key); } else if (key > root->val) { root->right = deleteNode(root->right, key); } else { ...
ALGO
0.999977
7.139082
479e62e0-5797-4264-af07-0d9c3c1f9728
ishandutta2007/codeforces
dmga44/normal/1296/C.cpp
#include <bits/stdc++.h> #define db(x) cout << (x) << '\n'; using namespace std; typedef long long ll; typedef pair<ll,ll> pii; typedef pair<ll,pii> pip; map<pii,int> m; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while(t--) { int n; ...
ALGO
0.999924
3.471072
42e65b92-2f11-471d-b65f-d8f2ca6a6ff6
AdityaKotnala2004/cpp-practice
c++/simple and compound interest.cpp
#include<bits/stdc++.h> #include<math.h> using namespace std; int main(){ float p,a,r,t,si,ci,i; cout<<"principle: "; cin>>p; cout<<"rate: "; cin>>r; cout<<"time: "; cin>>t; cout<<"interest: "; cin>>i; si=(p*r*t)/100; a= p *(pow((1 + r/100), t)); ci=a-p; cout<<"simple interest:"<<si<<endl<<"compo...
ALGO
0.987513
3.72001
298b29ec-4222-414b-a03c-a1c997f4b8f0
ishandutta2007/codeforces
olphe/normal/1325/E.cpp
#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "string" #include "map" #include "unordered_map" #include "unordered_set" #include "iomanip" #include "cmath" #include "random" #include "bitset" #include "cstdio" ...
ALGO
0.999957
3.961144
298fd1dd-6fbb-411f-898a-fb903fdbaf9f
largenumberhere/AOC_2024
day_23a/cpp/main.cpp
#include <stdio.h> #include <stddef.h> #include <stdlib.h> #include <string.h> #include <unordered_set> #include <unordered_map> #include <vector> #include <string> #include <memory> #include <iostream> #include <algorithm> int main() { std::unordered_set<std::string> unique_keys; const char* file_path = ...
ALGO
0.997542
4.514563
fa75d244-bddd-4435-96a0-aa40541ac3ae
sakshi-parmar2004/Leetcode
260-single-number-iii/single-number-iii.cpp
class Solution { public: vector<int> singleNumber(vector<int>& nums) { int XOR=0; for(int i:nums) { XOR^=i; } int k=0; while(!(XOR&1)) { XOR>>=1; k++; } int first=0,second=0; for(int i:nums) { ...
ALGO
0.999994
5.330765
9f703e65-8e8b-4ab2-bdb8-e03576940b57
Remonhasan/codeforces
Online Judge Solves (Others)/Codeforces (combined)/A_Wizard_of_Orz.cpp
/* Name of Allah Author: Remon Hasan Problem: CF - 1467A */ #include<bits/stdc++.h> #include<stdio.h> #include<vector> using namespace std; #define ll long long ll solve() { ll n; cin >> n; string s = "989"; if (n <= 3) return cout << s.substr(0, n) << "\n", 0; cout << s; for (ll i = 3...
ALGO
0.999598
4.501506
b39d50a4-1dc7-4abf-8d63-dce39ea39d6a
thortoyo/study
ABC110/D.cpp
S=input() T=input() ng = 0 ds = {} dt = {} for i in range(len(S)): if S[i] in ds: if ds[S[i]] != T[i]: ng = 1 break; else: ds[S[i]] = T[i] if T[i] in dt: if dt[T[i]] != S[i]: ng = 1 break; else: dt[T[i]] = S[i] if ng == 0: ...
ALGO
0.999928
3.825189
0f25dc06-60ae-490e-b51d-480e77dd7a31
Hossam44/Codeforces-Problem-Solving
D. Two Divisors/main.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pa pair<int,int> int t,n,m; const int Max = 1e7+5; int v[Max]; void factor() { iota(v,v+Max,0); v[0]=v[1]=-1; for(int i=2;i<Max/i;i+=1+(i&1)) { if(v[i]==i) for(int j=i*i;j<Max;j+=i) if(v[j]==...
ALGO
0.999961
3.398041
e12547b4-009c-47c5-a9ad-1c8edaeb7962
Miras-Gtm/pro_beauty_crm
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.998733
6.76775
d4f7c94b-e04a-4d85-9d61-b67988f62345
rdunning0823/tophat
src/Engine/Airspace/AirspaceIntersectionVisitor.cpp
#include "AirspaceIntersectionVisitor.hpp" #include "AirspaceInterceptSolution.hpp" #include "AbstractAirspace.hpp" AirspaceInterceptSolution AirspaceIntersectionVisitor::Intercept(const AbstractAirspace &as, const AircraftState &state, con...
ALGO
0.963421
5.661073
2b34a6f8-3a75-4f2d-972b-f6ef70475deb
Nishant2306/DS
Array/1_Search_insert_and_delete_in_an_unsorted_array.cpp
#include <bits/stdc++.h> using namespace std; void input(int arr[], int n) { for (int i = 0; i < n; i++) { cin >> arr[i]; } } void display(int arr[], int n) { for (int i = 0; i < n; i++) { cout << arr[i] << " "; } } void search(int arr[], int n, int a) { int f = 0; for (...
ALGO
0.998124
3.977069
d69c56ab-59e9-493f-869e-2601a08f2c63
Nihal54/LoveBabbarDSAseries
MergeSortedArray.cpp
#include<iostream> using namespace std; void Merged(int Arr1[], int n , int Arr2[],int m, int Arr3[]) { int i = 0; int j = 0; int k = 0; while(i<n && j<m) { if(Arr1[i]<Arr2[j]) { Arr3[k]= Arr1[i]; k++; i++; } else { ...
ALGO
0.999966
4.492754
927711d0-26a1-4ee3-b42a-89dfe449c02e
yeohj0710/old-solutions
16000s/16017.cpp
#include<stdio.h> int main() { int a, b, c, d; scanf("%d %d %d %d", &a, &b, &c ,&d); if((a == 8 || a == 9) && (d == 8 || d == 9) && (b == c)) printf("ignore"); else printf("answer"); }
ALGO
0.998503
3.135333
88fa2fcf-8aed-43c9-ac9b-b6a428d042c6
leedohun/baekjoon
BitMask/17436.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; const ll _INF = 1e18; const ll INF = 1e9; struct P { int x; int y; int time; }; struct compare { bool operator()(P& a, P& b) { if (a.x != b.x) ...
ALGO
0.999987
3.830659
6477f524-c39a-49d2-8078-0e9063a7d7d2
muhammadhasan01/cp
Online Judge/Codeforces/Contests/Others/Hello_2024/F.cpp
#include <bits/stdc++.h> using namespace std; template<int MAXN, typename T, const T TERM> struct SegtreeLazy { vector<T> t; vector<T> lazy; SegtreeLazy() { t.assign(4 * MAXN, 0); lazy.assign(4 * MAXN, 0); } T combine(const T& x, const T& y) { return (x > y ? x : y); }...
ALGO
0.99992
3.961694
4032b6c0-3e92-4ecd-83f7-4e3fe923089e
ngctnnnn/evo_optim_cpp
include/boost/libs/compute/example/amd_cpp_kernel.cpp
#include <iostream> #include <boost/compute/command_queue.hpp> #include <boost/compute/kernel.hpp> #include <boost/compute/program.hpp> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/copy.hpp> #include <boost/compute/container/vector.hpp> #include <boost/compute/utility/source.hpp> namespace co...
ALGO
0.926018
5.26154
0171697e-5618-4672-80e7-1ee5c69d7859
CGCL-codes/G4S
cantera/samples/cxx/jacobian/derivative_speed.cpp
/*! * @file derivative_speed.cpp * * Benchmark derivative evaluations * * Calculate derivatives of reaction rates of progress and species production and * destruction rates with respect to temperature, pressure, molar concentration, * and mole fractions. Time evaluation for different chemical mechanisms. * * K...
ALGO
0.867053
7.29878
5106817a-2be9-4beb-afb1-93d7a3470b3d
Shraddhasingh171/DSA_With_CipherSchools
Integertoroman.cpp
#include <iostream> #include <string> using namespace std; // Function to convert an integer to a Roman numeral string string func(int n) { string romanNumeral = ""; // Initialize the resulting Roman numeral string // Define arrays for Roman numeral symbols and their corresponding values int values[] = ...
ALGO
0.999269
6.923177
93ec46e7-e292-43e6-adf6-642a727e4d9d
devanshdalal/CompetitiveProgrammingAlgos
devanshdalal/codeforces/330-A/330-A-4114459.cpp
#include<cstdio> #include<iostream> #include<algorithm> #include<vector> #include<cstdlib> #include<cmath> #include<cstring> #define sf scanf #define pf printf using namespace std; typedef long long ll; int n,k,m;char a[2000009],b[2000009]; ll modPow(int X, int Y) { ll Temp,Ans;ll M=(ll)pow(10,k); if(!Y) retur...
ALGO
0.998729
3.271434
c5a7508d-e96f-4c85-a407-3ebdc90a7071
nishchal333/cpp
jaggedArray.cpp
#include <iostream> using namespace std; int main() { int row; cin >> row; // Allocate memory for a jagged array int** arr = new int*[row]; for (int i = 0; i < row; i++) { arr[i] = new int[i + 1]; // Each row has i+1 columns } // Input values for (int i = 0; i < row; i++) { ...
ALGO
0.998844
4.804199
c5dab077-8e41-45fa-bf48-6e8353f09951
zxyDEDIRE/ACM_CODE
洛谷/动态规划/P1156.cpp
/* 嵌套变量重复 特殊样例 0 1 2 n 数组越界 开long long */ #include<bits/stdc++.h> using namespace std; #define endl "\n" #define pp(x) array<int,x> using ull=unsigned long long; using ll=long long; using pii=pair<int,int>; const int dx[]={0,0,1,-1,1,-1,1,-1}; const int dy[]={1,-1,0,0,1,-1,-1,1}; const int mod=998244353; const int ...
ALGO
0.999963
3.623937
4edb983e-ca8b-4dba-84ce-c67371983fd8
patrick-may/kattis
Speed-Limit/speed.cpp
#include <bits/stdc++.h> using namespace std; void tc(int lines) { int soln = 0; int elapsed = 0; for (; lines > 0; --lines) { int speed, hrs; cin >> speed >> hrs; hrs -= elapsed; soln += (speed * hrs); elapsed += hrs; } cout << soln << " miles\n"; } int main() { int lines; ...
ALGO
0.991938
3.875017
5a4996b6-7816-4e3b-94ea-2cc48038fec5
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/july/new_20200707210958.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #include<unordered_map> #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define ...
ALGO
0.999973
3.71906
4e59a1b0-fee7-4cc1-bf77-ac9f6252eec0
devLupin/algorithm-prev
BOJ/2442[IO].cpp
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n - i; j++) cout << ' '; for (int j = 1; j <= 2 * i - 1; j++) cout << '*';...
ALGO
0.999951
3.461694
1edeccd6-65d2-4c0f-856c-11e20b1bc57f
vmmc2/Competitive-Programming
Cracking The Code/Chapter 1 (Arrays and Strings)/1_5(one away).cpp
#include <bits/stdc++.h> #include <sstream> #include <cmath> using namespace std; bool oneAway(string s1, string s2){ //As string podem estar one-away uma da outra se o tamanho entre elas diferir //por no maximo 1 caracter. int maximo = max(s1.length(), s2.length()); int minimo = min(s1.length(), s2.l...
ALGO
0.999929
5.086807
cfe0b381-c496-4621-98cd-27c3143a82a8
sinnu2004/DSA
leetcode/divideWithoutoperator.cpp
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int power(long long n,long long x){ if(x==0) return 1; return n*power(n,x-1); } int main(){ long long int powp = 1; long long int n,x; cout<<"enter the base :"; cin>>n; cout<<"enter the power :"; cin>>x; cout...
ALGO
0.999909
4.763406
8f5c1e5a-b39e-4b9a-84c6-1f043681d160
vick-254/DSAlgo_Practice
Phase 2/DP/10_coinChange_tab.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int change(int amount, vector<int> &coins) { vector<vector<int>> dp(coins.size(), vector<int>(amount + 1, 0)); int n = coins.size(); for (int i = 0; i < n; i++) { dp[i][0] = 1; } ...
ALGO
0.999823
5.221839
a5b37a1c-f576-44e5-b8dc-b58709a85171
toufu-24/AtCoder
Practice/2024_03_07/20:30/I.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; #define all(v) v.begin(), v.end() #define SORT(v) sort(v.begin(), v.end()) #define RSORT(v) sort(v.begin(), v.end(), greater<int>()) #define REVERSE(v) reverse(v.begin(), v.end()) #define ll int64_t #define ld long double #d...
ALGO
0.99998
5.215083
8956f82b-4de5-445e-826f-6bfc8ecfc976
paw3llo/linear_regression_solver
src/permutacje.cpp
#include "permutacje.h" #include <iostream> #include <vector> #include <fstream> #include <math.h> #include <string> using namespace std; //---------- vector< vector<double> > wartosci_z_pliku(){ vector< vector<double> > tablica; string nazwa_pliku;//="dane4.txt"; cout<<"Podaj nazwe pliku z danymi."<<endl...
ALGO
0.995477
3.159482
1ee97a10-a812-4c37-9b9f-16cbd1c99a29
ishandutta2007/codeforces
marcin_smu/normal/611/E.cpp
#include <bits/stdc++.h> using namespace std; #define MP make_pair #define PB push_back #define LL long long #define int LL #define FI first #define SE second #define R(i,n) for(int i=0;i<n;i++) #define F(i,a,b) for(int i=a;i<b;i++) #define FD(i,n) for(int i=n-1;i>=0;i--) #define ALL(x) (x).begin(), (x).end() #define ...
ALGO
0.999933
3.533338
3b97784f-4dec-4737-a931-10ad79d8f3f3
Adityasinghvats/CPP---code
12_recursionbasics/06preinpost.cpp
#include<bits/stdc++.h> using namespace std; void pip(int n){ if(n<1) return; cout<<"Pre:"<<n<<endl; pip(n-1); cout<<"In:"<<n<<endl; pip(n-1); cout<<"Post:"<<n<<endl; } int main(){ pip(2); }
ALGO
0.932458
3.491488
350f1b18-fe95-48b7-a549-190f9f351074
shazm12/cracking_the_coding_interview_sandbox
bfs.cpp
#include <bits/stdc++.h> using namespace std; vector<int> bfs(vector<vector<int>>& adj) { int V = adj.size(); int s = 0; vector<int> res; queue<int> q; vector<bool> visited(V,false); visited[0] = true; q.push(s); while(!q.empty()) { int curr = q.front(); q.pop(); ...
ALGO
0.999968
4.910741
7dd53033-e549-4f57-b533-11faae880c08
smhadisadati/SpectDG
PhD_Final_I/qtrapsim.cpp
#include <armadillo> #include <math.h> #include <iostream> #include <fstream> #include <gnuplot_i.hpp> #include <windows.h> #include "globalvars.h" using namespace std; using namespace arma; #define FUNC(x) ((*func)(x)) static double xsav, y1sav, y2sav; static vec (*nrfunc)(double,double); vec quad2d(vec (*func)(dou...
ALGO
0.997647
3.719537
0359a999-7455-46bc-bd1d-fe88b292f823
shakfu/data-max
source/tests/test_eigen/test_eigen.cpp
#include <iostream> #include <Eigen/Dense> using Eigen::MatrixXd; int main() { MatrixXd m(2,2); m(0,0) = 3; m(1,0) = 2.5; m(0,1) = -1; m(1,1) = m(1,0) + m(0,1); std::cout << m << std::endl; }
ALGO
0.915143
3.374002
803bb5dd-071e-42c5-b768-3c92e44fa7ef
diegojoel301/Programacion_Competitiva
INF-143/contest_6/D/main.cpp
#include<bits/stdc++.h> using namespace std; int f(vector<int> v, int i, int j) { return abs(v[i] - v[j]); } int main() { freopen("input.txt", "r", stdin); ios_base::sync_with_stdio(false); cin.tie(NULL); int t, n, ans; cin >> t; while(t--) { vector<int> v; cin >> n; for(int i = 0, value; i < n; i++...
ALGO
0.999875
4.371209
61b507b1-9113-4f24-964f-e699a13bbaf0
sharma-anuradha/prebuild-test
src/coreclr/vm/util.cpp
// =========================================================================== #include "common.h" #include "excep.h" #include "corhost.h" #include "eventtrace.h" #include "posterror.h" #include <shlobj.h> #include "dlwrap.h" #ifndef DACCESS_COMPILE thread_local size_t t_ThreadType; void ClrFlsSetThreadType(TlsTh...
TOOL
0.928601
5.758815
76c8ca57-eddc-4e23-8fd0-59a1e1354ef3
farukhk123/C-Code
CALSS6_R.CPP
/* wap to input two number and swap(inter change) call by value*/ #include<iostream.h> #include<conio.h> class swp { int num; public: void input(); void swap(swp d); void output(); }; void swp::input() { cout<<endl<<"enter a number"<<endl; cin>>num; } void swp::swap(swp d) { int temp; temp=num; num=d.num; d.num=t...
ALGO
0.998695
4.666192
17474a9c-5d69-4798-b3eb-046e7d3dca1d
Prateek-Wayne/prateek-DSA
0001-two-sum/0001-two-sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { map<int,int> mp ; int n=nums.size(); for(int i=0;i<n;i++){ mp[nums[i]]=i; } vector<int> ans; for(int i=0;i<n;i++){ int toFind=target-nums[i]; if(mp.count(t...
ALGO
0.999989
6.203604
0fea28c4-c62f-48ec-9a1f-3d36cbe3501e
gedorinku/llvm-65816
libc/src/math/aarch64/round.cpp
#include "src/math/round.h" #include "src/__support/common.h" namespace __llvm_libc { LLVM_LIBC_FUNCTION(double, round, (double x)) { double y; __asm__ __volatile__("frinta %d0, %d1\n\t" : "=w"(y) : "w"(x)); return y; } } // namespace __llvm_libc
ALGO
0.995623
6.622436
4678208a-34d6-4027-b33b-0794d0fcefbe
roy7077/Codeforces-Practice
A. Combination Lock.cpp
#include <iostream> #include <cstring> #include <algorithm> using namespace std; int main() { int n; cin>>n; string s1,s2; cin>>s1>>s2; int count=0; for(int i=0;i<s1.length();i++) { if(s1[i]>s2[i]) { int a=abs(s1[i]-s2[i]); int b=9-s1[i]+s2[i]+1; count+=min(a,b); ...
ALGO
0.999958
3.784022
0e90c1d6-7b8a-43b3-9814-e15f4b50967d
Arpit0487/Dsa_Cpp
Leetcode-34.cpp
class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int left = -1; int right = -1; left = findLeft(nums,target); right = findRight(nums,target); return {left,right}; } vector<int> findLeft(vector<int>& ...
ALGO
0.99986
6.672952
782bae8a-91ae-4b7a-997d-16f42e40aad0
pragati-raut23/Firstbit
Data Structure/stack/reverse-stack/stack.cpp
#include"stack.h" Stack::Stack(int s) { this->size=s; pStack= new char[size]; this->top=-1; } bool Stack::isEmpty() { if(top==-1) return true; else return false; } bool Stack::isFull() { if(top==size-1) return true; else return false; } bool Stack::push(char ele) { if(isFull()) { return false; } else ...
ALGO
0.948209
3.495449
d27f0ef1-5186-4d54-b7fa-44a3911243ee
joshlevin91/Project-Euler
p32.cpp
#include <iostream> #include <set> #include <string> using namespace std; int main(){ set <int> products; set <char> digits{'1', '2', '3', '4', '5', '6', '7', '8', '9'}; string digitString; for (int a = 1; a < 10000; a++){ for (int b = 1; b < 1000; b++){ if (b > a){ continue; } set <char> digit...
ALGO
0.999545
5.010521
760714d0-3d90-4f63-a8c2-9da2832ecc2c
Pratt33/SolvingDSA
10_DoublyLL/MediumDLL/SumDLL.cpp
#include <bits/stdc++.h> using namespace std; class node{ public: int data; node* next; node* prev; node(int val){ data = val; next = nullptr; prev = nullptr; } }; class DoublyLinkedList{ private: node* head; public: DoublyLinkedList() { head =...
ALGO
0.999969
6.192565
9bc837fb-19be-4bd0-b3f7-21d4ba5a6b78
Nights-SDH/BaekJoon
10808.cpp
#include<iostream> #include<string> using namespace std; int main(){ string s; int a[26]={},i; cin>>s; for(i=0;i<s.length();i++) a[s[i]-97]++; for(i=0;i<26;i++) cout << a[i] <<" "; }
ALGO
0.999721
3.532231
e31291bf-ffde-4338-aff3-4f2a0ac3889c
pawelpustula/Zadania
Folder1/Interpolacja/Project1/interpolacja.cpp
#include <iostream> #include <string> #include <fstream> using namespace std; float interpolacja(float *, float *, int, float); int main() { float tabX[10]; float tabY[10]; int n = 10; float arg = 7; string s{}; ofstream zapis; zapis.open("wynik.txt"); ifstream odczyt; odczyt.open("dane.txt"); if (odczyt....
ALGO
0.943563
3.821425
add21627-546c-446f-92bb-db9eb1be643e
srimani-programmer/URI-Online-Judge
Beginner/1113.cpp
#include<iostream> using namespace std; int main(){ while(1){ int x,y; cin>>x>>y; if(x == y) break; else if(x > y) cout<<"Decrescente"<<endl; else if(x<y) cout<<"Crescente"<<endl; } return 0; }
ALGO
0.999935
3.458992
c9bab361-c083-4d89-859f-f292223f12b2
KhaosResearch/MORPHY
src/util/comparators/DominanceComparator.cpp
#include <DominanceComparator.h> /** * @class DominanceComparator * @brief This class is aimed at implementing a Dominance comparator. It returns true if solution one dominates to solution two. It returns false in other case. Author must notice that two solutions are non dominated only if: !compare(on...
ALGO
0.999849
5.976146
6f61724a-0c34-4acb-ae39-12f901b6c4f2
kmjp/procon
atcoder/abc301-350/abc344/d.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999596
3.677131
6573552e-2950-4f70-aa13-f364cd9d9f08
Rylynnn/Arithmetic
usaco/1.3.6skidesign.cpp
/* ID:15829681 LANG:C++ TASK:skidesign */ #include <cstdio> #include <algorithm> #include <iostream> #define LOCAL #define N 1005 #define MAX 0x3f3f3f3f using namespace std; int a[N]; int n; int dfs(int be,int en){ int b[N],c[N]; int i,j,k,num; j=k=0; num=0; //cout<<n<<endl; for(i=1;...
ALGO
0.999472
3.248151
2f1fb491-979c-492d-90ec-814d74254d35
fenil3357/Leetcode
94-binary-tree-inorder-traversal/94-binary-tree-inorder-traversal.cpp
class Solution { public: vector<int> ans; void solve(TreeNode* root) { if(!root) return; solve(root->left); ans.push_back(root->val); solve(root->right); } vector<int> inorderTraversal(TreeNode* root) { solve(root); return ans; } };
ALGO
0.999983
6.707346