uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
543272e6-fdbd-4e1b-83cb-199f1e2c7fdb
QIANG-crypto-230608/MPSU2025
ThresholdElGamalEncryption.cpp
#include "ThresholdElGamalEncryption.h" #include <iostream> #include <random> #include <openssl/rand.h> #include <openssl/bn.h> #include "cryptoTools/Common/Defines.h" #include "cryptoTools/Crypto/PRNG.h" using namespace osuCrypto; ThresholdElGamalEncryption::ThresholdElGamalEncryption(size_t numParties, size_t thres...
ALGO
0.99887
6.49631
55924dad-65a4-4db4-a779-f3b4e98c6a02
jguoaj/aerial-robot
project/2/proj2phase2/tag_detector/src/tag_detector_node.cpp
#include <iostream> #include <ros/ros.h> #include <ros/console.h> #include <sensor_msgs/Image.h> #include <sensor_msgs/image_encodings.h> #include <cv_bridge/cv_bridge.h> #include <nav_msgs/Odometry.h> #include <aruco/aruco.h> #include <aruco/cvdrawingutils.h> #include <opencv2/opencv.hpp> #include <Eigen/Eigen> #incl...
TOOL
0.977388
4.654217
25f3d8f5-34bb-488f-bcc2-bd0f479e8e65
himanshu14263/DS-CODES-
BINARY TREE/symmetric tree check.cpp
// PROBLEM : SYMMETRIC TREE CHECK #include<bits/stdc++.h> using namespace std; struct node { char data; node*left; node*right; }; node* newnode(char data) { node*n=new node; n->data=data; n->left=NULL; n->right=NULL; return n; } void func(node*l,node*r,bool&ans) { if(!l && !r)return; // to handle leaf nod...
ALGO
0.999993
4.876365
f9f08be9-227b-46f5-9670-06d9e2ef1dc9
aspseka/Versuch-K1
Programme/get_signals.cpp
////////////////////////////////////////////////////////////////////////////// #include <fstream> #include <iostream> #include <cstdlib> #include <cmath> #include <vector> using namespace std; int get_word(ifstream* file,int* dataword) { // This function reads 16 bit from the file and stores it in (*dataword). ...
TOOL
0.917993
3.777612
13110b0f-7d05-42aa-812e-1c74ebe79065
nomicos/acmp
src/OK/0504.cpp
#include <iostream> using namespace std; int main() { int k; cin >> k; switch(k % 3) { case 0: cout << "GCV"; break; case 1: cout << "VGC"; break; case 2: cout << "CVG"; break; } return 0; }
ALGO
0.996266
3.594333
d1408d1f-f46f-4ec1-9d55-738a3c79ece4
MissAashnaa1/DSA-Questions
0673-number-of-longest-increasing-subsequence/0673-number-of-longest-increasing-subsequence.cpp
class Solution { public: int findNumberOfLIS(vector<int>& arr) { int n=arr.size(); vector<int> dp(n,1); vector<int> cnt(n,1); vector<int>v; int last=0; int maxi=1; for(int i=0; i<=n-1; i++){ for(int prev_index = 0; prev_index <=i-1; prev_index ++){ if(a...
ALGO
0.999996
6.062143
7d04d07f-a685-4c01-b280-23ea663a63a2
HemantVermaDU/Algo
Heap Sort.cpp
#include<iostream> using namespace std; void heapify(int a[] , int n ,int i){ int largest = i; int l = 2*i+1; int r = 2*i+2; if(l<n && a[l] > a[largest]){ largest = l; } if(r<n && a[r] > a[largest]){ largest = r; } if(largest!=i){ int t = a[i]; a[i] =a[largest]; a[largest] = t; heapify(a,n,large...
ALGO
0.999979
4.218976
d9e2c2d0-eb59-4e80-b2c1-763d9bacc034
ishandutta2007/codeforces
pigstd/normal/1375/F.cpp
#include<bits/stdc++.h> #define int long long #define pb push_back #define WT int T=read();while(T--) #define NO puts("NO"); #define YES puts("YES"); using namespace std; inline int read() { char c=getchar();int x=0;bool f=0; for(;!isdigit(c);c=getchar())f^=!(c^45); for(;isdigit(c);c=getchar())x=(x<<1)+(x...
ALGO
0.999825
3.16321
3ab5e362-67b2-42f4-bf7e-52506c353e3b
divyanshu29jha/DSA
Recursion/Problems/GFG_Generate-all-binary-strings.cpp
// M-1) T.C: O(2^n), S.C: O(2^n) class Solution{ public: void helper(vector<string>& ans, int n, string s){ // Important - pass vector by refernce for recursion call if(s.size() == n){ ans.push_back(s); return; } helper(ans, n, s+'0'); if(...
ALGO
0.999973
6.921823
c93b5e38-4137-40e7-b6a3-d7386cfdd2c3
DeepLajpal/DSA
Step3-Arrays/EASY/Q40_singleNumberUsingMapHashing.cpp
#include <iostream> #include <vector> #include <map> using namespace std; int singleNumber(vector<int> &nums) { int n = nums.size(); int maxNum = 0; if (n == 1) { return nums[0]; } // getting the max num from nums arr for (int i = 0; i < n; i++) { if (nums[i] > maxNum) ...
ALGO
0.998605
5.431576
a48110c1-d1bd-4be8-bd5f-0adde0c3d602
tejasbahurupi/codeforces
imp_question/D_Right_Left_Wrong.cpp
#include <iostream> #include <bits/stdc++.h> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <string.h> #define ll long long using namespace std; void fillPrefixSum(ll int arr[], int n, ll int prefixSum[]) { prefixSum[0] = arr[0]; // Adding present element with previous elemen...
ALGO
0.998881
3.855201
23640ffb-c198-45f4-ac91-d4ae9622fa18
kangere/compiler_design
include/parser.expr.cpp
#include "parser.hpp" Expr* parser::parse_primary_expression() { if(is_eof()) return nullptr; token tok = consume(); if(tok.is(token::int_lit)){ return m_act.on_int_literal(tok); }else if(tok.is(token::float_lit)){ return m_act.on_float_literal(tok); } else if(tok.is_bool_lit()){ return m_act.on_bo...
ALGO
0.866182
4.949565
d2df08a8-e0f2-48b9-a450-1e88899e1830
zhaolingxi/RenderZ
triLibrary/assimp/code/PostProcessing/FixNormalsStep.cpp
/** @file Implementation of the post processing step to invert * all normals in meshes with infacing normals. */ // internal headers #include "FixNormalsStep.h" #include <assimp/StringUtils.h> #include <assimp/DefaultLogger.hpp> #include <assimp/postprocess.h> #include <assimp/scene.h> #include <stdio.h> using name...
TOOL
0.898023
6.973658
a708b80a-96e5-41ac-9343-8ed57b54c23d
tuan-nguyenduc/BT-DSA
homework_exercises/bonus_samsung/C/ex17.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Edge { int weight; int u; int v; Edge(int w, int x, int y) : weight(w), u(x), v(y) {} }; class Graph { public: void addEdge(int u, int v, int weight) { edges.push_back(Edge(weight, u, v)); } v...
ALGO
0.999983
5.74631
1b7c4c0e-2918-4e9c-aa51-d7b3b31289cd
proxmox/ceph
ceph/src/boost/libs/graph/test/dijkstra_no_color_map_compare.cpp
#include <iostream> #include <map> #include <vector> #include <ctime> #include <boost/config.hpp> #ifdef BOOST_MSVC // Without disabling this we get hard errors about initialialized pointers: #pragma warning(disable : 4703) #endif #include <boost/lexical_cast.hpp> #include <boost/random.hpp> #include <boost/graph/adj...
TEST
0.955446
6.503512
b71d6235-06db-4212-a898-8af0c3f249fc
GrootTheDeveloper/CompetitiveProgramming
CP10/Month11_AdvancedMathematics/Buoi1/1. StaticRangeMinimumQueries/sol.cpp
#include <iostream> #include <math.h> const int inf = 1000000007; int a[200005]; int it[4 * 200005]; int n, numQueries; void build(int index, int L, int R) { if (L == R) { it[index] = a[L]; return; } int mid = (L + R) / 2; build(2 * index, L, mid); build(2 * index + 1, mid + 1, R); it[ind...
ALGO
0.999996
5.658304
ce741d04-7b84-4480-9087-8ca4249c125d
Jeffrin2005/Dynamic_Programming
Minimu.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; class Solution { public: int minimumOperations(vector<vector<int>>& grid) { int n = grid.size(); int m = grid[0].size(); vvi cost(m, vi(11, 0)); // Fill cost matrix ...
ALGO
0.999425
5.997077
04004dfb-ff8b-480b-be60-5b6352a3d6ee
Not-Satya/Cpp_Basics
if_else.cpp
// Calculate the greatest of 3 different numbers #include <iostream> using namespace std; int main() { int a,b,c; cout<<"Input the value of a: "; cin>>a; cout<<"\nInput the value of b: "; cin>>b; cout<<"\nInput the value of c: "; cin>>c; if (a>b) { if (a>c) { ...
ALGO
0.999571
3.840992
7e8037c6-e0cf-4dc8-96ef-a32e84596723
its-coder5128/leetcode
my-folder/problems/most_stones_removed_with_same_row_or_column/solution.cpp
class Solution { class disJointSet { vector<int> size; vector<int> parent; public: disJointSet(int n) { size.resize(n+1); parent.resize(n+1); for(int i = 0;i<=n;i++) { size[i] = 1; ...
ALGO
0.999641
5.486115
2ddb6cae-be5c-41f0-83d4-9ae103c9a3bc
toseefkhan403/ParallaxCards
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.998848
6.76073
cbe4b013-3fb9-40f0-ade6-d7052101f360
ishandutta2007/codeforces
huangxiaohua/normal/1736/E.cpp
#include<bits/stdc++.h> using namespace std; int i,j,k,n,m,t,a[1005],f[505][505][2],res; int fuck(int id,int x,int y){ if(id>n)return 0; if(~f[id][x][y])return f[id][x][y]; int &t=f[id][x][y],i; for(i=id;i<=n;i++)t=max(t,fuck(i+1,x+1,1)+a[id]*(i-id+1)*y); for(i=1;i<=x;i++)t=max({t,fuck(i+id,x-i+1,0)+i*a[id+i],fu...
ALGO
0.999927
3.129243
4bd0d4c9-8f3c-4f38-926f-aac69e456399
ShenTensen/CppPrimer
ch01/1_21/main.cpp
#include <iostream> #include "Sales_item.h" int main() { Sales_item book1, book2; std::cin >> book1 >> book2; book1 += book2; std::cout << book1 + book2 << std::endl; return 0; }
ALGO
0.908741
4.443472
894ab53e-76fb-432f-89db-624260675074
chx2502/LeetCode
LeetCode_44/LeetCode_44/main.cpp
#include <iostream> #include <string> #include <vector> using namespace std; class Solution { public: bool isMatch(string s, string p) { int s_length = (int)s.length(); int p_length = (int)p.length(); if (s_length == p_length && p_length == 0) return true; vector<vector<bo...
ALGO
0.999862
5.445487
f224f689-9726-48ee-9780-678390307f19
dovnar/lab_week_12
task2.cpp
#include <iostream> #include <locale.h> using namespace std; int star(int); int main() { setlocale(LC_ALL, "rus"); int number; cout << "введите количество звёзд = "; cin >> number; star(number); } int star(int number) { if (number > 0) { cout << "*"; return star(number - 1); } cout << endl; }
ALGO
0.999473
3.520532
b48a62f8-6eca-4f80-b47b-4342a95712dd
NikitaUssyukin/PP1_2023_Fall
Lecture/G2/Week12/deque.cpp
#include <iostream> #include <deque> using namespace std; int main() { // !!! to use this initialization // you need to use additional flag: // g++ -std=c++17 deque<int> d = {1, 2, 3, 4, 5}; return 0; }
TOOL
0.951766
3.113158
6d4ce4e0-9e56-44c5-baaa-e57b523c36ff
sharmajatin741/Competitve-Programming
Codeforces/363B.cpp
/* nothing is impossible */ #include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define eb emplace_back #define fi first #define se second #define ff first #define ss second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, n) for (int...
ALGO
0.999986
4.21102
bfe63235-4760-4cf9-a334-959208be6ccf
KrishnaPensalwar/GFG-Solutions
Difficulty: Medium/Maximum Product Subarray/maximum-product-subarray.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: // Function to find maximum product subarray int maxProduct(vector<int> &arr) { // Your Code Here int pre=1,suff=1; int ans =...
ALGO
0.999395
6.384593
ab68ca54-82c6-4706-8471-8b851b1f38e0
paulkim1997/Baekjun
15000/15552.cpp
#include <bits/stdc++.h> using namespace std; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int count; cin >> count; for(int i=0;i<count;i++) { int a,b; cin >> a >> b; cout << a+b << "\n"; } }
ALGO
0.999702
5.318851
7cf17915-2a73-4dc0-b2b5-a2fcd51df817
arnab7070/BeyondCoding
C++ Programs/Algorithm Lab/Day1/binarySearch.cpp
/* Algorithm for Binary Search: Start with a sorted array of n elements and a search key. Initialize two variables, start and end, to the beginning and end of the array, respectively. Repeat the following steps until start is greater than end: a. Calculate the index of the middle element as mid = (start + end) / 2...
ALGO
0.999999
7.012252
eb798a06-10d3-4df2-a4b6-04ac88665088
shubham21699/My-LeetCode-Solutions
1035-uncrossed-lines/1035-uncrossed-lines.cpp
class Solution { public: int makeLines(vector<int>& nums1, vector<int>& nums2, int i, int j, int n, int m, vector<vector<int>>& dp) { if(i >= n || j >= m) return 0; if(dp[i][j] != -1) return dp[i][j]; if(nums1[i] == nums2[j]) return dp[i][j] = 1 + makeLines(nums1, nums2, i+...
ALGO
0.999997
6.246841
ae01b07b-c35e-428f-bfa7-2c22a77f7b90
iamtejasrg/LeetCodeChallenge
Unique Paths II/main.cpp
class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { int m = obstacleGrid.size(); int n = obstacleGrid[0].size(); for(int i=0; i<m; i++){ for(int j=0; j<n; j++){ if(obstacleGrid[i][j] == 1) obstacleGrid[i][j]=-1; }...
ALGO
0.999836
5.499569
4b60610d-0d84-41e9-a6d2-b8a9e61e202a
Arthurfangm/pat-exercises
Basic/1057 数零壹.cpp
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int main() { char str[100010]; cin.getline(str,100010); int len=strlen(str); int sum=0; for(int i=0;i<len;i++){ if(str[i]>='A'&&str[i]<='Z'){ sum+=str[i]-'A'+1; } else if(str[i]>='a'&&s...
ALGO
0.999688
3.600648
b7858e6d-1b0e-4908-b7cf-884f41987898
nayemhasan45/Phitron
C++/week 2/moduel 6.5 p/Q_Reverse_Words.cpp
#include<bits/stdc++.h> using namespace std; int main (){ string s; getline(cin,s); stringstream ss(s); string word; int cnt=0; while (ss>>word) { if(cnt){ cout<<" "; } for (int i = (word.length())-1; i >= 0; i--) { cout<<word[i]; ...
ALGO
0.999505
3.309213
ca1bd32e-53f1-4ccf-b437-9d78c73378e0
tamtamhihi/Leetcode
Stack/1081. Smallest Subsequence of Distinct Characters.cpp
class Solution { public: string smallestSubsequence(string s) { // Find the last occurence of each character. unordered_map<char, int> lastOccurence; for (int i = 0; i < s.size(); ++i) { lastOccurence[s[i]] = i; } stack<char> result; unordered_map<char, bo...
ALGO
0.99999
6.870028
4ad659b8-f2fd-41b0-9e64-3b198f1f658b
jsl0149/Programmers
1단계/Programmers_Failure_Rate.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <queue> using namespace std; bool compare(pair<int, double> a, pair<int, double> b) { if (a.second == b.second) { return a.first < b.first; } else { return a.second > b.second; } } int main() { vector<int> stages; sta...
ALGO
0.999924
3.297561
cd02a415-b5e8-46bf-93ee-cb67312b99b2
Laharika28/LeetCode-Self-Solutions
0226-invert-binary-tree/0226-invert-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999958
6.673453
575b820d-6296-4501-af45-3ce9cc2a3715
aamir-collab/leetcode
206-reverse-linked-list/206-reverse-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* reverseList...
ALGO
0.999735
5.565539
255a137f-bfd2-4be4-9264-16fc0542c938
remyamp1/flutter_Assignment3
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.998799
6.776823
d94666b0-60cb-45e3-a410-647d435ebe2c
fpaboim/gpufem
libs/eigen3.2/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; std::cout << "Column's maximum: " << std::endl << mat.colwise().maxCoeff() << std::endl; }
ALGO
0.999758
3.779679
b5eefa30-5bbe-440f-8a6c-fc0724de7019
zhangjrgary/LeetCode-Solutions
FindMinimumInRotatedSortedArray.cpp
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. You may assume no duplicate exists in the array. 这题要求在一个轮转了的排序数组里面找到最小值,我们可以用二分法来做。 首先我们需要知道,对于一个区间A,如果A[start] < A[stop],那么该区间一定是有序的了。 假设在一个轮转的排序数组A,我们首先获取中间元素的值,A...
ALGO
0.999998
6.743716
2ec067c0-e02d-4736-8e08-883ee5e894e6
pyvorak/leetcode
0202 Happy Number/0202.cpp
class Solution { public: int next(int num){ int nextNum = 0; while (num > 0){ int cur = num % 10; nextNum += cur * cur; num /= 10; } return nextNum; } bool isHappy(int n) { int fast = next(n); int slow = n; whil...
ALGO
0.999978
6.516807
490ce117-0112-4ce3-812d-de96132e64b1
mkoehnke/CarND-Path-Planning-Project
src/Eigen-3.3/doc/examples/Tutorial_PartialLU_solve.cpp
#include <Eigen/Core> #include <Eigen/LU> #include <iostream> using namespace std; using namespace Eigen; int main() { Matrix3f A; Vector3f b; A << 1,2,3, 4,5,6, 7,8,10; b << 3, 3, 4; cout << "Here is the matrix A:" << endl << A << endl; cout << "Here is the vector b:" << endl << b << endl; Vec...
ALGO
0.999759
3.142099
15919e0b-caae-48c9-971f-fe22db1c5347
dhirajpatil2346/compitative
cf 1600/sanch.cpp
#include <bits/stdc++.h> // Include every standard library using namespace std; typedef long long LL; typedef pair<int, int> pii; typedef pair<LL, LL> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<LL> vl; typedef vector<vl> vvl; double E...
ALGO
0.900007
3.338614
be9e17a0-084f-46c0-bf3e-b106b275ffb5
AKD-01/DSA-LeetCode
2540-minimum-common-value/2540-minimum-common-value.cpp
class Solution { public: int getCommon(vector<int>& nums1, vector<int>& nums2) { int i = 0, j = 0; while(i < nums1.size() && j < nums2.size() ){ if(nums1[i] == nums2[j]) return nums1[i]; if(nums1[i] > nums2[j]) j++; else i++; } return -1; } };
ALGO
0.999982
5.570062
0ed23b0e-bc28-4581-88ad-7a561ebf95a2
keijak/comp-pub
cf/contest/1404/E/main.cpp
#include <bits/stdc++.h> #include <atcoder/maxflow> #define REP_(i, a_, b_, a, b, ...) \ for (int i = (a), END_##i = (b); i < END_##i; ++i) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define ALL(x) std::begin(x), std::end(x) using i64 = long long; using u64 = unsigned long long; template...
ALGO
0.999915
5.434664
fe67332c-dd90-48f1-a87b-f73266ad0cbf
Um-ded/problem-solving
Codeforces Codes/118.Prob1389A(LCM Problem).cpp
#include <bits/stdc++.h> #define ss " " #define endl "\n" #define pb push_back #define pi acos(-1.0) #define ars greater<int>() #define vi vector<int> #define vvi vector<vector<int> > #define flush cin.ignore(numeric_limits<streamsize>::max(),'\n...
ALGO
0.999511
4.080304
ec29d066-1f1b-4dc7-be67-0cc453d0ca38
moaazassali/capstone
thirdparty/lietorch/eigen/bench/vdw_new.cpp
#include <iostream> #include <Eigen/Core> using namespace Eigen; #ifndef SCALAR #define SCALAR float #endif #ifndef SIZE #define SIZE 10000 #endif #ifndef REPEAT #define REPEAT 10000 #endif typedef Matrix<SCALAR, Eigen::Dynamic, 1> Vec; using namespace std; SCALAR E_VDW(const Vec &interactions1, const Vec &inter...
ALGO
0.999809
3.537879
f064164c-57b7-4ec4-aacb-b251f2b0370d
king-yyf/cpcode
codeforce/cr807/d.cpp
#include <bits/stdc++.h> using namespace std; #define all(c) (c).begin(), (c).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() #define f0(e) for(int i=0;i<(e);++i) #define f1(e) for(int i=1;i<=(e);++i) #define f2(i,e) for(int i=0;i<(e);++i) #define f3(i,e) for(int i=1;i<=(e);++i) #define S...
ALGO
0.999829
4.506768
66ee8af6-9542-4c2b-9e9b-303c30ab2e00
iipenaky/CPP
finalProject/main.cpp
// Include account classes #include "BankAccount.h" #include "SavingsAccount.h" #include "CheckingAccount.h" // Simulates customer actions on bank accounts void customer(BankAccount& account, int customer_id) { for (int i = 0; i < 5; i++) { // Each customer performs 5 actions int action = ran...
TOOL
0.981023
6.648993
0583e366-af71-49cc-bb03-6e2796ab0890
SonuKumar-3/Cpp-Codes
nonRepeatingElementsInArray.cpp
/* Problem Statement: Find all the non-repeating elements for a given array. Outputs can be in any order. Time Complexity: O(N) Space Complexity: O(N) */ #include <iostream> #include <map> using namespace std; #define loop(i, a, b) for(int i = a; i < b; i++) int main() { int n; cin>>n; int arr[n]...
ALGO
0.998914
4.057636
7e7fdf74-0390-45e1-b929-1d2c853b5690
susmita413/Phitron_DataStructure_DS_
C1 mod_23-5 pp_Leetcode&CodingNinja/2_Design_LinkedList_.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int val; Node* next; Node(int val) { this->val= val; this->next= NULL; } }; class MyLinkedList { public: Node* head=NULL; int sz=0; MyLinkedList() { ...
ALGO
0.999643
4.759623
1cb84cb9-9107-4787-b715-4e5809ce1c2d
abbash77/DSA
116-populating-next-right-pointers-in-each-node/116-populating-next-right-pointers-in-each-node.cpp
/* // Definition for a Node. class Node { public: int val; Node* left; Node* right; Node* next; Node() : val(0), left(NULL), right(NULL), next(NULL) {} Node(int _val) : val(_val), left(NULL), right(NULL), next(NULL) {} Node(int _val, Node* _left, Node* _right, Node* _next) : val(_...
ALGO
0.999952
5.413977
28449b68-2bbb-4d50-a4fe-614371fddeff
Akshityadav007/DSA
13.LinkedList/4.SlowFastPointer/slowfast.cpp
#include<iostream> using namespace std; // Problem || Leetcode : 876 /* -> Given the head of a singly linked list, return the middle node of the linked list. -> If there are two middle nodes, return the second middle node */ struct ListNode { int val; ListNode *next; ListNode() : val(0), next(...
ALGO
0.999923
5.838791
250c5b60-b472-48c0-8982-71f425042197
sergey-buryakov/CEssLabs
modul4/4_5_7.3/main.cpp
#include <iostream> #include <cstring> #include <vector> using namespace std; vector<string> split(string s, char c) { vector<string> res = vector<string>(); string temp; do { temp = s.substr(0, s.find_first_of(c)); res.push_back(temp); s = s.substr(s.find_first_of(c) + 1); }while (s.find_first_of(c) != s...
ALGO
0.996992
4.549966
758ed74d-801f-43b6-9b65-210b4a125fdd
sr6582924/monster-mash
third_party/libigl/include/igl/deform_skeleton.cpp
void igl::deform_skeleton( const Eigen::MatrixXd & C, const Eigen::MatrixXi & BE, const std::vector< Eigen::Affine3d,Eigen::aligned_allocator<Eigen::Affine3d> > & vA, Eigen::MatrixXd & CT, Eigen::MatrixXi & BET) { using namespace Eigen; assert(BE.rows() == (int)vA.size()); CT.resize(2*BE.rows(),C.co...
ALGO
0.992162
5.389054
def2a5ca-d6b1-404e-a212-1c592a8034ea
MereyPolatkhan/competitive_programming_and_algorithms
_codeforces/div3_521/d.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <cstdlib> #include <string> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <cmath> #include <cassert> #include <queue> #include <bitset> #include <numeric> #include <vector> #include <ctime> ...
ALGO
0.999978
4.882754
72ab62b7-a48c-4a41-8bf5-709e13fe8e3e
RahulVedula/ICS4U
Recursion Assignment/206.cpp
#include <iostream> #include <time.h> #include <ctime> #include <cmath> using namespace std; long long gcd(long long a, long long b) { if (b == 0) return a; return gcd(b, a % b); } long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; } long long fractorial (long long x){ if (x == 0){ ...
ALGO
0.999974
5.03488
1dc4414d-a68c-4553-984f-39e5ab7649e5
engineer6080/CodingExcercises
CTCI/Linked_List/problems.cpp
#include <iostream> #include <vector> #include "ll.hpp" #include <unordered_set> void prnt(const char * n){ std::cout << "Running " << n << std::endl; } /* O(n) Solution Remove Duplicates from Linked List */ template <typename T> void LinkedList<T>::remove_dup(){ std::cout << "Removing duplica...
ALGO
0.999081
4.883782
ce31bc85-fc95-4dca-a718-08473b524e4c
SnehaPal16/c_-_cpp
CPP/TEMPLATES/function_template.cpp
#include<iostream> using namespace std; template<class t1,class t2> float fn_avg(t1 a,t2 b) { float avg=(a+b)/2.0; return avg; } template<class t> void swapp(t &a,t &b) { t temp=a; a=b; b=temp; } int main() { float a; a=fn_avg(10,15); cout<<"average :"<<a; int x=10,y=12; swapp(x,y); cout<<x<<" "<<y; retu...
ALGO
0.98146
4.747273
f56d2149-2d28-4c28-beab-567174f8c98c
Nrupal-w/PX4-Autopilot
src/modules/ekf2/test/test_helper/comparison_helper.cpp
#include "comparison_helper.h" float randf() { return (float)rand() / (float)RAND_MAX; } SquareMatrixState createRandomCovarianceMatrix() { // Create a symmetric square matrix SquareMatrixState P; for (int col = 0; col < State::size; col++) { for (int row = 0; row <= col; row++) { if (row == col) { P(ro...
ALGO
0.96243
4.616956
50708344-b221-4f7d-b08d-d913d7b1d2ee
XhAfAn1/Data-Structure-Course-Material-with-Problem-and-Solve-Using-CPP-Language
New folder (4)/New folder/lab/lab 4/q4.cpp
#include<iostream> #include "stack.h" using namespace std; void reverseStack(stack *s1){ stack *temp1=new stack(); stack *temp2=new stack(); int s=s1->size(); for(int i=0;i<s;i++){ temp1->push(s1->topd()); s1->pop(); } for(int i=0;i<s;i++){ temp2->push(temp1->topd()); t...
ALGO
0.999204
4.13287
0500c021-43e5-4411-ab92-2b6d0b7d385a
x1314aq/dsa
luogu/3916.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; static vector<int> g_m[100005]; static int g_ans[100005]; static bool g_vis[100005]; static void dfs(int x, int d) { if (g_ans[x]) { return; } g_ans[x] = d; for (auto it = g_m[x].cbegin(); it != g_...
ALGO
0.999992
4.5698
7968711a-f3cd-44e8-81b4-cbd0c0489545
rajatgupta24/sometime-cpp
search/binary.cpp
#include<iostream> using namespace std; int main() { int arr[10], i, num, index; cout<<"Enter 10 Numbers: "; for(i=0; i<10; i++) { cin>>arr[i]; } cout<<"\nEnter a Number to Search: "; cin>>num; for(i=0; i<10; i++) { if(arr[i]==num) { index = i; ...
ALGO
0.992144
3.481788
9f69e9c0-ed03-4216-8a08-f30ad914579b
YouKlike/APCS
C++/d064.cpp
#include<bits/stdc++.h> using namespace std; int main() { int a; cin >> a; if (a%2 == 0) cout << "Even"; else cout << "Odd"; }
ALGO
0.999793
4.016068
b5da4add-b5fd-4ad3-9f5c-ded72beb30ad
Hima0X2/codeforces
731A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int sum=0,b,d; string s; cin>>s; int l=s.length(); d=abs(s[0]-'a'); if(d<=13) { sum=sum+d; } else { sum=sum+26-d; } for(int i=1;i<l;i++) { d=abs(s[i]-s[i-1]); ...
ALGO
0.999927
3.674682
939a27c0-fdb9-466b-9ba5-48828840a804
Maniac198/Competitve-Programming
B_Ten_Words_of_Wisdom.cpp
#include <bits/stdc++.h> using namespace std; #define yes {cout<<"YES"<<endl;} #define no {cout<<"NO"<<endl;} #define int long long #define endl '\n'; #define all(x) x.begin(),x.end() #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (...
ALGO
0.999808
4.706721
e05c327e-2935-4a8f-8418-574580dda768
KulmeetSJ/Leetcode
Shortest path in Directed Acyclic Graph - GFG/shortest-path-in-directed-acyclic-graph.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: void topoSort(int node,vector<vector<pair<int,int>>> adj,vector<int> &vis, stack<int>& st){ vis[node] =1; for(auto ...
ALGO
0.999939
5.848507
40cbb7c5-46fb-4f05-8adf-44cb7c48f6e9
DevOpsAraj/Striver-SDESheet-Challenge2023
07_rotateMatrix.cpp
// Code Studio - Rotate Matrix #include <bits/stdc++.h> using namespace std; #include <bits/stdc++.h> void rotateMatrix(vector<vector<int>> &mat, int n, int m) { if (n == 1 || m == 1) return; int top = 0, bottom = n - 1, left = 0, right = m - 1; while (top < bottom && left < right) { ...
ALGO
0.999987
4.01783
7595e84a-d8f3-4758-bf91-e065bdd53c27
sarvex/leetcode-scratch
solution/2400-2499/2470.Number of Subarrays With LCM Equal to K/Solution.cpp
class Solution { public: int subarrayLCM(vector<int>& nums, int k) { int n = nums.size(); int ans = 0; for (int i = 0; i < n; ++i) { int a = nums[i]; for (int j = i; j < n; ++j) { int b = nums[j]; int x = lcm(a, b); ans ...
ALGO
0.999941
5.739583
d9de00ee-5217-4bfc-a57c-1ed7dc6d571f
sarvex/leetcode-c--
solution/1700-1799/1762.Buildings With an Ocean View/Solution.cpp
class Solution { public: vector<int> findBuildings(vector<int>& heights) { int mx = 0; vector<int> ans; for (int i = heights.size() - 1; ~i; --i) { int v = heights[i]; if (mx < v) { ans.push_back(i); mx = v; } } ...
ALGO
0.99999
6.284778
5baccb3e-2ec6-4522-821b-09bb27090a78
mirtaba/ACMICPC-INOI_Archive
CF EDU #3/609C.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i,n,m) for(LL i = n ; i < m ; i++) #define DFOR(i,n,m) for(LL i = n ; i >= m ; i--) #define pb push_back const int Maxn = 1000 * 100 + 250; typedef long long LL; LL in[Maxn]; LL n , m = 0 , tmp , ans = 0 , total = 0 , goal = 0; int main() { cin >> n; ...
ALGO
0.99998
3.440584
64978797-3900-4024-b640-e0555f7fe7cc
lolzio5/JABBAL
C++GameOfLife/GameOfLife.cpp
#include <iostream> #include <vector> #include <thread> #include <chrono> // Function to clear the console screen void clearScreen() { // system("clear"); // Uncomment this line if you're on a Unix-based system system("cls"); // Use this line if you're on a Windows system } // Function to print the grid to th...
ALGO
0.999374
6.966098
986134ce-a5be-49b4-94ed-90ff12047bd0
ishandutta2007/codeforces
uestc_nocturne/normal/191/E.cpp
/* Author: elfness@UESTC */ #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> #include<iostream> #include<vector> #include<string> using namespace std; typedef long long LL; const LL ooo=10010000; const LL oo=ooo*ooo; const int V=100100; LL s[V]; int n; int find(LL tmp) { int ...
ALGO
0.999982
3.535371
9197ec25-a260-43d8-92fb-2681fe1a3cb9
dean2727/KattisJourney
pset7/nikola/C.cpp
#include <iostream> #include <vector> #include <map> using namespace std; /* DP[a][i]: a = the amount to jump for next time, i = the index in costs we start the jump at for this time We want to find whether the jump in the forward direction by previous jump + 1 or a jump in the reverse direction by the previous jump ...
ALGO
0.999893
4.477832
4a9c44a0-ec8b-4567-b323-4ab1a37352de
iprosenjitp/Online-Judge
Codeforces/2014C-Robin Hood in Town.cpp
#include <bits/stdc++.h> #define ll long long #define MAX 100000009 using namespace std; vector<int> wealth; int n; ll total_wealth; ll BinarySearch(); bool IsPossibleX(ll); int main() { int t; cin >> t; while(t--) { cin >> n; total_wealth = 0L; wealth.clear(); wealth.resize(n, 0); ...
ALGO
0.999844
4.97488
fe1a881d-3f8e-4ee6-83e0-5a8ecaa07192
mgomez101/GomezMichelle_CSC_CIS5_Spring2017
Hmwk/Assignment_1/Savitch_8thEd_Chap1_Prob9_FreeFall_V1/main.cpp
/* File: main.cpp Author: Dr. Mark E. Lehr Created on January 5, 2017, 1:15 PM Purpose: Free Fall */ //System Libraries #include <iostream> using namespace std; //User Libraries //Global Constants //Such as PI, Vc, -> Math/Science values //as well as conversions from system of units to //another const ...
ALGO
0.980352
3.792399
74399379-0e32-4cfa-96c7-4df0bcf1f0e9
yassjd199/CSES
String Algorithms/Finding Borders.cpp
/* @author : yassjd199 */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef pair<int , int> pii; typedef pair<long long , long long> pll; typedef vector<int> vii; typedef vector<long long> vll; double eps ...
ALGO
0.99998
4.763778
bfceb91c-4f72-4d9e-a033-6a912fa6eaca
yuriyvolkov/galib
src/ga/garandom.cpp
// $Header$ #include <ga/garandom.h> #include <time.h> #include <math.h> #include <string.h> static void bitseed(unsigned int seed = 1); // If the machine has multiple processes, use the PID to help make the random // number generator seed more random. #if defined(GALIB_USE_PID) #include <unistd.h> #define _GA_PID *...
TOOL
0.983919
5.953112
6f951ebc-a7c1-49d7-b5e6-7e1710c71bab
BVibhu/Cplusplus-Practicals-B.Sc-Hons-CS
PRACTICAL 9.cpp
#include<iostream> using namespace std; int main() { int n; cout<<"enter value of 'n': "; cin>>n; for(int i=1;i<=n; i++) { for(int j=n-1;j>=i ;j--) cout<<" "; for(int k=1;k<=(2*i-1) ;k++) cout<<"*"; cout<<"\n"; } return 0; }
ALGO
0.999795
3.312877
d71448dc-e831-4f56-aea5-62709a71e248
SoftTissueBiomechanicsLab/isofin
Functions/PatchN_R.cpp
#include <iostream> #include <cmath> #include"../Eigen/Eigen/Dense" #include"../Eigen/Eigen/Sparse" #include <tuple> using namespace std; using namespace Eigen; typedef Matrix <int, Dynamic, Dynamic> MatrixXi; // define matrix for integers. typedef Matrix <int, 1, Dynamic> RowVectorXi; // define row vector for integers...
ALGO
0.998603
3.218801
8d5abe4a-b740-4740-9d16-22f59c0718f5
juniorandrade1/Competitive-Programming
Kattis/NAIPC17/appleMarket.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; typedef pair< ll, ll > ii; typedef vector< ll > vi; typedef vector< ii > vii; #define INF 0x3F3F3F3F #define LINF 0x3F3F3F3F3F3F3F3FLL #define pb push_back #define mp make_pair #define pq priori...
ALGO
0.999921
4.115986
adc77997-6e2f-4e57-aec3-10e46ef3ecec
code233trainee/lijiminbest
Data_Structure/dsacpp-src/src/BTree/main.cpp
/****************************************************************************************** * Test of B-Tree ******************************************************************************************/ #include "BTree_test.h" /****************************************************************************************** * ...
TEST
0.938837
6.175313
338e6d99-f846-4ec8-bc9a-8289e9765a70
hieuh0/opencv-tesseract-android
app/src/main/cpp/tesseractlib/tesseract/src/src/dict/trie.cpp
/*---------------------------------------------------------------------- I n c l u d e s ----------------------------------------------------------------------*/ #include "trie.h" #include "dawg.h" #include "dict.h" #include "helpers.h" #include "kdpair.h" namespace tesseract { const char kDoNotRevers...
ALGO
0.985143
7.220171
08c718d7-4525-4703-ad7d-444a4d111a4e
Bin0903/Programs
Data Structure/Sort/MergeSort.cpp
#include "MergeSort.h" void MergeSort::merge(std::vector<int>& nums, int left, int mid, int right) { int length = right - left+2; std::vector<int> temp(length); int i = left, j = mid+1; int p = 0; while (i < mid+1 && j < right+1) { if (nums[i] <= nums[j]) temp[p++] = nums[i++]; else temp[p++] = nums[...
ALGO
0.999968
5.551508
54140792-62fe-4b79-8f36-f31e4c34f1a4
AskarKani/ExcelPyUnitTestFW
examples/lib_example/sub/sub.cpp
#include <iostream> #include "sub.hpp" #include "print_out.hpp" int sub(int a, int b) { print(a-b); return(a-b); }
TOOL
0.960282
4.438629
9977034e-0b85-4aa3-8bb0-e3a914a0b486
SokratG/cu-Reconstruction
3dparty/CudaUtils/filesystem.cpp
#include "filesystem.h" #include "alphanum.h" #include "Process.h" #include <sys/stat.h> #include <algorithm> #include <strings.h> #include <glob.h> #include "logging.h" // absolutePath std::string absolutePath( const std::string& relative_path ) { if( relative_path.size() != 0 ) { const char first_char = relati...
TOOL
0.946884
5.932607
147bc357-87da-468f-ae57-de70274dc921
AndanteKim/LeetCode_Practice
1293-shortest-path-in-a-grid-with-obstacles-elimination/1293-shortest-path-in-a-grid-with-obstacles-elimination.cpp
struct pathObj{ int row, col, g, remain, f; }; class Compare{ public: bool operator()(pathObj& lhs, pathObj& rhs){ return lhs.f > rhs.f; } }; class Solution { int rows, cols; public: int shortestPath(vector<vector<int>>& grid, int k) { rows = grid.size(), cols = gri...
ALGO
0.999998
5.839588
ea8b3f05-2a9d-49e5-b196-ea604d0b3f7e
dante329/Cpp_develop
Sort/selection_sort.cpp
#include <iostream> using namespace std; void selection_sort(int* arr,int sz) { for(int i=1;i<=sz;i++) //һԪĬ { int mini = i; for(int j=i;j<=sz;j++) { if(arr[j] < arr[mini]) { mini = j; } } swap(arr[i],arr[mini]); } } void print(int* arr,int sz) { for(int i=1;i<=sz;i++) { cout << *(a...
ALGO
0.999313
3.825653
f1886330-a14b-49c9-8e42-fb1f854b693b
sumanthreddy07/OS_LAB
Page Table and Page Replacement/pagetable.cpp
#include <bits/stdc++.h> using namespace std; struct page{ int pg_no; int frame; }; int main() { int log_add, phy_add, pg_size,i,j; cout<<"\nEnter the size of logical address: "; cin>>log_add; cout<<"\nEnter the size of physical address: "; cin>>phy_add; cout<<"\nEnter the size of t...
TOOL
0.955561
3.36197
60108b5c-dd55-4d82-a120-b7e52092f3e7
mathpz/competitive-programming
Codes/CDP-UTFPR/uri2135-StonksOverflow.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n, j=1; while(scanf("%d", &n) != EOF){ int i,a,sum = 0; bool flag = true; for(i = 0; i<n; i++){ scanf(" %d", &a); if(sum == a && flag){ printf("Instancia %d\n", j++); ...
ALGO
0.998447
3.354921
d6c6b6e1-45ae-49ea-981f-8e6cb2cb15f7
Daksh-2256/c--with-dk
C++/03_operators/arth.cpp
#include<iostream> using namespace std; int main(){ int cups; double pricePerCup,totalPrice,discountedPrice; cout<<"Enter the number of Cup: "; cin>>cups; cout<<"Enter the price per Cup: "; cin>>pricePerCup; totalPrice = cups*pricePerCup; //apply 5% discount if total price is above 1...
TOOL
0.96026
3.823951
42da61e4-d5d5-4c3d-a016-a7c43ae7a5f9
Sanchitraina1999/DSA
Ass2/2.cpp
/* Write C++ program for storing matrix. Write functions for Check whether given matrix is upper triangular or not Compute summation of diagonal elements Compute transpose of matrix Add, subtract and multiply two matrices Check saddle point is present or not. */ #include<iostream> using namespace std; int mai...
ALGO
0.999891
4.220308
843a2399-3bd5-4ca1-b302-9adce62494f1
ginkgotyranny/MyLeetCode
0013.罗马数字转整数/0013.cpp
class Solution { public: int romanToInt(string s) { map<char, int> mp; mp['I'] = 1, mp['V'] = 5, mp['X'] = 10, mp['L'] = 50, mp['C'] = 100, mp['D'] = 500, mp['M'] = 1000; int ans = 0; int index = 0; while (index < s.length()) { if (index + 1 < s.length() && mp[s[i...
ALGO
0.999904
6.321982
7d825717-940b-4cff-a225-d49887d19b9c
lokesh-0706/6Companies30days
GoldmanSachs/GCD_of_Srings.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: string gcdOfStrings(string s1, string s2) { if(s1+s2==s2+s1) { int n= __gcd( s1.length() , s2.length() ); return s1.substr(0,n); } return ""; } };
ALGO
0.999755
5.56567
b9439626-975c-4592-b0c1-8674d0c6da65
MusshcaB/lynx_cplus
python_cpp/opencv-4.5.1/opencv-4.5.1/samples/cpp/text_skewness_correction.cpp
/* This tutorial demonstrates how to correct the skewness in a text. The program takes as input a skewed source image and shows non skewed text. */ #include <opencv2/core.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <iostream> #include <iomanip> #includ...
ALGO
0.950861
6.157617
ab355d96-0ff5-4f1d-80c9-b04a417125d3
2021ucs0088/leetcode
0164-maximum-gap/0164-maximum-gap.cpp
class Solution { public: int maximumGap(vector<int>& nums) { priority_queue<int,vector<int>,greater<int>>pq; for(int num:nums){ pq.push(num); } if(nums.size()<2){ return 0; } int maxval=INT_MIN; for(int i=0;i<nums.size()-1;i++){ ...
ALGO
0.999979
5.263034
1d0045ce-9899-41b2-ac4d-fa9739754998
ThomasVuNguyen/livekit
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.998799
6.776823
74f9764e-c3eb-4427-8bc4-21bcc4f45737
Seoha57/Programmers
C++/Lv2 다리를 지나는 트럭.cpp
/******************** 다리를 지나는 트럭 문제 설명 트럭 여러 대가 강을 가로지르는 일 차선 다리를 정해진 순으로 건너려 합니다. 모든 트럭이 다리를 건너려면 최소 몇 초가 걸리는지 알아내야 합니다. 트럭은 1초에 1만큼 움직이며, 다리 길이는 bridge_length이고 다리는 무게 weight까지 견딥니다. ※ 트럭이 다리에 완전히 오르지 않은 경우, 이 트럭의 무게는 고려하지 않습니다. 예를 들어, 길이가 2이고 10kg 무게를 견디는 다리가 있습니다. 무게가 [7, 4, 5, 6]kg인 트럭이 순서대로 최단 시간 안에 다리를 건너려면 다음...
ALGO
0.999869
5.76019
a41f400a-b929-4a84-b9a1-6c05131abdff
sailor-ux/repo2
leetcode_vscode/leetcode_232/232.cpp
#include <iostream> #include <stack> using namespace std; class MyQueue { public: stack<int> stk1, stk2; MyQueue() { } void push(int x) { stk1.push(x); } int pop() { if (!stk2.empty()) { int res = stk2.top(); stk2.pop(); return res; }...
ALGO
0.999528
5.148638
d16509bf-4aff-43e8-a779-89ace6dc69ec
aurelw/libfhc
src/tests/test_counting_performance.cpp
#include <highgui.h> #include <pcl/conversions.h> #include <pcl/io/io.h> #include <pcl/io/vtk_lib_io.h> #include <pcl/PolygonMesh.h> #include "fasthullcollision.hpp" #include "utils.hpp" typedef pcl::PointCloud<pcl::PointXYZ> PointCloud; using namespace fhc; int main(int argc, char** argv) { int res_x = 512; ...
ALGO
0.94741
6.096827