uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
eee7b439-3d68-4fd5-a06c-11f93d32203e
divyansh1511/CPP
ARSH DSA/Linked List/13_reverse_ll.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int data; node *next; node(int data) { this->data = data; next = NULL; } }; node *takeinput() { node *head = NULL; node *tail = NULL; int data; cin >> data; while (data != -1) { node...
ALGO
0.999774
3.783076
67389014-bc27-41c4-952d-455cce7142da
haebinKahng/codint_test_cpp
18.층간소음_solution.cpp
#include <iostream> #include <vector> using namespace std; int main() { freopen("input.txt", "rt", stdin); int n, a, val, i, cnt = 0, max = -2147000000; scanf("%d %d", &n, &val); for(i=1; i<=n; i++) { scanf("%d", &a); if(a>val) cnt++; else cnt = 0; if(cnt > max) max = cnt; } if(max==0) cout << -1 ; ...
ALGO
0.999993
3.916993
5c53b7df-9071-46e1-a1fb-a908edc9e3ac
Robert19950512/libigl
include/igl/min_quad_dense.cpp
#include <Eigen/Core> #include <Eigen/LU> #include "EPS.h" #include <cstdio> template <typename T> IGL_INLINE void igl::min_quad_dense_precompute( const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& A, const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& Aeq, const bool use_lu_decomposition, Eigen::...
ALGO
0.999798
5.823007
c2bb1acc-9d4c-4ef6-ac73-b3e2127786cd
harrycrcz/challenges_diarios
dia10_ordenararray.cpp
#include <iostream> #include <algorithm> // Para std::sort int main() { // Definir un array de enteros int arr[] = {5, 2, 9, 1, 5, 6}; int n = sizeof(arr) / sizeof(arr[0]); // Calcular el tamaño del array // Imprimir el array antes de ordenar std::cout << "Array antes de ordenar: "; for (int i...
ALGO
0.999919
5.719601
3164cd54-b9f6-4551-8ab2-cb32d3a6dd43
ATHARVA-GAWAS/DSA
424-longest-repeating-character-replacement/longest-repeating-character-replacement.cpp
class Solution { public: int characterReplacement(string s, int k) { int n=s.size(),r=0,l=0,maxlen=0,maxf=0; vector<int> mp(26,0); while(r<n){ mp[s[r]-'A']++; maxf=max(maxf,mp[s[r]-'A']); if((r-l+1)-maxf >k){ mp[s[l]-'A']--; ...
ALGO
0.999986
6.306963
1e74d39f-96d9-4158-8de8-c67436f865f5
aman81004/DS
Recurrsion/stairPath.cpp
#include<iostream> using namespace std; int stair(int n){ if(n==1) return 1; if(n==2) return 2; int a = stair(n-1); int b = stair(n-2); return a+b; } int main(){ int n; cout<<"Enter number of stairs:"; cin>>n; cout<<"Choices of climbing stairs:"<<stair(n)<<endl; }
ALGO
0.999507
3.837744
4706025c-6032-45b9-bff2-3db6011f81f2
MDNoorUddin/cses.fi-Solutions
Range_Sum_Queries_I.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define ps() cout<<" "; /** '' "\n" ^ **/ int main() { ios::sync_with_stdio(false); cin.tie(0); int n,q; cin>>n>>q; vector<ll> a(n+1); vector<ll> b(n+1); b[0]=0; for(int i=1;i<=n;i++) { cin>>a[i]; ...
ALGO
0.99991
3.780078
cd582322-dcbb-4c81-a049-ee5e570eacbe
yunuskrt/CS-Assignments
CS204-Advanced_Programming-Assignments/Assignment #4 - Stacks&Queues - SU services/ykerestecioglu_Kerestecioglu_Yunus_Tan_hw4/ykerestecioglu_Kerestecioglu_Yunus_Tan_hw4.cpp
// Yunus Tan Kerestecioglu #include <iostream> #include <vector> #include <fstream> #include <sstream> #include "Services.h" using namespace std; string Str(string word){ return word.substr(0,word.length()-1); } funcNode * processFile(string filename){ ifstream input; string line; input.open(filename.c_str());...
WEB
0.940708
3.649053
37926ac8-7ddd-48b5-aa8a-5fe6a687a7ed
karhabernel/BaekJoon_Practice
BaekJoon/BaekJoon/09_2438_star(easy).cpp
#include <iostream> using namespace std; int main() { int N = 0; cin >> N; N++; for (int i = 1; i < N; i++) { for (int j = 0; j < i; j++) { cout << "*"; } cout << "\n"; } return 0; }
ALGO
0.99993
3.652906
b1969810-d345-4443-b2d5-50d42ebd4fe3
minh-tn-hust/cp-practice
diamond/diamond.cpp
#include <iostream> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <string> #include <climits> #include <algorithm> using namespace std; void solve() { int N, K; cin >> N >> K; vector<int> diamondSizes; int temp; for (int i = 0; i < N; i++) { ...
ALGO
0.999711
4.486287
f117759c-0347-4154-a429-21ba28544cb3
ousttrue/swigbullet
bullet-2.79/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp
#include "SpuContactManifoldCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btCollisionShape.h" #include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h" void...
ALGO
0.989274
6.1832
e285692d-0126-45c6-be46-8a8b57066705
J0SAL/6Companies30days
Microsoft/6.cpp
// https://practice.geeksforgeeks.org/viewSol.php?subId=8a983fc954979a34ce6e9c71ee412189&pid=701199&user=josal vector<string> maping = {"","","abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; void getCombinations(int a[], int i, int &N, string curr, vector<string> &res){ if(i==N){ res.push_back(c...
ALGO
0.999816
5.808874
da094485-7a35-4f4e-ad09-49ce87b94dc7
juni12891226/pin-code-rules-utils-juni1289
example/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.998905
6.785645
0471fc95-2939-42ea-9f0b-5571e3ea9c26
SoftRobotics/physics-toolbox
source/src/Bullet/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp
#include "btCompoundCompoundCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btCompoundShape.h" #include "BulletCollision/BroadphaseCollision/btDbvt.h" #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btAabbUtil2.h" #include "Bulle...
ALGO
0.999459
6.358808
f2a28f06-a2ef-4a0e-b845-cdc834a6a7a3
rachitvk/Competitive-Programming
Leetcode/KDifferentPairsInArray.cpp
class Solution { public: int findPairs(vector<int>& nums, int k) { unordered_set<int>s; unordered_set<int>t; for(int i=0;i<nums.size();i++){ s.insert(nums[i]); } int ans=0; if(k<0) return 0; if(k==0){ unor...
ALGO
0.999918
5.786151
fe3cd7c6-f1d8-470f-90f5-ecdbf37bd14b
rdzhao/SurfaceVectorFieldDecomposition
eigen/doc/examples/class_CwiseUnaryOp.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define a custom template unary functor template<typename Scalar> struct CwiseClampOp { CwiseClampOp(const Scalar& inf, const Scalar& sup) : m_inf(inf), m_sup(sup) {} const Scalar operator()(const Scalar& x) const { return x<m_...
ALGO
0.953733
6.417363
361506cd-2048-471b-ae0b-89ac8405b740
ishandutta2007/codeforces
boook/normal/566/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define REP(i,j,k) for(int i = j ; i < k ; ++i) #define RREP(i,j,k) for(int i = j ; i >=k ; --i) #define A first #define B second #define mp make_pair #define pb emplace_back #define PII p...
ALGO
0.999933
4.157727
1d7219c4-4519-4078-8923-a1b4a1064551
arifulmist/code_library
contest/Alice and Books.cpp
/* __ __ ____ _ ____ ___ _____ _ _ _ ___ ____ _ _ __ __ | \/ | _ \ / \ | _ \|_ _| ___| | | | | |_ _/ ___|| | / \ | \/ | | |\/| | | | | / _ \ | |_) || || |_ | | | | | | |\___ \| | / _ \ | |\/| | | | | | |_| | / ___ \| _ < | || _| | |_| | |___ |...
ALGO
0.999752
3.605724
2c010733-0503-4c11-9e7b-a93493676158
yaden09/Lagrange_9
lagrange.cpp
#include "lagrange.h" #include "ui_lagrange.h" #include <QString> #include <cmath> LaGrange::LaGrange(QWidget *parent) : QMainWindow(parent), ui(new Ui::LaGrange) { ui->setupUi(this); connect(ui->start,SIGNAL(clicked()),this,SLOT(metodo()));//connection of slot to button of method connect(u...
TOOL
0.959192
3.94817
cd434352-24ec-4eb4-a968-012b7bb1e259
poojan124/Competitive
fb_hackercup_2020/b.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll,ll> pl; #define PI 3.1415926535897932384626433832795 #define mp make_pair #define pb push_back #define F first #define S second #define lb lower_bound #define ub upper_bound #define ...
ALGO
0.999389
3.954561
05333df1-40d5-4c13-96dc-6ac167f20acb
DhruvPandey1509/Vscode-Program-Folders
Problem-Solutions/Longest_Palindrome_by_Concatenating_Two_Letter_Words.cpp
#include "bits/stdc++.h" using namespace std; class Solution { public: int longestPalindrome(vector<string> &words) { map<string, int> m; for (auto word : words) { m[word]++; } int res = 0; bool flag = false; for (auto i : m) { ...
ALGO
0.999978
5.625371
119e33fb-c54a-42d8-8abf-8ea1aa1eb660
sudipto0315/MyPrograms
C++Codes/2DArraysVectors/pascalTriangle.cpp
#include <iostream> #include <vector> using namespace std; void generatePascalsTriangle(vector<vector<int>> &triangle, int n) { for (int i = 0; i < n; i++) { triangle[i][0] = 1; // First element in each row is 1 for (int j = 1; j < i; j++) { triangle[i][j] = triangle[i - 1][...
ALGO
0.999623
6.489867
e4bb4cd8-8a66-4f4b-a609-3af29e308228
b-dmitry1/e86r
stm32/instr.cpp
#include "stdafx.h" #include "cpu.h" #include "interrupts.h" #include "memdescr.h" #include "transfer.h" #include "modrm.h" #include "alu.h" #include "stringops.h" #include "ioports.h" #include "instr_0F.h" #include "instr32_0F.h" #include "disk.h" extern void (*instrs[256])(); int repne = 0; int repe = 0; extern int...
TOOL
0.878096
3.270926
87166210-21c2-4bae-a466-9c084b401e96
arpittyagi102/leetcode-submissions
0416-partition-equal-subset-sum/0416-partition-equal-subset-sum.cpp
class Solution { public: bool canPartition(vector<int>& nums) { int totalSum = 0; for (int n: nums){ totalSum += n; } if (totalSum % 2 != 0){ return false; } int targetSum = totalSum / 2; vector<bool> dp(targetSum + 1, false); ...
ALGO
0.999808
6.188804
dbaca8f4-ea4c-4b07-9f88-ff843608f937
sanjanaarul/CSA-1430-COMPILER-DESIGN
C13.cpp
#include<stdio.h> #include<conio.h> #include<string.h> int main() { char string[50]; int flag,count=0; printf("The grammar is: S->aS, S->Sb, S->ab\n"); printf("Enter the string to be checked:\n"); gets(string); if(string[0]=='a') { flag=0; for (count=1;string[count-1]!='\0';count++) { if(string[count]=='b...
ALGO
0.997763
3.125924
771eb820-b155-4461-bd97-284fd403f05e
dmehrab06/Time_wasters
codeforces/hello19/B.cpp
#include <bits/stdc++.h> using namespace std; int angg[20]; int getangle(int curmask, int n){ int msk = 1; int ang = 0; for(int i = 0; i<n; ++i){ if(curmask&msk){ ang = ang+angg[i]; } else{ ang = ang-angg[i]; } msk = msk<<1; } cout<<ang<<"\n"; while(ang<0){ ang = ang+360; } return (ang%36...
ALGO
0.999941
3.879711
e4f77a58-c8dd-4a7c-a475-850de82c7bbe
marmest/Algotrade
parser.cpp
#include <iostream> #include <fstream> #include <string> #include <cmath> #include <vector> using namespace std; #define start_position 8 // idemo do prvog imena neke valute #define market_size 4000 #define num_of_currencies 500 struct price_pair { string name_sell; string name_buy; double price; lon...
DATA
0.980496
4.214206
93eccf68-1033-4412-9fc3-4632d3234735
MarcToussaint/rai
src/Optim/testProblems_Opt.cpp
#include "testProblems_Opt.h" #include "lagrangian.h" #include <math.h> //=========================================================================== enum BenchmarkSymbol { BS_none=0, BS_Rosenbrock, BS_Rastrigin, BS_RastriginSOS, BS_Square, BS_RandomSquared, BS_Sum, BS_RandomLP, BS_SimpleConstraine...
ALGO
0.998876
6.557855
35d6c929-bfbb-4687-9d28-e98183bb5eea
anubansal17/Coding-Career-Journey
Recursion/SubsetsInArray.cpp
// https://leetcode.com/problems/subsets/submissions/ class Solution { void solve(vector <int> ip, vector<int> op, vector<vector<int>> &ans) { // Base condition: If input becomes empty, add its output to ans if(ip.empty() == 1) { ans.push_back(op); return; } /...
ALGO
0.999973
6.659647
3fbc4f85-b1ac-482e-b778-c28b2fc4f7dd
proteus-core/libra
libra-llvm/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp
// <algorithm> // template<class ForwardIterator1, class ForwardIterator2> // constexpr bool // constexpr after C++17 // is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, // ForwardIterator2 first2); #include <algorithm> #include <cassert> #include "test_iterators.h" #include "t...
TEST
0.928042
7.504437
8637c903-71ce-4960-be24-5df6d2c90d62
darpan-gaur/Courses_IITH
CS5300/Assgn3/inbuiltMRMW_CO21BTECH11004.cpp
#include <iostream> #include <random> #include <thread> #include <chrono> #include <unistd.h> #include <atomic> using namespace std; double lambda; int capacity=1, numOps; long *threadTime; // random number generator random_device rd; mt19937 gen(rd()); // open output file FILE *outFile; // make atomic shared var...
ALGO
0.945394
5.777517
cd13045c-dcaf-4999-aec5-1543aee36965
pnnv/hyprland-dotfiles
VSCodium/User/History/54ce42a8/Typg.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n, k; cin >> n >> k; int diag ; int sum =n; if(k==0) diag = 0; else if (n >= k) diag = 1; else { for (int i = 1; i < n; i++)...
ALGO
0.99996
4.14391
79029264-c4aa-40fd-b416-8b9ec6faf00a
stampixel/ICS4U1
src/test/test.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; int mountains[n]; for (int i = 0; i < n; i++) { cin >> mountains[i]; } int asy_values[n]; for (int i = 0; i < n; i++) { vector<int> tmp; for (int j = 0; j <...
ALGO
0.999868
4.135802
50925901-6d8c-4709-bc0d-3be8532b3ee1
terror/solutions
atcoder/abc150_c.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned int uint; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int, int> ii; typedef map<int, int> MPII; typedef set<int> ...
ALGO
0.999988
3.842804
aec0fc89-074e-46fd-82f8-ca19e1cd3a24
POC-2025/leetcode
solution/2500-2599/2570.Merge Two 2D Arrays by Summing Values/Solution.cpp
class Solution { public: vector<vector<int>> mergeArrays(vector<vector<int>>& nums1, vector<vector<int>>& nums2) { int cnt[1001]{}; for (auto& x : nums1) { cnt[x[0]] += x[1]; } for (auto& x : nums2) { cnt[x[0]] += x[1]; } vector<vector<int>> an...
ALGO
0.999974
5.242338
82116ad2-4f11-4aa0-bdc9-c9df077ee450
imakshaysoni/LeetCode
0155-min-stack/0155-min-stack.cpp
class MinStack { vector<long long> st; long long mini = INT_MAX; public: MinStack() { } void push(int val) { if(st.empty()){ st.push_back(val); mini = val; } else{ if(val < mini){ st.push_back(1LL*2*val - mini); ...
ALGO
0.999949
6.123187
f769db48-8733-44bc-80ee-0bc4279f9f8e
abergmeier/jedi_academy
codemp/botlib/be_ai_gen.cpp
/***************************************************************************** * name: be_ai_gen.c * * desc: genetic selection * * $Archive: /MissionPack/code/botlib/be_ai_gen.c $ * $Author: Zaphod $ * $Revision: 3 $ * $Modtime: 11/22/00 8:50a $ * $Date: 11/22/00 8:55a $ * *******************************...
ALGO
0.999931
5.426704
cfec4aaa-790f-48aa-973b-41e78d9f9578
cp-geeks-adgitm/Hacktoberfest
Leetcode-Solutions/Greedy/Reduce Array Size to The Half.cpp
class Solution { public: int minSetSize(vector<int>& arr) { int n=arr.size(); int count=0; map<int,int> m; for(int i=0;i<n;i++) { m[arr[i]]++; } vector<int> freq; map<int,int>::iterator itr; for(itr=m.begin();itr!=m.end();itr++) ...
ALGO
0.999907
5.641913
e6dd38b8-68dd-4f08-8466-07b9194a7f69
JayTheCoder77/Striver-Dsa
ARRAYS/HARD/missingANDrepeating/better/main.cpp
vector<int> findMissingRepeatingNumbers(vector < int > a) { // Write your code here int n = a.size(); int hash[n + 1] = {0}; int rep = -1 , miss = -1; for (int i = 0; i < a.size(); i++){ hash[a[i]]++; } for(int i = 1; i < n+1 ; i++){ if(hash[i] == 2) rep = i; else if(...
ALGO
0.999251
4.581168
d57f1afd-b269-4e45-a789-1eaf109a1d61
peacefullyquietly/baekjoon_study
JEJE/N&M 1-12/N과 M (5) 15654.cpp
using namespace std; int M, N; vector<int> input; vector<int> out; bool use[10001]; void nm5() { if ((int)out.size() == M) { for (auto i : out) cout << i << ' '; cout << '\n'; return; } for (auto j : input) { if (!use[j]) { use[j] = true; ...
ALGO
0.999989
3.902991
78865370-116f-40f7-86a0-e8dd91fa9dae
Zix-Tang/casadi
docs/examples/cplusplus/chain_qp.cpp
#include <casadi/casadi.hpp> #include <string.h> /** Solve a simple QP We want to model a chain attached to two supports and hanging in between. Let us discretise it with N mass points connected by N-1 springs. Each mass i has position (yi,zi), i=1,...,N. The equilibrium point of the system minimises the po...
ALGO
0.999763
3.816134
4e711dd1-cbe4-4fa7-ab04-c44da70996d2
luszczek/paqr
paqr-gpu/src/zhegvd.cpp
/* -- MAGMA (version 2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date @author Raffaele Solca @author Azzam Haidar @author Stan Tomov @author Mark Gates @precisions normal z -> c */ #include "magma_in...
ALGO
0.999183
4.99172
e1a5d8cf-4310-4ce7-ad89-c9faf0a9162f
klikest/cnc-machining-simulation_2
include/igl/embree/unproject_in_mesh.cpp
template <typename Derivedobj> IGL_INLINE int igl::embree::unproject_in_mesh( const Eigen::Vector2f& pos, const Eigen::Matrix4f& model, const Eigen::Matrix4f& proj, const Eigen::Vector4f& viewport, const EmbreeIntersector & ei, Eigen::PlainObjectBase<Derivedobj> & obj, std::vector<igl::Hit > & hits) { u...
ALGO
0.878602
6.222244
dfd320f1-6f5d-4847-811e-28480a2cf25a
ishandutta2007/codeforces
-skyline-/normal/581/F.cpp
#include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<cerrno> #include<cfloat> #include<ciso646> #include<climits> #include<clocale> #include<complex> #include<csetjmp> #include<csignal> #include<cstdarg> #include<cstddef> #include<cstdio> #i...
ALGO
0.999132
3.703737
271d62df-a621-46a8-95e6-e01417db9881
TuringKi/llvm-project-12-wasi
clang/lib/Analysis/ThreadSafetyTIL.cpp
#include "clang/Analysis/Analyses/ThreadSafetyTIL.h" #include "clang/Basic/LLVM.h" #include "llvm/Support/Casting.h" #include <cassert> #include <cstddef> using namespace clang; using namespace threadSafety; using namespace til; StringRef til::getUnaryOpcodeString(TIL_UnaryOpcode Op) { switch (Op) { case UOP_Mi...
ALGO
0.987188
4.640091
2f999d0a-ef10-4026-9905-a406acab9bdc
TheFenrisLycaon/DSA-C--
Languages/C++/expression-tree/visitors/Evaluation_Visitor.cpp
/* -*- C++ -*- */ #ifndef _EVALUATION_VISITOR_CPP_ #define _EVALUATION_VISITOR_CPP_ #include <iostream> #include "composites/Leaf_Node.h" #include "composites/Composite_Negate_Node.h" #include "composites/Composite_Add_Node.h" #include "composites/Composite_Subtract_Node.h" #include "composites/Composite_Divide_Node....
ALGO
0.970824
6.016197
cc8fc5c4-4d9d-4fb9-b56f-07c69e67a547
am282000/Cpp_Programs
reverse.cpp
#include<iostream> using namespace std; int main(){ int n,r; cout<<"enter no"; cin>>n; while(n!=0){ r=n%10; cout<<r; n=n/10; } return 0; }
ALGO
0.999469
3.30139
4db54404-d38a-4aeb-9f03-bc97e8727c38
aa-ryan/Comp-Prog
eduround101/test.cpp
#include <iostream> #include <cmath> using std::cin; using std::cout; double power (double base, int exponent) { double result = 1; for(int i=0; i < exponent; i++) { result = result * base; } return result; } int main() { int base , exponent; cout << "YO! What's the base?"; cin >> base; cout << "What '...
ALGO
0.998022
4.000044
245f6ff6-0de3-4b7e-8565-a73ac4f80f02
Pannuba/Impiccato
main.cpp
#include <cstdlib> #include <ctime> #include "Gioco.h" #include "Parole.h" using namespace std; int main(){ srand((unsigned)time(0)); #ifdef _WIN32 /* Se siamo su Windows (_WIN32 include _WIN64) */ #define CLEAR_SCREEN system("cls") system("color a"); #elif __linux__ #define CLEAR_SCREEN system("clear")...
TOOL
0.89291
4.046004
c335519e-451f-4e74-9645-ecce861d47c6
Alokpatel88/LeetCode
2405-optimal-partition-of-string/2405-optimal-partition-of-string.cpp
class Solution { public: int partitionString(string s) { int res=1; unordered_map<char,int> temp; for(int i=0; i<s.length(); i++){ if(temp.find(s[i]) !=temp.end()){ if(temp[s[i]]>0) res++; temp.clear(); } temp[s[i]]++; ...
ALGO
0.999993
5.854303
b4717c20-fb16-4180-a644-505dea812400
TanmayBorse/DSA_CPP
DSA/mcm.cpp
#include <iostream> #include <vector> #include <limits.h> using namespace std; // Memoization table vector<vector<int>> dp; vector<vector<int>> split; int matrixChainMultiplication(const vector<int> &arr, int i, int j) { if (i == j) return 0; // If the result is already computed, return it if (dp[i...
ALGO
0.999989
5.232986
03abf361-979e-416b-9215-07ee87c27476
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_7728_2.cpp
#include <bits/stdc++.h> using namespace std; clock_t time_p = clock(); void Time() { time_p = clock() - time_p; cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n"; } const int INF = 1e9; const long long INF64 = 9e18; const long long mod = 998244353; int modo(long long n) { return (n % mod); } void...
ALGO
0.999674
4.509192
6566ef5f-fe2d-4b4d-8afe-4cf36fd8b643
Utkarsh-Arora-007/GFG-Self-Paced-Course
Gfg DSA Self Paced Course/Dequeue/5. Maximums of all subarrays of size k.cpp
#include<bits/stdc++.h> using namespace std; void printMax(int arr[], int n, int k) { deque<int> dq; for(int i=0; i<k; i++) { while(!dq.empty() && arr[i] >= arr[dq.back()]) { dq.pop_back(); } dq.push_back(i); } for(int i=k; i<n; i++) { cout...
ALGO
0.999981
4.026812
c7b44751-5eb9-48d3-afdd-737336f46120
taicr/SOURCE-CODE
Quy hoach dong/conech.cpp
#include<bits/stdc++.h> using namespace std; #define run() ios_base :: sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define ll long long int ech(int i){ int f[52]; f[1]=1; f[2]=2; f[3]=4; for(int i=4;i<=50;i++){ f[i]=f[i-1]+f[i-2]+f[i-3]; } return f[i]; } int main(){ ...
ALGO
0.999964
4.368797
af643e33-efa4-4806-ab4d-afb57d19801f
jainDivyansh0211/CP_prac
Codeforces/981 div 3/template.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long void solve(){ int n; cin>>n; int arr[n][n]; int negs=0; for(int i=0;i<n;i++){ for(int j=0;j<n;j++) { cin>>arr[i][j]; if(arr[i][j]<0) negs+=1; } } int cost=0; if...
ALGO
0.999863
4.602327
c8d3b263-4211-4b14-b592-675af6156789
SwordHarry/LeetCode
考研机试/中科大/1-连续数字数.cpp
/** * 给定一个正整数 N,试求有多少组连续正整数满足所有数字之和为 N? 示例 1: 输入: 5 输出: 2 解释: 5 = 5 = 2 + 3,共有两组连续整数([5],[2,3])求和后为 5。 示例 2: 输入: 9 输出: 3 解释: 9 = 9 = 4 + 5 = 2 + 3 + 4 示例 3: 输入: 15 输出: 4 解释: 15 = 15 = 8 + 7 = 4 + 5 + 6 = 1 + 2 + 3 + 4 + 5 说明: 1 <= N <= 10 ^ 9 */ // 滑动窗口 超时 #include <iostream> using namespace std; int main() { ...
ALGO
0.999982
4.554552
c1cdc251-41ea-4b52-a564-d7b3112f8c49
ishandutta2007/codeforces
neko_nyaaaaaaaaaaaaaaaaa/normal/1205/B.cpp
#include <bits/stdc++.h> using namespace std; vector<int> adj[120]; int solve(vector<pair<int, int>> edges, int x, int y, int n) { for (int i = 0; i < n; i++) { adj[i].clear(); } for (auto [i, j]: edges) { if (i == x && j == y) continue; adj[i].push_back(j); adj[j].push_ba...
ALGO
0.999969
4.024352
90844ce4-39bb-4dd9-88c8-b9e42803bf6d
pankajzxcc/Audio-Player
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.99887
6.783439
ab92313c-7211-4be8-b3b7-7bc3052e2364
CherryGS/ACM
others/大一下/周赛-/周赛/j.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <bitset> #include <cstring> using namespace std; #define ll long long #define ull unsigned long long #define cint const int& #define Pi acos(-1) const int mod = 998244353; const int inf_int = 0x7fffffff; const ll inf_ll = 0x7ffffffff...
ALGO
0.999936
3.75303
44401719-023e-40ba-90e6-2a290244e70a
saurabh-kud/DSA
CollegeDsa/linkedList/linkedList.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int data; node *next; node *revTemp; node(int value){ data = value; next=NULL; revTemp = NULL; } }; class linkedList { private: /* data */ node *head; node *tail; int nodeCount; // fu...
ALGO
0.999446
4.652787
b0116f7c-2fe9-44f1-ab80-c03b85ad2fef
Sammyowei/example3
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.99887
6.783439
9c79f5dd-a238-49b2-899b-a24ce333a534
Juanfigueroa29/C-
equipoOK.cpp
//Un equipo de baloncesto que va a participar en la prxima temporada, necesita un programa que le permita realizar las estadsticas de todos sus jugadores, // partido a partido hasta donde puedan avanzar dentro del campeonato, por cada partido jugado se tendr //el nmero que identifica al jugador y la cantidad de puntos...
TOOL
0.868516
3.746721
ca368c0c-285a-425c-b60b-f0193e280f78
HarshitVijayKumar/CodeDatabase
DesignAndAnalysisOfAlgorithms/Fractional_Knapsack.cpp
#include <iostream> using namespace std; int main(){ int n,m,i,j,max,t,flag; int profit=0; cout<<"Enter the number of items : "; cin>>n; int p[n],w[n],order[n]; double v[n]; for (i=0;i<n;i++){ cout<<"Enter the profit : "; cin>>p[i]; cout<<"Enter the weight : "; ...
ALGO
0.999989
3.559318
3f9ae71d-57fa-4155-866e-1f822b4b7a82
VeloxChem/VeloxChem
src/t2c_nuclear_potential/NuclearPotentialPrimRecDF.cpp
#include "NuclearPotentialPrimRecDF.hpp" namespace npotrec { // npotrec namespace auto comp_prim_nuclear_potential_df(CSimdArray<double>& pbuffer, const size_t idx_npot_0_df, const size_t idx_npot_0_sf, ...
ALGO
0.992232
5.014148
8f0775b7-53a4-4ad4-87e4-a97221cfff62
AnsonHooL/Coding_Note
leetcode/【!!贪心】135.分发糖果.cpp
// // Created by lenovo on 2020/12/24. // /*** * 老师想给孩子们分发糖果,有 N 个孩子站成了一条直线,老师会根据每个孩子的表现,预先给他们评分。 你需要按照以下要求,帮助老师给这些孩子分发糖果: 每个孩子至少分配到 1 个糖果。 相邻的孩子中,评分高的孩子必须获得更多的糖果。 那么这样下来,老师至少需要准备多少颗糖果呢? 示例 1: 输入: [1,0,2] 输出: 5 解释: 你可以分别给这三个孩子分发 2、1、2 颗糖果。 示例 2: 输入: [1,2,2] 输出: 4 解释: 你可以分别给这三个孩子分发 1、2、1 颗糖果。 第三个孩子只得到 1 颗糖果,这...
ALGO
0.999997
6.272203
23014d84-3cb8-4859-aa8d-2cb47404fceb
Alaxe/noi2-ranking
2017/solutions/B/TOT-Gabrovo/corridor.cpp
#include<cstdio> #include<vector> #include<algorithm> using namespace std; int w,h,n,m=1,maxZ[100005]; pair<int,int> in[100005],a[100005]; vector<int> f,v; long long ans=0; struct line { int y1,y2,x; }; vector<line> q; bool cmp (line o, line c) { return o.x>c.x; } int main() { //cin>>w>>h>>n; scanf("%d%...
ALGO
0.999838
3.792909
aca8117b-f876-4bb3-aabc-f340e393c81a
AhmedTheMagnificent/Leetcode-Problems
23-merge-k-sorted-lists/merge-k-sorted-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: struct Compare { ...
ALGO
0.999923
6.066298
906263d7-7245-482b-af33-9bd27a2d359a
yzzupgo/MFTCG
Data/abc206_a/rtanA/wa/23572116.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; n *= 1.08; if(n < 206) { cout << "Yay!" << endl; } if(n == 206) { cout << "so-so" << endl; } else { cout << ":(" << endl; } return 0; }
ALGO
0.982782
3.603051
e4425ce8-dd2c-490b-b3ff-c3227733dac2
PaulTheLionHeart/manpwin
parser/QDTrigFn.cpp
////////////////////////////////////////////////////////////////////// // // QDTrigFn.cpp: Function list. Quad-double version // ////////////////////////////////////////////////////////////////////// #pragma once #include <Windows.h> #include <time.h> #include "complex.h" #include "TrigFn.h" void CTrigFn::QDHComplexT...
ALGO
0.901304
4.008155
273c2cc3-cd52-4c7d-a38e-ea5f70a33b3b
jakeheke75/30DaysOfCode
26NestedLogic.cpp
#include <cstdio> #include <iostream> using namespace std; int main() { string inputLine; int dd, mm, yyyy, dates[6]{0}, fine{0}; scanf("%d %d %d", &dd, &mm, &yyyy); dates[0] = dd; dates[1] = mm; dates[2] = yyyy; scanf("%d %d %d", &dd, &mm, &yyyy); dates[3] = dd; dates[4] = mm; ...
ALGO
0.999285
3.978748
3a2a7b69-fb31-4178-b3e6-c23be43eeb3f
ishandutta2007/codeforces
demoralizer/normal/1671/E.cpp
#include "bits/stdc++.h" using namespace std; #define int long long #define pb push_back #define ppb pop_back #define pf push_front #define ppf pop_front #define all(x) (x).begin(),(x).end() #define uniq(v) (v).erase(unique(all...
ALGO
0.999991
4.559548
9a9da0a6-d251-45ec-a0f6-87532ebac8c3
iains/llvm-project-old
libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp
// <forward_list> // void sort(); #include <forward_list> #include <iterator> #include <algorithm> #include <vector> #include <cassert> #include "min_allocator.h" template <class C> void test(int N) { typedef typename C::value_type T; typedef std::vector<T> V; V v; for (int i = 0; i < N; ++i) ...
TEST
0.877401
5.620383
54b5c46c-a8b7-4f0a-a493-6f42f68bd460
bsf2000650/DSA
Lecture_50_is_Linked_List_Palindrome_or_not/isLLPalindrome.cpp
#include<iostream> #include<vector> using namespace std; class Node{ public: int data; Node* next; Node(int d){ this->data = d; this->next = NULL; } }; // bool checkPalindrome(vector<int> arr){ // int s = 0; // int e = arr.size()-1; // while (s...
ALGO
0.99952
5.06114
0a1a24e3-643c-47f6-863c-c1b824f86575
JeromeLee-ljl/leetcode
051~100/_079_word_search.cpp
// Given a 2D board and a word, find if the word exists in the grid. // The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells // are those horizontally or vertically neighboring. The same letter cell may not be used more than // once. // Example: // board = // [ // ['A','B','...
ALGO
0.997809
5.973813
418d4a91-d359-4aea-bbe9-19ed7af378c3
CroxxN/algorithms
leetcode/removeelement.cpp
#include <algorithm> #include <functional> #include <vector> using namespace std; bool des(int a, int b) { if (b > a) return true; else return false; } class Solution { public: int removeElement(vector<int> &nums, int val) { int k = 0; int len = nums.size(); for (int i = 0; i < nums.size(); ...
ALGO
0.999912
5.828451
85bbec1d-452c-4b34-b1c4-656a05508e7a
MannJain1609/Leetcode-Problems
138-copy-list-with-random-pointer/138-copy-list-with-random-pointer.cpp
/* // Definition for a Node. class Node { public: int val; Node* next; Node* random; Node(int _val) { val = _val; next = NULL; random = NULL; } }; */ class Solution { public: Node* copyRandomList(Node* head) { Node* copyList = NULL; Node* te...
ALGO
0.998919
5.281526
64ec4b29-93a7-4eae-9acf-74775da5bde1
Project-3T/frameworks_av
media/libstagefright/codecs/m4v_h263/dec/src/datapart_decode.cpp
#include "mp4dec_lib.h" #include "vlc_decode.h" #include "bitstream.h" #include "scaling.h" #include "mbtype_mode.h" #include "idct.h" #define OSCL_DISABLE_WARNING_CONDITIONAL_IS_CONSTANT /* ======================================================================== */ /* Function : DecodeFrameDataPartMode() ...
ALGO
0.93791
5.383424
a8d5b9e1-e9cd-4259-9e5d-04243632d8c2
AdamOron/CSGOInternal
CSGOInternal/src/features/Aimbot.cpp
#include "Aimbot.h" #include "../hooks/Interfaces.h" #include "../sdk/modules/ClientModule.h" #include "../sdk/IClientEntityList.h" #include "../sdk/IClientEntity.h" #include "../sdk/math/Vector.h" #include "../sdk/math/QAngle.h" #include "../sdk/math/matrix3x4_t.h" #include "../sdk/CUserCmd.h" #include "../sdk/CGlobal...
TOOL
0.882651
4.077588
b81c8e26-a872-4937-8149-1de815d7ac84
Soumyadip3007/OOPs
C++_Practice/Quick Sort.cpp
#include<bits/stdc++.h> using namespace std; int partition(vector<int>&arr, int low, int high) { int pivot=arr[high]; int i=low-1; for(int j=low;j<high;j++) { if(arr[j]<pivot) { i++; swap(arr[i],arr[j]); } } swap(arr[i+1],arr[high]); return i+...
ALGO
0.999984
5.538934
d9ae1526-a817-4858-9dd0-c223cc9c7db5
omarjilanijidan/Beecrowd-code-solution-by-JIDAN
BEE 3358.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t ,i; cin>>t; while(t--) { int count=0; string s; cin>>s; string m=s; transform(s.begin(),s.end(),s.begin(),::tolower); for(int i=0;i<s.size();i++) { if(s[i]!='a' && s[i]!='e...
ALGO
0.999231
4.171509
faacc790-3618-4203-8a3b-be179691d00e
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_7966_2.cpp
#include <bits/stdc++.h> using namespace std; long long int modulo = 1e9 + 7; long long int eleva(long long int b, long long int e) { if (e == 0) return 1; if (e % 2 == 0) return eleva(b * b % modulo, e / 2); return b * eleva(b * b % modulo, e / 2) % modulo; } long long int inverso(long long int x) { return eleva...
ALGO
0.999995
4.967547
1ef2396e-0387-4f1c-94b8-19876313d7d3
Abdelmagidawad/ProblemSolving-AssiutSheets
Sheet 3 (Arrays)/Q. Count Subarrays.cpp
#include<iostream> #include <algorithm> #include<string> #include<cmath> #include<iomanip> #include<cstdlib> #include<stdio.h> using namespace std; int arr[1000]; int main() { int t; cin >> t; while (t--) { int n; cin >> n; arr[n]; int y = 0; for (int i=0; i < n; i++...
ALGO
0.999184
3.334475
e5bec9ea-0d91-4816-92e3-f581a9b7826f
pedroarthurob/CompetitiveProgramming
uporto/semana04/spoj-MSE06H.cpp
/* * Nome do arquivo: spoj-MSE06H.cpp * Autor: Pedro Arthur de Oliveira Barreto * Data de criação: 26/11/2024 * Descrição: * Plataforma: * Solução: */ #include <bits/stdc++.h> using namespace std; #define fast_io ios_base::sync_with_stdio(false); cin.tie(nullptr); #define endl '\n' // Definições úteis par...
ALGO
0.999231
5.028577
6552b737-6101-4de4-acf8-f55280f9a159
kudryashovda/Stroustrup-book-my-answers
ch8/ch8_ex11.cpp
#include<iostream> #include<vector> using namespace std; int maxv(const vector<int>& v) { int max = v[0]; for(auto it: v) if (it > max) max = it; return max; } int main() { vector<int> v = {3,5,4,2,6,8,3,5,3,6,8}; cout << "max = " << maxv(v); }
ALGO
0.998952
5.041337
19e17958-9884-4851-82fc-0da95b6db4e1
vishwajeetanand21/Leet-code
Rotate by 90 degree - GFG/rotate-by-90-degree.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; void rotate (vector<vector<int> >& matrix); // } Driver Code Ends //User function template for C++ /* matrix : given input matrix, you are require to change it in place without using extra space */ void reverseArr(vector...
ALGO
0.999861
5.840427
fb4f066d-9a54-4176-8df8-84bdfc500e30
park-com/SumCoin
src/qt/guiutil.cpp
#include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QString> #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #include ...
TOOL
0.923067
6.919883
7f40c9da-0aec-46bc-bd5b-2d08b2276a52
JinLn/MF-SLAM
Thirdparty/g2o/g2o/types/types_six_dof_expmap.cpp
#include "types_six_dof_expmap.h" #include "../core/factory.h" #include "../stuff/macros.h" namespace g2o { using namespace std; Vector2d project2d(const Vector3d& v) { Vector2d res; res(0) = v(0)/v(2); res(1) = v(1)/v(2); return res; } Vector3d unproject2d(const Vector2d& v) { Vector3d res; res(0) =...
ALGO
0.966405
5.55332
51069079-0ab3-48a6-abfa-f7160ed37606
dkumarjha999/cpp-programming
recursion_array_sum.cpp
#include <bits/stdc++.h> using namespace std; int sum(int input[], int n) { /* Don't write main(). Don't read input, it is passed as function argument. Return output and don't print it. Taking input and printing output is handled automatically. */ if(n==0) { return 0; } ...
ALGO
0.999741
4.418478
ae75948a-685d-486d-b847-2641f51e8797
Marxan-source-code/marxan
iterative_improvement.cpp
// C++ code for Marxan // version 2.3 introduced multiple connectivity files and their associated weighting file // version 2.4.3 introduced 1D and 2D probability // version 3.0.0 is refactoring of code in 2019 #include <algorithm> #include <chrono> #include <ctime> #include <cfloat> #include <iostream> #include <omp....
ALGO
0.999904
5.162502
af510c2e-7c82-4db5-9e08-7a6f3e280578
Chandu-Thanuku/DSA-cpp
Arrays/Swapping MIN & Max/swapping.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter size of array; "; cin>>n; int a[n]; int min,max; cout<<"Enter Elements of Array: \n"; for(int i=0;i<n;i++){ cin>>a[i]; } min=a[0]; max=a[0]; int x=0,y=0; for(int i=0;i<n;i++){ if(a[i]>max){max...
ALGO
0.999854
3.621731
4bc9238c-691a-4b2c-84f4-da2f40ad5f86
omnirom-mt6589/android_build
tools/atree/files.cpp
#include "files.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <sys/stat.h> #include <unistd.h> #include <dirent.h> #include <fnmatch.h> #include <string.h> #include <stdlib.h> static bool is_comment_line(const char* p) { while (*p && isspace(*p)) { p++; } ...
TOOL
0.950288
5.911925
5757c6c7-d128-4a30-8954-0f5b4e6cace0
infinte-rishi37/AIT285
DSA_SEIT/Assignment4.cpp
#include <bits/stdc++.h> using namespace std; struct node{ char data; node *left, *right; node(char val){ data = val; left = right = NULL; } }; class ExpTree{ public: node *root; stack<node*> st; ExpTree(){ root = NULL; } void createPostfix(string s){ ...
ALGO
0.999836
5.479279
8be934f8-1f73-4d83-bc5f-32abca6471dd
Yogesh9389/Data-Structure
Other Questions C++/xyz.cpp
// First Repating Element -- Amazon , Oracle // #include<iostream> #include<climits> using namespace std; int main() { int n,i; cin>> n; int a[n]; for(i=0; i<n; i++) { cin>>a[i]; } int minidx = INT_MAX; int N = 1000; int idx[N]; for(i=0; i<N; i++) { idx[i] = -1; } for(i=0;i<n; i++) { if(idx[a[i]...
ALGO
0.999966
3.712827
329e4ef9-0efa-4557-9b9a-d4e90d1a42c8
colorbox/leetcode
695/step2_3.cpp
/* Time : O() Space : O(N * M) ラムダを用いてstackへの要素追加部分のロジックを修正したものt */ class Solution { public: int maxAreaOfIsland(vector<vector<int>>& grid) { const int row_count = grid.size(); const int col_count = grid.front().size(); auto visited = vector<vector<char>>(row_count, vector<char>(col_count, '0')); in...
ALGO
0.999548
6.776876
fcb82b1c-76eb-4b60-ae43-2361e90bff18
dubeyayushi/Competitive-Programming
LeetCode Daily Questions/03_March/21-Mar_LC-206.cpp
// https://leetcode.com/problems/reverse-linked-list/description/?envType=daily-question&envId=2024-02-23 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(...
ALGO
0.999633
5.812858
d1f531e3-f355-4b32-9be2-40e733f68918
Feodor2/Mypal68
gfx/angle/checkout/src/common/mathutil.cpp
// mathutil.cpp: Math and bit manipulation functions. #include "common/mathutil.h" #include <math.h> #include <algorithm> namespace gl { namespace { struct RGB9E5Data { unsigned int R : 9; unsigned int G : 9; unsigned int B : 9; unsigned int E : 5; }; // B is the exponent bias (15) constexpr int g...
TOOL
0.952408
7.607607
ff3f548b-757e-413f-90a5-bb24c00ed916
Damla-cakci/Flight_Management_Systems
flight management system/main.cpp
#include <iostream> #include <algorithm> #include "flight.h" #include "employee.h" #include "personalinfo.h" #include "dijkstra.h" #include "customer.h" using namespace std; int main() { int choice; cargo myCargo; do { cout << "Menu:" << endl; cout << "1. Display all flights" << endl; ...
TOOL
0.914225
3.817471
0e384e64-da1d-4bbe-b6c8-2d66e2f86cba
ajrusso/Geek4Geek
RemoveKDigits/removeKDigits.cpp
/* Remove K Digits Given a non-negative integer S represented as a string, remove K digits from the number so that the new number is the smallest possible. Note : The given num does not contain any leading zero. Example 1: Input: S = "149811", K = 3 Output: 111 Explanation: Remove the three digits 4, 9, and 8 to ...
ALGO
0.999937
6.558856
01c0c658-24ec-40d9-887b-05e46803d15b
nishikantparmariam/Solutions-to-Coding-Problems
12CODE432.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); ll T;cin>>T; while(T--){ string S;cin>>S; ll N = S.size(); vector<ll> arr(N, 0); for(ll i=0;i<N;i++){ arr[i] = (ll)(S[i]-'a');...
ALGO
0.999882
4.405392
40337461-fc1c-4763-be6a-ccc1acc0b474
mjwybrow/dunnart
libogdf/src/upward/LayerBasedUPRLayout.cpp
#include <ogdf/upward/LayerBasedUPRLayout.h> #include <ogdf/basic/simple_graph_alg.h> #include <ogdf/basic/Queue.h> #include <ogdf/basic/Stack.h> namespace ogdf { OrderComparer::OrderComparer(const ogdf::UpwardPlanRep &_UPR, Hierarchy &_H) : UPR(_UPR), H(_H) { dfsNum.init(UPR, -1); crossed.init(UPR, false); //c...
ALGO
0.999882
5.601774