uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
eab91e1b-a2cd-4ccc-853a-f0f809704d11
onenewarm/codetree-TILs
240202/기울어진 직사각형/slanted-rectangle.cpp
#include <iostream> using namespace std; int dy[4] = { -1, -1, 1, 1 }; int dx[4] = { 1, -1, -1, 1 }; int main() { // 여기에 코드를 작성해주세요. int n; cin >> n; int matrix[21][21]; for (int iRow = 0; iRow < n; ++iRow) { for (int iCol = 0; iCol < n; ++iCol) { cin >> matrix[i...
ALGO
0.99992
4.35922
51a902fc-830b-4c89-b564-8fb4cd08855a
MdRafidulIslam/xpsc-week1
stater161/temperature.cpp
#include <bits/stdc++.h> #define int long long #define ll long long #define pii pair<ll, ll> #define yes cout << "YES" << endl #define no cout << "NO" << endl #define cyes cout << "Yes" << endl #define cno cout << "No" << endl #define minus cout << -1 << endl #define fastread() \ ios_base::sync_with_...
ALGO
0.99999
5.242321
04c60920-4fc3-4009-80d2-b1355f72ad21
AyaShalqar/c-lab-10
10Lab/g1.cpp
#include <iostream> #include <map> using namespace std; int main(){ int n; cin >> n; map<pair<pair<string,string>,int> ,int> m; for (int i = 0; i < n; i++){ string s1; int k1; string s2; int k2; cin >> s1; cin >> k1; cin >> s2; cin >> k2; m[make_pair(make_pair(s1, ...
ALGO
0.998916
3.625101
4a9b8e7a-387d-447d-93b9-4d6057f1cb09
Neer393/Strivers-SDE-Challenge
Maximum-Consecutive-ones.cpp
int longestSubSeg(vector<int> &arr , int n, int k){ int maxi = 0; int cnt0 = 0; for(int i = 0, j = 0; i < n; i++){ if(arr[i] == 0){ cnt0++; } while(cnt0 > k){ if(arr[j] == 0){ cnt0--; } j++; } maxi = max(maxi...
ALGO
0.999953
5.219421
d0c22323-1c59-46f0-8b31-00b26aa86552
shaowei-cai-group/AriParti
src/partitioner/src/ast/simplifiers/bv_slice.cpp
#include "ast/ast_pp.h" #include "ast/ast_ll_pp.h" #include "ast/simplifiers/bv_slice.h" namespace bv { void slice::reduce() { process_eqs(); apply_subst(); } void slice::process_eqs() { for (unsigned i : indices()) { auto const [f, p, d] = m_fmls[i](); pro...
ALGO
0.967993
4.279815
0487dec6-0479-4918-a9dc-2ffea1014a6a
Fernadoo/Data-structures
cluster/cluster.cpp
#include<cstdio> #include<cstdlib> #include<iostream> #include<string> #include<cmath> using namespace std; int num_city = 0; int num_road = 0; int thresh_rig = 0; int num_regions = 0; int real_road = 0; //----implement disjoint-set------ int find_tag(int* dj_set, int search_city){ int child = search_city; int pa...
ALGO
0.999808
3.753362
48f74838-3685-4ab6-abf4-478232db3611
hschoi1104/Algorithm
BOJ/수학/17374_비트베리.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int t; cin >> t; for (int i = 0; i < t; i++) { int p, q, a, b, c, d; cin >> p >> q >> a >> b >> c >> d; int coin = 0, ans=0; if (q >= c) coin += d * (q / c); int res = (p - coin) / (a + b); int tmp = res; ans = min(p - a * tmp, c...
ALGO
0.999806
3.209059
4dc01d0c-fc31-483d-8ebf-5fcd0d95b2dd
leeeyupeng/leeeyupeng.github.io
project/algorithm/leetcode/src/1654.minimumJumps.cpp
#include"leetcode.h" class Solution { public: int minimumJumps(vector<int>& forbidden, int a, int b, int x) { pair<int,int> step[2] = {{a,1},{a-b,2}}; while(step[1].first < 0){ step[1].first += a; step[1].second ++; } vector<int> dp(x+1,-1); dp[0] = 0...
ALGO
0.999907
5.199631
7f1f6519-be54-4123-9450-cb1dd03daa14
itzpankajpanwar/Leetcode
stone-game-iii/stone-game-iii.cpp
class Solution { public: string stoneGameIII(vector<int>& A) { vector<int> dp(4); for (int i = A.size() - 1; i >= 0; --i) { dp[i % 4] = -1e9; for (int k = 0, take = 0; k < 3 && i + k < A.size(); ++k) dp[i % 4] = max(dp[i % 4], (take += A[i + k]) - dp[(i + k + ...
ALGO
0.999957
5.615555
f8ae2c0a-a12a-417f-b202-937dac803e89
EganChin/Solution
PAT-A/Data-Structure/1056 Mice And Rice.cpp
// // Created by Administrator on 2019/8/5. // //2019.8.5 17:13 reading //2019.8.6 14:58 read #include <iostream> #include <queue> #include <algorithm> using namespace std; struct Mouse { int rank; int weight; }; int main() { int np, ng, order; scanf("%d%d", &np, &ng); Mouse mouse[np]; que...
ALGO
0.999995
4.116439
4835f9dd-59ce-4d11-9266-e8037d314450
wisecashew/suite
Explicit_Solvation/implementations/executables/unit_tests/detailed_balance/tail_rotation/biased/TwoBead_C15/T_3_v0/debug.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <array> #include <map> #include <utility> #include <array> #include <random> #include <chrono> #include <getopt.h> #include <stdlib.h> #include "classes.h" #include "misc.h" // obtained all necessary libraries. // TO-DO: Check la...
TOOL
0.904109
4.829195
f9ca1da6-c92d-4535-af5e-06d283b0f446
Gomi-coder/baekjoon_String
2908(상수).cpp
#include <iostream> using namespace std; int change(int k); int main(void){ int n, m; cin >> n >> m; n = change(n); m = change(m); if(n>m){ cout<<n; } else if(n<m){ cout << m; } } int change(int k){ int new_k = (k%10)*100 + ((k%100)/10)*10 + k/100; return new_k; }
ALGO
0.999208
3.239582
d68cad2b-ccae-4406-b278-f577385b611d
atccoinofficial/ATCC
src/rpc/rpcblockchain.cpp
#include "chain/checkpoints.h" #include "core/main.h" #include "rpc/rpcserver.h" #include "rpc/rpcserver.h" #include "utils/sync.h" #include "utils/util.h" #include <stdint.h> /* MCHN START */ #include "structs/base58.h" /* MCHN END */ #include "json/json_spirit_value.h" using namespace json_spirit; using namespace...
WEB
0.896767
5.947768
aa1d9eb7-80ef-413b-801a-339bc0da94d0
BenchCouncil/BigDataBench_V5.0_BigData_MicroBenchmark
MPI/BigDataGeneratorSuite/Graph_datagen/snap-exp/mxdag.cpp
#include "stdafx.h" #include "mxdag.h" namespace TSnap { // number of edge going from left to right int EvalMxDagOrdering(const PNGraph& Graph, const TIntV& NIdV) { TIntH NIdPosH(NIdV.Len()); for (int i = 0; i < NIdV.Len(); i++) { NIdPosH.AddDat(NIdV[i], i); } return EvalMxDagOrdering(Graph, NIdPosH); } /...
ALGO
0.999995
6.371215
de85cd59-4e41-47b6-bba9-7313926cc208
ishandutta2007/codeforces
forza_ferrari/normal/1391/B.cpp
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int t,n,m,ans; char a[101][101]; int main() { scanf("%d",&t); while(t--) { scanf("%d%d",&n,&m); ans=0; for(register int i=1;i<=n;++i) for(register int j=1;j<=m;++j) { a[...
ALGO
0.999185
3.544493
7c7cd5d1-ab0e-4b29-84ec-bea4c4402ad2
galib36/respectful_modelling
COPASI-master/copasi/optimization/CGA.cpp
// Begin CVS Header // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/optimization/CGA.cpp,v $ // $Revision: 1.28 $ // $Name: $ // $Author: shoops $ // $Date: 2012/04/23 21:11:20 $ // End CVS Header /** * File name: CGA.cpp * * Programmer: Yongqun He * Contact email: <EMAIL> * Purpose: T...
ALGO
0.999666
6.545104
3b395aed-844d-42ae-aeb2-43bcea7cb988
comaps/comaps
libs/routing/index_graph.cpp
#include "routing/index_graph.hpp" #include "routing/restrictions_serialization.hpp" #include "routing/routing_options.hpp" #include "routing/world_graph.hpp" #include "platform/settings.hpp" #include "base/assert.hpp" #include "base/checked_cast.hpp" #include "base/exception.hpp" #include "base/timer.hpp" #include...
ALGO
0.9985
7.610983
12e0e9a4-653e-4751-9156-208dcec012e3
pearlde-bink/DSA-PTIT
cpp/singleLinkedList(DSLKD).cpp
#include<iostream> #include<string> using namespace std; struct Node{ int data; Node *next; }; typedef struct Node* node; node makeNode(int x){ node tmp = new Node(); tmp -> data = x; tmp -> next = NULL; return tmp; } bool empty(node a){ return a == NULL; } int size(node a){ int cnt = 0; while(a != NULL){...
ALGO
0.998582
3.374352
927489c6-880a-4aaf-bd2f-6423c8c26ae1
maisaamadeu/payflow
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.998762
6.786404
fb407cd7-f72d-4a0c-8064-07a17e85a2ea
koreait24/Cotesolve
다익스트라.cpp
#include <cstdio> #include <algorithm> #include <queue> #include <vector> #include <cstring> using namespace std; int v, e, s, x, y, z, d[20002]; vector<vector<pair<int, int>>> vt; int main() { scanf("%d%d%d", &v, &e, &s); vt.resize(v + 1); for (int i = 0; i < e; i++) { scanf("%d%d%d", &x, &y, &...
ALGO
0.999968
3.701978
c1555817-9aaf-4632-a9f7-8785126faaf8
maddymundhra/DSA-Supreme-2.0
Searching&&Sorting-Level1/peakelementMountainArray.cpp
class Solution { public: int peakIndexInMountainArray(vector<int>& arr) { int n=arr.size(); int start=0; int end=n-1; int mid; while(start<end) { mid=start+(end-start)/2; if(arr[mid]<arr[mid+1]) { start=mid+1; } ...
ALGO
0.999965
5.659201
85b946e9-0ddf-4882-a0e9-265826929c21
Padm0069/Leetcode-DSA
1662-check-if-two-string-arrays-are-equivalent/1662-check-if-two-string-arrays-are-equivalent.cpp
class Solution { public: bool arrayStringsAreEqual(vector<string>& word1, vector<string>& word2) { string a1=""; string a2=""; for(int i=0;i<word1.size();++i){ a1=a1+word1[i]; } for(int i=0;i<word2.size();++i){ a2=a2+word2[i]; ...
ALGO
0.99884
6.202426
f7918e62-eb39-45d4-a722-8e52bf3baded
MSamiulHasnat/CodeForces
ICPC Assiut Sheet4/E-Count.cpp
// Problem link - https://codeforces.com/group/MWSDmqGsZm/contest/219856/problem/E #include <iostream> #include <stdio.h> #include <string.h> #include <cmath> #include <algorithm> #define nl '\n' using namespace std; int main(){ { //this 4 lines are for input and output .text files #ifndef ONLINE_JUDGE freopen(...
ALGO
0.999825
4.547427
782f4d80-a47c-4501-a163-8c74f6e971f8
ASapotskaya/Homework
binarytree/main.cpp
#include<iostream> #include <ctime> #include <algorithm> using namespace std; using std::cin; using std::cout; using std::endl; class Tree { protected: class Element { int Data; Element* pLeft; Element* pRight; public: Element(int Data, Element* pLeft = nullptr, Element* pRight = nullptr) :Data(Data), pLeft(...
ALGO
0.998598
4.285782
60083eee-8437-425e-971b-572233b4c0f1
ellynhan/challenge100-codingtest-study
hall_of_fame/Ernstjunger-1914/[BOJ]오큰수.cpp
#include <bits/stdc++.h> #define ioboost ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; using ll=long long; int res[1000001]; int seq[1000001]; stack<int> si; int main() { ioboost; int n; cin>>n; for(int i=0; i<n; i++) { cin>>seq[i]; } for(int i=n-1; i>=0; i--) { while(!...
ALGO
0.999996
4.380704
da8b8494-9444-47e2-87fd-2f007bb9468c
bhatpraveen/acmuva
483WordScramble.cpp
/* UVa 483 Word Scramble http://uva.onlinejudge.org/external/4/483.html */ #include <cstdio> #include <iostream> #include <string.h> using namespace std; int main() { char c; char s[1000]; //who knows what the word size is, let alone line! int i = 0; while((c = getchar()) != EOF) { if(c == ' '...
ALGO
0.998487
3.681791
bf9341c1-0a0e-4a96-903c-6fd209d355b9
Alexcrayon/EducationalGame
A8-An-Educational-App/Box2D/Rope/b2Rope.cpp
#include <Box2D/Rope/b2Rope.h> #include <Box2D/Common/b2Draw.h> b2Rope::b2Rope() { m_count = 0; m_ps = NULL; m_p0s = NULL; m_vs = NULL; m_ims = NULL; m_Ls = NULL; m_as = NULL; m_gravity.SetZero(); m_k2 = 1.0f; m_k3 = 0.1f; } b2Rope::~b2Rope() { b2Free(m_ps); b2Free(m_p0s); b2Free(m_vs); b2Free(m_ims); ...
ALGO
0.997013
6.29539
6b461615-02a6-4781-9a6c-b336bd2d3ca5
kellazo/PhysicsBullet3D
Physics3D_class3dubtes/Physics3D_class3 - handout/Bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
#include "btSphereBoxCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionShapes/btSphereShape.h" #include "BulletCollision/CollisionShapes/btBoxShape.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/Co...
ALGO
0.999603
6.811761
db300d07-cbf0-438c-8234-aec6934f9ba7
anmolgera/Codeforces_Solutions
CodeForces/GNU C++17/1445A | Array Rearrangment/97314291.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int32_t main(){ int n; cin>>n; while(n--){ int t; cin>>t; int x; cin>>x; int a[t],b[t]; for(int i =0; i<t; i++){ cin>>a[i]; } for(int i =0; i<t; i++){ cin>>b[i]; } sort(a,a+t); sort(b,b+t); reverse(b,b+t); bool flag =...
ALGO
0.999909
4.365674
a5b5d156-b69a-4e57-9a75-6c12a3533c01
yusifaliyevpro/Competitive-Programming
LeetCode/Easy/108. Convert Sorted Array to Binary Search Tree.cpp
// 108. Convert Sorted Array to Binary Search Tree // https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ #include <iostream> #include <vector> using namespace std; /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * ...
ALGO
0.999993
7.081442
7c13eacd-ddb2-4a68-bed5-45f9934159b5
zhzhzhang/zzz_algorithm
character_set/getcharacter.cpp
#include "serverInfo.h" #include<iostream> #include<map> #include<vector> #include<string> #include<sstream> #include<fstream> #include<memory.h> #include<cstdlib> #include<iomanip> using namespace std; struct node{ vector<int> port; vector<string> active; string dn; }; double getstab(vector<string>& acti...
TOOL
0.891775
3.543279
030e0135-db71-44ad-a555-14a1c47fc3b7
tarakNathJ/D-S-A
celebrity.cpp
#include <iostream> #include <stack> #include <vector> using namespace std; bool know(vector<vector<int>> &m,int a,int b ){ if(m[a][b]==1){ return true; } else{ return false; } } int celebrity(vector<vector<int>> &m ,int n){ stack<int>st; // stap 1 : push all element for(int...
ALGO
0.999952
4.969729
a22a10e0-8818-404d-a5d3-d457a8b1e6e6
Bharat2044/365-days-coding-challanges
Day_320/01_minCostPath.cpp
// Question Link: https://www.interviewbit.com/problems/min-cost-path/ /* Min Cost Path Problem Description: You are given a AB character matrix named C. Every cell in C has a character U,R,L or D indicating up,right,left and down. Your target is to go from top left corner to the bottom right corner of the matrix. B...
ALGO
0.99981
6.061374
43c65f55-d1b4-4e24-a03a-51c0b09cea63
SimhadriSantosh/DSA-LeetCode
0042-trapping-rain-water/0042-trapping-rain-water.cpp
class Solution { public: int trap(vector<int>& height) { int sum = 0,n=height.size(),maxh = height[0],count=0,idxh=0; for(int i=1;i<n;i++){ if(height[i]<maxh){ count+=maxh-height[i]; } else{ maxh = height[i]; idxh=i;...
ALGO
0.999985
6.86031
948c4356-b49f-4a56-acd1-61bbc4b351e7
JJWasyl/ASD-2017
Fibonacci Heap/fib.cpp
#include <iostream> #include <cmath> #include <math.h> #include <limits> #include <cstdlib> using namespace std; /* * Deklaracja wezla */ struct node{ int n; int degree; node* parent; node* child; node* left; node* right; char mark; char C; }; /* * Deklaracja klasy */ class FibHeap{ p...
ALGO
0.999645
3.687043
6d6736e7-fd9a-4620-85e4-f761ff11c003
gurtej007/CODING
A_Weird_Sum.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long bool cmp(const pair<int,int> &a,const pair<int,int> &b){ return (a.second < b.second); } void solve() { ll n, m; cin >> n >> m; map<ll, vector<pair<ll, ll>>> mp; for (ll i = 0; i < n; i++) { for (ll j = 0; j < m; j++) ...
ALGO
0.999884
3.238227
24939aa8-bb5f-4336-a672-58c4b84d1b2d
masanders/cvSorts
status.cpp
/* * Matthew Sanders * ============================================================================ * cvSorts -- status.cpp * Define the methods of the Status class */ #include <utility> #include <iostream> #include <opencv2/opencv.hpp> #include "status.h" using namespace std; using namespace cv; /*...
ALGO
0.980914
4.650026
5378c316-2359-4708-aeca-e57f41f86cb4
gordeevbr/Multithread-Programming-Homework
Lab1.cpp
#include <iostream> #include <fstream> #include <sstream> #include <omp.h> #include <chrono> #include <string> void calc(int** &matrix1, int m1, int n1, int** &matrix2, int m2, int n2, int** &res_matrix, int threads) { #pragma omp parallel for num_threads(threads) schedule(dynamic, 10000) for(i...
TOOL
0.976292
4.449221
c8c10fbd-67c9-41c6-8e2d-08b866481b3c
matheusconaga/curso--flutter
23_estudos_mobx_provider/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.997884
6.772262
a27263c7-fa7d-4821-b28a-aec826ee671e
Salman-Farid/Competitive_programming_codes_and_snippets
Codeforces codes/A. Police Recruits.cpp
#include <iostream> using namespace std; int main() { int n, sum=0, c = 0; cin >> n; int arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; for (auto p = 0; p < n; p++) { if (arr[p] > 0) sum += arr[p]; else if (sum > 0 && arr[p] < 0) sum += arr[p]; else c++; } cout<<c<<e...
ALGO
0.999991
4.131413
bceedfc1-7b16-4ed5-bc87-9ba2de33ed6b
Akshit6828/CompetitiveProgramming
Codechef/Question2.cpp
#include <bits/stdc++.h> using namespace std; int profit=0; int addprofit(int j,int curleft,int x[],int n) { int i; for(i=j;i<n;i++) { if (i==n-1&&x[i]>x[i-1]) { profit+=x[i]-curleft; break; ...
ALGO
0.999982
3.959852
08a1fd8f-765a-448b-855c-e822dbfd839d
Drchamyoung/Mathematical-programming-For-Students
0909-snakes-and-ladders/0909-snakes-and-ladders.cpp
class Solution { public: int snakesAndLadders(vector<vector<int>>& board) { const int n = board.size(); queue<int> q{{1}}; vector<bool> seen(1 + n * n); vector<int> A(1 + n * n); // 2D -> 1D for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) A[(n - 1 - i) * n + ((n - i) % 2 =...
ALGO
0.999607
6.813017
2b9ec900-324e-45e8-a544-045280c4ce38
tar3q-az1z/Codeforces-solutions
1470A.cpp
// Author : Mars_Coder // https://codeforces.com/problemset/problem/1470/A #define _USE_MATH_DEFINES #include<bits/stdc++.h> using namespace std; #define ln "\n" // no flush, oppos of endl #define _flush endl #define stop_sync ios::sync_with_stdio(false) // not to use c-style io #def...
ALGO
0.999956
3.257454
563575f8-c62b-441e-8b7f-b929c4a89cc1
SEONMl/Solutions
venv/Category/DfsBfs/N2842.cpp
#include<iostream> #include<vector> #include<algorithm> #include<queue> #define INF 999999999 #define MAX 50 #define fse(A,B,C) for(int i=A;i<B;i+=C) using namespace std; vector<pair<int,int>> home; int dx[]={-1,-1,-1, 0,0, 1,1,1}; int dy[]={-1,0,1, -1,1, -1,0,1}; int godo[MAX][MAX]; int N, answer = INF; bool visit[MAX...
ALGO
0.999623
3.587344
e7bf07bf-d477-4bb4-a096-173a7ac88dc8
ramya765/soundofmeme
soundofmeme/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.99819
6.76775
ab50b333-7da5-42cf-9b43-af3ffb126fa3
Invidam/Problem-Solving
src/boj-problem-kks227/temp/temp.cpp
//#include <iostream> //#include <vector> //using namespace std; //typedef long long ll; //vector<ll> arr; // //int N,M,K; //ll SIZE; //void setSize() { // SIZE = 1; // while(SIZE < N) SIZE = SIZE << 1; //} //void construct(vector<ll>& inputs) { // setSize(); // 입력 k에 대해, 이보다 큰 제곱 수들 중 최소인 n을 설정 // arr = ve...
ALGO
0.999626
4.76125
f8d8b4dc-c2b1-4777-8f5e-d493e9a234ca
rikuya6/ICPC_learning
AtCoder/ABC105/B.cpp
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) const int c = 4, d = 7; int solve(int n) { for (int i = 0; i <= 100; ++i) { for (int k = 0; k <= 100; ++k) { if (c * i + d *...
ALGO
0.999806
3.429127
5cb11899-5665-4761-b384-acd51c5ea54a
jigarvarma2k20/yt-music-flutter
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.998756
6.772262
b8a607b1-c803-4f9a-be28-454ddacafeab
matumoto1234/cp-crawler
AtCoder/abc217/abc217_d/27269609.cpp
// detail: https://atcoder.jp/contests/abc217/submissions/27269609 #include <bits/stdc++.h> using namespace std; #include <boost/range/adaptors.hpp> using namespace boost::adaptors; // {{{ templates // clang-format off // Macros #define over_load_(_1,_2,_3,_4,NAME,...) NAME #define rep(...) over_load_(__VA_ARGS__, ...
ALGO
0.9999
5.438388
b5fa3ec6-d1b6-439c-a679-837a794f36ed
Abhinaycodex/work
recursion/name_n_times.cpp
#include <iostream> using namespace std; void fun(int i, int n){ if (i>n){ cout << i << endl; return ; } fun(i+1, n); } int main (){ int n; cin >> n; fun(1, n); }
ALGO
0.99985
3.860871
d43587e8-2729-4460-9650-d8f3040dd6ed
tiny656/PAT
PAT (Advanced Level) Practice/1057_Stack (30).cpp
#include <cstdio> #include <iostream> #include <map> #include <cstring> #include <string> #include <stack> #include <algorithm> using namespace std; static inline bool get(int &v) { int s = 1, c; while(!isdigit(c = getchar())&&c != '-') { if(c == EOF) break ; } if(c == EOF) return 0; if(c == '-') s = 0 , v ...
ALGO
0.999881
4.111897
1854230a-1930-4115-b4e4-653951cc8cbb
NguyenMinhThuan24112001/Data_structures_and_Algorithms_PTIT
xau tot.cpp
#include<bits/stdc++.h> using namespace std; #define pb push_back #define ll long long #define endl '\n' #define mp make_pair #define mt make_tuple #define f first #define pll pair<long long, long long> #define s second #define eb emplace_back #define pii pair<int, int> #define INF INT_MAX #define LINF LLONG_MAX #defi...
ALGO
0.999928
3.80478
fbf1cd5d-f06f-41e4-8501-7f64b2e7615e
ishandutta2007/codeforces
hos.lyric/normal/2/C.cpp
// Codeforces Beta Round #2 // Problem C #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cassert> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <utility> #include <algorithm> #include <bitset> #inc...
ALGO
0.999715
3.941909
2076f66d-0265-4e52-9bc2-ebe4491b5bf2
xNIGMAx/eecs_348
template/lab7/main.cpp
#include <iostream> #include <fstream> #include <iomanip> using namespace std; const int SIZE = 4; // Global variable for matrix size class Matrix { private: int data[SIZE][SIZE]; // 2D array for matrix data public: // 1. Read values from a file into a matrix void readFromFile(const string& filename, boo...
ALGO
0.983584
5.87942
cc281fa1-11c9-41fd-9088-c34a60dbb0a6
sarvex/leetcode-checked-c
solution/1500-1599/1556.Thousand Separator/Solution.cpp
class Solution { public: string thousandSeparator(int n) { int cnt = 0; string ans; while (1) { int v = n % 10; n /= 10; ans += to_string(v); if (n == 0) break; if (++cnt == 3) { ans += '.'; cnt = 0; ...
ALGO
0.999891
5.935328
c7c55d0a-d676-4558-b923-556983a97a5f
kevinchahine/supersonicai
supersonicai/ml/frontier.cpp
#include "supersonicai/ml/frontier.h" using namespace std; namespace supersonicai { namespace ml { ml::State supersonicai::ml::Frontier::fetchTop() { ml::State & top = const_cast<ml::State &>(this->top()); ml::State curr = move(top); this->pop(); return curr; } } // namespace ml } // namespac...
ALGO
0.971451
4.373327
92794308-4d3e-4011-bc3e-2b7728f5938a
hdfk7/tdlib-control
td/tdutils/td/utils/port/rlimit.cpp
#include "td/utils/port/config.h" #include "td/utils/misc.h" #if TD_PORT_POSIX #include <sys/resource.h> #include <sys/time.h> #include <sys/types.h> #endif namespace td { #if TD_PORT_POSIX static int get_resource(ResourceLimitType type) { switch (type) { case ResourceLimitType::NoFile: return RLIMIT_NO...
TOOL
0.870603
6.908365
0d30038f-2c09-4d44-81b5-2089fef8c0b2
Nickeron-dev/Basics-Of-CPP
all_unknown/all_lib/algorithm/for_each.cpp
#include <cstdio> #include <algorithm> #include <vector> int main() { std::vector v = { 1, 3, 5, 2, 65, 0 }; auto print = [](const int &n) { printf("%i ", n); }; // Unary func std::for_each(v.begin(), v.end(), print); return 0; }
ALGO
0.994247
4.12508
4e805373-8513-4820-9447-22babcc320e3
sahu121singh/C_plus_plus
sorting.cpp
#include<bits/stdc++.h> using namespace std; void fun(int *arr, int n); int main(){ int arr[] = {3, 2, 5, 6, 7, 1, 7, 4, 3, 6, 6, 8}; int n = sizeof(arr)/sizeof(arr[0]); fun(arr, n); cout<<endl; for(int i = 0; i < n; i++){ cout<<arr[i]<<" "; } } /* int min_index(int *arr, int n, i...
ALGO
0.999858
3.872356
dcbebcb3-cac9-4c9c-8581-54c7e525adb3
gitcseme/solved-problems-catagorized
Math/uva 10948 - The primary problem.cpp
#include <bits/stdc++.h> #define FI freopen ("inp.txt", "r", stdin) #define FO freopen ("out.txt", "w", stdout) using namespace std; #define N 1000006 bool mark[N]; void Eratosthenes() { mark[0] = mark[1] = true; for(int i = 3; i * i <= N; i += 2) if (!mark[i]) for (int j = i * i; j <= N; ...
ALGO
0.999834
4.10478
87105fb7-ffb8-4281-9544-3ac49c8348ce
h3h3h0h0/galaxybrain
vcpkg_installed/vcpkg/blds/opencv4/src/4.8.0-8224011a81.clean/samples/cpp/contours2.cpp
#include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include <math.h> #include <iostream> using namespace cv; using namespace std; static void help(char** argv) { cout << "\nThis program illustrates the use of findContours and drawContours\n" << "The original image is put up along with t...
TOOL
0.991419
4.590504
08e749aa-bb50-4646-be1e-9a83c486d61e
haoliu-ai/C_CODE
06 函数/06 函数/01 函数的定义.cpp
//#define _CRT_SECURE_NO_WARNINGS 1 //#include<iostream> //using namespace std; //int add(int num1,int num2) //{ // int sum = num1+num2; // return sum; //} //int main(){ // system("pause"); // return 0; //}
TOOL
0.924597
3.036713
620140bb-2ad7-44f0-b257-e9f4b9ebcb3d
DaniiarS/LeetCodeProblems
LeetCode/Medium/maxsubarray.cpp
#include <iostream> #include <vector> int maxSubArray( std:: vector< int >& nums ){ int size = nums.size(); for( int i = 1; i < size; i++ ){ if( nums[i] < nums[i] + nums[i - 1] ){ nums[i] = nums[i] + nums[i - 1]; } } int max_value = nums[0]; ...
ALGO
0.999547
5.100236
dbbec302-d5ab-4b8a-91ee-2e22ed045d8a
ZwFink/hpac_offload_artifact
benchmarks/lavaMD/main.cpp
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <omp.h> #include <fstream> #include <approx.h> #include <math.h> #include "./util/timer/timer.h" // (in path specified here) #include "./util/num/num.h" // (in path specified here) #include "main.h" // (in t...
ALGO
0.999386
3.068946
f20f4e1c-a61c-44d0-ac01-5e3fc276aa10
Jackarain/tinyrpc
third_party/boost/libs/numeric/ublas/doc/samples/matrix_binary_scalar.cpp
#include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; matrix<double> m (3, 3); for (unsigned i = 0; i < m.size1 (); ++ i) for (unsigned j = 0; j < m.size2 (); ++ j) m (i, j) = 3 * i + j; std::cout << 2.0...
ALGO
0.973025
3.700392
dbde1ea3-e8f3-4c13-8a2b-7b1b28e07118
p2cteam/pay2c-Core
src/zerocoin/Coin.cpp
/** * @file Coin.cpp * * @brief PublicCoin and PrivateCoin classes for the Zerocoin library. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This project is released under...
TOOL
0.912501
6.273365
2c949424-b8ff-4315-8925-6b5b3c8c478b
Marcux777/Programacao_Competitiva
CodeForces/Codeforces Round 940 (Div. 2) and CodeCraft-23/A.cpp
/* ~~ Alguma parte/frase foda de um livro/mangá para dar sorte ~~ Uma vez eu gritei, gradualmente, perdi minha voz. Uma vez eu chorei, gradualmente, perdi minhas lágrimas. Uma vez eu sofri, gradualmente, me tornei capaz de suportar tudo. Uma vez me alegrei, gradualmente, me tornei indiferente ao mundo. E agora, tudo o...
ALGO
0.999644
5.112257
b9c77d37-2784-4ee3-9e8e-2a320657f863
FaisalRajpoot1/Coding-Interview-Prep
Arrays/LeetCode/two sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { int n = nums.size(); for(int i =0; i < n; i++){ for(int j =i+1; j<n; j++){ if(nums[i] + nums[j] == target){ return {i , j}; } } }return {1 ...
ALGO
0.999748
5.963224
74236427-8a64-4698-a74b-7e62f2923c1a
Suryavf/UTECsstree
main.cpp
#include <iostream> #include <vector> #include <random> #include "SStree.h" int main() { // Create a random number generator std::random_device rd; std::mt19937 gen(rd()); std::uniform_real_distribution<> dis(-1000.0, 1000.0); std::vector<Point> points(500, Point(50)); for (int i = 0; i < 500;...
ALGO
0.931341
4.503521
a6fbf9a4-0428-4c77-abd9-96b8e78bc222
raincross7/code-similarity
codes/train_code/problem311/problem311_248.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1e17; const ll MOD = 1e9+7; int main() { // input, ready int N; vector<string> vec_s; vector<int> vec_t; string X; cin >> N; vec_s.resize(N); vec_t.resize(N); for (int i=0; i < N; i++) cin >> vec_s[i...
ALGO
0.999933
5.268451
45721f95-73a5-4789-91f4-3938b6dc5e59
Mrhuangyi/leetcode-Solutions
Cpp/Easy/67. 二进制求和.cpp
给定两个二进制字符串,返回他们的和(用二进制表示)。 输入为非空字符串且只包含数字 1 和 0。 示例 1: 输入: a = "11", b = "1" 输出: "100" 示例 2: 输入: a = "1010", b = "1011" 输出: "10101" class Solution { public: string addBinary(string a, string b) { int len1 = a.size(), len2 = b.size(); if(len1 == 0) { return b; } if(le...
ALGO
0.99998
6.491354
d41a4f4c-39f6-4e26-b92d-d6a1c6b115ff
luisdavid24/Algorithms-2
TallerPunteros10.cpp
#include <iostream> #include <string.h> #include <conio.h> //Este el punto numero 10 del taller de Punteros C. using namespace std; char palabra[30]; int vocales,consonates; void llenado(); void contar(char *); int main(){ vocales=0,consonates=0; llenado(); contar(palabra); cout<<"Este son el numero de vocales :...
ALGO
0.939058
3.057725
3b59b7b8-65ca-4876-b7ae-ed61fdca17ae
HuangStomach/leetcode
201-300/279.cpp
// 完全平方数 // 给定正整数 n,找到若干个完全平方数(比如 1, 4, 9, 16, ...)使得它们的和等于 n。你需要让组成和的完全平方数的个数最少。 // Lagrange's Four Square theorem:每个正整数均可表示为4个整数(包括0)的平方和,所以只有四种可能结果,即[1,2,3,4] // Legendre's three-square theorem:非4^a(8b+7)型的正整数都可以用三个整数的平方和表示,所以对于可以写成4^a(8b+7)类型的n,其结果只能为4 #include <math.h> class Solution { public: int numSquare...
ALGO
0.999942
5.195391
bcf1c743-8408-41d1-98bc-442577769dd8
kartikeysharma12321/Chinese-DeepSpeech
native_client/ctcdecode/path_trie.cpp
#include "path_trie.h" #include <algorithm> #include <limits> #include <memory> #include <utility> #include <vector> #include "decoder_utils.h" PathTrie::PathTrie() { log_prob_b_prev = -NUM_FLT_INF; log_prob_nb_prev = -NUM_FLT_INF; log_prob_b_cur = -NUM_FLT_INF; log_prob_nb_cur = -NUM_FLT_INF; log_prob_c =...
ALGO
0.972991
5.779387
e8c2d504-c6c9-4ad3-b4ad-8352b1367a23
manishya1669/MyLeetcodeJourney
131-palindrome-partitioning/131-palindrome-partitioning.cpp
class Solution { public: vector<vector<string>>v; bool ispalindrome(string s){ int i =0,j=s.length()-1; while(i<j){ if(s[i] != s[j]){ return false; } i++; j--; } return true; } void result(...
ALGO
0.999949
6.399185
7ebf44c8-cf69-4802-b5a1-78a82cda6b36
manikanta2901/ubuntu
.history/SRM/placementPractice/HackerRank/DataStructure/InsertingNodeInDoublyLL_20210310203910.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int data; struct Node* next = NULL; struct Node* prev = NULL; }; void printList(struct Node *a){ cout << "Iterate from front : "; while(a != NULL){ cout << a->data << " "; a = a->next; } cout << endl; cout << "It...
ALGO
0.998996
4.301121
69461014-3eac-4973-bdd7-200fc51dbfa1
purekm/Today-I-Learned
algorithm/graph/2660.cpp
#include <iostream> #include <vector> #include <algorithm> #include <unordered_set> #include <queue> using namespace std; bool visit[51]; int candidate[51]; vector<unordered_set<int>> vec(51); int n; int bfs(int num){ fill(visit,visit+51,false); visit[num] = true; queue<pair<int,int>> que; int stage ...
ALGO
0.999945
3.994579
dd847fe1-c535-42e3-8c67-c9ec4d9595e2
Fangqierin/DOME-Monitoring-System
Task_generation/farsite/src/polygon.cpp
//#include "stdafx.h" #include "polygon.h" #include "Farsite5.h" const double PI=acos(-1.0); xPolygon::xPolygon() { Vertex=0; NumPoints=0; } xPolygon::~xPolygon() { if(Vertex) delete[] Vertex; Vertex=0; NumPoints=0; } bool xPolygon::AllocVertex(long Number) { if(Number>NumPoints) {...
ALGO
0.993856
4.476373
b43f2fd0-eb43-4fca-97d7-bb84229fdddd
rosyidId/Belajar_cpp
bab-11/balik_cstring.cpp
/****************************************************** Nama file: balik_cstring.cpp *******************************************************/ #include <iostream> #include <cstring> // strcpy(), strlen() void tukar(char& c1, char& c2) { char temp = c1; c1 = c2; c2 = temp; } int main() { char s[16]; siz...
ALGO
0.998412
4.894242
864cdb72-76f6-4e05-991a-eeb6804d1530
MohamedSalah9972/Competitive-Programming
UVa solutions/10920 - Spiral Tap.cpp
#include <bits/stdc++.h> #define endl "\n" #define ll long long #define ii pair<ll, ll> using namespace std; const int N = 2e5 + 5; void run() { ios_base::sync_with_stdio(false); cin.tie(nullptr), cout.tie(nullptr); } void printAns(ii ans){ cout<<"Line = "<<ans.first<<", column = "<<ans.second<<"."<<endl; ...
ALGO
0.999823
3.725184
49738092-1e51-4670-8c86-0c0deddbeea7
danieltrt/SBFL
benchmarks/python_syntax/FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <cstdlib> #include <string> #include <vector> #include <queue> #include <fstream> #include <iomanip> #include <vector> #include <queue> #include <map> #include <unordered_map> #include <set> #incl...
ALGO
0.998577
4.89477
28f7fd33-da0b-4244-ba4d-3f2790be5d24
TransportDebuger/CPP-Skillbox-study
Module 17 Pointers/Mod 17 ht1-Swap-values-by-pointer/main.cpp
#include <iostream> using namespace std; void swap(int* v1, int* v2) { int c; c = *v1; *v1 = *v2; *v2 = c; }; int main() { std::cout << "Swap values by variable pointers!\n"; int a = 10, b=20; cout << "a=" << a << " b=" << b << endl; swap(&a, &b); cout << "a=" << a << " b=" << b << endl; }
ALGO
0.99615
5.281803
902cf121-f470-4cf9-9c36-c6def92430ef
jiangyinzuo/algorithm
src/exercise/leetcode/super-egg-drop.cpp
class Solution { public: int superEggDrop(int k, int n) { if (k == 1 || n == 1) return n; std::vector<std::vector<int>> dp(n+1, std::vector<int>(k+1)); for (int _k = 1; _k <= k; ++_k) dp[1][_k] = 1; for (int t = 1; t <= n; ++t) dp[t][1] = t; for (int t...
ALGO
0.999964
5.995641
148ded56-af92-40da-9e96-758ba947f746
zairobastos/obiuan
solucoes/detetive.cpp
// OBI-2019, detetive, Guilherme A. Pinto #include <vector> #include <queue> #include <iostream> #include <algorithm> using namespace std; int E, I, V, A, B, X; int stamp, flag; vector<vector<int>> implica, implicado, consequencia; vector<int> verdadeiro, m, res, nec; queue<int> q; // intersecao de dois vetores ord...
ALGO
0.999976
4.356739
b429913b-15a6-4a35-82e7-4245e36dbbdc
Lynx2711/colab_ques
assignmentDay/day15/question2.cpp
#include<iostream> using namespace std; // Node structure struct Node { int data; Node* next; }; void insert(Node* &head, int value) { Node* newNode = new Node(); newNode->data = value; newNode->next = nullptr; if (head == nullptr) { head = newNode; } else { Node* temp = h...
ALGO
0.99998
6.160747
42c7d301-0891-4b24-b84d-8ed83b999da2
hzhuay/MyAlgorithmCodes
白书/白书第3章——数组和字符串/All in all 10340.cpp
#include<iostream> #include<cstdio> #include<cstring> using namespace std; char s[100005],t[100005]; int main(){ int mark,p=0,lens,lent; while(scanf("%s %s",s,t)!=EOF){ mark=0; p=0; lens=strlen(s); lent=strlen(t); for(int i=0;i<lens;i++){ for(int j=p;j<lent;j++){ if(s[i]==t[j]){ mark++; p=j...
ALGO
0.99993
3.079085
60980f5d-9bdb-4d02-a105-761f2491d87e
fryme/coursera-stanford-algorithms-part1
week1/counting_inversions/counting_inversions/main.cpp
#include <common.h> uint32_t merge(size_t i, size_t j, size_t middle, std::vector<int32_t>& arr, std::vector<int32_t>& aux) { uint32_t inversions(0); //print_array(arr, arr.size()); for (size_t idx = i; idx <= j; ++idx) aux[idx] = arr[idx]; size_t current(i), left(i), right(middle + 1); while (true) { i...
ALGO
0.999635
4.857051
4dbbd047-7570-4151-b2fa-e99d18618699
ukrboy12/Tasks
Coursera/C++_white/first_course_project.cpp
#include <iostream> #include <exception> #include <string> #include <map> #include <list> #include <vector> #include <sstream> #include <iomanip> #include <algorithm> #define MONTH 1 #define DAY 2 class Date { private: int year, month, day; void convertStringToDate(std::string date){ int codeException ...
TOOL
0.944584
4.922243
da36ac6a-f202-4c81-b66a-b3ab2058ce56
zzm99/Algorithm-Training
动态规划/线性DP/soj 13062 SubDiagonal Paths.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; while(cin >> n) { if(n == 0) break; vector<vector<long long>> dp(n+1, vector<long long>(n+1)); for(int i=0; i<=n; i++) { for(int j=0; j<=n; j++) { if(i == 0) d...
ALGO
0.999988
4.797152
1a3e2bb3-27b1-4dd3-9eb8-970b6eda3966
Akrobatik/ps
BaekJoon/33000/33906.cpp
// Title : 점심 나가서 먹기 // Link : https://www.acmicpc.net/problem/33906 // Time : 164 ms // Memory: 14452 KB #include <bits/stdc++.h> using namespace std; vector<pair<int, int>> edges[100001]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; vector<int> xrr(n), yrr(n);...
ALGO
0.999982
4.747177
dd24c80d-2b0c-42a9-9137-b66c93a2c29f
ComputerProgrammerStorager/DataStructureAlgorithm
CLRS/CLRS-master/other/stringSpilit.cpp
vector<string> split(const string &s, char delim) { vector<string> elems; stringstream ss(s); string item; while (getline(ss, item, delim)) { if (item.length() > 0) { elems.push_back(item); } } return elems; }
TOOL
0.90212
5.949789
5a6b29c8-4b11-498d-93f7-f28157ff64fe
Y-ang/c_plus_plus
0425huawei/1.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: vector<string> restoreIpAddresses(string s) { vector<string> res; backtracking(0, 0, "", s, res); return res; } void backtracking(int startIndex, int cnt, string path, string s, vector<string>& res) { if (...
ALGO
0.999293
5.268816
5193b418-9b6e-4ec9-bf82-4d6e1e88fe8a
ji3427/algorithm
2020/week16/baekjoon_15657_NM8.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> answer; vector<int> nums; int N,M; void dfs(int cnt,int start){ if(cnt == M){ for(auto i : answer) cout<<i<<" "; cout<<"\n"; return; } for(int i = start ; i < nums.size() ;i++){ answer.push_back(nums[i]); dfs(cnt+...
ALGO
0.999979
4.493594
edc870e0-fb6f-4d45-8809-32da0a6a8378
ImtiazAhmedAkash/Problem-Solving
codeforces/2067/A.cpp
/* In the Name of ALLAH, the most gracious, the most merciful */ /* And whoever puts their trust in ALLAH, He alone is sufficient for them. Al-Quran (65:3) */ // A - Adjacent Digit Sums #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "Dbug.h" #else #define dbg(...) #endif using ll = long lo...
ALGO
0.999972
6.120403
31300511-6fb0-446a-ad3c-e8873a786dd1
GH2005/myLeetcodeSolutions
120. Triangle v1.cpp
class Solution { vector<int> lastSums; vector<bool> open; public: int minimumTotal(vector<vector<int>>& triangle, int level = 0, int pos = 0) { int height = triangle.size(); if (level >= height) return 0; if (level == 0) { this->lastSums = vector<int>(height, 0); ...
ALGO
0.999973
5.959199
75c9c794-ef44-4fa0-8aad-5be1ad7ab8d5
ishandutta2007/codeforces
abc864197532/normal/1349/A.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; #define lli long long int #define fop(i,m,n) for (int i=(m);i<(n);i++) #define FOP(i,m,n) for (int i=(m)-1;i>=(n);--i) #define test(x) cout << #x << ' ' << x << endl; #define printv(a) {\ for ...
ALGO
0.999995
5.704858
ade3c669-b02d-4fe9-be0f-6d037c54a87d
opencv/opencv_contrib
modules/ximgproc/src/lsc.cpp
/* "Superpixel Segmentation using Linear Spectral Clustering" Zhengqin Li, Jiansheng Chen, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 2015 OpenCV port by: Cristian Balint <cristian dot balint at gmail dot com> */ #include <map> #include <queue> #include "precomp.hpp" using namespac...
ALGO
0.996258
4.996241
2f620c2f-799f-43fc-80fe-dd15c2155c96
jhinkoo331/leetcode
solution/0226____Invert_Binary_Tree.cpp
#include "model\TreeNode.h" #include <queue> using std::queue; class Solution { public: TreeNode* invertTree(TreeNode* root) { return _1(root); } private: //! perf: [100, 5] TreeNode* _1(TreeNode* root){ queue<TreeNode*> q; if(root != nullptr) q.push(root); while (q.size()) { TreeNode* temp = q.front...
ALGO
0.999956
5.983263
34c8dc58-6815-4cd3-81e0-8e2672d191a1
Akashdeep-k/Data-Structures
Recursion/Bubble_sort.cpp
#include<iostream> using namespace std; void bubble_sort(int *arr, int n){ if(n==0 || n==1){ return ; } for (int i = 0; i < n-1; i++) { if(arr[i] > arr[i+1]){ swap(arr[i], arr[i+1]); } } bubble_sort(arr, n-1); } int main(){ int n; cin>>n; int *arr ...
ALGO
0.999832
4.156867
6886da9a-c30c-4d34-a29b-1afa2d8762ff
indicgenous/DSA-C-plus-plus
Linked-List/2_doubly_linkedL.cpp
#include <iostream> using namespace std; class node{ public: int data; node * next; node * prev; // constructor node(int val){ this->data=val; this->prev=NULL; this->next=NULL; } ~node(){ cout<<"The memory location is free "<<endl; } }; // insertio...
ALGO
0.99959
3.495416