uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e8ba876e-e791-43e0-b1e5-e67bc4b0cc65
sudesh-p/Sem4_SPPU
Adv. Data Structures Lab/Group A/A1.cpp
/* A book consists of chapters, chapters consist of sections and sections consist of subsections. Construct a tree and print the nodes. */ #include<iostream> #include<stdio.h> #include<queue> using namespace std; class Tree { typedef struct node { char data[15]; struct node *left; struct node * right; ...
ALGO
0.999362
3.910907
fcd88832-88fa-45c6-a7b6-3c5b69079afb
glovvzz/-5130203-40001-Maltsev-Dmitry-
week.01/2.2.cpp
#include <iostream> #include <cmath> using namespace std; int main(){ double H,V,alh,tru=0,T,x,y,t=-1; const float g=9.8; do{ cout<< "ENTER H:\t"; cin>>H; cout<< "ENTER V:\t"; cin>>V; cout<< "ENTER alh:\t"; cin>>alh; if (V>=0 && H>=0 && (pow(V...
ALGO
0.999043
3.357644
357b2e2a-c1f5-4d7f-b31d-604583822737
sarafarajnasardi/cp
A_Ideal_Generator.cpp
// Author : Sarafaraj Nasardi #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <complex> #include <queue> #include <set> #include <unordered_set> #include <list> #include <chrono> #include <r...
ALGO
0.999731
5.305742
f73cde70-a489-4f10-8482-64d3469245b1
md-qubais/Data_Structures_Algorithms_and_Competitive_Programming
live_class_rat_chases_it_cheeze_recursion.cpp
#include<bits/stdc++.h> #define IOS ios_base::sync_with_stdio(false); cin.tie(NULL) #define int long long #define endl "\n" #define qubais_judge freopen("input.txt","r",stdin); freopen("output.txt","w",stdout) using namespace std; //in this case we are starting from the destination int ratWays(int n,int m){ if(n==0 a...
ALGO
0.999992
4.546053
aafcaad5-40e5-4935-baf5-f966e76fd7fa
behnejad/Online-Judge-Solutions
Timus Online Judge/1582 - Bookmakers.cpp
#include <cstdio> #include <cmath> using namespace std; int main(){ double k1,k2,k3; scanf("%lf %lf %lf",&k1,&k2,&k3); printf("%.0f\n",1000*k1*k2*k3 / (k1*k2 + k2*k3 + k3*k1)); return 0; }
ALGO
0.998979
3.731311
3d353431-8694-41b2-8664-f0c358e05928
sunfanyunn/acm
Esc/拆分數量數列.cpp
#include <iostream> #include<stdio.h> using namespace std; int main() { const int len = 7; int num[len + 1] = { 1 }; for (int i = 1; i <= len; ++i) for (int j = i; j <= len; ++j){ num[j] += num[j - i]; //printf("num[%d]+=num[%d]\n",j,j-i); } for (int i = 0; i <= len; i++) cout << "p(" <<i <...
ALGO
0.999675
3.30329
84d93135-2ea7-463b-979a-b0cf67be4cd4
ymishut/hydr__free_convection
src/galerk_method.cpp
#include "galerk_method.h" #include "maindatastorage.h" #include "some_math.h" #include "wide_output.h" #include <boost/bind.hpp> #include <algorithm> #define imaginaryOne std::complex<double>(0.0, 1.0) extern bool WIDE_OUTPUT; namespace conv_flow { //================================ // galerkMethod ctor //======...
ALGO
0.999856
6.143503
dbeca308-301d-46fe-99b2-aed13a2e6f85
CPSC223/TreeProject
linked_list.cpp
/* Name: Group 13 Class: CPSC223, Fall 2024 Date: September 8, 2024 Programming Assignment: Project 1 Description: This is the function implementation file that houses the definitions for all functions */ #include "linked_list.hpp" #include <iostream> #include <string> #include <sstream> #include <fstream> #include <v...
TOOL
0.889085
5.352345
c198395d-5bb2-4335-86ee-0ba995236778
Bhumika-Sethi/DSA-Leetcode
1056-capacity-to-ship-packages-within-d-days/1056-capacity-to-ship-packages-within-d-days.cpp
#include<bits/stdc++.h> class Solution { public: bool weightForNoOfDaysCalculator(vector<int>& weights, int capacityOfShip, int days){ int weightTotal = 0; int day = 1; for(int i = 0; i<weights.size(); i++){ weightTotal += weights[i]; if(weightTotal>capacityOfShip){ ...
ALGO
0.999996
5.430895
223138fa-0399-4fe0-8cbc-ce66bfb90b5f
yoshall/stMTMVL
reference code/MTL Code/MALSAR/MALSAR/MALSAR/c_files/calibration/segSubg_loss.cpp
/* ---------------------------------------------------------- */ /* mexFunction: segSubg_loss */ /* */ /* compute subgradient (without X') for each provided segment */ /* ...
ALGO
0.999915
5.733581
e1d368a8-7433-438f-a4c5-cbb857056e9b
dmelo/uspds
src/strategy_pf2/futbot.cpp
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <ctype.h> #include <time.h> #include <stdarg.h> #include <math.h> #include "futbot.h" #define DEF_ACT_FUNC (ActFuncPtr)ACT_Logistic #define DEF_OUT_FUNC (OutFuncPtr)OUT_IDENTITY /* Unit-Flags */ #define UFLAG_INITIALIZED 0x00...
ALGO
0.995791
4.299617
d6031fe9-1e0e-427a-b2bd-9fa77c0799aa
12kr34is56/shoe_app_ui
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.998809
6.763549
314d87e3-16ba-4a1d-a4e5-10f07adda9fd
sangyong-99/algorithm_study
algorithm_study/programmers/Level_2/주식가격.cpp
// // 주식가격.cpp // algorithm_study // // Created by 신상용 on 9/24/24. // #include <bits/stdc++.h> using namespace std; vector<int> solution(vector<int> prices) { vector<int> answer(prices.size()); stack<int> st; for(int i = 0; i < prices.size(); i++) { while(!st.empty()) { int te...
ALGO
0.999803
5.521743
2ee7badc-2cf7-4fd5-8021-e6180af140db
shivammahajancse/IMP-Interview_Questions
Linked List/Intersection_of_linked_list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { ListNode* start1=headA,*start2=headB; int count=0;...
ALGO
0.999938
5.275854
858f2e09-fbce-402d-8dda-44215bd7e9f2
zabi8/SnipToText
tesseract/src/ccstruct/otsuthr.cpp
#include "otsuthr.h" #include <allheaders.h> #include <cstring> #include "helpers.h" #if defined(USE_OPENCL) # include "openclwrapper.h" // for OpenclDevice #endif namespace tesseract { // Computes the Otsu threshold(s) for the given image rectangle, making one // for each channel. Each channel is always one byte p...
ALGO
0.999126
7.49029
a105fe6a-0817-42b9-921e-df4b28d00e70
xxpcb/PnP-Camera
ConsoleApplication1/eigen/doc/examples/TutorialLinAlgExComputeSolveError.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { MatrixXd A = MatrixXd::Random(100,100); MatrixXd b = MatrixXd::Random(100,50); MatrixXd x = A.fullPivLu().solve(b); double relative_error = (A*x - b).norm() / b.norm(); // norm() is L2 norm cout << "The ...
ALGO
0.999794
3.625966
ead15080-3a25-405e-aa87-baa81063408c
Kaminyou/MyLeetcode
cpp_solutions/364.cpp
/** * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate about its implementation * class NestedInteger { * public: * // Constructor initializes an empty nested list. * NestedInteger(); * * // Constructor initializes a single integer. * ...
ALGO
0.999726
6.090647
90ad3a68-4342-4f7d-82cc-3f5cea2b01b4
doviethung11192023/code_c_pluss_pluss_2
interchange smallest.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<pair<int,int>>v(n); for(int i=0;i<n;i++){ int x; cin>>x; v[i].first=x; v[i].second=i; } sort(v.begin(),v.end()); int ans=0; for(int i=0;i<n;i++){ if(v[i].second!=i){ swap(v[i].first,v[v[i].second].firs...
ALGO
0.999891
3.830134
6dd1f965-62b0-43ca-abea-30963fc83121
ZYLZhuPP/OI
YBTOJ/762_8.cpp
#include<bits/stdc++.h> using namespace std; #define rFor(i, r, l) for (int i = (r); i >= (l); --i) #define For(i, l, r) for (int i = (l); i <= (r); ++i) const int N = 2e5 + 5, inf = 1e9; struct IO { char c; int f; #define gc() getchar() template<class C> inline IO& operator >> (C &x) { x = 0; f =...
ALGO
0.999727
3.966913
3cfa1e0f-4c10-4e99-a86c-894c6e6573cc
ved015/Codeforces-solution
round988/d.cpp
// #include<bits/stdc++.h> #include<iostream> #include<vector> #include<algorithm> #include<map> #include<set> #include<string> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<string> vs; typedef vector<long long> vll; typedef vector<vector<ll> > vvll; #def...
ALGO
0.999843
3.557496
d7bed8b6-1e42-445a-b529-f01571966e9e
greenbeanpie/OI-training
NOIP2023-ZJ/ZJ-0188/run/run.cpp
#include<bits/stdc++.h> using namespace std; const int maxn=100005; long long C,T,n,m,K,d; long long Ans; //long long f[2][5005][5005]; bool vis[maxn]; struct yxy{ long long x,y,z; bool operator<(const yxy b)const{return x<b.x;} }a[maxn]; long long read(){ long long ret=0,f=1;char ch=getchar(); while(!isdigit(ch)){...
ALGO
0.999697
4.339303
f40637ea-46a9-44b3-9a1c-c46c2ef11fd7
ishandutta2007/codeforces
toxel/normal/703/D.cpp
#include<bits/stdc++.h> #define lowbit(x) ((x) & (-x)) const int N = 1000010; int c[N], a[N], ans[N], pre[N]; std::map <int, int> last; std::pair <std::pair <int, int>, int> p[N]; int n, m; void add(int sit, int value){ for ( ; sit < N; sit += lowbit(sit)){ c[sit] ^= value; } } int query(int sit){ int ret = 0;...
ALGO
0.999988
4.559708
7cb655dd-3e03-4245-94b3-d9c8d4be830e
ashishc534/HackerRank_Questions
String Construction.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; while(n--) { int c=0; int arr[26]={0}; string s; cin>>s; for(int i=0;i<s.size();i++) arr[s[i]-'a']++; for(int i=0;i<26;i++) if(arr[i]) c++; cout<<c; } }
ALGO
0.999777
3.954629
ae7c001c-4344-4c9c-a542-4ddc65cf8ffc
ShivamDhamija/leetcodeQuestions
1171-remove-zero-sum-consecutive-nodes-from-linked-list/1171-remove-zero-sum-consecutive-nodes-from-linked-list.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: ListNode* removeZeroS...
ALGO
0.999783
5.776196
213239b2-57f7-4024-8eb4-b2bafe197377
TonyStark-sudo/LeetCode
hashtable/18_fourSum.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { vector<vector<int>> result; sort(nums.begin(), nums.end()); for (int i = 0; i < nums.size(); ++i) { if (i > 0 &...
ALGO
0.999985
5.628939
a0291f8d-a177-4134-a555-7e6e81257c5b
nayana-a11y/C2512
Phase01/prog_.cpp
/* Title: Railway Ticket Booking Management System The fields are: 1. Booking ID -> bookingId[] 2. Ticket Amount -> ticketAmounts[] 3. Food Amount -> foodAmount[] Implement a counter to tract the number of customer booking Max array size: 1000 Operations required(menu-driven): ...
TOOL
0.977199
6.933169
fe04d696-3055-4073-8917-521f8a8a9a81
WilliamX1/leetcode
Solutions/Minimize-Result-by-Adding-Parentheses-to-Expression.cpp
class Solution { public: string minimizeResult(string expression) { int plus_idx = expression.find('+'), ans = 0x7fffffff; string res; for (int i = 0; i < plus_idx; i++) { for (int j = plus_idx + 1; j < expression.length(); j++) { int pre...
ALGO
0.999957
5.136828
2d5419ca-2a44-4830-9aea-8ebe7df9e2b4
saojiprasad/CP
Code Forces/String/800 musical .cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; string s; cin>>s; unordered_map<string,int>m; for(int i=1;i<n;i++){ string str=""; for(int j=i-1;j<=i;j++){ ...
ALGO
0.999823
4.030479
5be1d3c4-0f28-4ddc-84e0-dbd41a5c6f74
PotentialKillScreen/Problem-Solving
primeSieve.cpp
//Author: Axel Ahlqvist //Problem: Prime Sieve //Finding all primes up to a given integer //Algorithm: Sieve of Eratosthenes //Time complexity: O(NloglogN) //Memory complexity: O(N) #include<bits/stdc++.h> using namespace std; class PrimeGenerator{ //class which takes an integer as input and finds every prime up ...
ALGO
0.999769
4.172282
534dcd8d-ac07-451a-97d0-2c45b6541e6d
shahbazkarimi123/DSA
Queues_Array.cpp
#include<iostream> #define n 20 using namespace std; class queue { int *arr; int front; int back; public: queue() { arr=new int[n]; front=-1; back=-1; } ~queue() { delete []arr; } void push(int x) ...
ALGO
0.987643
3.817148
bee99a8e-fd4a-48c8-aba5-69300bb9047a
mrcchef/CP
Contest/code_chef/Long/long_june_2020.cpp/tuple.cpp
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <climits> #include <math.h> #include <string> #include <bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define pb push_back #define mp make_pair #define mii map<ll,ll> #define pii pair<ll,...
ALGO
0.999935
4.32027
648b31bd-c3b4-4a0a-a066-d53a955fd370
codetiger/Iyan3d
Iyan3dEngineFiles/bullet3/src/BulletCollision/Gimpact/gim_contact.cpp
#include "gim_contact.h" #define MAX_COINCIDENT 8 void gim_contact_array::merge_contacts( const gim_contact_array & contacts, bool normal_contact_average) { clear(); if(contacts.size()==1) { push_back(contacts.back()); return; } gim_array<GIM_RSORT_TOKEN> keycontacts(contacts.size()); keycontacts.resize(...
ALGO
0.989833
4.553871
0e8aac1c-0b79-4d34-81d9-1136f06afcc6
davimesmo/Projetos
PDS2/vpl4/list.cpp
#include "list.hpp" #include <iostream> void List::insertNode(int data) { Node* aux = new Node; aux->data = data; aux->next = nullptr; if (head == nullptr) { head = aux; tail = aux; } else { tail->next = aux; tail = aux; } } void List::display() { Node* aux...
ALGO
0.898188
5.061695
4dfbb3a5-de43-4a68-8b47-44a864503e09
mashhhinka/linux
Homework2/main.cpp
// main.cpp #include <iostream> #include "ComplexNumber.h" #include "sort_complex.h" int main() { // Define the number of ComplexNumbers const int SIZE = 5; // Create an array of ComplexNumbers ComplexNumber complexArr[SIZE] = { ComplexNumber(140,54), ComplexNumber(67,5), ...
ALGO
0.999683
4.420089
a1f5ec93-cdd1-422c-afb5-d37c634e3a14
rahulkirpekar/club7
NO00.CPP
#include<iostream.h> #include<conio.h> class Calc { int no1,no2; public: Calc(int no1,int no2) { this->no1=no1; this->no2=no2; } void disp() { cout<<"\nNO1 : "<<no1<<"\tNo2 : "<<no2<<"---"<<this; } friend Calc operator + (Calc &c1,Calc &c2); }; Calc operator + (Calc &c1,Calc &c2) { Calc temp(0,0); // ...
TOOL
0.989807
4.669948
8aec5b45-a99b-4275-abc5-5c55165b6111
samarth015/DataStructures-Algorithms-Cpp
problems/3/12.cpp
/* Repeat Exercise 3.11, maintaining the singly linked list in sorted order. */ #include <stdexcept> #include <iostream> #include <random> template<typename T> class singly_linked_list_sorted { private: struct node { T data; node* next; node(): data{}, next{nullptr} {} node(const T& data): dat...
ALGO
0.997727
6.013654
fa2d377c-2d84-4a09-83f2-cd511dcc1fc4
chaenning/CodingTest
프로그래머스/1/70128. 내적/내적.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> a, vector<int> b) { int answer = 0; for (int i = 0; i<a.size(); i++){ answer+= (a[i] *b[i]); } return answer; }
ALGO
0.999875
4.546997
72166f05-c36a-4e5a-bed1-60b7d46d4c36
ishandutta2007/codeforces
andreasyan/normal/1195/C.cpp
#include <bits/stdc++.h> using namespace std; const int N = 100005; int n; int a[N], b[N]; long long dp[N][2]; int main() { scanf("%d", &n); for (int i = 1; i <= n; ++i) { scanf("%d", &a[i]); } for (int i = 1; i <= n; ++i) { scanf("%d", &b[i]); } long long ans = 0; ...
ALGO
0.999963
3.404618
752d69d2-6ef1-467d-b604-619fb0e98f3f
jsyeh/leetcode
1920/build-array-from-permutation.cpp
// LeetCode 1920. Build Array from Permutation // 用 for 迴圈, 把陣列 ans[i] = nums[nums[i]] class Solution { public: vector<int> buildArray(vector<int>& nums) { int N = nums.size(); // 陣列的大小 vector<int> ans(N); // ans 的大小, 是 N 小心是圓括號 C++的陣列 for(int i=0; i<N; i++){ ans[i] = nums[nums[...
ALGO
0.999998
5.921249
85faac37-088f-4e18-b212-6a8ce4d817a5
aniketmahajan20/codingpractice
cplusplus/kth_symbol_in_grammar.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: int kthGrammar(int n, int k){ if (n == 1 || k == 1) { return 0; } if (k%2 == 1) { return kthGrammar(n-1, (k+1)/2) == 0?0:1; } else { return kthGrammar(n-1, ...
ALGO
0.999971
4.755235
6efe6ba1-c971-45af-a7d2-febe74eb045a
imanagashodai/algorithm
クラスカル法.cpp
// https://www.slideshare.net/iwiwi/ss-3578491 #include <bits/stdc++.h> using namespace std; int N = 3; int E = 3; // 経路の数 int par[3]; vector<vector<int>> edges = {{20,0,1},{3,1,2},{100,2,0}}; int find(int x) { if (par[x] == x) return x; return par[x] = find(par[x]); } bool same(int x, int y) { return find(x) ==...
ALGO
0.999753
4.118111
19875137-3a7e-4f85-be4a-a30eb3105b5f
zrafoo/Programming-Methods-3
hash.cpp
hash.cpp #include "hash.h" #include <iostream> int easy_hash(std::string name) { int hash = 0; for (int i = 0; i < name.length(); i++) { hash += name[i] * i * name[i]; } return hash; } int hard_hash(std::string name) { int hash = 0; for (int i = 0; i < name.length(); i++) { hash += name[i] * i * name[i] *...
ALGO
0.996771
4.54985
e397c2c9-c884-4c8f-b73c-d54e8f135466
StanleyJo-37/competitive-programming-chatbots-comprasion
submissions/gemini/sub43.cpp
#include <iostream> // Required for input/output operations (std::cin, std::cout) #include <vector> // Required for using std::vector #include <algorithm> // Required for std::sort void solve() { int n; std::cin >> n; // Read the length of the sequence std::vector<long long> a(n); // Declare a vector to ...
ALGO
0.999925
6.004803
8d5d49d1-b957-4aed-966d-b6b424e4b927
Syuted/latihan_responsi
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.998784
6.761023
767fe932-90d1-475b-ab32-8912eaff1944
EnzoFerrari430/Cpp-primer5th
chapter9/9-3-6作业2.cpp
#include <iostream> #include <vector> #include <string> #include <deque> #include <list> #include <forward_list> using namespace std; //forward_list汾 int main() { //ѭɾżԪأԪ forward_list<int> vi = {0,1,2,3,4,5,6,7,8,9}; auto iter = vi.begin(); auto biter = vi.before_begin(); while(iter != vi.end()) { ...
TOOL
0.992185
3.80113
a9d87b0e-a646-4de6-8591-fcccc7dd78b8
arpangreat/college-work
kmp/kmp.cpp
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; // Function to check if the suffix of P of length k is equal to the end of Pqx bool isSuffix(const string &P, int k, const string &Pqx) { if (k > Pqx.size()) return false; return P.substr(0, k) == Pqx.substr(Pqx....
ALGO
0.999974
7.133075
c730258f-5a62-455e-b7f3-c7d463d055f2
pedrosoutinho/cp-dump
1181B.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" using db = long double; using pi = pair<int, int>; using pd = pair<db, db>; #define mp make_pair #define f first #define s second #define tcT template <class T #define tcTU tcT, class U tcT > using V = vector<T>; tcT, size_t SZ > u...
ALGO
0.99993
4.869964
39218bfe-39af-4944-b462-b99ecb4209f4
Yiting-Mao/Reference
Powerball/main.cpp
#include "powerball.hpp" #include "randomrecommend.hpp" int main(int argc, char** argv) { if (argc != 5) { std::cout << "Usage: ./powerball jackpot_amount num_of_people_sharing_jackpot" << "minimum_money_want_to_spend maximum_money_want_to_spend" << std::endl; return -1; } //TODO: add more ...
ALGO
0.984636
5.026918
a63550fa-7784-4a0e-913c-e13ea58a395d
iamarghamallick/GeeksforGeeks-Solutions
Difficulty: Easy/Delete Alternate Nodes/delete-alternate-nodes.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; // } Driver Code Ends /* Structure of the node of the binary tree struct Node { int data; struct Node *next; Node(int ...
ALGO
0.999599
5.940414
e7f27f67-b699-4331-9394-973b3890f706
Sergio471/spoj_problems
addrev.cpp
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <list> #include <string> #include <algorithm> #include <chrono> int rev(int n) { int res = 0; while (n) { res *= 10; res += n % 10; n /= 10; } return res; } int main() { int N; ...
ALGO
0.999814
5.265293
58081b93-32c5-46b0-8181-44a382db3984
Linuxydable/Godot_STL
thirdparty/bullet/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
#include "btConvexConcaveCollisionAlgorithm.h" #include "LinearMath/btQuickprof.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btMultiSphereShape.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/CollisionShapes...
ALGO
0.999745
7.464207
bec5b7b2-9a2c-4ede-91af-f600dfa6574b
randbatch-md/lammps-rbe
src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp
// clang-format off /* ---------------------------------------------------------------------- Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ #include "pair_lj_cut_coul_debye_kokkos.h" #include "atom_kokkos.h" #include "atom_masks.h" #include "error...
ALGO
0.997116
6.877726
8fd31ff4-dd7b-4342-b3e1-96f05b9f72ad
sinian666/codes_82_1
cpp_副本6/chapter_sorting/quick_sort.cpp
/** * File: quick_sort.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 快速排序类 */ class QuickSort { private: /* 元素交换 */ static void swap(vector<int> &nums, int i, int j) { int tmp = nums[i]; nums[i] = nums[j]; nums[j] = tmp; } ...
ALGO
0.999956
5.600534
48e04c90-b9f7-4f6d-823d-881332ea77a2
shrik/mpp
mpp/codec/mpp_dec_normal.cpp
#define MODULE_TAG "mpp_dec" #include <string.h> #include "mpp_buffer_impl.h" #include "mpp_dec_debug.h" #include "mpp_dec_vproc.h" #include "mpp_dec_normal.h" #include "rk_hdr_meta_com.h" static RK_S32 ts_cmp(void *priv, const struct list_head *a, const struct list_head *b) { MppPktTs *ts1, *ts2; (void)pr...
TOOL
0.948541
4.254968
846a543a-a828-453a-bf85-4f01d5fd6d85
XingwenZhang/Leetcode
No141_LinkedListCycle.cpp
/*141. Linked List Cycle Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space?*/ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ // directed method, ...
ALGO
0.999833
5.403516
a136e0d8-4ff4-4084-b81d-7d9e2eb44fe2
moizmoizdev/CelestialChain
crypto_utils.cpp
#include "crypto_utils.h" #include "sha.h" #include <openssl/ecdsa.h> #include <openssl/obj_mac.h> #include <openssl/bn.h> #include <openssl/sha.h> #include <sstream> #include <iomanip> #include <vector> #include <iostream> // Add the splitString function std::vector<std::string> splitString(const std::string& str, ch...
TOOL
0.964936
7.528897
5fb445de-7334-44f2-b336-206bf587639e
plutonchain/plutonchain
src/qt/transactionfilterproxy.cpp
#include <qt/transactionfilterproxy.h> #include <qt/transactiontablemodel.h> #include <qt/transactionrecord.h> #include <cstdlib> // Earliest date that can be represented (far in the past) const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromTime_t(0); // Last date that can be represented (far in the fu...
TOOL
0.935247
6.752341
c2699b7f-64e3-4e2c-8b4b-5388da2612cc
GSPune/Numerical-Computing
Numerical Methods Stand-alone/Bisection Method/main.cpp
#include <iostream> #include <cmath> using namespace std; #include "bisection.cpp" int main(void) { BisectionMethod obj(pow(10,-10));//check agin with lower precisions obj.find_interval(); obj.bisection(); //obj.get_interval(-2.0,-0.1); obj.get_interval(0,1); obj.bisection(); // obj.get_int...
ALGO
0.999826
4.36125
00a976c7-6b98-4062-ae5e-5b0014a7571c
Schr0Smi1ey/LeetCode
Easy/String/Longest_common_prefix.cpp
class Solution { public: string longestCommonPrefix(vector<string>& strs) { string ans = ""; for(int j = 0;j<strs[0].size();j++){ bool flag = true; for(int i=1;i<strs.size();i++){ flag &= (strs[i][j] == strs[0][j]); } if(flag) ans += st...
ALGO
0.999853
5.780681
22c585cc-bc5b-47f5-94dc-332eef23586a
orenov/usaco
silver/introduction_prefix_sum/running_miles.cpp
#include <iostream> #include <vector> #include <algorithm> #include <limits> #include <cstdio> #include <map> // https://codeforces.com/contest/1826/problem/D int main() { int T; std::cin >> T; for (int qq = 1; qq <= T; ++qq) { int n; std::cin >> n; std::vector<int> a(n, 0); for (int i...
ALGO
0.999828
4.933678
aa707244-d6d5-45e8-9487-69111085a56a
GabrielFMontoni/lista-de-contatos-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.998809
6.763549
bbc423f4-d99a-4c27-8bad-9dd04166c4c9
anuragkashyap302/DSA-C-
BINARY SEARCH/implemation.cpp
#include<iostream> using namespace std; int binarysearch(int arr[],int size,int key){ int start= 0; int end = size-1; while(start<=end){//jab tak startig chota hai tabhi tak na search karoge int mid = (start + end)/2; if(arr[mid]==key){ return mid; }//right side jaana hai...
ALGO
0.999922
4.982564
b91afe73-fb0c-4f7e-a39d-017dea2c25f1
peyote2504/proglang
lab2.7.cpp
#include <iostream> #include <cmath> using namespace std; int main(){ int A,B; cin>>A>>B; cout<<"arithmetic mean="<<(A+B)/2<<endl; cout<<"geometric mean= "<<sqrt(A*B)<<endl; return 0; }
ALGO
0.997695
3.839926
135b1e78-ba57-429f-88a5-90130d5aff11
zl90/cpp-education
src/kattis/sith.cpp
// https://open.kattis.com/problems/sith #include <iostream> #include <string> using namespace std; int main() { int a, b, x; string name; getline(cin, name); cin >> a; cin >> b; cin >> x; if ((a - b) < 0) { if (x < 0) { cout << "JEDI"; } else { cout << "SITH"; } } else { ...
ALGO
0.999781
4.220861
6d0548ab-fda2-43a6-b540-0ebadc99121a
samuelflores/MMB
3rdparty/openmm/plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaInPlaneAngleForce.cpp
/** * This tests the CUDA implementation of AmoebaInPlaneAngleForce. */ #include "openmm/internal/AssertionUtilities.h" #include "openmm/Context.h" #include "OpenMMAmoeba.h" #include "openmm/System.h" #include "openmm/LangevinIntegrator.h" #include <iostream> #include <vector> using namespace OpenMM; extern "C" vo...
ALGO
0.936958
7.633697
d96c0382-1561-45e1-9ffc-140cb610f86b
Nevin100/Striver-DSA-CPP
STEP-1/Lec_1/Lec_1e.cpp
#include <iostream> using namespace std; // Pass by value : where a copy of argument is passed into the function and doest let the user to alter the original value void addfive(int x){ x = x + 5; cout << "Inside function: " << x << endl; } // Pass by reference : where a copy of the argument is not passed into th...
TOOL
0.980348
4.952288
25a2ab87-0f9e-4cb8-8340-a9978707d72c
bira37/problem-solving
Codeforces/Official Rounds/372/Div2B.cpp
#include <bits/stdc++.h> #define int long long #define double long double #define ff first #define ss second #define endl '\n' #define ii pair<int, int> #define mp make_pair #define mt make_tuple #define DESYNC ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) #define pb push_back #define vi vector<int> #defi...
ALGO
0.999863
3.881827
0a353d10-2f63-4326-bcfa-e09a6f7226d7
pl9632008/onnxruntime_examples
test.cpp
#include "onnxruntime_cxx_api.h" #include <iostream> #include <opencv2/opencv.hpp> struct Object{ cv::Rect_<float> rect; int label; float prob; }; class YOLO{ public: std::vector<std::string> class_names = {"GW4_kai","GW4_he","GW7_kai","GW7_he", "GW10_kai","GW...
DATA
0.984903
6.295063
39887cf2-cd18-4f27-bf4f-967b0be75ca7
Pranav910/multithreaded-string-tokenizer-in-CPP
src/tokenizer/tokenizer.cpp
#include "./tokenizer.hpp" #include<iostream> #include<map> #include<thread> #include<functional> #include<mutex> // defining a struct which is not local to the tokenizer class. // This struct holds the parameters required for toknizing the string struct _thread { int t_id; // holds the id for...
TOOL
0.869027
4.457765
0cdab605-b0f1-45de-958d-3d831cb75561
VictorKoehler/ICG-2nd-Pipeline
eigen-folder/doc/examples/TutorialLinAlgExSolveLDLT.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2f A, b; A << 2, -1, -1, 3; b << 1, 2, 3, 1; cout << "Here is the matrix A:\n" << A << endl; cout << "Here is the right hand side b:\n" << b << endl; Matrix2f x = A.ldlt().solve(b); cout << "...
ALGO
0.999913
3.804243
02bb03a7-13dd-4039-8de4-beaedc701d2b
Resinss/2C-Bartosz-Pasek
Programowanie/czerwiecMaturaSamConsoleApplication/czerwiecMaturaSamConsoleApplication.cpp
#include <iostream> #include <fstream> #include <vector> void zadanie4_1() { std::ifstream file("przyklad.txt"); std::vector<int> numbers; int number; std::cout << "Zadanie 4.1 \n"; while (file >> number) { int reserved = 0; int temp = number; while (temp > 0) { ...
ALGO
0.997611
3.042428
ee05843e-b3e0-4f48-8658-b35aefd53f6b
hdqlkncso24jvf/LBoost
LBRMiner/BiSimulation/thirdparty/eigen/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2f A; A << 1, 2, 2, 3; cout << "Here is the matrix A:\n" << A << endl; SelfAdjointEigenSolver<Matrix2f> eigensolver(A); if (eigensolver.info() != Success) abort(); cout << "The eigenvalues of A ...
ALGO
0.999632
3.846247
7540a49f-4735-4884-b044-b1487a10888a
Priyo002/DSA
Striver CP Sheet/Impletation/476A-Dreamoon_and_Stairs.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define pb emplace_back #define setbits(x) __builtin_popcountll(x) #define zerobits(x) __builtin_ctzll(x) #define endl '\n' #define sort(X) sort(X.begin(),X.end()) const int mod = 1e9 + 7; const long long INF = 1e18; void init() { ios::sync_with_stdi...
ALGO
0.999952
3.607083
8c9fb625-d520-4e4e-95d4-981a5a093f07
DyogoBendo/cp
rated-questions/1400/1634B.cpp
#include <bits/stdc++.h> using namespace std; #define darvem ios_base::sync_with_stdio(false);cin.tie(NULL) #define endl '\n' #define ll long long #define int long long void solve(){ int n, x, y; cin >> n >> x >> y; // cout << "n: " << n << " x: " << x << " y: " << y << endl; int parity = x%2; fo...
ALGO
0.999981
4.594629
2864848f-0047-4d9a-b23e-8086bff0a3bb
dlvguo/NoobOJCollection
LeetCode/Normal/300-399/396.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int maxRotateFunction(vector<int> &nums) { int f = 0, n = nums.size(); int numSum = accumulate(nums.begin(), nums.end(), 0); for (int i = 0; i < n; i++) { f += i * nums[i]; } int re...
ALGO
0.99996
5.147961
55d725a0-0922-4905-b326-c1a0b8e83f3a
PixelExtended/frameworks_base
libs/androidfw/Locale.cpp
#include "android-base/macros.h" #include "androidfw/Locale.h" #include "androidfw/Util.h" #include <ctype.h> #include <algorithm> #include <string> #include <vector> using ::android::ResTable_config; using ::android::StringPiece; namespace android { template <size_t N, class Transformer> static void safe_transfor...
TOOL
0.892714
6.480893
2d8df17e-6197-418c-8cb1-b83319d8d54e
Rickpcz/Flutter
Forms/style_textfield/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.997652
6.76073
dd861f8b-3c2e-4d6a-8eeb-32d60909b588
hitesh103/Leetcode
power-of-two/power-of-two.cpp
class Solution { public: // Now consider :- // bit representation of 7 -> 0111 // bit representation of 8 -> 1000 // bitwise AND of 7 and 8 -> 0000 // we are gonna use this property for for all numbers which are powers of two bool isPowerOfTwo(int n) { if(n...
ALGO
0.997654
5.554874
0509be96-0997-4d06-b61d-16b8a3005b77
KatsuyaKikuchi/ProgrammingContest
AizuOnlineJudge/Volume/Volume00/0022.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i)) #define REP(i, n) FOR(i,n,0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll) 1e15; int main() { cin.tie(0); ios::sync_with_s...
ALGO
0.999897
4.360048
68859753-7c34-4f59-b0fe-b3ced254affe
CakeQ/FinalYearProject
include/Box2D/Collision/b2Collision.cpp
#include <Box2D/Collision/b2Collision.h> #include <Box2D/Collision/b2Distance.h> void b2WorldManifold::Initialize(const b2Manifold* manifold, const b2Transform& xfA, float32 radiusA, const b2Transform& xfB, float32 radiusB) { if (manifold->pointCount == 0) { return; } switch (manifold->type) { ...
ALGO
0.999521
7.750615
c34c9f4e-d844-4f1f-b19d-0e0d65075f20
IMLHF/CodeDupCheck
c++bak/zhxw150216邱理驰_runid3759396.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int MAXN = 13e5 + 5; const int inf = 1e9; int n; int num[MAXN]; int ans = 0; int sum = 0; int count_mid(int mid, int l, int r) //统计中间数的重数 { int cnt = 0; for(int i = l; i <= r; ++i)if(num[i] == mid)cnt++; return cnt; } int get_start(...
ALGO
0.999944
4.2697
0b01d1e6-b7c5-4e50-9e6c-470f3da2296b
say2omprakash01/LeetCode
322-coin-change/coin-change.cpp
class Solution { public: int coinChange(vector<int>& coins, int t) { int n = coins.size() ; vector<int> prev(t+1 , 0) , cur(t+1 , 0) ; for(int i = 0 ; i<=t ; i++){ if(i%coins[0]==0) prev[i] = i/coins[0] ; else prev[i] = 1e9 ; } for(int ind =1 ; ind...
ALGO
0.999953
6.138728
e11a1646-ddbd-48f7-b674-d7ef078e7755
tyt0815/BaekJoon_Solved
Silver2/10799.cpp
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string Parens; cin >> Parens; int TotalSticks = 1, Stick = 1; for(int i = 1; i < Parens.length(); ++i) { char Curr = Parens[i], Pre = Parens[i - 1]; if(Curr == '(') ...
ALGO
0.999403
3.899173
03e6bf99-7dce-4a32-8c96-fc1e9d5ae9de
AkshayTiwari27/Leetcode
1073-number-of-enclaves/number-of-enclaves.cpp
class Solution { public: vector<vector<int>>directions = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; void dfs(vector<vector<int>>& board, vector<vector<bool>>&visited, int i, int j){ visited[i][j] = true; int m = board.size(); int n = board[0].size(); for(auto &dir : directions){ ...
ALGO
0.999943
6.44718
1fea9019-f550-4c04-b7e8-7a58489b5b17
romanesco/qfract
plugins/kim.cpp
/* * Kyounghee Kim's birational map Lσ, where * L: a linear transformation * σ: cremona transformation * (in R^2) */ #include "../plugin.h" using namespace QFract; #define FUNCTION \ den = .43479167440053448494935455009397596083970904704335*x+.56520832559946551505064544990602403916029095295670*x*y; \ tmp = ....
ALGO
0.999516
5.319093
d1c6a9e0-7ad0-484b-a3f9-c5b8247f0e06
tudelft3d/3D_Urban_Mesh_Annotator
CGAL/examples/Polygon_mesh_processing/corefinement_mesh_union_with_attributes.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Surface_mesh.h> #include <boost/container/flat_map.hpp> #include <CGAL/Polygon_mesh_processing/corefinement.h> #include <fstream> typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Surface_mesh<K::Point_3> ...
TOOL
0.918541
5.905312
72eaa8be-8b2b-46e1-8f9d-fcffd4d5e019
sanghyun0603/Algorithm_B_S
프로그래머스/unrated/181834. l로 만들기/l로 만들기.cpp
#include <string> #include <vector> using namespace std; string solution(string myString) { string answer = ""; for(int i = 0; i < myString.length(); i++) { if(myString[i] < 'l') { myString[i] = 'l'; } answer.push_back(myString[i]); } return answer; }
ALGO
0.99979
5.128997
4d48c83c-e1bf-4792-8a3f-cb4806e73187
ucb-ee290c/fa18-gps
verisim/verilator/src/verilator-3.920/src/V3Config.cpp
#include "config_build.h" #include "verilatedos.h" #include <string> #include <map> #include <set> #include "V3Global.h" #include "V3String.h" #include "V3Config.h" //###################################################################### class V3ConfigLine { public: int m_lineno; // Line number to make change a...
TOOL
0.854546
6.040688
67639df5-cbfc-4e75-a60e-cd7f21ca8edc
chncwang/cuda_test
eigen/doc/examples/class_FixedBlock.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived, 2, 2> topLeft2x2Corner(MatrixBase<Derived>& m) { return Eigen::Block<Derived, 2, 2>(m.derived(), 0, 0); } template<typename Derived> const Eigen::Block<const Derived, 2, 2> topLeft2...
TOOL
0.878996
6.64346
074eb67a-e306-4700-b4f4-368f8ae425ec
torcado194/godot-windowkill
thirdparty/meshoptimizer/overdrawoptimizer.cpp
#include <assert.h> #include <math.h> #include <string.h> // This work is based on: // Pedro Sander, Diego Nehab and Joshua Barczak. Fast Triangle Reordering for Vertex Locality and Reduced Overdraw. 2007 namespace meshopt { static void calculateSortData(float* sort_data, const unsigned int* indices, size_t index_cou...
ALGO
0.999867
7.733637
d5c373ab-afd8-4006-9682-342aad68aa03
tarunrajput/Data-Structures-and-Algorithms
LeetCode/69_sqrt(x).cpp
#include<bits/stdc++.h> using namespace std; int squareRoot(int n) { long i=1; while(i*i <= n) { i++; } return i-1; } int squareRootUsingNewton(int n) { long i = n; while (i*i > n) i = (i + n/i) / 2; return i; } int main(int argc, char const *argv[]) { cout<<squareRoot...
ALGO
0.999836
3.964051
737e23e9-a3f6-488b-a14b-5588c454ef86
Farrij48/minggu_9
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.998859
6.785645
81b3d362-65b3-477a-abf0-5850deb8fe50
mkp0/CP
GeekForGeek/Count BST nodes that lie in a given range GFG.cpp
int getCount(Node *root, int l, int h) { if(!root)return 0; if(root->data >= l && root->data <= h) { return 1 + getCount(root->left,l,h) + getCount(root->right,l,h); }else if(root->data < l) { return getCount(root->right,l,h); }else{ return getCount(root->left,l,h); } return 0; }
ALGO
0.999833
4.083314
c22ef1ff-a47c-43b1-81d4-564e3e59147b
vertver/OpenLR
src/xrGame/Level_network_compressed_updates.cpp
#include "stdafx.h" #include "Level.h" #include "../xrCore/ppmd_compressor.h" #include "../xrphysics/iphworld.h" #include "xrServer_updates_compressor.h" void CLevel::ProcessCompressedUpdate(NET_Packet& P, u8 const compress_type) { NET_Packet uncompressed_packet; u16 next_size; P.r_u16(next_size); Device.Statistic...
TOOL
0.869362
4.385012
7685c9fb-5d03-485b-8360-8e670e21ac2c
anjkt/xttchain
src/Algorithms-master/Code Chef/TLG/main.cpp
#include <iostream> using namespace std; int main() { int n,sum1=0,sum2=0,l=0,m=0,x,y; cin>>n; for(int i=0;i<n;i++) { cin>>x>>y; sum1+=x; sum2+=y; if((l<(sum1-sum2))&&(sum1>sum2)) { l=sum1-sum2; m=1; } else if(l<(sum2-sum1)...
ALGO
0.999938
3.657588
ab411b34-2d83-461c-940c-35c33dc06cdc
MelasMalephar/DSA
344-reverse-string/344-reverse-string.cpp
class Solution { public: void reverseString(vector<char>& s) { int n=s.size()-1; for(int i=0;i<=n/2;i++){ swap(s[i],s[n-i]); } } };
ALGO
0.999498
6.126871
84ebc0c4-4f04-487d-ab29-4571ea91ec65
imhnoyon/Data-Structure
Module-10.5/same_or_not.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int value; node *next; node *prev; node(int value) { this->value = value; this->next = NULL; this->prev = NULL; } }; void insert_tail(node *&head, node *&tail, int value) { node *newnode = new node(va...
ALGO
0.999931
3.654218
34b34886-74e7-4e04-9348-873b4df0da9b
ZaynStark/LeetCode
0278第一个错误版本.cpp
// The API isBadVersion is defined for you. bool isBadVersion(int version); class Solution { public: int firstBadVersion(int n) { int left = 1; int right = n; while (left < right) { int mid = left + (right - left) / 2; if (isBadVersion(mid)) {...
ALGO
0.999337
6.623958
7d19ec15-12e6-416e-8086-65eb3f0049da
go2scope/mmcorec
3rdParty/boost-versions/boost_1_77_0/libs/graph/test/mas_test.cpp
#include <fstream> #include <iostream> #include <map> #include <vector> #include <string> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/connected_components.hpp> #include <boost/graph/exception.hpp> #include <boost/graph/graph_traits.hpp> #include <boost/graph/read_dimacs.hpp> #include <boost/graph/ma...
TEST
0.989511
6.357671
1b730257-e990-478e-8cbb-6ec9d6204851
yuvraj0502/DSA
LeetCode/Array/jump game2.cpp
class Solution { public: int jump(vector<int>& nums) { int n = nums.size(); if(n==0){ return 1; } int jumps = 0; int farthest = 0; int currentEnd = 0; for (int i = 0; i < n - 1; i++) { farthest = max(farthest, i + nums...
ALGO
0.999977
6.171159