uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
571c4ae9-7bca-4724-aac6-cfb87ece2962
siddhantpushpraj/DATA-STRUCTURE-LAB
exp7(a).cpp
/* EXPERIMENT 7(b) Menu driven Program to demonstrate the implementation of various operations on a Circular queue (using a linear array and a linked list) */ #include <iostream> #define MAX 5 using namespace std; class Circular_Queue { private: int *cqueue_arr; int front, rear; publ...
ALGO
0.98546
4.651167
eb23ef57-8c7e-4de3-9c62-0e5eb49a02f0
DevunuriSrinidhi/LEETCODE
2434-design-a-number-container-system/design-a-number-container-system.cpp
class NumberContainers { public: NumberContainers() { } void change(int index, int number) { if (d.contains(index)) { int oldNumber = d[index]; g[oldNumber].erase(index); if (g[oldNumber].empty()) { g.erase(oldNumber); } } ...
ALGO
0.999801
6.119812
c4528452-26cd-4e52-8f3d-ed443b9247a6
prisrv/prisrv
Algorithm/MIRACL/sf2m12x.cpp
/* * MIRACL C++ Implementation file SF2m12x.cpp * * AUTHOR : M. Scott * * PURPOSE : Implementation of class SF2m12x (special 12-th extension over 2^m) * * WARNING: This class has been cobbled together for a specific use with * the MIRACL library. It is not complete, and may not work in other * ...
ALGO
0.998585
3.674291
577e483b-7a69-4ef5-8a72-5e2298567595
gauravgupta15/DSA
VS-Code/DSA/Recrusion/Day4_Strings/CalcPow.cpp
#include <iostream> using namespace std; int power(int num, int p) { // Base Case : if (p == 0) return 1; if ( p == 1) return num; // Recursive Call: int ans = power(num, p/2); // Progressive Step: // if power is even : if(p%2 == 0) return ans * ans; ...
ALGO
0.999922
5.178694
99021a8b-e5ca-4625-aafb-863a1a4bf44f
LucaCraft89/C_Class3AIA
olimpiadi/manymax.cpp
// NOTE: it is recommended to use this even if you don't understand the following code. #include <fstream> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { // uncomment the two following lines if you want to read/write from files // ifstream cin("...
ALGO
0.999889
4.425646
f9d7746c-060f-41b0-803a-d940112203a5
FIT-HCMUTE-Learn/introductory-programming
Bai4Level10.cpp
#include <bits/stdc++.h> using namespace std; void input(char normal[]); int words(char normal[]); void output(int answer); int main () { char normal[99999]; input(normal); int answer = words(normal); output(answer); return 0; } void input(char normal[]) { gets(normal); } int words(char normal[]) { int cnt = 0...
ALGO
0.999217
3.588481
d1d1bd7d-11cc-47f7-94d1-be9a93c2f339
SMath0510/CS2810-Labs
OOPS/Graph Template.cpp
#include<bits/stdc++.h> using namespace std; class Graphs{ private: vector<vector<pair<int,int>>> adj_list; int size; vector<bool> visited; vector<pair<pair<int,int>,int>> edges; vector<int> color; vector<int> dist; public: Graphs(int n){ size...
ALGO
0.999977
4.896147
5b080a5b-461c-4864-ae35-8d9ec2f62f6e
avishekkumar0204/leetcode-solutions
Linked List/reverse_linkedlist_206.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.999773
5.548728
6921ccff-7643-4668-b949-4db4a7b93e30
viiku/competitive-programming-problems
codeforces/1433A.cpp
#include<bits/stdc++.h> using namespace std; /* int countdigit(int x){ int count=0; while(x!=0){ x/=10; count++; } return count; }*/ int main(){ int a[36]={1,11,111,1111,2,22,222,2222,3,33,333,3333,4,44,444,4444,5,55,555,5555,6,66,666,6666,7,77,777,7777,8,88,888,8888,9,99,999,9999}; ...
ALGO
0.998928
3.80928
e380e9e0-a19f-48eb-a63e-0da883eefbd0
PrathameshJadhav30/Data-Structure
DATA STRUCTURE/EXP 8_binarysearch.cpp
#include <stdio.h> #define MAX 50 int arr[MAX], pos[MAX], ns = 0; void sort(int * array, int size) { int i, j, temp; for (i = 0; i < size; i++) { for (j = i + 1; j < size; j++) { if (array[j] < array[i]) { temp = array[i]; array[i] = array[j]; ...
ALGO
0.99989
4.610661
8decbe25-d9e7-4111-90a3-56f304944a86
ishandutta2007/codeforces
ympc2005/normal/1229/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair <ll, int> pli; const int N = 1e5 + 10, mod = 1e9 + 7; int n, fa[N], ans; ll a[N]; vector <int> e[N]; vector <pli> b[N], tmp; ll gcd_(ll a, ll b) { while (b) { a %= b; swap(a, b); } return a; } void dfs_(...
ALGO
0.999871
4.194122
a1f49c38-8e18-4108-9380-5a6b96e6af32
OneBitPython/Codeforces
A_Subtract_or_Divide.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define all(c) c.begin(), c.end() #define endl "\n" const double PI=3.141592653589; void __print(int x) {cerr << x;} void __print(long x) {cerr << x;} void __print(unsigned x) {cerr << x;} void __print(unsigned long x) {cerr << ...
ALGO
0.999861
4.236254
fe5568e6-03b5-4b67-aef1-a287b8d0530e
cjlworld/OJ
Luogu/P3939.cpp
#include<vector> #include<cstdio> #include<iostream> #include<algorithm> typedef long long LL; typedef unsigned long long ULL; namespace FastIO { const int _SIZE = (1 << 21) + 1; char ibuf[_SIZE],obuf[_SIZE]; char *iS,*iT; char c; char qu[55]; char *oS=obuf,*oT=oS+_SIZE-1; bool _sign=false; int qr; // getchar #define g...
ALGO
0.999985
3.777251
ab2562b5-9ddf-403f-a626-12dd95d687ac
ishandutta2007/codeforces
ujrepacul/normal/1428/B.cpp
#include <bits/stdc++.h> using namespace std; char v[300005]; int main() { ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0); long long t,i,j,s=0,k,n,m; cin>>t; while(t--) { cin>>n; for(i=1;i<=n;++i) cin>>v[i]; v[0]=v[n]; int ok1=0,ok2=0; ...
ALGO
0.999874
3.452204
9f3b396f-e122-4370-9498-ef5a7bf1b919
raincross7/code-similarity
codes/train_code/problem338/problem338_392.cpp
// C - Monsters Battle Royale #include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 2147483647; // const ll INF = 9223372036854775807; // const ll MOD = 1e9 + 7; int main() { int N; cin >> N; int ans; cin >> ans; for (int i=1; i<N; i++) { int A; cin >> A; ans = __gcd(ans, ...
ALGO
0.999932
4.067838
def00077-d8bd-4e1b-885f-3c7d125b6e71
muhammadalmuzahid/ACM-Library
Matroid/colorLinearMatroid.cpp
/* source : https://codeforces.com/blog/entry/69287 [Tutorial] Matroid intersection in simple words by ATSTNG */ #include <bits/stdc++.h> using namespace std; typedef long long int Z2Vector; struct GroundSetElement { int color; Z2Vector vector; bool in_independent_set; int independent_set_p...
ALGO
0.999886
4.112283
385b4135-3c79-4276-897f-607e1cc674ac
camenduru/sibr_core
src/core/view/Orbit.cpp
#include "Orbit.hpp" #include <boost/filesystem.hpp> #include "core/graphics/Input.hpp" #include "core/graphics/Viewport.hpp" #include "core/raycaster/CameraRaycaster.hpp" #include "core/graphics/Window.hpp" #include "core/graphics/Mesh.hpp" #include "core/view/UIShortcuts.hpp" # define SIBR_ORBIT_INTERPOLATE_FRAMES ...
ALGO
0.879339
6.659568
a85ec143-2424-48e0-8b07-9a4f6fb68f70
ishandutta2007/codeforces
teapotd/normal/1327/B.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #ifdef LOC #include "debuglib.h" #else #define deb(...) #define DBP(...) #endif using namespace std; using ll = long long; using Vi = vector<int>; using Pii = pair<int, int>; #define pb push_back #define mp make_pair #de...
ALGO
0.999971
4.219466
a143e5dc-0969-4588-b733-cb78b995f543
InCloudsBelly/Xngine
Engine/Source/ThirdParty/bullet3/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
#include "btSphereBoxCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionShapes/btSphereShape.h" #include "BulletCollision/CollisionShapes/btBoxShape.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/Co...
ALGO
0.999641
6.841656
a4dbf9c5-de0c-4c71-b1ab-281220ac1372
WindBlowAssCold/ollvm
libcxx/test/std/containers/associative/map/map.ops/equal_range_transparent.pass.cpp
// UNSUPPORTED: c++03, c++11 // <map> // class map // template<typename K> // pair<iterator,iterator> equal_range(const K& x); // C++14 // template<typename K> // pair<const_iterator,const_iterator> equal_range(const K& x) const; // // C++14 #include <cassert> #include <map> #inc...
TEST
0.981067
5.229283
14ce59a3-5e7c-413f-b126-1c848c4bc9e5
sud-dev/Algorithm-DS-Practice
CodingNinjas/Dynamic Programming-2/PartyProblem.cpp
#include <bits/stdc++.h> using namespace std; int *helper(int *weight,int *value,int n,int **dp,int budget){ int *res=new int[2]; for(int i=1;i<=n;i++){ for(int j=1;j<=budget;j++){ dp[i][j]=dp[i-1][j]; if(weight[i-1]<=j){ dp[i][j]=max(value[i-1]+dp[i-1][j-weight[i...
ALGO
0.999884
4.226
5873c4a3-3eb0-4c11-ad96-1065e8e5f185
GuoYuefei/PAT
1009/1009.cpp
/* * 1009.cpp * * Created on: 2017年5月2日 * Author: Administrator */ #include<iostream> #include<cstdlib> #include<string> using namespace std; /** * 哇哈哈,上一题是给这题做铺垫啊 其实可以用上一题的做法,但是这反正没限制,啦啦啦~啦 */ int decompose(string str,string* words); void reverse(string& str); int main(){ string* str = new string(); g...
ALGO
0.999942
3.975345
f9c38106-211f-4841-86bd-db55c95f493c
jasveen18/CP-krle-placement-lag-jayegi
CompetitiveProg_CB/Recursion/string_generation_acode.cpp
void generateStrings(char *n, char *out, int i, int j) { // Base Case if (n[i] == '\0') { out[j] = '\0'; cout << out << endl; return; } // Recursive Case // One digit at a time int digit = n[i] - '0'; if (digit > 0) { char ch = digit + 'A' - 1; out[j...
ALGO
0.998994
5.759188
14387df1-34fe-4fc0-9656-57762d6ef4a1
Backl1ght/competitive-programming-code-template
src/graph/BlockForest.cpp
// 「APIO2018」铁人两项(https://loj.ac/p/2587) // 给定一张简单无向图,问有多少对三元组 <s, c, f>(s, c, f互不相同)使得存在一条简单路径从 s 出发,经过 c 到达 f 。 #include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 2e5 + 5; int n, m; int w[N]; vector<int> G[N], F[N]; int cc, scc; int dfc, dfn[N], low[N]; int top, stk[N]; void tarjan(in...
ALGO
0.999876
4.866343
3985892f-1642-497b-8d74-1ec2a2de12c3
ishandutta2007/codeforces
marckess/normal/1588/A.cpp
// Problem : A. Two Arrays // Contest : Codeforces - Codeforces Round #755 (Div. 1, based on Technocup 2022 Elimination Round 2) // URL : https://codeforces.com/contest/1588/problem/A // Memory Limit : 256 MB // Time Limit : 1000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++....
ALGO
0.999989
4.748065
87f1042a-78e4-40e4-8e47-3860af528878
Moloshow/gpuprogrammingTP
MatMul CPU C++/eigen-3.3.7/bench/benchEigenSolver.cpp
// g++ -DNDEBUG -O3 -I.. benchEigenSolver.cpp -o benchEigenSolver && ./benchEigenSolver // options: // -DBENCH_GMM // -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3 // -DEIGEN_DONT_VECTORIZE // -msse2 // -DREPEAT=100 // -DTRIES=10 // -DSCALAR=double #include <iostream> #include <Eigen/Core> #include <Eigen/QR> #in...
TOOL
0.991739
5.772194
deb9629c-e642-4e16-81f4-dafa6966f45c
vansh-codes/Complete-Interview-Preparation-GFG
1_Programming-Language/MultiDimensionalArray/Problems/matrix_multiplication.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int> > multiplyMatrix( const vector<vector<int> >& A, const vector<vector<int> >& B) { // code here int rowA = A.size(); int colA = A[0].size(); int rowB = B.size(); int colB = B[0].size(); // cout<<rowA<<" ...
ALGO
0.996519
3.222389
b0b41c3c-9283-49d2-9705-b9927f02ee16
saurabhsharma02/IISc_Assignments
nsde/a2/q5/Q5.cpp
#include <iostream> #include <fstream> #include <cmath> #include "assert.h" #include <vector> using namespace std; using Real = double; void readFile(vector<double> &values) { ifstream fin; fin.open("./input", ios::in); assert(!fin.fail()); double temp = 0.0; while (fin >> temp) { valu...
ALGO
0.999476
3.628193
1feb287c-7212-47eb-8911-a89f413648d8
viscrisn/mit-algo-cpp
CPP Projects/Techweekend 2013/paran/gen_nos.cpp
#include<iostream> #include<stdio.h> #include<cstring> #include<stdlib.h> #include<cmath> #include<vector> #include<algorithm> #include<map> #include<functional> #include<stack> #include<queue> using namespace std; int main() { int test; test =100; for(int testno = 0; testno < test ; testno++ ) { long long n; ...
ALGO
0.999148
3.054787
61710887-5af2-4728-900a-dba204306e6b
daspushpita/athenak_updates
src/shearing_box/shearing_box.cpp
#include <algorithm> #include <iostream> #include <string> #include <vector> #include "athena.hpp" #include "parameter_input.hpp" #include "mesh/mesh.hpp" #include "shearing_box.hpp" //---------------------------------------------------------------------------------------- //! ShearingBoxBoundary base class construct...
ALGO
0.95394
4.62608
510bdf08-7474-4946-a31c-9d093a0d8d6f
ishandutta2007/codeforces
igorfardoc/normal/1368/E.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vector<int>> vvi; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifdef _FILE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ...
ALGO
0.999962
4.836077
6b4a9833-4e8a-47f1-a72d-e1d74da681e3
krisf01/CS110
m10/Chapter_10/Pr10-10.cpp
// This program demonstrates the strcmp and atoi functions. #include <iostream> #include <cctype> // For tolower #include <cstring> // For strcmp #include <cstdlib> // For atoi using namespace std; int main() { const int SIZE = 20; // Array size char input[SIZE]; // To hold user input int...
ALGO
0.978116
5.109094
a3dfaee5-6db8-45d2-abba-17508e2ad049
johannesgerer/jburkardt-cpp
asa172/asa172.cpp
# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> # include <ctime> using namespace std; # include "asa172.hpp" //****************************************************************************80 void revers ( int ivec[], int kdim ) { int i; int itemp; for ( i = 0; i < kdim / 2; i+...
ALGO
0.98228
5.46631
57b62363-e75c-4034-abd1-ff3cc2cfb5f7
sinkyoungdeok/Algorithm
boj_code/10800/10822.cpp
#include <iostream> #include <string.h> using namespace std; int num[101]; int main() { char st[101]; cin >> st; int num_i = 0; for (int i = 0; st[i] != NULL; i++) { if (st[i] != ',') { num[num_i] *= 10; num[num_i] += st[i] - '0'; } else num_i++; } int sum = 0; for (int i = 0; i <= num_i; i++...
ALGO
0.999556
3.430802
911f20e2-f196-4080-a680-8cb12fadd828
harikhkkishore/CSA_5196-cryptography-
10.playfair matrix.cpp
#include <stdio.h> #include <string.h> #include <ctype.h> #define SIZE 5 char playfairMatrix[SIZE][SIZE] = { {'M', 'F', 'H', 'I', 'K'}, {'U', 'N', 'O', 'P', 'Q'}, {'Z', 'V', 'W', 'X', 'Y'}, {'E', 'L', 'A', 'R', 'G'}, {'D', 'S', 'T', 'B', 'C'} }; void getPosition(char letter, int *row, int *col) {...
ALGO
0.999975
6.101131
ff101a43-d730-4caa-b4d8-dd8ec8223f6a
chananyameth/CommandParser
CommandParser/CommandParserMain.cpp
#include<iostream> #include<exception> #include<string> #include<vector> #include"CommandsLibrary.h" void parseCommand(std::vector<std::string>& args) { try { std::string addCommand = "add"; std::string subCommand = "sub"; std::string exitCommand = "exit"; if (args.size() == 0) { // do nothing } else...
TOOL
0.925484
5.293303
daa2d45b-00f4-482f-bf68-91a1970f9586
Nisarg-1406/DSA-LeetCode-Coding-Questions-in-C-
Trees/Trim a Binary Search Tree.cpp
// Iterative and Recursive Solution - 2 Approaches TreeNode* trimBST(TreeNode* root, int low, int high) { // Recursive Solution ios_base::sync_with_stdio(false); cin.tie(NULL); if (!root) return root; if (root->val >= low && root->val <= high){ ro...
ALGO
0.999999
6.130213
dd4686a3-f00b-445a-a8ea-5144b6036767
DebonairSM/AutoTrade
VTrade.Framework/applications/mql5/Experts/archive/V-EA-LongerTrends.cpp
#include <Trade\Trade.mqh> //--- Input parameters input double InpLotSize = 0.1; // Lot size input int InpStopLoss = 50; // Stop Loss in points input int InpTakeProfit = 100; // Take Profit in points input int InpTrendPeriod = 20; // Trend EMA period input int ...
ALGO
0.999143
6.011528
fd4e2920-9573-425a-b4c1-298362ff5b2d
sarvex/leetcode-modula
solution/1900-1999/1983.Widest Pair of Indices With Equal Range Sum/Solution.cpp
class Solution { public: int widestPairOfIndices(vector<int>& nums1, vector<int>& nums2) { unordered_map<int, int> d; d[0] = -1; int ans = 0, s = 0; int n = nums1.size(); for (int i = 0; i < n; ++i) { s += nums1[i] - nums2[i]; if (d.count(s)) { ...
ALGO
0.999983
5.686088
695ed445-fb16-492f-b97b-b3c83386f57c
zebra6/polecat
data_types/w_graph_t.cpp
#include "w_graph_t.h" #include "uf_t.h" //union find for kruskal #include <stdlib.h> // #include <stdio.h> //printf #include <assert.h> //assert #include <float.h> //FLT_MAX #include <vector> //node lists, etc #include <queue> //for minimum spanning tree using std::vector; using std::priority_queue; /********...
ALGO
0.998184
3.793558
1a3d1f8e-cedb-4c58-95b2-baa1570ba266
sarvex/leetcode-swift
solution/0500-0599/0564.Find the Closest Palindrome/Solution.cpp
class Solution { public: string nearestPalindromic(string n) { long x = stol(n); long ans = -1; for (long t : get(n)) if (ans == -1 || abs(t - x) < abs(ans - x) || (abs(t - x) == abs(ans - x) && t < ans)) ans = t; return to_string(ans); } unordere...
ALGO
0.999967
6.429273
7a9d8059-6591-4034-b5ec-7d0c9b5986f2
ShivamDhamija/leetcodeQuestions
0695-max-area-of-island/0695-max-area-of-island.cpp
class Solution { public: bool check(vector<vector<int>>& g,int i,int j) { if(i<0||j<0||i>=g.size()||j>=g[0].size()) return false; if(g[i][j]==0) return false; g[i][j]=0; return true; } void call(vector<vector<int>>& g,int i,int j,int &a) { ...
ALGO
0.999938
6.049007
30231de5-c540-4192-8135-de8b6d71cea2
suxutao/LeetcodeList
cn/706-design-hashmap .cpp
#include "../../../stdc.h" using namespace std; //leetcode submit region begin(Prohibit modification and deletion) class MyHashMap { public: int arr[1000002]; MyHashMap() { memset(arr,-1,sizeof arr); } void put(int key, int value) { arr[key]=value; } int get(int key) {...
ALGO
0.998046
5.28825
a90cf4f0-c481-4842-a82c-43b6867b4310
kk2a/library
verify/yosupo_ds/ds_static_rmq_2.test.cpp
#define PROBLEM "https://judge.yosupo.jp/problem/staticrmq" #include "../../data_structure/disjoint_sparse_table.hpp" #include "../../math/monoid/min.hpp" #include "../../template/template.hpp" using namespace std; int main() { using M = kk2::monoid::Min<int>; int n, q; kin >> n >> q; vc<M> a(n); ...
ALGO
0.999781
5.604266
857dceea-0e95-457c-a4a3-f862f0048eb9
somof/CarND-MPC-Project
src/Eigen-3.3/doc/snippets/Tutorial_solve_triangular.cpp
Matrix3f A; Vector3f b; A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; cout << "Here is the matrix A:" << endl << A << endl; cout << "Here is the vector b:" << endl << b << endl; Vector3f x = A.triangularView<Upper>().solve(b); cout << "The solution is:" << endl << x << endl;
ALGO
0.999587
3.055453
83010504-4ee4-4d4e-a6c8-9c8d42d3914d
yubindy/mygit
leection/56.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<vector<int>> merge(vector<vector<int>> &intervals) { if (intervals.size() <= 1) { return intervals; } sort(intervals.begin(), intervals.end(), [](vector<int> &s1, vector<int> &s2) { return s1[0] < s2[0]...
ALGO
0.999945
4.752694
d50753c1-f5c7-48ba-94d3-b01dcc0fe851
Abhishekrauniyar2906/GFG_Solutions
Difficulty: Medium/Longest Increasing Subsequence/longest-increasing-subsequence.cpp
class Solution { public: int solve(vector<int> &nums, int curr, int prev, vector<vector<int>> &dp){ if(curr == nums.size()){ return 0; } if(dp[curr][prev + 1] != -1){ return dp[curr][prev + 1]; } int take = 0; if(prev == -1 || nums[curr] > nums[pr...
ALGO
0.99999
5.687315
96258b10-f03e-411b-81e7-1ded6a2d1649
MayankGupta-dev08/myCppWork
52_decimalToHexadecimal.cpp
// To write a program to conert Decimal (0,1,2,3,4,5,6,7,8,9) HEXADECIMAL (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E) #include<bits/stdc++.h> using namespace std; string decimalToHexadecimal(int n){ //n=100 int x=1; string ans = ""; while(x<=n){ x *= 16; } x /= 16; //x=96, pow(1...
ALGO
0.999651
5.387025
dd7f3053-d231-494c-bcb0-fb3f940ccbb0
xiaodjb/zuoye
Huffman_code_program (1)/Huffman_code_program/Algorithms/Huffman/Tests/huffman_tests.cpp
/*********************************************************** * Program made by the teacher of the course CS111 2025 MUST ***********************************************************/ #include "../huffman_tree.hpp" #include "../huffman_algorithm.hpp" #include <climits> // for CHAR_BIT // Macros for defining test f...
TEST
0.921229
5.720235
df48e327-186e-43e5-be76-1a16532fd674
takano536/atcoder
abc/abc378/c.cpp
#include <iostream> #include <map> #include <vector> int main() { int n; std::cin >> n; std::map<int, int> prev_num; for (int i = 0; i < n; i++) { int a; std::cin >> a; if (prev_num.contains(a)) { std::cout << prev_num[a] << ' '; } else { std::co...
ALGO
0.999911
4.806225
f248bb91-7021-4030-b236-e5861092a986
MINTU296/DSA
DP/fibonacci.cpp
#include<bits/stdc++.h> using namespace std; long long fibo(int n,vector<int> &dp){ // base case if(n==0 || n==1) return n; if(dp[n]!=-1) return dp[n]; dp[n] = fibo(n-1,dp) + fibo(n-2,dp); } long long fibo_bottomUp(int n,vector<int>&dp){ dp[1]=1; dp[0]=0; for(int i=2; i<=n; i++){ ...
ALGO
0.999985
3.571279
f729d75c-7929-44e1-a6ce-c9825cf4d877
Rope0800/TP4_eda_SantiagoAdrianGomez
eje9b.cpp
///////Realice un programa permita elegir entre contar palabras de una frase y contar la ocurrencia de una ////////palabra en la frase, mientras el usuario lo desee. Para ello valerse de lo siguiente: //////• Una función que permita conocer cuantas palabras hay en una frase recibida como parámetro. ///////////• Otra fu...
TOOL
0.969988
6.561028
161628ff-f130-4ca8-b743-780851f448b3
derbess/PP1-assist
lab5/D.cpp
#include<iostream> using namespace std; int main() { string s; cin>>s; bool isPalindrome = true; for(int i = 0; i< s.size();i++) { if(s[i] != s[s.size() - 1 - i]) isPalindrome = false; } if(isPalindrome == true) cout<<"YES"; else cout<<"NO"; return 0; }
ALGO
0.999978
4.537202
e0a57c5c-a8fc-47fc-8f88-29a217691023
anstjaos/Algorithm
BOJ/1373.cpp
#include <iostream> using namespace std; char input[1000001]; int arr[1000001]; int arrIndex = 0; int cnt = 0; int strlen1(char *arr) { int index = 0; while (arr[index] != '\0') index++; return index; } int findNum(int count) { int result = 1; for (int i = 0; i < count; i++) { result = result * 2; } retur...
ALGO
0.999994
3.878573
40f92483-4286-4d0b-8dba-8be0e792d80d
snnnnnsoo/studies
merge_sort/sortings.cpp
#include "sortings.hpp" #include <vector> #include <iostream> void Insert_sort(std::vector<int> &array_to_sort, int m){ int temp; for (int i = 1; i < int(array_to_sort.size()); i+=m){ for (int j = i; j < i - 1 + m; ++j){ temp = array_to_sort[j]; int l; for (l = j; l ...
ALGO
0.999892
4.937596
eabd2340-22e5-4d97-aa17-fd3620cf3565
fabbaraujo/cpp-deep-dive
conditional/max-of-3-numbers/main.cpp
#include<iostream> using namespace std; void Max3(int a, int b, int c) { if(a > b && a > c) { cout<<a; } else { if(b > c) { cout<<b; } else { cout<<c; } } } int main() { Max3(2, 6, 1); }
ALGO
0.997164
4.456733
556fff49-6e21-429a-8de6-8d0768dbd952
alailsonbraz/cpp_funcoes_estruturas
avaliação/avaliação_final_q3.cpp
#include <iostream> using namespace std; #define MAX 2 struct funcionario{ int codigo; char nome[30]; char morada[30]; char telefone[20]; float vencimento; }; typedef struct funcionario Funcionario; //calcula a mdia dos vencimentos float obterMediaVenimentos(float somaVenc){ return somaVenc/MAX; } int main()...
TOOL
0.939451
4.755161
0265c02e-5365-47c9-9a2b-97c7f53c6ba2
zavik001/contest-coding
Algorithm training 5.0/A. Painting trees/source.cpp
#include <iostream> using namespace std; int main() { int P = 0, V = 0, Q = 0, M = 0; long long Ans = 0; cin >> P >> V >> Q >> M; Ans = V * 2 + M * 2 + 2; if (P + V >= Q - M && P - V < Q - M && P + V < Q + M) Ans -= P + V - Q + M + 1; if (Q + M >= P - V && Q - V < P - V && Q + M < P + V) Ans -= Q...
ALGO
0.999296
3.730705
55033597-5363-4151-b9b2-562852569b62
larissalages/code_problems
Codeforces_Contests/Round_828_Div_3/D_Divisibility_by_2_n.cpp
#include<bits/stdc++.h> #define IOS ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL); using namespace std; #define ll long long #define fl(x,y,n) for(ll x=y;x<n;x++) #define rfl(x,y,n) for(ll x=y;x>=n;x--) #define yesno if(result) cout<<"YES"<<endl;else cout<<"NO"<<endl; #define pb push_back #define all(v) v....
ALGO
0.9998
4.007206
240aaa5e-f9c5-4725-835b-65388caff13d
BorisPenchev1/Informatics-competitive
D group/Number Systems/binary.cpp
#include<bits/stdc++.h> using namespace std; int main(){ long long n; cin >> n; long long sum = 0; long i = 0; while (true){ i++; sum += (1LL << (i - 1)) * i; if (sum >= n) break; } sum -= (1LL << (i - 1)) * i; long pos = n - sum; long long number_pos = (po...
ALGO
0.999907
3.551804
10c06cf0-12b5-4ede-8c6f-4e0f8bf99d71
dwhobrey/MindCausalModellingLibrary
Library/Standard/Configure/Configuration.cpp
#include "PlatoIncludes.h" #include "Strings.h" #include "Numbers.h" #include "Trace.h" #include "CommandLine.h" #include "Configuration.h" namespace Plato { #pragma region // VariableAccessor class. VariableAccessor::VariableAccessor(VariablePtr varPtr, AccessorPtr accPtr) { VarPtr = varPtr; AccP...
CONFIG
0.926228
6.786291
c17ed139-3918-4a5c-87f3-ad49b99a45d3
vaishali-knightrider/Competitive_Programming
graph/bfs-dfs/bfs.cpp
#include<bits/stdc++.h> using namespace std; //implementing bfs algorithm on non-weighted graph int main() { int u,v=0; int j; int numVertices,numEdges, srcVertex; cin>>numVertices>>numEdges; vector<int> adj[numVertices]; // input graph for(int i=0;i<numEdges;i++) { cin>>u>>v; ...
ALGO
0.999968
4.712583
29e1e0cc-9888-4021-914d-a8f1de89058f
ishandutta2007/codeforces
hyperbolic/normal/1442/C.cpp
#include <stdio.h> #include <algorithm> #include <vector> #include <queue> #define MAX 1234567890 #define MOD 998244353 struct str{ int index; int first; int second; }; bool operator<(str a, str b) { if(a.second==b.second) return a.first>b.first; return a.second>b.second; } std::priority_queue<str> Q; std::vec...
ALGO
0.999938
3.941987
0656aa18-3c30-4230-8e75-e4f003187b84
rohan-goyal-1/CP
AIO/RuckusLeague.cpp
#include <algorithm> #include <array> #include <cassert> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #include <s...
ALGO
0.999946
3.606464
ef96d7b1-d718-4dfe-9716-d83c417b3073
bilkent-mrl/miniquad_simulator
rotors_control/src/attitude_controller.cpp
#include "rotors_control/attitude_controller.h" AttitudeController::AttitudeController() : gravity_(9.81), mass_(1.56779) { } AttitudeController::~AttitudeController() { } std::shared_ptr<ControllerBase> AttitudeController::Clone() { std::shared_ptr<ControllerBase> controller(new AttitudeController); ...
ALGO
0.968053
6.523511
1764a02c-031a-449f-8613-0094e6fa6c61
himanshuagarwal407/LeetCode_GFG_Problems
890-find-and-replace-pattern/890-find-and-replace-pattern.cpp
class Solution { public: vector<string> findAndReplacePattern(vector<string>& words, string pattern) { int n=pattern.size(); int m=words.size(); vector<string> ans; for(int i=0; i<m; i++) { string s=words[i]; int a=s.size(); if(a!=...
ALGO
0.999962
6.414609
b30d7488-df6c-4404-994a-588e6463beb1
ishandutta2007/codeforces
dotorya/normal/903/F.cpp
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string.h> #include <string> #inc...
ALGO
0.999907
3.903611
d0ba8db0-029b-4a48-ae99-8f0f5dac2440
Cobb-Yoo/Algorithms
BOJ/2523 별찍기-13/2523 별찍기-13.cpp
#include <iostream> using namespace std; int main(){ int n; cin >> n; for(int i=1;i<=n;i++){ for(int j=0;j<i;j++){ cout << "*"; } cout << endl; } for(int i=n-1;i>0;i--){ for(int j=i;j>0;j--){ cout << "*"; } cout << endl; } }
ALGO
0.99985
3.994984
53a255b6-c956-4a8c-9f81-27f3e40df69d
RolandHughes/ls-cs
src/gui/painting/qmatrix.cpp
#include <qmatrix.h> #include <qdatastream.h> #include <qdebug.h> #include <qhashfunc.h> #include <qmath.h> #include <qregion.h> #include <qpainterpath.h> #include <qvariant.h> #include <qpainterpath_p.h> #include <limits.h> // some defines to inline some code #define MAPDOUBLE(x, y, nx, ny) \ { \ qreal fx = x; ...
TOOL
0.953304
6.480407
3c41c113-535a-423e-803c-20f19a86ad9a
AdrianEpi/Computabilidad-y-Algoritmia
03 Calculadora de Lenguajes/main.cpp
/*========================================================================= =========================================================================== = Proyecto: Práctica 3 Calculadora de lenguajes = = Archivo: main.cpp = = Autor: ...
TOOL
0.936608
3.582648
2c0063bc-3685-4bfd-9b59-0df3aba1b09b
Abidur24/Codeforces
1472B - Fair Division .cpp
// In the name of Allah. // We're nothing and you're everything. // Ya MAALIK-UL-MULK!!! /* Indeed, my prayer, my rites of sacrifice, my living and my dying are for Allah, Lord of the worlds */ #include<bits/stdc++.h> using namespace std; int main(){ int t,n,x,c1=0,c2=0; cin>>t; for(int i=1;i<=t;i++) ...
ALGO
0.999861
4.102561
20633408-fd04-4977-b2bb-ed0f3bb4786e
emondaslearner/Phitron
week4/Day 1/nasa.cpp
#include <bits/stdc++.h> using namespace std; long long cs=1; vector<long long>store; void nasa() { long long n; cin>>n; long long a[n]; long long frequancyArr[35000]={0}; for(long long i=0;i<n;i++) { cin>>a[i]; frequancyArr[a[i]]++; } long long ans=0; for(long long ...
ALGO
0.99998
4.313753
1dfc7d7a-e69e-4403-a931-eb464c4d6ac2
suryanshmanocha/kalman_filter
eigen/doc/snippets/Tutorial_solve_triangular.cpp
Matrix3f A; Vector3f b; A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; cout << "Here is the matrix A:" << endl << A << endl; cout << "Here is the vector b:" << endl << b << endl; Vector3f x = A.triangularView<Upper>().solve(b); cout << "The solution is:" << endl << x << endl;
ALGO
0.999787
3.055453
d28f3c78-0a32-452e-94b7-acc98c8a0caf
Piyush4298/Cpp-Practice-problems
Array Programs/equilibrium.cpp
/* Given an array arr of n positive numbers. The task is to find the first Equilibium Point in the array. Equilibrium Point in an array is a position such that the sum of elements before it is equal to the sum of elements after it. Input: n = 5 A[] = {1, 3, 5, 2, 2} Output: 3 ---------->(index+1) point. */...
ALGO
0.999997
5.873652
bb1704bd-6925-4261-888a-ebacd120c511
ADFLin/GameProject
TinyGame/GreedySnake/GreedySnakeAI.cpp
#include "GreedySnakePCH.h" #include "GreedySnakeAI.h" namespace GreedySnake { static TGrid2D< unsigned > sCheckMap; static unsigned sCheckCount; SnakeAI::SnakeAI( Scene& scene , unsigned id ) :mScene( scene ) ,hostSnake( scene.getLevel().getSnake( id ) ) { } void SnakeAI::init( Scene& scene ) { Vec2i...
ALGO
0.99647
6.164383
db31f754-dfda-4905-a46b-4ecbcc0941e5
tuw-robotics/tuw_global_planner
global_planner/src/thinning.cpp
#include <global_planner/thinning.h> namespace global_planner { void sceletonize_iteration(cv::Mat &img, int iter) { CV_Assert(img.channels() == 1); CV_Assert(img.depth() != sizeof(uchar)); CV_Assert(img.rows > 3 && img.cols > 3); cv::Mat marker = cv::Mat::zeros(img.size(), CV_8UC1); int nRows = img.rows; ...
ALGO
0.991437
3.46764
e24d1a54-a45e-44a7-9d46-c4578ad8bb24
bergemkolcuoglu/cs201_data_structures_and_algorithms
Homework_3/AlgorithmSortAll.cpp
#include "AlgorithmSortAll.h" #include <iostream> using namespace std; AlgorithmSortAll::AlgorithmSortAll(int k) : SelectionAlgorithm(k) { this->k = k; } AlgorithmSortAll::~AlgorithmSortAll() { delete[] pNums; pNums = 0; } void AlgorithmSortAll::setNumbers() { cin >> n; pNums = new int[n]; for (int i = 0; i...
ALGO
0.999814
3.977739
a63e7b5f-0632-4078-83ce-9190ecd787b2
nitcse2018/daa-ankitrouniyar5
Algorithms/greedy algorithm/jobSequencing.cpp
/* Job Sequencing problem using greedy method BY -- Ankit Kr. Rouniyar. --Cse 2nd year.. Roll number-181210011 Given an array of jobs where every job has a deadline and a profit. Profit can be earned only if the job is finished before the deadline. It is also given that every job takes a single unit of t...
ALGO
0.999996
5.727505
5e5548a0-7ed2-4a37-b101-3387cdbc8ede
Nein-to-Sick/bandi_official
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
3280932f-40dd-418b-8d89-82b95bd96ceb
sarvex/leetcode-rect
solution/0000-0099/0082.Remove Duplicates from Sorted List II/Solution.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* deleteDupli...
ALGO
0.999987
5.910652
e5fb2b10-af41-4f6b-8f04-9722b666bbd9
MoHuaa/mouhua-XCPC-
template/数学/ax+by=c求解.cpp
pair<ll,ll> exgcd(ll a, ll b, ll c) { function<ll(ll, ll, ll &, ll &)> ex_gcd = [&](ll a, ll b, ll & x, ll & y) { if (b == 0) { x = 1; y = 0; return a; } ll x1, y1; ll g = ex_gcd(b, a % b, x1, y1); x = y1; y = x1 - a / b...
ALGO
0.999952
4.727156
cda0ac51-e1c1-4cbc-b8bb-d942d3e08674
ryanj64/CarND_Path_Planning_Project
src/Eigen-3.3/bench/benchmark.cpp
// g++ -O3 -DNDEBUG -DMATSIZE=<x> benchmark.cpp -o benchmark && time ./benchmark #include <iostream> #include <Eigen/Core> #ifndef MATSIZE #define MATSIZE 3 #endif using namespace std; using namespace Eigen; #ifndef REPEAT #define REPEAT 40000000 #endif #ifndef SCALAR #define SCALAR double #endif int main(int ar...
ALGO
0.978103
3.675187
cf67a3b7-5a98-4dd1-a7af-9da8d392e8bf
takoikatakotako/atcoder
exawizards2019_a.cpp
#include <iostream> using namespace std; int exawizards2019_a() { // 入力 int A, B, C; cin >> A >> B >> C; if (A == B && B == C && C == A) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
ALGO
0.999982
4.550189
19c1ac7c-032b-4e53-9d4f-37dcbf5cad99
jiang3f/CodingInterviewCplusplus
TreeAndBST/HeightOfBinaryTree.cpp
// // https://practice.geeksforgeeks.org/problems/height-of-binary-tree/1/ // #include "stdafx.h" #include <iostream> #include <vector> #include <queue> #include <deque> #include <string> #include <sstream> // std::istringstream #include <map> #include <deque> using namespace std; namespace HeightOfBinaryTree { ...
ALGO
0.997079
5.153028
760719e5-ffe2-42df-932e-c433aa3feb55
ajayaraman/CarND-PathPlanning
src/Eigen-3.3/lapack/eigenvalues.cpp
#include "lapack_common.h" #include <Eigen/Eigenvalues> // computes eigen values and vectors of a general N-by-N matrix A EIGEN_LAPACK_FUNC(syev,(char *jobz, char *uplo, int* n, Scalar* a, int *lda, Scalar* w, Scalar* /*work*/, int* lwork, int *info)) { // TODO exploit the work buffer bool query_size = *lwork==-1;...
ALGO
0.990218
4.671507
748ffbb4-b220-48a3-9a45-c0212f84fc0b
nc26676027/related_key_zero_co
twine80 copy/test_single.cpp
#include<stdio.h> #include<iostream> #include<vector> #include<time.h> #include<cmath> using namespace std; bool get_xored(unsigned int in) { unsigned int count = 0; unsigned int v = in; while (v) { count += (v % 2); v = v / 2; } if( (count % 2) == 0 ) { return 0; ...
ALGO
0.999288
3.36976
f670a354-b4a5-4534-9c41-696e3c5c3bd1
BajajGirik/DS-Algo
contests/codechef/CodeChef Starters 33/Stable Mex.cpp
/******************************************************/ #include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<ll> #define vvi vector<vi> #define all(v) v.begin(), v.end() #define pii pair<ll, ll> #define pb ...
ALGO
0.999915
4.478456
6eb79a16-c099-4a97-bf80-f8fb3b2a9f54
tkzcfc/ed_imgui
code/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp
// // RuntimeLuaImpl.cpp // Simulator // // #include "RuntimeLuaImpl.h" #if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) #include <cstdio> #include <string> #include "lua_debugger.h" #include "CCLuaEngine.h" #include "LuaBasicConversions.h" #include "lua_module_register.h" #include "runtime/Runtime.h" ...
TOOL
0.916057
4.697533
95135dac-3da9-428c-985f-9cd9b5aec0c9
ishandutta2007/codeforces
baba/normal/514/A.cpp
//Tanuj Khattar #include<bits/stdc++.h> using namespace std; typedef pair<int,int> II; typedef vector< II > VII; typedef vector<int> VI; typedef vector< VI > VVI; typedef long long int LL; typedef unsigned long long int ULL; #define PB push_back #define MP make_pair #define F first #define S second #def...
ALGO
0.999846
3.700774
f1c28ccf-9d09-473c-9af6-e62bc9c66757
axelu/leetcode
cpp/01000-01499/buildarray.cpp
// 1441. Build an Array With Stack Operations // https://leetcode.com/problems/build-an-array-with-stack-operations/ class Solution { public: vector<string> buildArray(vector<int>& target, int n) { vector<string> r; int j = 0; // idx in target int m = target.size(); int i = 1; // l...
ALGO
0.999794
6.403536
9d671b62-3cd6-4417-9b4a-8cbf717b719f
kwanyoung92/practice
compete/absent-student/main.cpp
#include <bits/stdc++.h> using namespace std; vector<string> split_string(string); // Complete the findTheAbsentStudents function below. vector<int> findTheAbsentStudents(int n, vector<int> a) { // Return the list of student IDs of the missing students in increasing order. vector<int> attend(n); for(int i = ...
ALGO
0.999531
3.865364
e5bd7c83-9f40-4e95-8cdb-c37ce14975fb
EhardFr42996/project_flightsuite
blender-2.63a/extern/recastnavigation/Detour/Source/DetourTileNavMesh.cpp
#include <math.h> #include <float.h> #include <string.h> #include <stdio.h> #include "DetourTileNavMesh.h" #include "DetourNode.h" #include "DetourCommon.h" inline int opposite(int side) { return (side+2) & 0x3; } inline bool overlapBoxes(const float* amin, const float* amax, const float* bmin, const float* bm...
ALGO
0.993024
5.801244
781a1836-9b3e-422e-88c6-596262790d9d
Pushkar012345/Cpp-Complete-Course
tut68ga.cpp
//Example of function templates in c++ #include<iostream> using namespace std; template<typename T> T myMax(T x,T y){ return x>y ? x:y; } int main(){ cout<< myMax<int>(3,4)<<endl; cout<<myMax<float>(3.0,7.0)<<endl; cout<<myMax<char>('c','h'); return 0; }
ALGO
0.963547
3.599326
104ed7d6-3d2e-47fd-8abb-1aa3a55019c0
amol5113/Data_Structure
stack-queue/brackmatching.cpp
#include <iostream> #include "stack.cpp" int main(int argc, char** argv){ Stack<char> stack(20); string exp( argv[1] ); bool invalid =0; for( int i = 0; i < exp.size(); i++){ if( exp.at(i) == '(' || exp.at(i) == '{' || exp.at(i) == '[' ){ stack.push( exp.at(i) ) ; }else{ if( stack.isEmpty() ){ co...
ALGO
0.955184
5.760025
98f2e948-2e37-440b-a650-ca9a397872cc
NatanGarcias/Competitive-Programming
Atcoder/UNIQUE VISION Programming Contest 2023 Autumn(AtCoder Beginner Contest 323)/E.cpp
#include<bits/stdc++.h> using namespace std; template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << "{"; for (typename vector<T>::const_iterator vi = v.begin(); vi != v.end(); ++vi) { if (vi != v.begin()) os << ", "; os << *vi; } os << "}"; return os; } template<typename A, typename B> ostre...
ALGO
0.999986
4.461333
7077f7e3-d156-4efa-821d-3f312616a062
subratamondalnsec/Pw-cpp-code
17BinaryTree/class/15LevelorderTraversal_usingQueue.cpp
#include <bits/stdc++.h> using namespace std; class Node{// this is a tree node public: int val; Node* left; Node* right; Node(int val){ this->val=val; this->left=NULL; this->right=NULL; } }; void levelorderQueue(Node *root){//bfs queue<Node*> q; q.push(root); whi...
ALGO
0.999997
4.334282
bda9475f-cdb5-4e84-87b4-6be5acfac1f4
EmmanuelCastaneda/Flutter-Entrega-D
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.9988
6.76073
a87ad62e-5afa-4ca8-a6f5-48a83e1e9d6e
Dhruv-Jain31/cpp_programs
Array/longest_band.cpp
/*Given an array containing N integers, find length of longest band. A band is a subsequence which can be reordered in such a manner that all elements appear consecutive (i.e with absolute difference of 1 neighbouring elements.) Longest band is the band (subsequence) which contains maximum integers*/ #include <iostrea...
ALGO
0.99996
4.155774
0c0c957d-5e4d-413e-8da8-7a4056b96774
DSAtoppers/Shaan_DSA
13-10-2021/Next Largest Element.cpp
#include<bits/stdc++.h> using namespace std; int main() { vector<int>v{1,3,2,4,5}; stack<int>s; vector<int>vec; for(int i=v.size()-1;i>=0;--i) { if(s.empty()) { vec.push_back(-1); } if(!s.empty() && v[i]<s.top()) { vec.push_back(s.top()...
ALGO
0.999995
4.481112
f48b3508-0901-4596-a414-fdeb0e30b05e
vusec/stickytags
llvm-project/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp
// <algorithm> // template<InputIterator InIter, RandomAccessIterator RAIter> // requires ShuffleIterator<RAIter> // && OutputIterator<RAIter, InIter::reference> // && HasLess<InIter::value_type, RAIter::value_type> // && LessThanComparable<RAIter::value_type> // constexpr RAIter // conste...
TEST
0.998743
7.318115