uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ef26c2fc-774c-4cf0-88aa-727dd4f436dd
tommytracey/Udacity-CarND-Term2
p10-model-predictive-control/src/Eigen-3.3/bench/quat_slerp.cpp
#include <iostream> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; template<typename Q> EIGEN_DONT_INLINE Q nlerp(const Q& a, const Q& b, typename Q::Scalar t) { return Q((a.coeffs() * (1.0-t) + b.coeffs() * t).normalized()); } template<typename Q> EIGEN_DONT_INL...
ALGO
0.991373
6.251058
bd418309-e34f-4b6c-808e-410eedb45825
ZhaCong2017/USACO
2.1.3SortingaThree-ValuedSequence.cpp
/* ID:chac161 TASK:sort3 LANG:C++ */ #include<iostream> #include<fstream> #include<vector> using namespace std; int main() { ifstream fin("sort3.in"); ofstream fout("sort3.out"); int n; fin >> n; vector<int> num(n); int *time = new int[3](); int exchange[3][3]; for (int i = 0; i < 3; i++) { for (int j = 0;...
ALGO
0.999877
3.478751
cddcf491-28f0-4cb5-b634-5c8da36e8437
javagovindsharma/leetscode
lcof2/剑指 Offer II 116. 朋友圈/Solution2.cpp
class Solution { public: vector<int> p; int findCircleNum(vector<vector<int>>& isConnected) { int n = isConnected.size(); p.resize(n); for (int i = 0; i < n; ++i) p[i] = i; for (int i = 0; i < n; ++i) for (int j = i + 1; j < n; ++j) if (isConnected[i]...
ALGO
0.999492
6.10384
d112a437-d3bf-4118-a5bd-016c03ad088c
neelchoudhury/cp
Codechef and Spoj/1-K/FRUITS.cpp
#include<bits/stdc++.h> #define ll long long int using namespace std; int main() { ll t,n,m,k; scanf("%lld", &t); while(t--) { scanf("%lld %lld %lld", &n, &m, &k); if(abs(n-m)>k) { printf("%lld\n", abs(n-m)-k); } else printf("0\n"); } return 0; }
ALGO
0.999949
4.118454
4b3d7248-377f-47da-8987-b57409a726a5
te0541/c-project
snail.cpp
#include<iostream> using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0); int a,b,v; cin>>a>>b>>v; int count; if(v<=a) count=1; else if(v%(a-b)==0) count=(v-a)/(a-b)+1; else count=(v-a)/(a-b)+2; cout<<count; return 0; }
ALGO
0.999786
3.381045
772c79dc-0418-4880-82e5-900306efcdb0
amtf1683/llvm
mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
#include "mlir/Dialect/Linalg/Transforms/Hoisting.h" #include "mlir/Analysis/SliceAnalysis.h" #include "mlir/Dialect/Affine/Analysis/AffineStructures.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/Affine/IR/AffineValueMap.h" #include "mlir/Dialect/Affine/Utils.h" #include "mlir/Dialect/Arith/IR...
ALGO
0.982924
7.740131
8d605b36-8576-4051-82f7-d8d7fa296a33
alexandraback/datacollection
solutions_5648941810974720_1/C++/cathook/a.cpp
#include <stdio.h> const size_t SLEN_MAX = 2000; void Update(int *num_digits, int *counter, int num, const char* ns, char c) { num_digits[num] = counter[c]; for (int i = 0; ns[i] != '\0'; ++i) { counter[ns[i]] -= num_digits[num]; } } int main(void) { int num_cases; scanf("%d", &num_cases); for (int ...
ALGO
0.99972
5.324834
81329e0b-8412-4ef6-b532-78ca008ccf47
bfeng/CryptoGRU
third_party/cryptoTools/thirdparty/linux/boost/doc/html/boost_asio/example/cpp03/invocation/prioritised_handlers.cpp
#include <boost/asio.hpp> #include <boost/function.hpp> #include <iostream> #include <queue> using boost::asio::ip::tcp; class handler_priority_queue { public: void add(int priority, boost::function<void()> function) { handlers_.push(queued_handler(priority, function)); } void execute_all() { while...
TOOL
0.8998
7.69276
fcb601ab-7c92-438b-9e63-2e299728ac7e
roshanxshrestha/college-codes
2-OOP/05grade.cpp
//5. C++ Program to calculate grade of student #include <iostream> using namespace std; int main() { int score, i, average; float total=0; cout<< "Enter marks of 5 subjects\n"; for(i=0; i<5; i++) { cin >> score; total += score; } average = total/5; cout<<"Grade : "; swit...
TOOL
0.931047
3.769691
dbf8cc6d-f7f0-4b5b-83f8-bb27c1abb16a
neilsong/USACO
Alpha Star Gold/3.1/Source.cpp
#include <bits/stdc++.h> using namespace std; vector<int> parent, sizes; //path compression find int root(int v) { if (v == parent[v]) return v; return parent[v] = root(parent[v]); } //union by size void join(int u, int v) { int U = root(u); int V = root(v); if (U == V) return; if (sizes[U] < sizes[V]) { par...
ALGO
0.99989
4.219852
f97ce450-f866-4e99-8588-05ea7e22bace
MultiDCP/BOJPractice
c++/practice/graph_vector.cpp
#include <bits/stdc++.h> using namespace std; int n, m, s; // n , m int visited[1001]; int main(void){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n >> m >> s; /* // 迭 int graphArr[n+1][n+1]; for(int i=0; i<=n; i++) for(int j=0; j<=n; j++) g...
ALGO
0.99999
3.812739
99fac458-8754-45e8-878f-85e2742a1448
Ewenwan/MVision
vSLAM/ch10/ceres_custombundle/common/BALProblem.cpp
#include "BALProblem.h" #include <cstdio> #include <fstream> #include <string> #include <vector> #include <Eigen/Core> #include "tools/random.h" #include "tools/rotation.h" typedef Eigen::Map<Eigen::VectorXd> VectorRef; typedef Eigen::Map<const Eigen::VectorXd> ConstVectorRef; template<typename T> void FscanfOrDie...
ALGO
0.955615
6.126863
12efcabf-26f7-4801-aa9b-ce1a5b45d66a
Yaxin1996Z/LeetCode-py-cpp
LeetCode-c++/78_subsets.cpp
#include<iostream> #include<vector> using namespace std; class Solution{ public: vector<vector<int>> subsets(vector<int>& nums) { if (nums.empty()) return {{}}; int n = nums.back(); nums.pop_back(); vector<vector<int>> res = subsets(nums); int size = res.size(); ...
ALGO
0.999914
5.833767
5ced6c53-b32d-4c8b-8e31-67ddb2d353d7
Karatsiolis/AI
AStar.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <string> #include <unordered_set> #include <sstream> using namespace std; class Node{ public: string state; //κατάσταση σε μορφή string Node* parent; //Πατρικός κόμβος string action; //Ενέργεια int f, g, h; //...
ALGO
0.999998
5.784168
74f80967-286a-434c-a7fa-0e1cdc467b50
Ahisingh/leetcode
100-same-tree/same-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.999909
6.302262
344a1137-f233-42a3-8da6-29d4bf21981e
akshat2109/DSA-Practice
42-trapping-rain-water/42-trapping-rain-water.cpp
class Solution { public: int trap(vector<int>& height) { int rain = 0; int lmax = 0, rmax = 0; int i = 0, j = height.size()-1; while(i <= j) { if(height[i] <= height[j]) { if(height[i] > lmax) lmax = height[...
ALGO
0.999981
6.749056
e1a46f29-f76e-4271-a9b5-e2f17fbd9f80
MrJustreborn/godot4_webcam
thirdparty/bullet/BulletSoftBody/btDefaultSoftBodySolver.cpp
#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btCollisionShape.h" #include "btDefaultSoftBodySolver.h" #include "BulletCollision/CollisionShapes/btCapsuleShape.h" #include "BulletSoftBod...
ALGO
0.877097
7.481757
2bd1a5a1-28f6-4148-91ff-e053a1c14913
openpokergame/Quick-Cocos2dx-Community-365
cocos/math/CCVertex.cpp
#include "math/CCVertex.h" #include "base/ccMacros.h" NS_CC_BEGIN void ccVertexLineToPolygon(Vec2 *points, float stroke, Vec2 *vertices, unsigned int offset, unsigned int nuPoints) { nuPoints += offset; if(nuPoints<=1) return; stroke *= 0.5f; unsigned int idx; unsigned int nuPointsMinus = nuPoin...
ALGO
0.99095
5.802056
92c965f7-8e55-4b18-a37b-87dc4e007e55
DouglasSherk/project-euler
15.cpp
#include <iostream> #include <math.h> using namespace std; #define SIZE 20 int main(int argc, char** argv) { unsigned long long grid[SIZE + 1][SIZE + 1]; for (int i = 0; i < SIZE; i++) { grid[i][SIZE] = 1; grid[SIZE][i] = 1; } for (int i = SIZE - 1; i >= 0; i--) { for (int j = SIZE - 1; j >= 0; j...
ALGO
0.999515
3.950569
f7004927-6f96-4691-bb2e-c6a2eeaa9290
fanaticclan/client
faned_src/shared/crypto.cpp
#include "cube.h" ///////////////////////// cryptography ///////////////////////////////// /* Based off the reference implementation of Tiger, a cryptographically * secure 192 bit hash function by Ross Anderson and Eli Biham. More info at: * http://www.cs.technion.ac.il/~biham/Reports/Tiger/ */ #define TIGER_PASS...
ALGO
0.999269
7.325449
d9cb78fd-1fc6-4787-b4ea-d36662735793
cechallenge/2025
llvm/mlir/lib/Analysis/Liveness.cpp
#include "mlir/Analysis/Liveness.h" #include "mlir/IR/Block.h" #include "mlir/IR/Operation.h" #include "mlir/IR/Region.h" #include "mlir/IR/Value.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SetOperations.h" #include "llvm/ADT/SetVector.h" #include "llvm/Support/raw_ostream.h" using namespace mlir; namespace...
TOOL
0.973219
8.272282
40dd6d6f-4735-445e-a063-82d1b69d75bd
ItWasItIs/boost
libs/bimap/example/bimap_and_boost/property_map.cpp
// VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overruns or other possible security issues if misused. // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx // But the wording of the warning is misleading and unsettling, there are no // po...
TOOL
0.929129
5.83119
cd52f79d-6b45-4e6b-85e5-1e2660c339a4
ioanaandreeab/sdd
++/stive_si_cozi/stive_si_cozi/Source.cpp
#include <stdio.h> #include <malloc.h> #include <string.h> struct Carte { char* titlu; int nrPagini; }; struct nod { Carte info; nod* next; }; Carte creareCarte(const char* titlu, int nrPagini) { Carte c; c.titlu = (char*)malloc(sizeof(char)*(strlen(titlu) + 1)); strcpy(c.titlu, titlu); c.nrPagini = nrPagini...
ALGO
0.993076
4.618563
e183ccb1-5fab-459b-bd05-71e20826db27
BaruaSourav/UVA-Solutions
Save Setu/abtahi code.cpp
#include <iostream> #include <string> using namespace std; int main() { int i,T,K, totalAmount = 0; string test; cin>>T; for(i=1;i<=T;i++) { cin>>test; if(test=="donate") { cin>>K; totalAmount+=K; } else if(test=="report") ...
ALGO
0.991217
3.62642
4ca22f52-2054-4d90-9906-2f4e931676f6
RitchieLab/PLATO
method_lib/old/NMI.cpp
//NMI.cpp #include "NMI.h" // #include <iomanip> namespace Methods{ /// /// Constructor /// NMI::NMI(){ dataset = NULL; initialize(); } /// /// Alternative constructor /// NMI::NMI(DataSet* ds){ resetDataSet(ds); initialize(); } /// /// Initialize starting variables /// void NMI::initialize(){ nmi_score =...
ALGO
0.976124
5.18653
88a473ef-b2c5-4d85-a25f-aa6097d2a1d7
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_8300_9.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1000100, P = 998244353; inline char gc() { static char buf[N], *s = buf, *t = buf; return s == t && (t = (s = buf) + fread(buf, 1, N, stdin), s == t) ? EOF : *s++; } inline int read() { ...
ALGO
0.999956
4.131446
8ee5ec45-e7c6-42f4-8f11-d2cf68fec477
yashnagrawal/DSA
Detect Loop in linked list - GFG/detect-loop-in-linked-list.cpp
//{ Driver Code Starts //Initial template code for C++ #include <bits/stdc++.h> using namespace std; struct Node { int data; Node* next; Node(int val) { data = val; next = NULL; } }; void loopHere(Node* head, Node* tail, int position) { if(position==0) return; No...
ALGO
0.999793
4.456359
49870c87-8cf3-4e91-9ffa-73069ce87308
CTxD/FreeTACOSImage
boost_1_70_0/libs/spirit/example/x3/num_list/num_list2.cpp
/////////////////////////////////////////////////////////////////////////////// // // This sample demontrates a parser for a comma separated list of numbers. // // [ JDG May 10, 2002 ] spirit1 // [ JDG March 24, 2007 ] spirit2 // [ JDG May 12, 2015 ] spirit X3 // /////////////////////////////////////////////...
TOOL
0.931985
6.745415
fe1162c1-a482-4310-9cfe-601c3c0bc51b
iamsiamhossen/Problem-Solve-2025
C_Choose_the_Different_Ones.cpp
/** * Author: iamsiamhossen * Created: 31-05-2025 21:45:29 **/ #include <bits/stdc++.h> using namespace std; // fastread #define fastread() (ios_base::sync_with_stdio(0), cin.tie(0)) // Shortcut #define endl "\n" #define int long long #define float double #define all(X) (X).begin(), (X).end() #define Reverse(X) reve...
ALGO
0.999986
4.581441
1b9d82e5-995e-4c1b-886f-1fe234bf5a6d
JohannaBromark/AvalgProj1
proj2/testKod.cpp
#include <iostream> #include <random> #include <cmath> #include <algorithm> #include <string> #include <iterator> #include <chrono> #include <gmpxx.h> using namespace std; mpz_class gFunction(mpz_class& x, const mpz_class& number) { //Computes (x*x)+1 mod number (which factor we seek) return (x * x + 1) % num...
ALGO
0.999323
4.356129
2b369d43-bb64-41f1-8bd1-ab26f6cc9fe0
ishandutta2007/codeforces
eddy1021/normal/939/B.cpp
// eddy1021 #pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef double D; typedef long double LD; typedef long long LL; typedef pair<int,int> PII; typedef pair<LL,LL> PLL; #define mod9 1000000009LL #define mod7 1000000007LL #define INF 1023456789LL #define INF16 10000000000000000LL #define...
ALGO
0.999973
3.537174
13720ad6-02b5-4195-81a6-ca8656e86fb7
desktop-app/tg_angle
src/compiler/translator/tree_ops/d3d/UnfoldShortCircuitToIf.cpp
#include "compiler/translator/tree_ops/d3d/UnfoldShortCircuitToIf.h" #include "compiler/translator/StaticType.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermTraverse.h" namespace sh { name...
TOOL
0.8615
7.620896
1240f34b-e5a2-412a-add4-4379136b6271
danyuanwang/XuanWuGame_C
boost/libs/algorithm/test/search_test1.cpp
#include <boost/algorithm/searching/boyer_moore.hpp> #include <boost/algorithm/searching/boyer_moore_horspool.hpp> #include <boost/algorithm/searching/knuth_morris_pratt.hpp> #define BOOST_TEST_MAIN #include <boost/test/unit_test.hpp> #include <iostream> #include <string> #include <vector> namespace ba = boost::algo...
TEST
0.922944
6.434797
f55da398-0448-4653-99bf-1e6fc15d7a84
junhochoi-dev/algorithm
[PS]BOJ/00000_09999/01000_01999/01773/boj01773.cpp
#include <iostream> using namespace std; int main() { int student, firecracker, *arr, sum = 0; cin >> student >> firecracker; arr = new int[student]; bool *time = new bool[firecracker + 1]; for(int n = 0 ; n < student ; n++){ cin >> arr[n]; time[n] = false; } for(int n = 0 ; ...
ALGO
0.999626
3.144609
57a83947-6b06-4be9-8925-d6b98a25d01d
StephanErb/multicrit
src/time_grid_instances2.cpp
#include <unistd.h> #include <iostream> #include <vector> #include <fstream> #include "BiCritShortestPathAlgorithm.hpp" #include "GraphGenerator.hpp" #include "utility/timing.h" #include "utility/memory.h" #include "tbb/task_scheduler_init.h" #include "tbb/tick_count.h" #ifndef BATCH_SIZE /* only used by the parall...
ALGO
0.999408
4.691698
22f3075a-bfec-42fb-8482-c766a1344463
gkoursiounis/cpp
train/linkedList.cpp
#include <iostream> #include <cstdlib> #include <ctime> #include "linkedList.h" using namespace std; //member functions for class passenger passenger::passenger() { hasTicket = rand() % 2; hasDiscount = rand() % 2; iwasCaught = 0; myNumber = 0; } //member functions for class linkedList linkedList::...
TOOL
0.932954
3.814182
16d9ab22-081e-453b-af65-294a13e433fa
thegamer1907/Code_Analysis
Graphs/1178.cpp
#include<cstdio> #define maxn 30005 using namespace std; int n,t; int a[maxn]; bool vis[maxn]; void s(int i){ vis[i]=1; if(a[i])s(i+a[i]); return; } int main(){ scanf("%d%d",&n,&t); for(int i=1;i<n;i++)scanf("%d",&a[i]); s(1); if(vis[t])puts("YES"); else puts("NO"); return 0; }
ALGO
0.999984
3.916769
5a10ef72-fc89-4851-a235-c495b7575609
adhikareeprayush/DSA-Assignments
lab1/assignment.cpp
#include <iostream> #include <vector> #include <stack> #include <string> #include <algorithm> using namespace std; int precedence(string op) { if (op == "^") return 3; if (op == "*" || op == "/") return 2; if (op == "+" || op == "-") return 1; return 0; } bool isOperator(string op) { return op ==...
ALGO
0.99988
6.280007
cac037bb-c8b3-4eb9-94df-32f9681cbf22
KrissiKodar/tolvusjon_HR
samples/cpp/intersectExample.cpp
/* * Author: Steve Nicholson * * A program that illustrates intersectConvexConvex in various scenarios */ #include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" using namespace cv; using namespace std; // Create a vector of points describing a rectangle with the given corners static vector<Point> makeRect...
ALGO
0.999049
6.691697
af972499-6798-411b-951c-f22d0fd96033
0xAriseAizen-404/NeetCode-150
01_Arrays_&_Hashing/02_Valid_Anagram/0242-valid-anagram.cpp
/* Problem: LeetCode 242 - Valid Anagram Description: Given two strings s and t, return true if t is an anagram of s, and false otherwise. Intuition: To determine if two strings are valid anagrams, we can compare the counts of each character in both strings. If the counts of all characters are equal, the strings are ...
ALGO
0.999971
7.344737
066b3aaf-9028-4f48-ab37-3635cc8a4a77
Fresh-hongsi/BaekjoonCpp
18408-3 つの整数 (Three Integers) .cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(void) { int arr[2]={0,}; for (int i = 0; i < 3; i++) { int temp = 0; cin >> temp; if (temp == 1) { arr[0]++; } else { arr[1]++; } } if (arr[0] > arr[1]) { cout << 1; } else { cout << 2; } ...
ALGO
0.999972
3.376018
88c0e84a-31d8-4e04-a200-de58adaa6b6f
crkaushik93/model-predictive-control
src/Eigen-3.3/unsupported/test/BVH.cpp
#include "main.h" #include <Eigen/StdVector> #include <Eigen/Geometry> #include <unsupported/Eigen/BVH> namespace Eigen { template<typename Scalar, int Dim> AlignedBox<Scalar, Dim> bounding_box(const Matrix<Scalar, Dim, 1> &v) { return AlignedBox<Scalar, Dim>(v); } } template<int Dim> struct Ball { EIGEN_MAKE_ALIGN...
TEST
0.989561
6.337957
5eee8041-7f20-4b2c-8190-d93abdba8c45
aash553/leetcode-gfg
0060-permutation-sequence/0060-permutation-sequence.cpp
class Solution { public: string getPermutation(int n, int k) { vector<int>number; int fact = 1; for(int i =1;i<n;i++){ fact = fact*i; number.push_back(i); } number.push_back(n); k = k-1; string ans= ""; while(true){ ...
ALGO
0.999989
6.457679
6fa50988-7c9b-4bc3-aea2-6f1aa5006d04
Rajmeet/DSA
C++/Stacks/YT/balancedParanthesis.cpp
#include <iostream> #include <stack> #include <string> using namespace std; bool isBalanced(string s) { stack<char> st; char x; for(int i = 0; i < s.size(); i++) { if(s[i] == '{' || s[i] == '(' || s[i] == '[') { st.push(s[i]); } if(st.empty()) { return false...
ALGO
0.995885
5.475864
41066e41-45a3-4f06-81d4-a3c9ffa2dff4
M0D4/Competitive-Programming-Problems-Solutions
Atcoder/C++ (GCC 9.2.1)/abc268_f/34960609.cpp
#include "bits/stdc++.h" #pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define endl "\n" #define all(v) v.begin(), v.end() #define debug(x) cout << #x << " is " << x << endl #define pow(n, m) (int)powl(n, m) #define clr(x, value) memset(x, value, sizeof(x)) using namesp...
ALGO
0.999289
4.450789
1ea05eec-f82b-4702-8c2c-90cf6003a50b
NoLimitCoder/Leetcode
LeetCode-Solutions/1370-count-number-of-nice-subarrays/solution.cpp
#pragma GCC optimize("O3,unroll-loops") class Solution { public: int numberOfSubarrays(vector<int>& A, int k) { int odd = 0, max_odd = 0, ans = 0, mp[50001] = {}; for(int cur : A){ if(cur&1) {odd++; max_odd = max(max_odd, odd);} mp[odd]++; } for(int count = k; count <= max_odd; ++count){ a...
ALGO
0.999993
5.455081
25b0f57b-3fd4-486f-a416-d29e8374e6a5
harshraj78/DSA
8. Matrix/08_search_in_a_row_column_sorted_matrix.cpp
// given a row and column wise sorted matrix and a key, find the position of the key in the matrix // input: 10 20 30 40 // 15 25 35 45 // 27 29 37 48 // 32 33 39 50 // key = 29 // output: Found at (2, 1) // 1. Naive Solution:- O(R * C)time complexity void searchMatrix(int arr[][100], int m...
ALGO
0.999977
4.938675
62f35893-d0eb-407f-a50f-641cc985db4d
kyeah/Cloth-Fluids-Solver
fluids/eigen_3.2.2/doc/examples/class_VectorBlock.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::VectorBlock<Derived> segmentFromRange(MatrixBase<Derived>& v, int start, int end) { return Eigen::VectorBlock<Derived>(v.derived(), start, end-start); } template<typename Derived> const Eigen::Vec...
TOOL
0.986705
4.383477
121fc426-84bf-44ff-b594-dff89548c1d4
ZYCSwing/pat_advanced_level
1074.cpp
//1074. Reversing Linked List /* Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K = 3, then you must output 3→2→1→6→5→4; if K = 4, you must output 4→3→2→1→5→6. Input Specification: Each input file contains one t...
ALGO
0.999363
3.741969
13895ac3-b5ed-4cfe-94c5-02c137f4e624
lefticus/AnalysisTestSuite
unreferenced_variadic.cpp
#include <vector> template<typename T> T add(T t, T u) { return t + u; } template<typename ... T> std::vector<int> add_values(int value, T ... t) { return {add(t, value)...}; } int main() { // expected: no warnings or errors in this code add_values(4); add_values(4, 1); add_values(4, 1, 2); }
TOOL
0.988045
4.785935
c04c32a8-826c-4851-938d-fa19192edf60
jiebanghan/swordtoken
src/crypto/muhash.cpp
#include <crypto/muhash.h> #include <crypto/chacha20.h> #include <crypto/common.h> #include <hash.h> #include <cassert> #include <cstdio> #include <limits> namespace { using limb_t = Num3072::limb_t; using double_limb_t = Num3072::double_limb_t; constexpr int LIMB_SIZE = Num3072::LIMB_SIZE; /** 2^3072 - 1103717, th...
ALGO
0.998417
7.246519
d302b309-25f9-49a6-a809-8be8b5b7eb9e
Anonymus123/AtomicCore-3.3.5a
src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
/* ScriptData SDName: Boss_High_King_Maulgar SD%Complete: 90 SDComment: Correct timers, after whirlwind melee attack bug, prayer of healing SDCategory: Gruul's Lair EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "gruuls_lair.h" #define SAY_AGGRO -1565000 #define SAY_ENRAG...
TOOL
0.927542
5.996631
6a3110a6-10be-4060-88b5-7f80b49b3d9b
Md-Nasiat-Hasan-Fahim/Problem-Solving-with-C
.acmx/solutions/Codeforces - Educational Codeforces Round 114 (Rated for Div. 2)/A_Regular_Bracket_Sequences.cpp
#include<bits/stdc++.h> using namespace std; #define FastIO ios_base::sync_with_stdio(false), cin.tie(0) #define endl '\n' #define int long long #define all(x) x.begin(),x.end() #define pb push_back #define YES cout<<"YES\n" #define NO cout<<"NO\n" #define check(x) cout << (#x) << " is " << (x) << endl; const int mod ...
ALGO
0.999126
4.164686
46f66746-e440-4679-8b08-a18e524e0952
thegamer1907/Code_Analysis
Implementation/3013.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define szof(x) int32_t((x).size()) #define print(x) cout << x #define println(x) cout << x << endl using namespace std; typedef long long ll; typedef long double ld; const ll MOD = 1e9 + 7; const ll MOD998 = 998244353; typedef unsigned int uint; ...
ALGO
0.999957
4.325933
ed6d8b65-9586-4778-a0b5-d24a632d1263
SaurabhKumar171/data_structure_and_algorithms
Binary Search/Logic Building/7_find_out_how_many_times_the_array_is_rotated.cpp
#include<iostream> #include<vector> #include<algorithm> #include<set> using namespace std; class Solution { public: int findKRotation(vector<int> &arr) { int l = 0; int h = arr.size() - 1; int ele = INT_MAX; int id = -1; while(l <= h){ int m = l + (h-l)/2; ...
ALGO
0.999902
5.291455
14f28bc2-facd-41b9-80bb-af7cc3b5eda4
Shreyak810/CNS-LAB
7.RSA/RSA.cpp
#include <bits/stdc++.h> using namespace std; set<int> prime; // a set will be the collection of prime numbers, // where we can select random primes p and q int public_key; int private_key; int n; // we will run the function only once to fill the set of // prime numbers void primefiller() { // method...
ALGO
0.999819
5.260132
579582b2-c144-42d1-b900-d6fc3f559af5
mr-jestin-roy/LeetCode-TaskList
Codeforces-Daily-Virtual Contests/Codeforces Round #784 (Div. 4)/G_Fall_Down.cpp
#pragma GCC optimize("Ofast") #pragma GCC optimize ("O3") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define ppb pop_back #define pf push_front #define ppf pop_front #define all(x) (x).begin(), (x).end() #define uniq(v) (v).erase(unique(al...
ALGO
0.999927
4.577694
2408fc40-ce8f-4531-b5c2-9d593e713a5e
avnish404/CodeGrind
44Sqrt(x).cpp
int floorSqrt(long long int N) { // Write your code here. long long int s=0; long long int e=N; long long int mid=s+(e-s)/2; long long int ans=1; while(s<=e) { if((mid*mid) == N ) { return mid; } else if((mid*mid)<N) { ans=mid; ...
ALGO
0.999981
4.872
0216614b-05bb-45e6-8699-d5fedfaf2488
SAP/project-foxhound
gfx/skia/skia/src/core/SkImageFilterCache.cpp
#include "src/core/SkImageFilterCache.h" #include "include/private/base/SkMutex.h" #include "include/private/base/SkOnce.h" #include "src/base/SkTInternalLList.h" #include "src/core/SkChecksum.h" #include "src/core/SkImageFilterTypes.h" #include "src/core/SkSpecialImage.h" #include "src/core/SkTDynamicHash.h" #include...
TOOL
0.878296
7.24695
0be0112a-ff20-4d97-8974-c6be51db0e4d
don-arko/CP_Journey
Classical Problems/Binary Search/CP-Algo-ref/First and last appearance of x.cpp
//https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/submissions/1412602250/ //neatest class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int first = lower_bound(nums.begin(),nums.end(),target)-nums.begin(); int last = upper_bound(num...
ALGO
0.999936
6.47105
32e6d119-85d8-45ea-9dfd-9a8284fe8bdd
NekoSekaiMoe/zig-bootstrap-ollvm
llvm/lib/Analysis/PhiValues.cpp
#include "llvm/Analysis/PhiValues.h" #include "llvm/ADT/SmallVector.h" #include "llvm/IR/Instructions.h" #include "llvm/InitializePasses.h" using namespace llvm; void PhiValues::PhiValuesCallbackVH::deleted() { PV->invalidateValue(getValPtr()); } void PhiValues::PhiValuesCallbackVH::allUsesReplacedWith(Value *) { ...
TOOL
0.982216
7.821162
6c1a6adb-e724-43ce-a449-30f3ae71d20b
kawsarkk1/Codes
codeforece/New folder/cp server.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl "\n" #define Endl "\n" #define FOR(i,n) for(i=1;i<=n;i++) #define FORN(i,n) for(i=n;i>=1;i--) #define FOR0(i,n) for(i=0;i<n;i++) #define FORN0(i,n) for(...
ALGO
0.999923
3.495189
7455b048-937e-4439-aac5-6be4a5fef4d0
nai7/JustForOffer
Q8.3/Q8.3/main.cpp
#include <iostream> #include <vector> using namespace std; vector<vector<int>> getResult(int a[], int index, int n){ vector<vector<int>> result ; if(index == n){ vector<int> subset ; result.push_back(subset); } else{ vector<vector<int>> rresult = getResult(a, index+1, n); ...
ALGO
0.999823
3.556447
32f55d8c-1e49-441c-8b68-14d7dae80799
MananOO12/Codeforces
Division 2A/796A Buying a House.cpp
/* Solution by Manan Jain github.com/MananOO12 www.linkedin.com/in/0012manan-jain */ /* #include <stdio.h> int min(int a, int b){ return a < b ? a : b; } int abs(int x){ return x < 0 ? -x : x; } int main(){ int n, m, k; scanf("%d%d%d", &n, &m, &k); int res = 1e9; ...
ALGO
0.999939
3.630314
26561caf-7561-4b1f-8247-56a362d4599d
hojune02/BOJ
11866.cpp
//백준 11866번: 요세푸스 문제 0 #include <iostream> #include <deque> #include <vector> using namespace std; void josephus(int n, int k){ deque<int> temp; for (int i = 1; i <= n; i++){ temp.push_back(i); } vector<int> result; while(!temp.empty()){ for (int i = 0; i < k-1; i++){ in...
ALGO
0.999986
4.403524
7c080c5d-c9aa-48bf-b01e-58ada5acfd0e
alifalhasan/CP-code-vault
Codeforces/Codeforces Round/Codeforces Round 587 (Div. 3)/B - Shooting/61008254.cpp
#include<bits/stdc++.h> using namespace std; #define S scanf #define P printf #define G getline #define SZ size() #define C clear() #define B begin() #define F front() #define T top() #define E end() #define EM empty() #define V vector #define Q queue #define DQ deque #define PQ priority_queue #define ST stack #define ...
ALGO
0.999935
3.060817
f36629cc-db1e-4893-98c0-7a0ad99c8e04
kbg8146/Cplusplus_codetree
250308/문자열의 길이 출력하기/print-strings-length.cpp
#include <iostream> #include <string> using namespace std; int main() { string str1; string str2; cin >> str1 >> str2; int leght = str1.length() + str2.length(); cout << str1.length()+str2.length(); // Please write your code here. return 0; }
ALGO
0.998585
3.433032
ee9bc49e-c070-4003-b415-83f4d52bfb09
VPlabc/web-configuration-for-all-project_170524
libraries/MPU9250/quaternionFilters.cpp
// Implementation of Sebastian Madgwick's "...efficient orientation filter // for... inertial/magnetic sensor arrays" // (see http://www.x-io.co.uk/category/open-source/ for examples & more details) // which fuses acceleration, rotation rate, and magnetic moments to produce a // quaternion-based estimate of absolute d...
ALGO
0.999057
5.849371
09f0bf4f-77a3-413c-a1cf-037abbbcca96
itsVed/DSA-Grind
1197-parsing-a-boolean-expression/parsing-a-boolean-expression.cpp
class Solution { public: bool f(int &index, string &s){ char ch = s[index++]; if(ch == 't') return true; if(ch == 'f') return false; if(ch == '!'){ index++; bool result = !f(index, s); index++; return result; } vect...
ALGO
0.999785
5.86483
63f2c939-a1ee-4394-b0c4-e90425e0074d
PiyasSarkar81/LeetCode-and-GFG-Solutions
0019-remove-nth-node-from-end-of-list/0019-remove-nth-node-from-end-of-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* removeNthFr...
ALGO
0.999958
6.099734
f7f7b777-b725-4a65-a90d-cda1988f32d0
ishandutta2007/codeforces
tatyam/normal/1408/E.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using uint = unsigned; using pcc = pair<char, char>; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<ld, ld>; using tuplis = array<ll, 3>; template<class T> using pq = prior...
ALGO
0.999922
3.77821
5febcb21-3613-46ec-ba3c-70f61f8b1a50
Valerion052/codeforces
training/Тренировки_Нижний_Новгород/Графы_растояние_1/C01/main.cpp
#include <iostream> #include <vector> #include <queue> #include <set> using namespace std; int n, m, k; set<int> find_X(vector<int> parent, vector<int> children) { set<int> ans; queue<int> q; for (int i=0; i<parent.size(); ++i) { if (children[i]==0) {q.push(i);} } while (ans.size()<k) ...
ALGO
0.999955
4.009846
47291452-6757-4e8c-b34e-55aae11c695a
ishandutta2007/codeforces
zero4338/normal/1616/A.cpp
#include<bits/stdc++.h> using namespace std; int read() { int ret=0;bool f=0;char c=getchar(); while(c>'9'||c<'0')f|=(c=='-'),c=getchar(); while(c>='0'&&c<='9')ret=(ret<<3)+(ret<<1)+(c^48),c=getchar(); return f?-ret:ret; } int T; const int maxn=105; int n,a[maxn]; int ans; map<int,bool>exi; int main() { T=read(); ...
ALGO
0.999926
4.288477
cf3b5b2d-febd-4a41-95a0-192f9dd00dc0
Romankomarov154/ikbo_70_23
ConsoleApplication5_1/ConsoleApplication5_1/ConsoleApplication5_1.cpp
// ConsoleApplication5_1.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> using namespace std; int nod(int a, int b, bool speed) { if (speed) { int temp; while (a && b) { if (a > b) { ...
ALGO
0.998969
5.427685
9718ba36-c87e-438f-8bf1-29f1a80fd44d
Sayemahamed/cpp
A_Ilya_and_Bank_Account.cpp
#include<bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if(s[0]=='-') { if(s.size()==3 and (s[1]=='0' or s[2]=='0'))cout << } else cout<<s; }
ALGO
0.963491
3.547479
4af9e6b6-eaa6-43e0-971c-613bcc2dbc0a
lleviackermann/CpCodes
codeforces/F_PolandBall_and_Gifts.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define endl "\n" #define fo(i, n) for (i = 0;...
ALGO
0.999845
4.013387
1542b93d-eb07-40c0-ba8d-e806bf10df60
ssuperpower-developer/Algorithms_Study
HJH/2346.cpp
#include<iostream> #include <vector> using namespace::std; int main(void){ int N; int tempInput; cin>>N; vector<pair <int,int> > vec; for(int i=1;i<=N;i++){ cin>>tempInput; vec.push_back(make_pair(i,tempInput)); } // 입력 int num; while(!vec.empty()){ cout<<ve...
ALGO
0.999972
3.386154
acb1fde8-091d-4b38-a0da-10e6b65e4224
AmanSharma121202/DSA-Code
questionsOnGenricTree.cpp
//Q1 just greater in Generic tree // #include<bits\stdc++.h> // using namespace std; // class TreeNode{ // public: // int data; // vector<TreeNode*>children; // TreeNode(int data_val){ // this->data=data_val; // } // }; // TreeNode* justGreater(TreeNode*&currNode,TreeNode*&ansNode, int ...
ALGO
0.995814
4.089344
a647c100-9550-4540-861c-6200eba40fb9
AmaanKhan63/Data-Structures
huffman.cpp
#include <bits/stdc++.h> using namespace std; struct MinHeapNode { char data; unsigned freq; MinHeapNode *left, *right; MinHeapNode(char data, unsigned freq) { left = right = NULL; this->data = data; this->freq = freq; } }; struct compare { bool operator()(MinHeapNode* l, MinHeapNode* r) { re...
ALGO
0.999914
4.796221
357acb8c-7f88-4872-a26d-da1b5fb7db7f
josuehfa/DAASystem
CoreSystem/lib/CGAL/examples/Min_sphere_of_spheres_d/benchmark.cpp
#include <iostream> #include <ctime> #define CGAL_JUST_MINIBALL #include <CGAL/Min_sphere_of_spheres_d.h> class Ball { private: // representation: double c[3]; // center in Eucliden coordinates double r; // radius public: // constructor: Ball() {} template<typename InputIterator> Ball(InputIterator fro...
ALGO
0.999575
6.634974
1a10d8b3-2afb-49a2-87f9-fa9c7889dbe4
POC-2025/leetcode
solution/2900-2999/2915.Length of the Longest Subsequence That Sums to Target/Solution2.cpp
class Solution { public: int lengthOfLongestSubsequence(vector<int>& nums, int target) { int f[target + 1]; memset(f, -0x3f, sizeof(f)); f[0] = 0; for (int x : nums) { for (int j = target; j >= x; --j) { f[j] = max(f[j], f[j - x] + 1); } ...
ALGO
0.999921
5.832408
25662c14-61e6-4360-864f-ac6e3e76c462
99cardz/g-delnummer
GNumber.cpp
#include "GNumber.hpp" #include <iostream> GNumber::GNumber(unsigned long long n) { do m_digits += n % 10; while (n /= 10); } unsigned long GNumber::size() const { return m_digits.size(); } char GNumber::operator[](const unsigned int& i) const { if (i >= m_digits.size()) return 0; return m_digits[i]; } GNumb...
TOOL
0.911599
4.632041
b3dd9afa-161b-43b4-8581-72a98f9386da
AgrVanshit/DataStructures-and-Algorithms
04.Recursion/D)Combination sum-2.cpp
//https://leetcode.com/problems/combination-sum-ii/description/ /*ONE OF THE RECURSION PATTERN IS TAKE/NOTTAKE WHICH WE USE IN "PRINT ALL SUBSEQUENCES" AND "COMBINATION ONE TYPE PROBLEMS" AND THE OTHER RECURSION PATTERN IS THAT WE ARE USING IN THIS PROBLEM.*/ //T.C: O(2^N * K(K is Avg. length of combinations)); /...
ALGO
0.99997
6.441471
92fbb4d4-f3cd-4f03-9e25-998d9b5cbd42
victorehrich/Metodos-numericos
ajuste_linear.cpp
#include<iostream> #include <math.h> using namespace std; int main(){ int n; cout << "Digite o nmero de valores de x e y:\n"; cin >> n; int i; cout << "Digite os valores de x:"; float x[n],x_barra = 0; for(i=0;i<n;i++){ cout <<"\nx["<<i<<"] = "; cin >>x[i]; x_barra...
ALGO
0.994122
3.278229
e7b26a7a-8aed-4261-a32a-8769e8703570
GlycerolVeinz/ALG
AbstractDataTypes/tree/BinTree.cpp
// // Created by safor on 26.1.24. // #include "BinTree.h" namespace MyADTs { namespace Trees{ namespace BinaryTree{ Node::Node(Node *par, void *data) { this->parent = par; this->data = data; this->left = nullptr; this->right = n...
ALGO
0.999085
4.510017
deaeffc2-a177-4420-9c09-35b5f072f4fc
Bamtau/frameworks_av
media/libstagefright/codecs/mp3dec/src/pvmp3_normalize.cpp
/* ------------------------------------------------------------------------------ PacketVideo Corp. MP3 Decoder Library Filename: pvmp3_normalize.cpp Date: 10/02/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: -----------------------...
ALGO
0.998503
4.971278
9b8f3f56-37dc-40c4-96cd-baf62335b991
rbdus0715/algorithm
boj/dynamic_programming/1937.cpp
#include <iostream> using namespace std; #define MAX 501 int N, map[MAX][MAX], dp[MAX][MAX], res; const int dx[4] = {0, 0, -1, 1}; const int dy[4] = {-1, 1, 0, 0}; int d(int y, int x) { // cout << y << " " << x << "\n"; int& ret = dp[y][x]; if(ret!=-1) return ret; ret = 0; for(int i=0; i<4; i...
ALGO
0.999767
3.927642
03d1f967-476a-416a-819c-7bd8d3f1de02
eric-haibin-lin/pelotondb
src/postgres/backend/utils/adt/levenshtein.cpp
#define MAX_LEVENSHTEIN_STRLEN 255 /* * Calculates Levenshtein distance metric between supplied csrings, which are * not necessarily null-terminated. Generally (1, 1, 1) penalty costs suffices * for common cases, but your mileage may vary. * * One way to compute Levenshtein distance is to incrementally construc...
ALGO
0.997367
6.268522
3d202d5e-cc8a-4c1b-bc15-4d0eb52d29ff
Brilly-Bohyun/Algorithm-Diary
프로그래머스/unrated/181882. 조건에 맞게 수열 변환하기 1/조건에 맞게 수열 변환하기 1.cpp
#include <string> #include <vector> using namespace std; vector<int> solution(vector<int> arr) { vector<int> answer; for(int i = 0; i < arr.size(); i++){ if(arr[i] >= 50 && arr[i] % 2 == 0){ answer.push_back(arr[i] / 2); } else if(arr[i] < 50 && arr[i] % 2 != 0){ answer...
ALGO
0.99989
5.106349
4ceb2825-39c9-430f-b599-22dc9caa790f
ambika-binayak/daily-code
day4/armstrong.cpp
#include<iostream> #include<math.h> using namespace std; int main() { int a,b,i,j,s=0,n,r; cout<<"Enter range="; cin>>a>>b; for(i=a;i<=b;i++) { for(j=a;j<=i;j++) n=i; while(n>0) { r=n%10; s=(s+(r*r*r)); n=n/10; } if(s==i) cout<<i<<"\t"; s=0; } }
ALGO
0.999873
3.779166
6d10207a-3d78-4d1c-acf7-35357f36564a
ArturAssisComp/layout-challenge
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
aa09de32-b56a-4ab6-93c3-0af70993dd4b
WebKit/WebKit-http
Source/WebKit/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
#include "config.h" #include "NetscapeBrowserFuncs.h" #if ENABLE(NETSCAPE_PLUGIN_API) #include "NPRuntimeUtilities.h" #include "NetscapePlugin.h" #include "PluginController.h" #include <WebCore/HTTPHeaderMap.h> #include <WebCore/HTTPHeaderNames.h> #include <WebCore/IdentifierRep.h> #include <WebCore/NotImplemented.h>...
TOOL
0.8869
6.068085
ad873f2a-59fd-40e2-8e13-436154f10456
egeozsoy/LABRAD-OR
scene_graph_prediction/pointnet2_dir/pointnet2_ops_lib/pointnet2_ops/_ext-src/src/ball_query.cpp
#include "ball_query.h" #include "utils.h" void query_ball_point_kernel_wrapper(int b, int n, int m, float radius, int nsample, const float *new_xyz, const float *xyz, int *idx); at::Tensor ball_query(at::Tensor new_xyz, at::Tensor xyz, const f...
ALGO
0.955192
6.143755
bd0cc2ec-53ad-4ad1-b8a4-7f88a8c4fffe
5onyy/Competitive_Programming
CSES/Dynamic Programming/Rectangle Cutting/main.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define sz(x) (int)(x).size() #define sqr(x) ((x) * (x)) #define log2i(x) (64 - __builtin_clzll(1ll * (x)) - 1) #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define debug(x) { co...
ALGO
0.999939
3.424019
193681a0-80f4-4012-a67f-af93822a90d4
emilymryan/LAMMPS-SPH-Source-Code
src/USER-MISC/pair_edip_multi.cpp
/* ---------------------------------------------------------------------- Environment Dependent Interatomic Potential Contributing author: Chao Jiang ------------------------------------------------------------------------- */ #include "pair_edip_multi.h" #include "atom.h" #include "citeme.h" #include "comm.h"...
ALGO
0.997502
5.592354
c72b85f2-4cf5-40d1-91d9-0827f58ceb45
ayushyadav24/Leetcode
Rearrange an array with O(1) extra space - GFG/rearrange-an-array-with-o1-extra-space.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: // arr: input array // n: size of array //Function to rearrange an array so that arr[i] becomes arr[arr[i]] //with O(1) extra space. void arrange(long long arr[], int n) { ...
ALGO
0.99986
5.160155
44d73c41-8384-4983-a644-af47e71af9ac
yashraj9932/Data-Structures-and-Algorithms-Practice
CLL.cpp
//Circular Linked List #include <bits/stdc++.h> using namespace std; struct Node { int data; Node *next; }; Node *start = NULL; Node *last; void createList(int n); void print(); void deleteNode(); void insert(int x); int main() { cout << "Enter the value of n:" << endl; int n; cin >> n; createList(n); print()...
ALGO
0.999716
4.426628
e3cffd40-23aa-48dc-a720-0013b4fc05bb
vineelkrish/TUF_DSA_Problems
increasingnum.cpp
#include<bits/stdc++.h> using namespace std; void pat(int n) { int count=1; for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) { cout<<count<<" "; count++; } cout<<endl; } } int main(){ int n; n=5; pat(n); }
ALGO
0.999806
4.068192
1f2eb974-2dea-453b-b5a2-65b3f63c79f6
Clazex/oi-study
2019-Summer/exercise/luogu_training/4/P1046@luogu.cpp
#include <cstdio> using namespace std; int main(){ int a[10], n, i, sum = 0; for(i = 0; i < 10; i++){ scanf("%d", &a[i]); } scanf("%d", &n); for(i = 0; i < 10; i++){ if(n + 30 >= a[i]){ sum++; } } printf("%d", sum); return 0; }
ALGO
0.999398
3.206817
d0a7a945-ed93-4280-9af3-2de6ecaf00b1
jfedorov/gromacs
src/gromacs/linearalgebra/gmx_blas/sgemv.cpp
#include <cctype> #include <cmath> #include "gromacs/utility/real.h" #include "../gmx_blas.h" void F77_FUNC(sgemv,SGEMV)(const char *trans, int *m__, int *n__, float *alpha__, float *a, int *lda__, ...
ALGO
0.99883
5.897514