uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c9a28154-bc1b-4835-a598-c3c17085267f
side-projects-all/works
Leetcodes/bfs_dfs/q_490.cpp
/* There is a ball in a maze with empty spaces (represented as 0) and walls (represented as 1). The ball can go through the empty spaces by rolling up, down, left or right, but it won't stop rolling until hitting a wall. When the ball stops, it could choose the next direction. Given the m x n maze, the ball's start po...
ALGO
0.999884
6.061198
48531efb-d3b4-46e8-9bdb-26ea18b4b54a
stevens-crag/crag
Examples/main/ex_GraphConcept.cpp
#include "GraphType.h" #include "GraphConcept.h" #include "GraphConceptAlgorithms.h" #include "Word.h" #include "RanlibCPP.h" using namespace Graphs; //---------------------------------------------------------------------------// //----------------------------- graph_example -------------------------------// //----...
ALGO
0.997936
5.184391
1d1dc5da-323e-4f6a-8162-69ac7f0ba7b1
MarcosRossoni/EstruturaDeDados
Estrutura de Dados/exercicioMatrizes.cpp
#include <stdio.h> int notas[3][4]; int main () { printf("Informe as notas dos alunos\n\n"); for (int a = 0; a < 3; a++){ printf("%do. aluno\n", a+1); for (int n = 0; n < 4; n++) { printf(" %da. nota: ", n+1); scanf("%d", &notas[a][n]); } } }
ALGO
0.926957
3.08129
9f094e06-7293-4dd9-b386-139e92c1eff5
Ujin-Kim/Cpp_Algorithm
Ilkwon/상어중학교.cpp
#include <iostream> #include <memory.h> #include <queue> using namespace std; #define MAX 21 int N,M; int map[MAX][MAX] = {}; int dir[4][2] = {{0,1},{0,-1},{1,0},{-1,0}}; struct Block{ int y,x; int b_sz = 0; int r_cnt = 0; int map[MAX][MAX]={}; }; Block block_info; int visited[MAX][MAX] = {}; int isI...
ALGO
0.999818
3.574134
e2ae9e49-2865-413e-b652-f50c91c3848c
algavania/calme_mobile
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
09404362-e5fb-43ef-9a8a-f77a5db9b5da
TeamAquasHideout/team-aquas-troll-hack
tools/ramscrgen/elf.cpp
#include <cstdio> #include <cstring> #include <cstdint> #include <map> #include <vector> #include <string> #include "ramscrgen.h" #include "elf.h" #define SHN_COMMON 0xFFF2 static std::string s_elfPath; static std::string s_archiveFilePath; static std::string s_archiveObjectPath; static FILE *s_file; static std::ui...
TOOL
0.968601
5.315747
86f369c5-9551-4d29-9bd5-7743d2ed6850
tjgolubi/boost
libs/multiprecision/example/floating_point_examples.cpp
#include <boost/math/constants/constants.hpp> #include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/math/special_functions/gamma.hpp> #include <boost/math/special_functions/bessel.hpp> #include <iostream> #include <iomanip> #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_CXX11_LAMBDAS) #include...
TOOL
0.99744
7.002923
f51dd8a9-f24d-4cb6-9b57-2a98989815b9
kagisomakhubela32/C-
Aws_Prt1_No15.cpp
#include "iostream" #include "conio.h" using namespace std; int main() { int const SIZE = 10; double raw[SIZE]; double sorted[SIZE]; double temp; //promt massege cout <<"Please enter numbers: "<<endl; for(int i = 0;i < SIZE;i++) { //input cin >> raw[i]; } for(int i = 0;i < SIZE;i++) { for(int ...
ALGO
0.999858
3.452667
3dd9547a-6f90-437e-9a1d-8c7e62f6ba7d
moskovets/kg_project
model/triangle.cpp
#include "triangle.h" Triangle::Triangle(Vector4 vertex[], Vector4 normal[]) { for(int i = 0; i < 3; i++) { m_vertex[i] = vertex[i]; m_normal[i] = normal[i]; } } Triangle::Triangle() {} void Triangle::setVertex(unsigned index, const Vector4 &vertex) { if (index < 3) m_vertex[index...
ALGO
0.902722
5.373909
3c7a2988-b803-43b5-a47d-a0e0a010ca95
lancorredorbe934/Programaci-n
2020-10-16contenedores/listas.cpp
#include <algorithm> #include <iostream> #include <list> #include<cmath> int main() { // Create a list containing integers std::list<int> l = { 7, 5, 16, 8 }; // Add an integer to the front of the list l.push_front(25); // Add an integer to the back of the list l.push_back(13); // Inse...
ALGO
0.998521
4.913356
c71b0d90-c1a7-4c07-8adc-15954db46639
Aumuyanzzz/2021-11-C-
11.12练习1:数组.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> //void ret(int arr[],int sz) //{ // int j = 0; // int i = 0; // for (i = 0; i < sz; i++) // { // for (j = i + 1; j <= sz; j++) // { // if (arr[i] > arr[j]) // { // int a = arr[j]; // arr[j] = arr[i]; // arr[i] = a; // } // // // } // // // } // // ...
ALGO
0.999978
3.845327
75977ce5-0cd6-4425-a0ff-dcbf8db1e02f
systembugtj/playasa
src/Source/filters/switcher/audioswitcher/Audio.cpp
// originally from virtualdub #include "stdafx.h" #include "Audio.h" static long audio_pointsample_8(void *dst, void *src, long accum, long samp_frac, long cnt) { unsigned char *d = (unsigned char *)dst; unsigned char *s = (unsigned char *)src; do { *d++ = s[accum>>19]; accum += samp_frac; } while(--cnt); ...
ALGO
0.904854
5.48094
5138b276-547b-4b2b-b8fd-ba53c22cc254
Sakib-2004043/My-Cpp-Code
OOP/aa test class.cpp
#include <iostream> class Student { public: std::string id; int age; int level; int term; Student() {} Student(std::string id, int age, int level, int term) { this->id = id; this->age = age; this->level = level; this->term = term; } }; class Course_Student { ...
TEST
0.874064
4.371258
244ef367-260d-4986-b782-aae1267d9f27
servo/osmesa-src
mesa-src/src/compiler/glsl/lower_vector_derefs.cpp
#include "ir.h" #include "ir_builder.h" #include "ir_rvalue_visitor.h" #include "ir_optimization.h" #include "main/mtypes.h" using namespace ir_builder; namespace { class vector_deref_visitor : public ir_rvalue_enter_visitor { public: vector_deref_visitor(void *mem_ctx, gl_shader_stage shader_stage) : progr...
TOOL
0.918167
7.08269
315952a1-e231-4b76-ad0c-fd28d40905be
sipho-mancam/common_module
Dependencies/libs/math/example/trapezoidal_example.cpp
#include <iostream> #include <cmath> #include <limits> #include <boost/math/quadrature/trapezoidal.hpp> int main() { using boost::math::constants::two_pi; using boost::math::constants::third; using boost::math::quadrature::trapezoidal; // This function has an analytic form for its integral over a perio...
ALGO
0.999912
5.706181
dfa77cf0-5660-4852-807f-6d3818a6aa34
ishandutta2007/codeforces
feecie6418/normal/995/F.cpp
#include<bits/stdc++.h> using namespace std; const int mod=1e9+7; int n,K,f[3005][3005]; vector<int> g[3005]; int Power(int x,int y){ int ret=1; while(y){ if(y&1)ret=1ll*ret*x%mod; x=1ll*x*x%mod,y>>=1; } return ret; } int Interpolation(int n,int K,vector<int> x,vector<int> y){ int ans=0; for(int i=0;i<n;i++){...
ALGO
0.999796
3.948819
bc3a27bc-b2ad-4e4d-8817-6f9e536fa0c5
StarFire1701/DSA-Practice
Problem Of The Day/Largest_3_same_digit_no_in_string.cpp
class Solution { public: string largestGoodInteger(string num) { string ans = ""; int n = num.length(); for (int i = 0; i + 2 < n; i++) { if (num[i] == num[i+1] && num[i+1] == num[i+2]) { string temp = string(3, num[i]); // repeat the digit 3 times ...
ALGO
0.999918
6.27805
2cffac76-a0a4-493f-afed-69fcbb7b107b
Moongss/ps
Baekjoon/1000-9999/2473.cpp
#include <iostream> #include <vector> #include <algorithm> using ll = long long; int N; ll tmp; std::vector<ll> v; int main() { std::cin >> N; ll tmp; for (int i = 0; i < N; i++) { std::cin >> tmp; v.push_back(tmp); } std::sort(v.begin(), v.end()); ll min = 3e9 + 1; std:...
ALGO
0.999979
4.379563
c0f9a35b-4027-45b6-938d-5350c91b0084
muhammedBkf/Competitive-Programming
HackerRank/Problem Solving/Algorithms/Implementation/Counting Valleys.cpp
int countingValleys(int steps, string path) { int coun = 0; int height = 0; int height9; for (unsigned int i = 0; i < steps; i++) { height9 = height; if (path[i] == 'D') { height--; } else if (path[i] == 'U') { height++; } if (height9 < 0 && height == 0) { ...
ALGO
0.999624
4.28242
17e63ec2-388a-430f-8d3c-6e7285e93975
NullAwe/competitive-programming
cses/range-queries/ForestQueries2.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> t; int n; inline void my(int vx, int lx, int rx, int vy, int ly, int ry, int x, int y) { if (ly == ry) { if (lx == rx) t[vx][vy] = 1 - t[vx][vy]; else t[vx][vy] = t[vx << 1][vy] + t[(vx << 1) + 1][vy]; } else { int m = (ly + ry) / 2; ...
ALGO
0.999714
4.090925
868c0c84-bce8-44eb-a001-ff8c6bdd99eb
Israel-Eskape/C-
NumMaximo.cpp
//maximo.cpp #include <iostream> using namespace std; float maxi(float x, float y, float z); main(){ int a,b,c; cout<<"Introduce 3 enteros: "; cin>>a>>b>>c; cout<<"max["<<a<<","<<b<<","<<c<<"]="<<maxi(a,b,c)<<endl; return 0; } float maxi(float x,float y,float z){ return x>y?(x>z?x:z):(y>z?y:z); } ...
ALGO
0.998591
4.143768
f94e4cc8-17d8-495d-b2ce-520407e560e4
ftasse/FirstPersonTerrainSketch
extern/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Eigen::MatrixXf m(2,2); m << 1, 2, 3, 4; //get location of maximum MatrixXf::Index maxRow, maxCol; float max = m.maxCoeff(&maxRow, &maxCol); //get location of minimum MatrixXf::Index minRow, m...
ALGO
0.999697
4.00675
86f8623c-cd64-483e-aab9-d62f3f1fd100
JustJimer/BSNU-cpp-labs
sod-labs/sod-6/sod-6.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cstring> #include <string> #include <windows.h> using namespace std; struct Node // { int data; Node* right; Node* left; }; struct NodePrint { NodePrint* child; bool printing_last_child; }; // : NodePrint* root = NULL; void printSub...
ALGO
0.99954
3.422785
c63d8a29-03bb-4ff2-ac47-58c626852434
JHLeeJnu/51nod-1
LV0/1089.cpp
//Manacher #include <iostream> #include <cstring> using namespace std; char s[200005]; int n,f[200005]; void deal() { int right=0,pos=0; for (int i=1;i<=n;++i) { if (right>i) { f[i]=f[pos+pos-i]; if (i+f[i]>=right) { int j; for (j=right-i;i+j<=n && i-j>=1;++j) { if (s[i+j] != s[i-j]) ...
ALGO
0.999712
3.434136
283448c1-177f-4d20-949d-d1c0cc50bbe2
Ghauoor/Food-Recipe-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.998667
6.789978
02ceaf34-a696-43b1-afaa-2669761bf71c
HHSOLL/BAEKJOON
2342.cpp
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <vector> int movecost(int from, int to) { if (from == 0) return 2; if (from == to) return 1; if (abs(from - to) == 1 || abs(from - to) == 3) { return 3; } return 4; } int main(void) { std::ios::sync_with_stdio(false)...
ALGO
0.999964
4.889053
f6eaca2f-396e-4974-acd0-d3a4f993cb34
alexandraback/datacollection
solutions_5756407898963968_0/C++/jeffreyan07/magic.cpp
#include <fstream> #include <iostream> #include <sstream> #include <vector> using namespace std; struct testcase { int v1, v2; int arr1[4][4]; int arr2[4][4]; }; vector<testcase*> cases; bool readFile() { std::string line; std::ifstream cfile("minput.txt"); if(cfile.is_open()) { getl...
ALGO
0.99597
4.421906
3b506f0c-9ef8-4fb6-86e3-a67c8c94b303
divjot0/CollisionsOnSHA-256
Implementations/testingExample/testMessage.cpp
#include "semiFreeStartUtil.h" #include <iostream> #include <vector> using namespace std; int main(int argc, char const *argv[]) { vector<unsigned int> registers(8); unsigned int H0 = 0x6a09e667; unsigned int H1 = 0xbb67ae85; unsigned int H2 = 0x3c6ef372; unsigned int H3 = 0xa54ff53a; unsigned int H4 = 0x5...
ALGO
0.999119
3.890798
73d6004d-ea7a-459f-b687-0d7ef837ccf4
AlessanderLCarazas/Ciencia-de-la-Computacion-II---Laboratorio
LAB11_GRUPO_A_20190755_ EJECUTABLE_ALESSANDER_CARAZAS/Ejercicio 3/Pila.cpp
#include "Pila.h" #include<iostream> using namespace std; Pila::Pila() { this->longitud = nullptr; } Pila::~Pila() { //dtor } void Pila::push(int a) { Nodo *nuevo = new Nodo(); nuevo->dato = a; nuevo->siguiente = this->longitud; this->longitud = nuevo; cout<<"\nEL numero: "<<a<<" fue ing...
TOOL
0.937556
3.884822
b7dc0dcc-146b-4d3b-9a88-4e92dd517c8c
byungmeo/WantedAlgorithm
김병대/21일차/boj-17845.cpp
// g++ .\main.cpp -o {실행파일명} #include <iostream> #include <algorithm> #include <climits> #include <string> #include <string.h> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <vector> #include <tuple> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(N...
ALGO
0.999966
3.771081
cd68a397-d899-40d0-9a43-58704663a183
yousirong/Cpp-How-To-Program-9E-master
Chapter02/exercises/2.09/ex_209.cpp
/* * ===================================================================================== * * Filename: ex_209.cpp * * Description: Exercise 2.9 - Print Single C++ Statements. * * Version: 1.0 * Created: 10/03/16 23:52:15 * Revision: none * Compiler: g++ * * ...
TOOL
0.904686
3.321781
6eb6337a-1acf-4b72-b2f4-99ca0430235f
A7144888/leetcode
1528-kids-with-the-greatest-number-of-candies/1528-kids-with-the-greatest-number-of-candies.cpp
class Solution { public: vector<bool> kidsWithCandies(vector<int>& candies, int extraCandies) { int max=*max_element(candies.begin(),candies.end()); vector<bool> result; for(int i:candies){ result.push_back(i+extraCandies>=max); } return result; } };
ALGO
0.999951
5.962637
a4873fe6-e361-4b54-af07-b98ee3fc7ac4
austin880625/problem_solving
NCTUHW/196.cpp
#include <stdio.h> int N,T; int fl[205]; int main() { scanf("%d",&T); while(T--){ scanf("%d",&N); for(int i=0;i<205;i++)fl[i]=0; for(int i=0,f;i<N;i++){scanf("%d",&f);fl[f]++;} int ans=0; for(int i=202;i>=2;i--){ if(fl[i]){ ans++; ...
ALGO
0.999912
3.809369
acc3031f-eb69-4b0b-be73-6352c571d4e9
DionysiosB/CodeChef
SHUFFLE.cpp
#include <cstdio> #include <vector> #include <algorithm> int main(){ long t; scanf("%ld",&t); while(t--){ long n, k; scanf("%ld %ld", &n, &k); std::vector<std::vector<long> > b(k); std::vector<long> a(n); for(long p = 0; p < n; p++){ scanf("%ld", &a[p]); ...
ALGO
0.999754
3.704166
ed86eebe-b11d-4d16-9996-8e65b9568510
Prathm-hu/DSA-
Basic Patterns/13.cpp
#include<iostream> using namespace std; int main(){ for(int i=1; i<=5; i++){ for(int j=1; j<=i; j++) { cout << "* "; } cout << endl; } return 0; }
ALGO
0.999288
3.505965
8367e9f6-92f0-4254-a668-b1200b3ea5b4
cheng112360213/CH03_HW1
P15/P15/P15.cpp
#include<stdio.h> #include<stdlib.h> int maximum(int x, int y, int z); int main(void) { int number1; int number2; int number3; printf("Enter three integers:"); scanf("%d %d %d", &number1, &number2, &number3); printf("maximum is: %d\n", maximum(number1, number2, number3)); system("pause"); return 0; } int max...
ALGO
0.996963
4.45897
be45b2ee-7439-453c-9914-5475b392bea3
BlackcoinDev/blackcoin-amore
src/banman.cpp
#include <banman.h> #include <netaddress.h> #include <node/ui_interface.h> #include <sync.h> #include <util/system.h> #include <util/time.h> #include <util/translation.h> BanMan::BanMan(fs::path ban_file, CClientUIInterface* client_interface, int64_t default_ban_time) : m_client_interface(client_interface), m_ban...
TOOL
0.891445
7.203902
2a404e11-2dea-46dd-9402-af5b470af4bc
bplatak/spoj
LASTDIG2/lastdig2.cpp
//g++ 5699.cpp -o test && ./test<test.in #include <stdio.h> #include <string.h> int main(){ int t; scanf("%d",&t); while(t--){ unsigned long long b; int a; char buffer[1000]; scanf("%s %lld",buffer,&b); a=buffer[strlen(buffer)-1]-48; printf("%c\n",a!=0&&b!=0 ? "111124863971464655556666793184269191"[(a-1...
ALGO
0.999309
3.13116
00ca935c-2a86-41f2-aeb6-a42a0702d882
manrajgrover/Codes
Codeforces/581-C/581-C-13288145.cpp
// By manrajsingh #include <bits/stdc++.h> using namespace std; #define ll long long #define d1(a)cout<<#a<<": "<<a<<"\n"; #define d2(a,b)cout<<#a<<": "<<a<<" , "<<#b<<": "<<b<<"\n"; #define d3(a,b,c)cout<<#a<<": "<<a<<" , "<<#b<<": "<<b<<" , "<<#c<<": "<<c<<"\n"; #define d4(a,b,c,d)cout<<#a<<": "<<a<<" , "<<#b<<": "<<...
ALGO
0.99972
3.8497
901c8828-87eb-4275-9552-e61423a64959
NadunKavindra/Programming-CPP-Stroustrup
Chapter06/Exercises/exercise6.cpp
/* Exercise 6 on Page 219 Program that checks if a sentence is correct according to the following grammar: Sentence: Noun Verb " ." // note the space before the dot Sentence Conjuction Sentence " ." Conjunction: "and" "or" "but" Noun: Article Nou...
TOOL
0.960566
6.239789
a5b591bd-3d13-42fc-94c1-6b9aae9bc97e
shivamngpal/DSA-practice
searching and sorting/sorting/mergeSort.cpp
#include<iostream> #include<vector> using namespace std; void mergeSort(vector<int>& arr){ } int main(){ vector<int> arr={38,27,43,3,9,82}; mergeSort(arr); }
ALGO
0.999918
5.268932
61cbba3e-2ff1-4e3b-be6a-d07fce81a5e0
bhawarth-garg/Leetcode-Solutions
Taxi Booking - GFG/taxi-booking.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: int minimumTime(int n,int cur,vector<int> &pos,vector<int> &time){ int minm= INT_MAX; for(int i=0;i<n;i++) ...
ALGO
0.999847
5.07459
5114692b-cf47-479d-aba9-4109c0fd8e11
m-a-d-n-e-s-s/tbb
src/test/test_parallel_sort.cpp
#include "harness_defs.h" #include "tbb/parallel_sort.h" #include "tbb/task_scheduler_init.h" #include "tbb/concurrent_vector.h" #include "harness.h" #include <math.h> #include <vector> #include <exception> #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not en...
TEST
0.93159
7.072815
50a64a76-85c1-4b58-9ea4-7a26638ea14a
pratyushiitd/CP
Graphs-Trees/Shortest Path/floyd_warshall.cpp
// https://cses.fi/problemset/task/1672/ #include <bits/stdc++.h> using namespace std; #define int long long #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define fi first #define se second #define ld long double const int MAX = 200002; int INF = 1e15; int n,m,r; int arr[MAX]; int dx[4] = ...
ALGO
0.99999
5.037509
5db6d811-9e50-4750-b5f5-427940288c23
Luxusio/Coding-Test
Programmers/L1/L1_행렬의 덧셈.cpp
//// 2021.04.05 08:50 //#include <vector> // //using namespace std; // //vector<vector<int>> solution(vector<vector<int>> arr1, vector<vector<int>> arr2) { // vector<vector<int>> answer; // for (int i = 0; i < arr1.size(); i++) { // answer.push_back(vector<int>()); // for (int j = 0; j < arr1[i].size(); j++) { // a...
ALGO
0.999698
4.677588
7ff48f95-3254-48fe-ab0a-36a38b38d7ea
BaTaNav/Galgje-spel
main.cpp
#include <iostream> //input en output #include <string> //string manipulatie #include <vector> //gebruik van vectoren #include <algorithm> //functies zoals std::find #include <ctime> //verkrijgen van de huidige tijd #include <cstdlib> //random getallen // Functie die de galg tekent op basis van het ...
TOOL
0.959644
5.344891
7ad8bc1b-eda0-47d0-a09a-a282a9ec5573
paolo-torres/interview-prep
leetcode/blind_75/all/kth_smallest_element_in_a_bst.cpp
/* Given root of BST & int k, return kth smallest value (1-indexed) of all values in tree Ex. root = [3,1,4,null,2] k = 1 -> 1, root = [5,3,6,2,4,null,null,1] k = 3 -> 3 Inorder traversal, each visit decrement k, when k = 0 return, works because inorder Time: O(n) Space: O(n) */ /** * Definition...
ALGO
0.999996
6.902154
62da9555-c449-43c8-b0b7-c464a3815091
nareshkangeyan/c-programming
7. Sum of ASCII Value.cpp
#include <stdio.h> #include <string.h> int main() { char str[100]; int sum = 0; printf("Enter a string: "); gets(str); for(int i=0; i<strlen(str); i++) { sum += (int) str[i]; } printf("Sum of ASCII values of all characters in the string: %d", sum); return 0...
ALGO
0.989547
4.895236
334323f5-59dc-4c08-a8f6-2f39fed3b7ad
Lan-ce-lot/data-structures
heap/优先队列.cpp
#include<bits/stdc++.h> using namespace std; #define MAX_N 10000 //priority_queue int heap[MAX_N],sz = 0; void push(int x) { int i = sz++; while(i > 0) { int p = (i - 1) / 2; //p Ϊڵ if(heap[p] <= x)break; //ӽڵûдСߵ˳ heap[i] = heap[p]; //ӻ i = p; } heap[i] = x; } int po...
ALGO
0.999819
3.527466
e8b148f2-1785-4d67-9ede-75c8fc904d69
Ishwarendra/Contests
ATCODER/Regular/abc265/C.cpp
#include <bits/stdc++.h> #ifdef LOCAL #include "F:\CPP\Debug\debug.h" #else #define print(...) 1; #endif using i64 = long long; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n, m; std::cin >> n >> m; std::vector<std::string> a(n); for (int i = 0; i < n; ++i) ...
ALGO
0.999956
3.896606
9bef08d2-a24e-469e-b972-ee0edde6c921
hoangkiet1906/C--
Stack3.cpp
#include<iostream> #include<string.h> #include <cstdlib> using namespace std; struct node { char data; struct node *pNext; }; typedef struct node NODE; struct stack { NODE *pTop; }; typedef struct stack STACK; void KhoiTaoStack(STACK &s) { s.pTop = NULL; } NODE *KhoiTaoNode(char x) { NODE *p = new NODE(); ...
ALGO
0.999819
3.585655
f71dea66-24b3-44c3-a1d5-aaa1be384214
Utkarsh-Jain-LPU/Leetcode
0560-subarray-sum-equals-k/0560-subarray-sum-equals-k.cpp
class Solution { public: int subarraySum(vector<int>& nums, int k) { int count = 0; map<int, int> m; int lastSum = 0; for (int num : nums) { lastSum += num; if (lastSum == k) count++; count += m[lastSum-k]; m[lastSum]++; } ...
ALGO
0.999898
6.320385
5369df21-609a-4b6a-9a09-231d5b4151aa
saakcy7/lab-two
lab2-queue/main.cpp
#include <iostream> #include "linkedlist.h" #include "queue.h" #include "queuearray.h" #include "queuelinkedlist.h" using namespace std; int main() { cout << endl; cout << "Queue Implementing Linked List" << endl; cout << "Adding data" << endl; Queue *q = new QueueArray(); q->enqueue(4); q->enq...
TOOL
0.921978
4.246884
45d52512-9c45-4235-ab3d-badebf1e391d
raincross7/code-similarity
codes/train_code/problem345/problem345_408.cpp
#include <bits/stdc++.h> using namespace std; using ll =long long; #define all(v) v.begin(),v.end() int main() { ll N; cin>>N; cout<<800*N-(N/15)*200<<endl; }
ALGO
0.999561
3.070403
d5da7b7c-7427-47a9-8294-3201e33ce1ab
RamAIbot/Self_Driving_car_Highway_driving
src/Eigen-3.3/doc/examples/Tutorial_BlockOperations_print_block.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::MatrixXf m(4,4); m << 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16; cout << "Block in the middle" << endl; cout << m.block<2,2>(1,1) << endl << endl; for (int i = 1; i <= 3; ++i) { cout << "B...
ALGO
0.969002
3.6853
752657c4-9757-441b-b90e-06659d67bf32
yuxiang115/BitMatrixGraph
Project5_XiangYu/Source1.cpp
int compute_sum(int n) { int sum = 0; int i = 1; while (i <= n) { sum = sum + i; i = i + 2; } }
ALGO
0.999834
4.327535
26524821-3143-447b-9b1a-ca33c9554c61
gbl08ma/eigenmath
src/arg.cpp
/* Argument (angle) of complex z z arg(z) - ------ a 0 -a -pi See note 3 below (-1)^a a pi exp(a + i b) b a b arg(a) + arg(b) a + i b arctan(b/a) Result by quadrant z arg(z) - ------ 1 + i 1/4 pi 1 - i -1/4 pi -1 + i 3/4 pi -1 - i -3/4 pi Notes 1. Handles mixed polar and rec...
ALGO
0.948541
4.511746
b3488b2a-7ed7-46b0-b5b1-307425ff0ed7
nandeeshbhatrai/codeforces-chef-problems
A_Sakurako_s_Exam.cpp
#include <bits/stdc++.h> // #include <chrono> using namespace std; using namespace std::chrono; #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #pragma optimization_level 3 #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragm...
ALGO
0.99983
4.465661
0acd2f96-d900-4526-81ce-baacfe0237b5
yogi2442/repo
spoj/done/anarc09a/final.cpp
#include <cstdio> #include <cstring> int main() { int i,j,count,ans,n,m,len; char str[3000]; scanf("%s",str); j=1; while(str[0] != '-') { len = strlen(str); count=0; ans = 0; for(i=0;i<len;i++) { if(str[i] == '{') count++; else if(str[i] == '}') count--; if(count < 0) { count = ...
ALGO
0.991511
3.223228
6bb7aef2-e122-460c-ac6c-14958cc8cc0b
kennethpersel/datasciencecourserra
win-library/4.0/Rcpp/examples/ConvolveBenchmarks/convolve3_cpp.cpp
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // This is a rewrite of the 'Writing R Extensions' section 5.10.1 example #include <Rcpp.h> RcppExport SEXP convolve3cpp(SEXP a, SEXP b){ Rcpp::NumericVector xa(a); Rcpp::NumericVector xb(b); int n_xa = xa.size() ; int n_xb = xb...
ALGO
0.981883
5.944395
0a40a69e-e45a-4163-8826-afeb3f30d1c3
Gabriel-SGama/3d_hokuyo
src/Logic.cpp
#include "headers/Logic.hpp" #include <cmath> using namespace std; Logic::Logic() { nID = 0; beginSize = 50; // max size of lines in one frame lineRep = new LineRep(); lineRep->lines.resize(beginSize); lineRep->size = 0; } Logic::~Logic() { } void Logic::defineLimit(Scan* data) { int x = d...
ALGO
0.882601
3.868593
d5822d6c-b157-42da-9916-3e6606f07cb5
ghts2110/competitive_programing
code_forces/Knight Tournament/Knight_Tournament.cpp
#include <iostream> #include <cstring> using namespace std; int st[12000000]; void update(int ind, int l, int r, int p, int q, int x){ if(st[2*ind+1] == -1 && l != r){ st[2*ind+1] = st[ind]; } if(st[2*ind+2] == -1 && l != r){ st[2*ind+2] = st[ind]; } if(l != r){ st[ind] = ...
ALGO
0.999985
4.190348
d18113ad-49a6-4cfc-9626-a9d7c74cd7ca
duxingli/Algorithm-C
043朴素匹配算法.cpp
//ģʽƥ㷨Ӵλ //s //Ӵt t:ģʽ //sѰtĹ̳Ϊģʽƥ //sҵtӴƥɹtsе״γֵĴ洢λãţ //ƥʧܣ-1 //ģʽƥ-ƥ㷨(BF㷨) //1.ڴSʹTȽϵʼ±ij //2.ѭֱSTַδȽ // S[i]=T[j],ȽSTһַ // 򣬽ijݣ׼һ˱Ƚ //3.TַȽ꣬ƥɹ //ƥʼȽ±;ƥʧܣ-1 #include <stdio.h> #include <string.h> int BF1(char *s,char *t) { //s[0] 洢ַij ַͲһ??? //ijɵڼλ int i=1,j=1; while(i<=s[0] && j<=t[0]){ if(s[i] =...
ALGO
0.999769
3.722215
27ef01d7-ffd6-477a-86be-d39d47733c29
sikeking/AtcoderBeginingContest
ABC126/C.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main(){ long double N,K; long double S = 0; cin >> N >> K; for(int i = 1;i <= N;i++){ long double T = i; long double c = 1.0/N; while(true){ if(T < K){ T *= 2; ...
ALGO
0.999777
3.641765
64c6059f-7f99-4d87-8e47-200bd7148731
JACoders/OpenJK
codemp/rd-common/tr_noise.cpp
// tr_noise.c #include "tr_common.h" #define NOISE_SIZE 256 #define NOISE_MASK ( NOISE_SIZE - 1 ) #define VAL( a ) s_noise_perm[ ( a ) & ( NOISE_MASK )] #define INDEX( x, y, z, t ) VAL( x + VAL( y + VAL( z + VAL( t ) ) ) ) static float s_noise_table[NOISE_SIZE]; static int s_noise_perm[NOISE_SIZE]; #define LERP( a,...
ALGO
0.998944
5.389241
53c9b6a7-a666-4550-b517-c6bf11e3b2a9
sarvex/leetcode-vala
solution/0200-0299/0214.Shortest Palindrome/Solution.cpp
typedef unsigned long long ull; class Solution { public: string shortestPalindrome(string s) { int base = 131; ull mul = 1; ull prefix = 0; ull suffix = 0; int idx = 0, n = s.size(); for (int i = 0; i < n; ++i) { int t = s[i] - 'a' + 1; prefix...
ALGO
0.999997
6.239186
74a4c802-ad88-41e2-b8fe-76dfb87d1722
felipe-augusto/ufabc
programacao_gpu/projeto/td_cpu.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <iostream> #include <string> #include <thread> #include <vector> #include <sys/time.h> std::vector<int> bounds(int process, int height) { std::vector<int>bnd; int size = 0; int increment = height / process; for(int i = ...
ALGO
0.99977
3.931075
fbba9d23-f05a-4b05-8b15-1d547dbd2eba
kitcat-dev/CryptographyLabs-10trimester
ElGamalPlus.cpp
#include <iostream> #include <cmath> #include <string> #include <vector> #include <ctime> #include <map> using namespace std; long new_pow(long a, long d, long n) { long b = 1; while (d) { if (d % 2 == 0) { d /= 2; a = (a * a) % n; } else { d--; b = (b * a) % n; } } return b; } long lon...
ALGO
0.99985
4.963385
6c0979c4-f78b-40bf-88d4-ea6e5984aecb
davidyslu/LeetCode
LC-283/LC-283-3.cpp
#include <vector> #include <algorithm> using namespace std; class Solution { public: /** * Concepts: * */ void moveZeroes(vector<int>& nums) { for (int i = 0, lastNonZeroFoundAt = 0; i < nums.size(); ++i) { if (nums[i] != 0) swap(nums[lastNonZeroFoundAt++], ...
ALGO
0.99994
6.797278
0b526b91-c215-448a-99bc-ddfad386cb32
nezumimusume/c_purapura_1
Lesson_13_HandsOn/tkEngine/bulletPhysics/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
//#include <stdio.h> #include "BulletCollision/CollisionShapes/btConvexShape.h" #include "BulletCollision/CollisionShapes/btTriangleShape.h" #include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" #include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h" #include "BulletCollision/NarrowPhaseCo...
ALGO
0.979681
5.537234
6112efdd-1ae8-4655-b627-152bd6b19565
sikuner/book-code
Exploring C++ 11/chapter53/list5301.cpp
// Listing 53-1. Specializing the hash Template for the rational Type #include <array> #include "rational.hpp" namespace std { template<class T> class hash<rational<T>> { public: std::size_t operator()(rational<T> const& r) const { return hasher_(r.numerator()) + hasher_(r.denominator()); } private: std:...
TOOL
0.857583
6.199426
7ffbb3a6-2362-44c8-a226-a7cdd4f806de
VasisthaPrakhar/LC_Questions
2433-find-the-original-array-of-prefix-xor/2433-find-the-original-array-of-prefix-xor.cpp
class Solution { public: vector<int> findArray(vector<int>& pref) { int n=pref.size(); vector<int>ans; ans.push_back(pref[0]); for(int i=1;i<n;i++){ ans.push_back(pref[i-1]^pref[i]); } return ans; } };
ALGO
0.999992
5.314816
d0cc35c2-5458-4757-abe7-40571cf17329
sarvex/leetcode-ocaml
solution/1400-1499/1437.Check If All 1's Are at Least Length K Places Away/Solution.cpp
class Solution { public: bool kLengthApart(vector<int>& nums, int k) { int j = -1; for (int i = 0; i < nums.size(); ++i) { if (nums[i] == 1) { if (j != -1 && i - j - 1 < k) { return false; } j = i; } ...
ALGO
0.999987
5.743949
e858a255-80f3-4dea-ba18-e9d2d9cefb63
Palakmalik1594/Learning-to-code-DSA
Difficulty: Easy/Linked List Matrix/linked-list-matrix.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; Node *right, *down; Node(int x) { data = x; right = NULL; down = NULL; } }; // } Driver Code Ends /*structure of the node of the linked list is as struct Node { int data; Nod...
ALGO
0.999534
6.639833
f4956008-69f0-4a28-9a53-4cd4dd1db1ae
Kwondoryeong/iot-cpp-2025
STL/iterator2.cpp
/* * vector<int>::iterator iter ݺ * ϰ auto */ #include<iostream> #include<vector> using namespace std; int main() { vector<int> v = { 10, 20, 30, 40, 50 }; vector<int>::reverse_iterator rit; for (rit = v.rbegin(); rit != v.rend(); rit++) { cout << *rit << endl; } cout << endl; for (auto rit = v.rbegin()...
ALGO
0.948988
4.093958
beddc065-a39d-4f61-9519-5b0a5c8424d2
Kiritouse/Algorithm
Binary String/main.cpp
#include <stdio.h> __int64 a[100000001] = {0}; __int64 b[1001][1001] = {0}; const int p = 1000000007; void swap(int* x,int *y){ int temp = *x; *x = *y; *y = temp; } void quick_sort(int q[],int l,int r){ int i = l-1; int j = r+1; int x = q[(l+r)/2]; if(l>=r) return; while(l<r){ do i++;while(q[i]>x); do j++;w...
ALGO
0.999758
3.830839
e0aeb2e3-8bf7-4d23-82a9-2472b52d5e64
pvc1989/miniWiki
algorithms/data_structures/leetcode/623.add-one-row-to-tree.cpp
/* * @lc app=leetcode id=623 lang=cpp * * [623] Add One Row to Tree * * https://leetcode.com/problems/add-one-row-to-tree/description/ * * algorithms * Medium (50.38%) * Likes: 666 * Dislikes: 148 * Total Accepted: 50.1K * Total Submissions: 97.4K * Testcase Example: '[4,2,6,3,1,5]\n1\n2' * * Give...
ALGO
0.999954
7.522873
07645db3-8a26-4406-826b-04e1749f9cc9
Vishnu798/DSA-practice-
assignment-14/pattern-2.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cout<<"enter the number of rows : "; cin>>n; int i=1; int sum=0; while(i<=n){ sum+=i; int current =sum; cout<<"sum is : "<<sum<<endl; while(current!=0){ cout<<"#"; current--; ...
ALGO
0.999154
3.466969
870205cc-a4c7-498d-bbc1-e43746916152
ThalesOfMiletus/deveoo-flutter-test
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
fb0e71b4-47c6-48f9-850a-541aceb44eda
fpdjsns/Algorithm
leetcode/medium/399. Evaluate Division.cpp
/** * problem : https://leetcode.com/problems/evaluate-division/ */ class Solution { unordered_map<string, unordered_map<string, double>> dist; double query(string start, string end) { queue<pair<string, double>> q; unordered_map<string, unordered_set<string>> check; q.push({sta...
ALGO
0.999967
6.220566
bfa22394-6daf-4551-a9ee-8fcddedf33e7
VladSaioc/oopsla-24-artifact
gcatch/tools/z3/src/test/cnf_backbones.cpp
#include<iostream> #include<time.h> #include<signal.h> #include "util/timeout.h" #include "util/rlimit.h" #include "sat/dimacs.h" #include "sat/sat_solver.h" #include "util/gparams.h" static sat::solver * g_solver = nullptr; static clock_t g_start_time; static void display_statistics() { clock_t end_time = ...
ALGO
0.996224
4.939285
12c5e91f-0cd3-45af-aef8-9de6c2def4fa
WangXinyan940/openmm-vs
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceOutOfPlaneBendForce.cpp
#include "AmoebaReferenceForce.h" #include "AmoebaReferenceOutOfPlaneBendForce.h" #include "SimTKOpenMMRealType.h" using std::vector; using namespace OpenMM; void AmoebaReferenceOutOfPlaneBendForce::setPeriodic(OpenMM::Vec3* vectors) { usePeriodic = true; boxVectors[0] = vectors[0]; boxVectors[1] = vector...
ALGO
0.991106
6.143521
889f23c4-aea3-43d7-832d-9c6ba5cc5c12
test-Banal/ModulesCPP
cpp08/ex01/Span.cpp
#include "Span.hpp" #include <limits> Span::Span(unsigned int n) : maxSize(n) {} void Span::addNumber(int num) { if (numbers.size() >= maxSize) { throw std::length_error("Span is full"); } numbers.push_back(num); } int Span::shortestSpan() { if (numbers.size() < 2) { throw std::logic_...
ALGO
0.922116
5.214513
0b89f3ea-1d11-4c6a-b42b-29e593f34d74
wildmichael/libcxx
test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
// <algorithm> // template<RandomAccessIterator Iter, StrictWeakOrder<auto, Iter::value_type> Compare> // requires ShuffleIterator<Iter> && CopyConstructible<Compare> // void // pop_heap(Iter first, Iter last, Compare comp); #include <algorithm> #include <functional> #include <cassert> #ifndef _LIBCPP_HAS_NO_RV...
TEST
0.995595
5.355385
5215093e-e3f7-4894-b997-2c63967758f8
tomfly-connectThesource/Computational-Geometry
include/igl/bfs.cpp
#include "bfs.h" #include "list_to_matrix.h" #include <vector> #include <queue> template < typename AType, typename DerivedD, typename DerivedP> IGL_INLINE void igl::bfs( const AType & A, const size_t s, Eigen::PlainObjectBase<DerivedD> & D, Eigen::PlainObjectBase<DerivedP> & P) { std::vector<typename ...
ALGO
0.999619
4.747497
9bd6c9a0-c35f-4faf-8d81-79a87e55617b
nalinasai/DSAlabs
lab1/Q2takehome.cpp
#include <iostream> #include <vector> #include <sstream> using namespace std; int main(){ int array[6][6] = {{1,1,1,0,0,0},{0,1,0,0,0,0},{1,1,1,0,0,0},{0,0,2,4,4,0},{0,0,0,2,0,0},{0,0,1,2,4,0}}; vector<int> numbers; int total; for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ ...
ALGO
0.999703
3.823555
2c17a3e0-2ab2-4492-8d38-acfb16a9114e
EricDiGi/HashWithChaining
Hash.cpp
#include <iostream> #include "Link.hpp" #include "Node.hpp" #include "Hash.hpp" using namespace std; Hash::Hash(int val){ this->bucket = val; this->size = 0; this->table = new Link[val]; } Hash::~Hash(){ delete[] this->table; } void Hash::insert(int key){ int iter = hashF(key); this->table[i...
ALGO
0.994944
4.208613
dc06a216-0bab-481e-9446-7d1c2a931706
omangaj/c-language
string/34.cpp
#include <stdio.h> #include<string.h> int main(){ char a[30],w[20],c[20]; int len,i,j,k,b[10],count=0,m; printf("Enter the string\n"); gets(a); len=strlen(a); printf("Enter the word that index find\n"); gets(w); for (int i=0,k=0;a[i] && w[k];i++) { if (a[i]==w[k] && a[i+1]=...
ALGO
0.99978
3.253852
bcb1381b-067e-4257-b13d-7fb0c80271e1
Mofazzal874/Data-strucetures-and-Algorithms-DSA-2-1-
Recursion/zobayersBlogProblems/TraversalsInFibonacciTree.cpp
/* If you already solved the problem for finding the nth fibonacci number, then you must have a clear vision on how the program flow works. So now, in this problem, print the values of your fibonacci function in pre-order, in-order and post-order traversal. For example, when n = 5, your program calls 3 and 4 from it, ...
ALGO
0.999975
4.647939
f9bb0215-6662-4199-a1e8-ba0e40e66950
EclipseMenu/rift
src/parser.cpp
#include <rift/parser.hpp> #include <stack> #include <rift/nodes/accessor.hpp> #include <rift/nodes/assign.hpp> #include <rift/nodes/binary.hpp> #include <rift/nodes/call.hpp> #include <rift/nodes/forloop.hpp> #include <rift/nodes/indexer.hpp> #include <rift/nodes/root.hpp> #include <rift/nodes/script.hpp> #include <...
TOOL
0.980489
7.480806
94f82d1f-8381-4579-b984-719cbe2d7abd
changmu/StructureAndAlgorithm
HDOJ/2391.cpp
////////////////////System Comment//////////////////// ////Welcome to Hangzhou Dianzi University Online Judge ////http://acm.hdu.edu.cn ////////////////////////////////////////////////////// ////Username: changmu ////Nickname: ľ ////Run ID: ////Submit time: 2014-08-05 16:27:31 ////Compiler: GUN C++ ///////////////////...
ALGO
0.998943
3.070809
7bf37c45-db1a-4c72-bb03-bfb18d40623b
nikhilhassija/CompetitiveProgramming
CodeForces/752/C.cpp
#include <bits/stdc++.h> #define lli long long int #define pb push_back #define pii pair <int, int> #define pll pair <lli, lli> #define _F first #define _S second #define mset(x) memset(x, 0, sizeof(x)) using namespace std; int main() { int n; cin >> n; string S; cin >> S; char h=0, v=0; int x = 1; for(int...
ALGO
0.999891
3.155847
06514b8c-9403-4f5a-be76-a8098a38950a
Robert19950512/libigl
include/igl/repmat.cpp
template <typename DerivedA, typename DerivedB> IGL_INLINE void igl::repmat( const Eigen::PlainObjectBase<DerivedA> & A, const int r, const int c, Eigen::PlainObjectBase<DerivedB> & B) { assert(r>0); assert(c>0); // Make room for output B.resize(r*A.rows(),c*A.cols()); // copy tiled blocks for(int ...
ALGO
0.979975
4.043232
e6312978-0ef1-4235-bcc0-f984f2631316
matpx/blendini
src/extern/libigl/include/igl/arap.cpp
template <typename Scalar> using MatrixXX = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>; template < typename DerivedV, typename DerivedF, typename Derivedb> IGL_INLINE bool igl::arap_precomputation( const Eigen::MatrixBase<DerivedV> & V, const Eigen::MatrixBase<DerivedF> & F, const int dim, con...
ALGO
0.999801
6.285976
6526b73c-1ae3-4e09-91b5-cfa14550f611
beet-aizu/library
test/yosupo/static_range_frequency.test.cpp
// verification-helper: PROBLEM https://judge.yosupo.jp/problem/static_range_frequency #include <bits/stdc++.h> using namespace std; #define call_from_test #include "../../io/single.cpp" #include "../../datastructure/waveletmatrix.cpp" #undef call_from_test signed main(){ cin.tie(0); ios::sync_with_stdio(0); ...
ALGO
0.999384
4.538099
d8b44f33-d6b3-4254-85b0-eff30d705391
AndhikaBagusWA/andhika2100018232-prac-alpro
Pertemuan 5/Kegiatan/prak5.cpp
#include <iostream> #include "prak5.h" using namespace std; int main() { perulangan x; cout <<"Menggunakan cara iteratif\n"; x.ulang_for(4); cout <<"\nMenggunakan cara rekursif\n"; x.ulang_rekursif(4); return 0; }
ALGO
0.942639
4.273685
8ddcfab4-4bff-47ef-81d1-a16cf6d181b6
KDbob/K-Leetcode
Leetcode/Array&String/341_flatten-nested-list-iterator/main2.cpp
// 341. 扁平化嵌套列表迭代器 // Created by kaide on 2021/3/25. // #include <iostream> #include <vector> using namespace std; class NestedInteger { public: bool isInteger() const; int getInteger() const; const vector<NestedInteger> &getList() const; }; class SingletonInteger : public NestedInteger { private: ...
ALGO
0.999094
6.191936
fe9dca94-a1a3-4f2b-9a27-fcee27e3e346
sakib3201/My_codes
UVA solve/UVA 993 product of digits/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { int testcase, input,undivisable=0; scanf("%d",&testcase); vector<int>v; while(testcase--) { scanf("%d",&input); undivisable=0; if(input==1) cout<<1<<'\n'; else { undivisable=0...
ALGO
0.999561
4.649617
8088d5b3-d29b-4212-a739-8516c6bef37e
remotemcu/adin-llvm
lib/CodeGen/LiveRangeShrink.cpp
#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/iterator_range.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineOperand.h" #include...
ALGO
0.991706
7.949248
dece1979-13f2-4e75-9f16-a9369146604c
Fezaan/Leetcode
Postorder Traversal (Iterative) - GFG/postorder-traversal-iterative.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val...
ALGO
0.999895
6.748283