uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ca79f7d2-fa26-428c-961e-22a408951f30
20RitikSingh/Leetcode_cpp
2690-house-robber-iv/house-robber-iv.cpp
class Solution { bool check(vector<int> &nums,int k,int mi){ int n=nums.size(); vector<int> v(n); v[0]=(nums[0]<=mi); if(v[0]==k) return 1; for(int i=1;i<n;i++){ v[i]=nums[i]<=mi; if(i>1) v[i]+=v[i-2]; v[i]=max(v[i],v[i-1]); if(...
ALGO
0.999993
5.819227
dc8a8bc4-9b6c-4d32-ad99-607299f184dc
ishmeetkohli/SketchBasedImplicitBlending
lib/libigl/include/igl/embree/bone_heat.cpp
bool igl::embree::bone_heat( const Eigen::MatrixXd & V, const Eigen::MatrixXi & F, const Eigen::MatrixXd & C, const Eigen::VectorXi & P, const Eigen::MatrixXi & BE, const Eigen::MatrixXi & CE, Eigen::MatrixXd & W) { using namespace std; using namespace Eigen; assert(CE.rows() == 0 && "Cage edges not...
ALGO
0.979783
5.694891
ba1f69fb-d23d-4204-81a7-4f5342d70578
Danaka-dev/solominer2
depends/xmrig-solo/src/base/crypto/sha3.cpp
/* ------------------------------------------------------------------------- * Works when compiled for either 32-bit or 64-bit targets, optimized for * 64 bit. * * Canonical implementation of Init/Update/Finalize for SHA-3 byte input. * * SHA3-256, SHA3-384, SHA-512 are implemented. SHA-224 can easily be added. ...
ALGO
0.982137
7.675233
6fc31245-883f-46db-8ca9-17041fb2fabb
piotrglebocki/advent-of-code-2024
3/main2.cpp
#include <string> #include <sstream> #include <fstream> #include <iostream> using namespace std; const string DO = "do()"; const string DONT = "don't()"; const string pattern = "mul("; const size_t pattern_size = pattern.size(); vector<size_t> find_indices(const string &sequence, const string &substring) { std::...
ALGO
0.999638
5.297846
f2e7829f-35e9-4814-8baf-caf6dbd5e9c2
cw26378/PathPlanningProject
src/Eigen-3.3/failtest/qr_int.cpp
#include "../Eigen/QR" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { HouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
TEST
0.887556
3.076401
6eb419cc-6baa-4972-bf3b-d4ea60f39de4
yash13902/leetcodes
234-palindrome-linked-list/234-palindrome-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 *temp; b...
ALGO
0.999928
5.801764
94964b25-48d9-481c-937f-fa231a55f8cc
AmirHaytham/Online-Judges-Solutions
UVa/Closest Sums/main.cpp
#include <bits/stdc++.h> #define F first #define S second #define f(i , s , n) for(int i = s ; i < n ; ++i) #define sz(v)) (int)v.size() #define all(v) v.begin(),v.end() #define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define all(v) v.begin(),v.end() #define LightedDigits(x) __builtin_popcoun...
ALGO
0.999672
3.774854
cbda71c6-62d9-4d3a-8c42-253cc6dba1bc
ishandutta2007/codeforces
rhodoks/normal/1641/D.cpp
#include <bits/stdc++.h> #define DB double #define LL long long #define MST(a,b) memset((a),(b),sizeof(a)) #ifdef _DEBUG_ #define MRK() cout<<"Mark"<<endl; #define WRT(x) cout<<#x<<" = "<<(x)<<endl; #else #define MRK() ; #define WRT(x) ; #endif #define MAXN 1010000 #define MAXM 2010000 #define MOD1 998244353 #defi...
ALGO
0.999966
3.893552
74ff46ba-28bd-4da6-b8b5-314fd9847e53
mdNurAman/Codeforces
B_Angry_Monk.cpp
#include <bits/stdc++.h> using namespace std; #define el "\n" #define ll long long int #define loop(n) for (int i = 0; i < n; i++) void solve() { int t; cin >> t; while (t--) { int n, k; cin >> n >> k; vector<ll> v(k); loop(k) cin >> v[i]; ll ans = 0; sort...
ALGO
0.999779
3.898849
89d2b361-2486-46d9-aab4-a8c8dde18384
linyicheng1/OpenSLAM-Notes
rpg_svo-master/svo/src/depth_filter.cpp
#include <algorithm> #include <vikit/math_utils.h> #include <vikit/abstract_camera.h> #include <vikit/vision.h> #include <boost/bind.hpp> #include <boost/math/distributions/normal.hpp> #include <svo/global.h> #include <svo/depth_filter.h> #include <svo/frame.h> #include <svo/point.h> #include <svo/feature.h> #include <...
ALGO
0.991022
6.426324
0ebd0fa2-6a88-4144-a144-70a5c5b7e1bb
code233trainee/lijiminbest
CodeForese/div3/935_div3/D.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; void solve() { ll n, m; cin >> n >> m; vector<ll> A(n), B(n); for(int i = 0; i < n; i++) { cin >> A[i]; } //翻转整个数组 reverse(A.begin(), A.end()); for(int i = 0; i < n; i++) { cin >> B[i]; } ...
ALGO
0.999983
4.001998
80af1148-69bd-41d3-81c0-6a46addf39ab
lakshman2003/coding-questions
D_Alice_s_Adventures_in_Cards.cpp
#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 tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; #define ll long long #define ldd long double #define en '\n' #de...
ALGO
0.999777
3.66278
88614562-e4ce-4fa2-8f43-9dbee307e028
FelixMatrixx/23521215_23521704_23521494_23521821_23521208_23521327_BT03
Bai112/Bai112.cpp
#include <iostream> #include <iomanip> using namespace std; void Nhap(int[], int&); void Xuat(int[], int); int TanSuat(int[], int, int); int TimGiaTri(int[], int); void LietKe(int[], int); int main() { int b[500]; int k; Nhap(b, k); cout << "Mang da nhap la: "; Xuat(b, k); cout << "Gia tri co so lan xuat hien n...
ALGO
0.999766
3.629002
8595c463-cc06-4ee3-b8dd-50ddccd2f908
woobba94/algorithm
Project_codingTest/0391_1212.cpp
//#include <bits/stdc++.h> //using namespace std; // //void calc(int n, int i); //int main() //{ // string input; // cin >> input; // int len = input.length(); // // if (input[0] - '0' == 0) // { // cout << 0; // return 0; // } // // for (int i = 0; i < len; i++) // { // calc(input[i] - '0', i); // } // //} // //vo...
ALGO
0.999979
3.772075
fd31245b-45db-4ab9-93c5-3feed119ec30
pingchungchang/CP
CF1700D.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll,ll> #define pii pair<int,int> #define fs first #define sc second #define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ld long double vector<ll> v; bool f(ll now){ ll d = 0; for(auto i:v){ if(now+d<i)return false;...
ALGO
0.999783
3.8472
c1b93adb-5bd5-42c2-b7b9-3eddb6c805d3
madhabkafle/LeetCode
0038-count-and-say/0038-count-and-say.cpp
class Solution { public: string countAndSay(int n) { if(n==1) return "1"; if(n==2) return "11"; string s="11"; for(int i=3;i<=n;i++){ string t=""; s=s+'&'; int c=1; for(int j=1;j<s.length();j++){ if(s[j]!=s[j-1]){ ...
ALGO
0.999993
6.800001
6f659d56-7296-4864-ab5e-41a81e93c599
ishandutta2007/codeforces
brunovsky/normal/1493/B.cpp
#include <bits/stdc++.h> using namespace std; // ***** bool rev(int n, int N) { static const int map[10] = {0, 1, 5, -1, -1, 2, -1, -1, 8, -1}; int a = n / 10, b = n % 10; return map[a] >= 0 && map[b] >= 0 && 10 * map[b] + map[a] < N; } auto solve() { int H, M, h, m; scanf("%d%d\n%d:%d", &H, &M,...
ALGO
0.999372
4.690669
8c164a09-42ed-44e0-b428-a2b06a391658
LogCreative/OJ-DataStructure
Templates/kmp.cpp
#include<iostream> #include<string> using namespace std; void get_next(string t, int* next) { next[0] = -1; int j; for (int i = 1; i < t.length(); ++i) { j = i - 1; while(j >= 0 && t[next[j]+1]!=t[i]) j = next[j]; if (j < 0) next[i] = -1; else next[i] = next[j] + 1; } } ...
ALGO
0.999926
4.971325
37cf3a79-2d08-4ff8-840c-5b5fec1600cf
Ayush29Ayush/leetcode-gfg-problems
769-max-chunks-to-make-sorted/769-max-chunks-to-make-sorted.cpp
//! we will use chaining technique -> will see till where the impact is possible // refer this if needed -> https://www.youtube.com/watch?v=XZueXHOhO5E class Solution { public: int maxChunksToSorted(vector<int>& arr) { int ChunkCount = 0; int MaxElementImpact = 0; int n = arr.size(); ...
ALGO
0.999987
6.017468
3eda5dcf-7b09-4e93-b06f-2808b2c288fc
Moolvie/Source-code-From-Bucky-Roberts
C++/28_cppBeginners.cpp
#include <iostream> using namespace std; int volume(int l=1, int w=1, int h=1); // default values/parameters in function prototype int main() { cout << volume (5) << endl; // l=5, w=1, h=1 -> 5*1*1 } int volume(int l, int w, int h){ return l*w*h; }
TOOL
0.988597
5.107149
126d5d4f-3092-431f-b88e-e60e3955bb81
kks227/BOJ
1100/1194.cpp
#include <cstdio> #include <cctype> #include <queue> using namespace std; struct qInstance{ int key, r, c; qInstance():qInstance(0, 0, 0){} qInstance(int key1, int r1, int c1):key(key1), r(r1), c(c1){} }; const int roff[4] = {-1, 1, 0, 0}; const int coff[4] = {0, 0, -1, 1}; int main(){ int N, M; char map[50][50...
ALGO
0.999878
3.748067
e6d0ab2d-cf5d-493f-a409-5d57313d58d3
iamprofessor1/X-Cuber
Model/RubiksCubeBitboard.cpp
// // Created by Vikas Pandey ( https://github.com/iamprofessor1/X-Cuber ) . // #include "RubiksCube.h" class RubiksCubeBitboard : public RubiksCube { private: uint64_t solved_side_config[6]{}; int arr[3][3] = {{0, 1, 2}, {7, 8, 3}, {6, 5, 4}}; uint64_t one_...
ALGO
0.998833
5.692014
666e64af-9804-4b96-b3a4-f59e136b7011
joaobnetto/CN
boost_1_70_0/libs/spirit/example/qi/compiler_tutorial/calc7/vm.cpp
#include "vm.hpp" namespace client { void vmachine::execute(std::vector<int> const& code) { std::vector<int>::const_iterator pc = code.begin(); std::vector<int>::iterator locals = stack.begin(); stack_ptr = stack.begin(); while (pc != code.end()) { switch (*...
ALGO
0.883493
5.139827
57caa484-57c5-4feb-8277-ff6389278bef
iSuneast/uva-codes-for-acm-icpc
UVa 10000/10944 - Nuts for nuts.._0829_dp_tsp.cpp
/* 10944 - Nuts for nuts.. dp.. tsp... 1.There will be at most 15 places where there are nuts 2.starting from "L", gather all the nuts, and back to "L". so it's just a hamilton tsp problem... use bfs to pre_get the dis between any pair of nodes then bitmask dp will do. */ #include<iostream> #include<queue> #define MA...
ALGO
0.999919
3.958221
3fd01903-1d0f-4c65-89ce-f04bc5ee2656
yingku/nn-verification
MarabouRepo/src/basis_factorization/SparseLUFactors.cpp
/********************* */ #include "BasisFactorizationError.h" #include "Debug.h" #include "FloatUtils.h" #include "MString.h" #include "SparseLUFactors.h" SparseLUFactors::SparseLUFactors( unsigned m ) : _m( m ) , _F( NULL ) , _V( NULL ) , _P( m ...
ALGO
0.999088
3.134302
22bfd128-a953-4300-baad-117694a78010
Kobzol/llvm-se
src/solver/Solver.cpp
#include <util/Logger.h> #include "Solver.h" #include "expression/MemoryLocation.h" Solver::Solver(z3::context* ctx, Path* path): ctx(ctx), path(path), solver(*ctx) { } Solver::Solver(const Solver& other) : ctx(other.ctx), path(other.path), solver(this->copySolver(other.solver)) { } Solver& Solver::operato...
ALGO
0.989143
5.678785
c33501ab-62a8-4687-8d31-4cf8a3d15435
raincross7/code-similarity
codes/train_code/problem203/problem203_317.cpp
//1 - A ///=========================================== TAREQ ABRAR ============================================= #include "bits/stdc++.h" //#include<stdio.h> #define pb(x) push_back(x) #define XX first #define YY second #define cst 1000000007 #define nor_rad(x) ( ( PI*x )/180) #define rad_nor(x) ( (x/IP)*180 ) ...
ALGO
0.999053
3.410752
6a8838ca-e52a-4dcd-8fa6-f9bb2973bbd2
AigaGoto/AIzuPrigramming
p14.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { double a; cin >> a; double pi = M_PI; cout << fixed << setprecision(6); cout << a * a * pi << " " << 2 * a * pi << endl; return 0; }
ALGO
0.993248
4.000877
79cf4c78-aa79-415c-a10f-3a4cb81593fd
chb2ab/DataStructures
lab06/code/wordPuzzle.cpp
//Crispin Bernier, chb2ab, 104 //Time taken for 3x3 word search: 0.000160, 4x7: 0.000641, 5x8: 0.000800, 50x50: 0.404, 140x70: 4.69, 250x250: 101.2, 300x300: 195.3 //The big-theta running time for this application is Big-Theta(r,c,w) = r*c*max(r,c)*w, where w is the size of the dictionary. This was obtained by multiply...
ALGO
0.99646
4.56211
5bbc4f5d-f595-4ae7-9cef-9951a2b0daf2
sarvex/leetcode-java
lcof2/剑指 Offer II 109. 开密码锁/Solution.cpp
class Solution { public: int openLock(vector<string>& deadends, string target) { unordered_set<string> s(deadends.begin(), deadends.end()); if (s.count(target) || s.count("0000")) return -1; if (target == "0000") return 0; unordered_set<string> visited; queue<string> q; ...
ALGO
0.999961
6.392484
eb01ca2b-cfbb-4f40-9b58-380fd808b918
Jasonyanyusong/OneStudentOneChip
DigitalCircuitsExperiments/DCE02/decode_2to4_for/obj_dir/Vdecode_2to4_for___024root__DepSet_h1251a6ac__0.cpp
// Verilated -*- C++ -*- // DESCRIPTION: Verilator output: Design implementation internals // See Vdecode_2to4_for.h for the primary calling header #include "verilated.h" #include "Vdecode_2to4_for___024root.h" VL_INLINE_OPT void Vdecode_2to4_for___024root___ico_sequent__TOP__0(Vdecode_2to4_for___024root* vlSelf) { ...
ALGO
0.973872
5.146714
6f79f1df-35b4-4ea4-a794-22c3671dc841
parthsavaliya01/HealWithPhysio
HealWithPhysio/heal_with_physio/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.998722
6.76775
5be54cc0-a35e-492e-98ab-6535af08478e
HighW4y2H3ll/PJ_O-LLVM
lib/Analysis/ScalarEvolutionNormalization.cpp
#include "llvm/IR/Dominators.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ScalarEvolutionNormalization.h" using namespace llvm; /// IVUseShouldUsePostIncValue - We have discovered a "User" of an IV expression /// and now we need to decide whether ...
ALGO
0.938114
7.496826
70abe762-4991-420e-b771-c1bb020cc5c2
greenapple1017/codeTree
241207/숫자가 가장 큰 인접한 곳으로 동시에 이동/move-to-max-adjacent-cell-simultaneously.cpp
#include <iostream> using namespace std; #define MAX_N 20 int n, m, t; int board[MAX_N+1][MAX_N+1]; int cnt[MAX_N+1][MAX_N+1]; int next_cnt[MAX_N+1][MAX_N+1]; int dr[4] = {-1,1,0,0}; int dc[4] = {0,0,-1,1}; void Debug() { cout << "board: " << '\n'; for (int i = 1; i <= n; i++) { for (int j = 1; j <...
ALGO
0.999784
5.436636
32dc2c8a-e7d5-49e2-8476-7bda241639e4
Ab-mahin/Codeforces
1684D.cpp
// USER: "Ab.Mahin" // Problem: D. Traps // Contest: Codeforces - Codeforces Round 792 (Div. 1 + Div. 2) // URL: https://codeforces.com/contest/1684/problem/D // Memory Limit: 256 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hp...
ALGO
0.999884
4.586143
f9c9d9b6-f2f1-43a9-be1c-408998ff9e8d
LiTianshui/programming
algorithm/leetcode/leetcode_101/0650.cpp
// 2021-07-09 // 650. 只有两个键的键盘 int minSteps (int n) { vector<int> dp(n + 1); for (int i = 2; i <= n; ++i) { dp[i] = i; for (int j = 2; j * j <= i; ++j) { if (i % j == 0) { dp[i] = dp[j] + dp[i / j]; break; } } } return dp[n]; }
ALGO
0.999908
3.550135
0c5bb0e5-3e48-450d-a9ed-11f84dfff1ba
EmonHira135923/XPSC-Club-05---Probleam-Solving
XPSC - 05 Probleam Solving Club/Week 04/Day 28/B_Segment_with_Big_Sum.cpp
#include<bits/stdc++.h> #define endl '\n' #define ll long long #include<string.h> #include<string> using namespace std; void solve() { int n; long long s; cin >> n >> s; vector<long long> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } long long currentSum = 0; int sta...
ALGO
0.999947
3.936278
f516cc96-6457-4778-9b0f-51968bcac515
heavenMOJANG/ICPC
.history/luogu/【算法2-4】字符串/P1470 [USACO2.3] 最长前缀 Longest Prefix_20240726092342.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include<bits/stdc++.h> #define int long long using namespace std; constexpr int inf = 0x7fffffff; constexpr int N = 2010, M = 200010; string s; int trie[N][26], e[N], fail[N], cnt = 1; int dp[M]; void insert(string str) { int ...
ALGO
0.999903
4.405247
edc1d0a0-a7ca-442d-840b-8d04b68ffbbb
MukulCode/CodingClubIndia
z-string-matching-algorithm.cpp
#include<bits/stdc++.h> using namespace std; vector<int> Z_algo(string s, int n) { vector<int> z(n); // form a z vector int l = 0; int r = 0 ; for (int i = 0; i < n; i++) { //condition 1 //if i > r then make l = i and r = i and check furthur as you can see from the below code if (i > r) { l = i; r =...
ALGO
0.999449
3.674616
855a2e76-26fa-40b4-abd7-19cba8a89a08
Saatvik-Lochan/competitive-programming
C_Balanced_Stone_Heaps.cpp
#include <bits/stdc++.h> using namespace std; void calculate(); bool test(int value, int h[], int n); int main(){ int t; cin >> t; while (t--) calculate(); } void calculate(){ int n; cin >> n; int h[n]; for (int i = 0; i < n; i++) { cin >> h[i]; } int l, u; l = 0; ...
ALGO
0.999959
4.097432
8846167a-5c17-415b-bb63-4790dd508069
SHREYDEVLOPER/sde-journey
904-leaf-similar-trees/leaf-similar-trees.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), ...
ALGO
0.999917
6.265671
a2dee194-c737-4464-a3ac-31cf806797c2
PureshwarGonekar/Striver-Dp-Series
DP_25_LongestCommonSubsequence.cpp
// Problem - https://www.codingninjas.com/codestudio/problems/longest-common-subsequence_624879 #include <bits/stdc++.h> //Recusion T.C = O(2^(m+n)) int f(int ind1,int ind2, string s, string t){ if(ind1<0 || ind2<0) return 0; if(s[ind1]==t[ind2]) return 1 + f(ind1-1,ind2-1,s,t); return max( f(ind1-1,ind2,s,t), ...
ALGO
0.999983
6.262864
167c3a6c-53bb-4fb8-995a-c188b7fb3d2b
joydip007x/CompetitiveCodeArchive
HackerRank/balanced-brackets/15241076_RE_0ms_0kB.cpp
#include <bits/stdc++.h> #define LOOP(i,L,U) for(long long int i=(long long int)L;i<U;i++) using namespace std; // Complete the isBalanced function below. string isBalanced(string s) { char A='(',B=')',C='{',D='}',E='[',F=']'; ///string s; stack<char > stak; int flag=-1; /// getline(cin,s); LO...
ALGO
0.999331
5.088536
e58549dd-fe84-49fd-8179-d3de29f79a18
DreamFeather/3Elevators-scheduling
3Elevator-scheduling/NewQue.cpp
#include<stdlib.h> #include<iostream> using namespace std; que::que() { initial(); } que::~que() { clean(); } struct que::Que //ԭ { int Target; struct Que *next,*last; }; int que::front() //Ԫ { if(Head==NULL)return -1; else return (Head->Target); } int que::back() //βԪ { if(Tail==NULL...
ALGO
0.999866
3.611809
bed42733-a26a-4e2d-8a54-f42f077a9076
raincross7/code-similarity
codes/train_code/problem251/problem251_122.cpp
// // author : Abhishek // #include <bits/stdc++.h> #define ll long long #define db double #define deb(x) cout<<#x<<": "<<x<<"\n" #define all(x) x.begin(),x.end() #define fo(i, n) for(i=0 ; i<n ; i++) #define Fo(i, k, n) for(i=k ; i<n ; i++) using namespace std; const ll mod = 1000000007; const ll N = 300005; // a...
ALGO
0.998708
4.320672
f79f18c4-b59a-44e1-8ad5-5cba638c6efb
DimitarSht/Informatics_10B_2024_2025
Grade_09/Първи срок/Седмица_08_Сортиране_10_11_2023/zad1_masivi.cpp
#include<iostream> using namespace std; /// Palindrom int main() { int razmer; cin>>razmer; bool isPalindrom = false; int counter = 0; char duma[razmer]; for(int i = 0; i < razmer; i++) { cin>>duma[i]; } /// Algoritam za palindromi for(int i = 0; i < razmer / 2; i++) ...
ALGO
0.999989
4.585587
a3134ca8-6825-468e-9fa6-6c534e1b1997
rhit-schielaj/CompetitiveProgramming
shortestpath1.cpp
#include <bits/stdc++.h> std::unordered_map<int, std::set<std::pair<int, int>>> graph; // first int of a pair is always weight const int INF = std::numeric_limits<int>::max(); std::vector<int> shortestPath(int start, int n) { std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int>>, std::greater<s...
ALGO
0.999788
4.050486
662b80f3-5928-4dda-b948-b68c25cf542e
iAmanKr47/DSA_Journey
ARRAYS/1975. Maximum Matrix Sum.cpp
//we can propagate negative sign in the whole matrix //if count of negative numbers are odd in the matrix then 1 negative number will be left over and to maximise the overall sum of the matrix we need that negative sign to be on the minimum number class Solution { public: long long maxMatrixSum(vector<vector<int>...
ALGO
0.999995
6.039979
51938196-3d18-4e95-8875-f1cbcc5ef442
Shrutikatyal/Interview-Preparation
Arrays & Strings/GFG Amazon/Equilibrium index of an array.cpp
/* * Author : Shruti Katyal * Date : 18 May, 2020 * * Compiler : g++ 5.1.0 * Flags : -std=c++14 * */ // { Driver Code Starts #include <iostream> using namespace std; #include <stdio.h> int findEquilibrium(int [], int ); int main() { int T; cin>>T; while(T--) { int n; cin>>n; int a[n]; for(i...
ALGO
0.999474
6.229695
c20f0209-c4fe-4553-bebc-6dcba3309c10
ee08b397/Lintcode-7
Cpp/Search-a-2D-Matrix-II.cpp
class Solution { public: /** * @param matrix, a list of lists of integers * @param target, an integer * @return a boolean, indicate whether matrix contains target */ int searchMatrix(vector<vector<int> > &matrix, int target) { // write your code here if (matrix.size() == 0) r...
ALGO
0.999935
5.933899
65fb6f4b-1bde-41de-b7a7-e02967dc76de
allanjoseph01/100-days-of-code
K-th Number in the Union of Segments.cpp
#include<bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif long long n,k; bool check(long long be,vector<pair<long long,long long>>& vp){ long long count=0; for(int i=0;i<n;i++){ if(vp[i].first<=be){ count+=((min(vp[i].second,be)-vp[i].first)+1); } } ...
ALGO
0.999983
3.974581
3656b282-3a97-4532-bc04-e047af342e6d
athuls/RL_Soar
Fall2011/boost_1_46_0/libs/graph/example/adj_list_ra_edgelist.cpp
#include <boost/config.hpp> #include <boost/graph/adjacency_list.hpp> int main() { using namespace boost; typedef adjacency_list<vecS, vecS, bidirectionalS, no_property, property<int, edge_weight_t>, no_property, vecS> Graph; const std::size_t n = 3; typedef std::pair<std::size_t, std::size_t> E; E edg...
ALGO
0.977623
4.315226
42ad4ac3-1e3d-4885-96ac-087edb7a75e8
Nafyaz/my-codes
Lightoj/1038.cpp
#include<bits/stdc++.h> using namespace std; int x[100009]; double e[100009]; double func(int n) { if(e[n] != -1) return e[n]; int i, nod = 0; e[n] = 0; for(i = 1; i <= sqrt(n); i++) { if(i == 1) { nod += 2; } else if(i*i == n) { ...
ALGO
0.999718
4.311009
5a7a06b8-75ea-43f2-8ac5-9c6fbe76fa96
porterlin/CP-Practice
leetcode/binary-search/2187.cpp
class Solution { public: bool check(vector<int>& time, int totalTrips, long long mid) { long long sum = 0; for (int t : time) { sum += (long long)mid / t; if (sum >= totalTrips) return true; } return false; } long long minimumTime(vect...
ALGO
0.999977
6.199079
99661d80-27f9-403f-9f06-3ae1964c50c9
vss2sn/advent_of_code
2023/cpp/day_13b.cpp
#include <algorithm> #include <cmath> #include <fstream> #include <iostream> #include <numeric> #include <string> #include <vector> bool check_row(const std::string& row, int col) { for (int lhs = col, rhs = col+1; lhs >= 0 && rhs < row.size(); lhs--, rhs++) { if (row[lhs] != row[rhs]) return false; } return...
ALGO
0.999647
6.237467
8588276f-9443-4f71-b4bc-382661de1253
delicm/cses
Graphs/Planet Queries II/main.cpp
#include <bits/stdc++.h> using namespace std; int p[200001][32]; bool vis[200001]; int len[200001]; int walk(int x, int step) { for(int i = 0; i <= 31; i++) { if(step&(1 << i)) { x = p[x][i]; } } return x; } void dfs(int i) { if(vis[i]) return; vis[i] = 1;...
ALGO
0.999918
4.122536
c86b87f2-252c-40a7-aeed-23195f021216
Shahbaz-husain/HackerRank-Solutions
Problem Solving/Algorithms/Implementation/Taum and B'day/Taum and B'day.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); /* * Complete the 'taumBday' function below. * * The function is expected to return a LONG_INTEGER. * The function accepts following parameters: * 1. INTEGER b * 2. ...
ALGO
0.999771
5.223197
56c0e073-d5b0-4b97-b393-c4b3712c8698
ma-wenqian/12345dfg
SRC/analysis/algorithm/domainDecompAlgo/DomainDecompAlgo.cpp
// $Revision: 1.2 $ // $Date: 2003-02-14 23:00:41 $ // $Source: /usr/local/cvs/OpenSees/SRC/analysis/algorithm/domainDecompAlgo/DomainDecompAlgo.cpp,v $ // File: ~/OOP/analysis/algorithm/DomainDecompAlgo.C // // Written: fmk // Created: Sun Sept 15 15:06:47: 1996 // Revision: A // // Description: This file contai...
ALGO
0.99763
5.090705
c7acc635-c803-42fd-bc79-9300bc6d40d7
Leo-aiolia-bao/acwing
prim.cpp
#include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N= 510, INF= 0x3f3f3f3f; int n,m; int g[N][N]; int dist[N]; bool st[N]; int prim(){ memset(dist , 0x3f , sizeof dist); int res = 0; for(int i = 0; i < n ; i ++){ int t = -1; for(int j = 1; j <= n ; j++){ if(!st[j] ...
ALGO
0.9999
4.052925
5405f969-676d-4696-a072-031337c0bd5f
DaurenCS/Programming
lab6/m5.cpp
#include <bits/stdc++.h> using namespace std; int main(){ string s; int a; char x; int cont=0; cin>>s>>x>>a; for(int i=0; i<s.size(); i++){ if(s[i]==x){ cont++; } } if(cont==a){ cout<<"YES"; } else if(cont!=a){cout<<"NO";} }
ALGO
0.999785
3.702419
77b86c67-7bcc-4944-96d6-097fc9e21260
Dt-Pham/Coding-Interview-v2
LeetCode/August-2021/19/Maximum_Product_of_Splitted_Binary_Tree.cpp
// https://leetcode.com/explore/challenge/card/august-leetcoding-challenge-2021/615/week-3-august-15th-august-21st/3903/ #include <iostream> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} Tre...
ALGO
0.999937
6.191462
c90f16a7-975a-4682-be0a-20e59623a838
khushboo56/RISC-V_Simulator
phase1/src/dec2bin.cpp
#include "builtin_funcs.hpp" string dec2bin(unsigned int n) { string val=""; while (n != 0) { if(n % 2==1){ val.push_back('1'); } else{ val.push_back('0'); } n /= 2; } int len =val.length(); for(int i=0;i<(32-len);i++){ val....
TOOL
0.925304
4.735019
b0feaab5-819f-4e37-aa36-c9a14bb91a28
alekseibutiaev/experience
leetcode/sgi_test1/sgi_test1.cpp
#include <vector> #include <iostream> int solution(int A, int B) { const int size = 20; int a[size]; int b[size]; int ia = size; int ib = size; if( 0 == A) a[--ia] = 0; if( 0 == B) b[--ib] = 0; while (A || B) { a[ia -= ( 0 != A ) ] = A % 10; A /= 10; b[ib -= ( 0 != B ) ] = B % 10; B /= 10; } int ...
ALGO
0.999607
4.904928
34df1288-abe9-4d5c-98d7-76be1484f1be
ishandutta2007/codeforces
blackbori/normal/1450/A.cpp
#include <bits/stdc++.h> using namespace std; void tc() { string S; int n; cin >> n >> S; sort(S.begin(), S.end()); cout << S << "\n"; } int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin >> t; for(; t --; ){ tc(); } }
ALGO
0.999736
4.151863
fc7ee87f-0c6d-445f-b4d1-1bc593b23f8f
SOFTK2765/PS
BOJ/4504.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); while(1) { int a; scanf("%d", &a); if(a==0) break; if(a%n==0) printf("%d is a multiple of %d.\n", a, n); else printf("%d is NOT a multiple of %d.\n", a, n); } return 0; }
ALGO
0.999091
3.410633
32190d60-89d6-4165-a326-563cab4cf7e8
saqar/WireRepackBySky
Source/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
/* ScriptData SDName: Boss_Astromancer SD%Complete: 80 SDComment: SDCategory: Tempest Keep, The Eye EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "the_eye.h" enum Yells { SAY_AGGRO = 0, SAY_SUMMO...
TOOL
0.872547
4.049633
131bf8af-a1cf-415d-9b91-84dca5ffc3e6
cpe102/lab11-2562-2-ColtenMore
lab11_2.cpp
#include<iostream> using namespace std; //Write function prototype here int gcd(int,int); int main(){ cout << gcd(25,15) << "\n"; cout << gcd(144,60) << "\n"; cout << gcd(60,144) << "\n"; cout << gcd(1,69) << "\n"; cout << gcd(17,19) << "\n"; cout << gcd(51,255) << "\n"; return 0; } int gcd(int x,int y){ ...
ALGO
0.999358
4.913202
9a711107-2747-4071-bb8f-298ee9bf8e3f
aaakshit/Leetcode-solutions
0790-domino-and-tromino-tiling/0790-domino-and-tromino-tiling.cpp
class Solution { public: int numTilings(int n) { if(n==1)return 1; if(n==2)return 2; vector<long long>dp(n+1); dp[1]=1; dp[2]=2; dp[3]=5; for(int i=4;i<=n;i++){ dp[i]=(2*dp[i-1]+dp[i-3])%1000000007; } return dp[n]; } };
ALGO
0.999967
5.606203
a4d5dba9-3ed3-407b-8248-5e6de1a8af2e
Um-ded/problem-solving
Codeforces Codes/597.Prob1099B(Squares and Segments).cpp
///*/////////////////////////////*/// /// IN THE NAME OF ALMIGHTY ALLAH /// ///*/////////////////////////////*/// ///*///////////////*/// /// Author : Um_ded /// ///*///////////////*/// ///*//////////////////////////////////////////*/// /// "When you want something, all the universe /// /// conspires in helping you ...
ALGO
0.999947
5.121376
042c8fa2-4f68-45f7-aa7b-7db7f95105cc
StudyingFather/my-code
luogu/1434.cpp
#include <cstdio> #include <algorithm> using namespace std; const int dx[]={1,-1,0,0}; const int dy[]={0,0,1,-1}; int a[105][105],f[105][105],r,c; int dfs(int x,int y) { if(f[x][y])return f[x][y]; int ans=1; for(int i=0;i<=3;i++) { int tx=x+dx[i],ty=y+dy[i]; if(tx>=1&&ty>=1&&tx<=r&&ty<=c&&a[x][y]>a[tx][ty])ans=...
ALGO
0.999817
3.865375
eab0ff12-29e3-42ec-8d0c-cc9163bae341
ks0727/AtCoder-Archive
APG4b/2章/ex19.cpp
#include <bits/stdc++.h> using namespace std; // 参照渡しを用いて、呼び出し側の変数の値を変更する void saiten(vector<vector<int> >& A,int& correct_count, int& wrong_count ) { // 呼び出し側のAの各マスを正しい値に修正する // Aのうち、正しい値の書かれたマスの個数を correct_count に入れる // Aのうち、誤った値の書かれたマスの個数を wrong_count に入れる // ここにプログラムを追記 for(int i=0;i<9;i++){ f...
ALGO
0.999491
3.594626
f6e70a3e-fe33-4430-97b3-88d613dc8e38
zealscott/ClassProject
DataStructure/Final/graph/main.cpp
#include <iostream> #define MAXVERTEXNUM 100 #define INFINITY 100 using namespace std ; struct Graph { int VertexNum ; char Vertex[MAXVERTEXNUM] ; int AdjMatrix[MAXVERTEXNUM][MAXVERTEXNUM] ; } ; Graph MGraph ; void CreateGraph (Graph *G) { int i, j ; cin >> G-> VertexNum ; for (i = 1 ; i <= ...
ALGO
0.999238
3.487726
a323130d-5f37-4e05-89cb-bb38f6ac7544
matthew-lim-matthew-lim/my-leetcode
2551-PutMarblesinBags/2551-PutMarblesinBags.cpp
// Last updated: 3/31/2025, 12:25:55 PM class Solution { public: long long putMarbles(vector<int>& weights, int k) { // The left and right ends must be included. // Then, we need to select (k - 1) adjacent weights. // We can make a max-heap and a min-heap to keep track of the adjacent weigh...
ALGO
0.999904
5.843699
b19f76ad-e462-4d64-a1e1-f549760a6a7e
Raghavjajooc123/DSA-Practice
StriverSheet/Q1_SetMatrixZeroes.cpp
class Solution { public: void setZeroes(vector<vector<int>>& matrix) { int m = matrix.size(); int n = matrix[0].size(); vector<int> presentx(m, 0); vector<int> presenty(n, 0); for(int i=0; i<m; i++){ for(int j=0; j<n; j++){ if(mat...
ALGO
0.999516
6.443743
607345d0-2a62-4757-acb3-c483aa5d558d
zeusptit/Hackerrank
Inheritance/09. Mua xe.cpp
#include <bits/stdc++.h> using namespace std; #define quick() ios_base::sync_with_stdio(false); cin.tie(0); #define pb push_back using ll = long long; int mod = 1000000007; class Vehicle{ private: string id, name,color,company; public: Vehicle() { id = ""; name ...
ALGO
0.935947
3.832378
419cfac6-1970-4bdd-b19e-bcd54b172de6
Akhil-1009/Leetcode-practice-solutions
0015-3sum/0015-3sum.cpp
class Solution { public: void helper(vector<int>&nums,int i,int k,int no,vector<vector<int>>& output){ int j=nums.size()-1; while(i<j) { if(nums[i]+nums[j]<k) { i++; } else if(nums[i]+nums[j]>k) { j--...
ALGO
0.999967
5.603107
53b5352b-69c7-4ac3-9d97-e313cfc02e7d
uxdxdev/bullet-dominos
Bullet/Demos/SimplexDemo/SimplexDemo.cpp
/* SimplexDemo demonstrated the working of the subdistance algorithm as used in GJK. It draws the simplex, and calculates the closest vector from simplex to the origin */ #include "GL_Simplex1to4.h" #include "LinearMath/btQuaternion.h" #include "LinearMath/btTransform.h" #include "GL_ShapeDrawer.h" #include "Bullet...
ALGO
0.998113
5.968009
f0afa816-a1f1-4a6b-8081-aa5f33937bd3
shengguo78/MultithreadedRendering12-Benchmark
D3D12Multithreading.cpp
#include "stdafx.h" #include "D3D12Multithreading.h" #include "FrameResource.h" //-------------------------------------------------------------------------------------- // Helper functions for querying information about the processors in the current // system. ( Copied from the doc page for GetLogicalProcessorInforma...
TOOL
0.890258
6.014002
a30b97ac-7f4a-405c-a1d9-b2137d113287
zhangzhiguo-fighting/HaizeiOJ
code/1.递归/240.图形打印四.cpp
#include <iostream> using namespace std; char ans[2200][2200]; // 后一个图形的答案不影响前一个图形的答案所以可以将它们存在同一个二维数组中 int num[10] = {0, 1, 3, 9, 27, 81, 243, 729, 2187}; void func(int x, int y, int n) { if (n == 1) { ans[x][y] = 'X'; return ; } func(x, y, n - 1); func(x, y + num[n] / 3 * 2, n - 1); /...
ALGO
0.999837
3.913695
0614e850-c3f4-44b6-ad1d-95979314963a
Augusto42/GCC
contest 01-03-25/2374.cpp
#include <iostream> using namespace std; int main() { int N, M; cin >> N >> M; cout << N - M << endl; return 0; } //Augusto C Fagundes
ALGO
0.999748
3.489404
7ee5acd3-f4d0-4364-9078-13b1a3ed2ff5
shreyaag25/Leetcode
0098-validate-binary-search-tree/0098-validate-binary-search-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.999962
6.419374
8d8a8156-a2dc-421a-8b8e-164a7c3b5b96
heweimin77/shoran_cpp
session2000/problem1700/p1626.bestTeamScore.cpp
#include <gtest/gtest.h> #include <list> using namespace std; namespace { class Solution { public: int bestTeamScore(vector<int>& scores, vector<int>& ages) { int n = scores.size(); vector<int> indexes(n); for (int i = 0; i < n; ++i) indexes[i] = i; sor...
ALGO
0.999651
6.332983
34e2d4ef-fe71-40d4-bd49-c29dfcdc748a
nirowu/leetcode-master
0107-binary-tree-level-order-traversal-ii/0107-binary-tree-level-order-traversal-ii.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.999968
6.333367
f4f87a54-eabd-469c-afde-2a4e6f33c868
jhanvee-khola/DataStructures-Algorithms
Linked_List/DeleteMiddle.cpp
//Given only a pointer/reference to a node to be deleted in a singly linked list, how do you delete it? #inculde<iostream> using namespace std; //Creating class node{ public: int data; node* next; node(int d){ data=d; next=NULL: } }; void deleteNode(node* n){ if(n==NULL){ retur...
ALGO
0.994345
5.67679
bcaad518-4ed1-450c-8e3c-678a35c67d10
liuawen/Play-Leetcode
Play-Leetcode-master/0393-UTF-8-Validation/cpp-0393/main2.cpp
/// Source : https://leetcode.com/problems/utf-8-validation/ /// Author : liuyubobobo /// Time : 2018-10-31 #include <iostream> #include <vector> using namespace std; /// Using Bit Manipulation /// Time Complexity: O(n) /// Space Complexity: O(1) class Solution { public: bool validUtf8(vector<int>& data) { ...
ALGO
0.997681
6.306401
a79a949c-dc02-4b2e-bc90-0f0868ec8810
derco19/Programming-Contest-
May CookOff CodeChef/Double_Burgers.cpp
#include<bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef long double ld; #define PB push_back #define MP make_pair #define F first #define S second #define Pair vector<pair<ll,ll>> #define vec vector <ll> #define all(a) a.begin(),a.end() #define mo 100000000...
ALGO
0.999976
3.833763
259cde1e-7bb6-4405-b1d4-84200735dc6c
yeahsilver/algorithm
백준/math/1002.cpp
#include <iostream> #include <cmath> using namespace std; int main(void) { int testCase; cin >> testCase; while(testCase--) { int x1, y1, r1, x2, y2, r2; cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2; double d = sqrt(pow(x2-x1,2) + pow(y2-y1, 2)); double sub = r1 > r2 ? r1 - r2...
ALGO
0.999903
3.696625
b4d76798-8219-4626-9f5c-789c28e63825
Pradeep772/OWL_CODING
349-intersection-of-two-arrays/intersection-of-two-arrays.cpp
class Solution { public: vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { sort(nums1.begin(),nums1.end()); sort(nums2.begin(),nums2.end()); int pre=-1; int i=0,j=0; vector<int>ans; while(i<nums1.size() && j<nums2.size()){ if(nums1[i]<nums...
ALGO
0.999996
5.487558
f4e74ff6-e7eb-4735-8e5f-9ef71d19edf3
Vincent550102/Competitive-Programming-Warehouse
codeforce/Codeforces Round #799 (Div. 4)/pG.cpp
#include<bits/stdc++.h> using namespace std; #define io_op ios_base::sync_with_stdio(0); /* ll pow_mod(int n, int p){ int rESULt = 1; while(p){ if(p&1) rESULt=(rESULt * n)%MOD; n = (n*n)%MOD; p>>=1; } return rESULt; } */ void solver(){ int n, k;cin >> n >> k; vector<int> v(n), chk(n); for(int i ...
ALGO
0.999589
4.088019
8da7e69a-498b-471d-b7ae-e9d6ce522996
AnshikPatel/90days_placement
day23/is-subsequence.cpp
class Solution { public: bool isSubsequence(string s, string t) { bool flag=false; int count=0; int fu=0; for(int i=0;i<s.size();i++){ for(int j=fu;j<t.size();j++){ if(s[i]==t[j]){ // flag=true; fu=j+1; ...
ALGO
0.999968
6.211734
47e348ca-c8ca-406e-a0e4-da3ff1952bad
Sanskrita2001/Placement-Prep
arranging-coins/arranging-coins.cpp
class Solution { public: int arrangeCoins(int n) { return (int)(sqrt(2*(long)n+0.25)-0.5); } };
ALGO
0.999835
6.23869
94303b94-a847-4f8f-930c-08dcc143bdbc
yogeshmahale629/yogeshai
dfsbfs.cpp
#include<iostream> #include<vector> #include<stack> #include<queue> #include<unordered_set> using namespace std; void bfs(vector<vector<int>>& graph,int start){ unordered_set<int> visited; queue<int> q; q.push(start); while(!q.empty()){ int vertex=q.front(); q.pop(); if(visited....
ALGO
0.999953
5.40185
28a3d8ef-caab-459a-a12b-699acd1a7c64
eae11/algorithm
zyr/algoritm/src/main/java/com/douma/_2_day_一维数组/_665/代码实现_C++.cpp
public: bool checkPossibility(vector<int>& nums) { // 记录递减的次数 int cnt = 0; for (int i = 1; i < nums.size(); i++) { if (nums[i] < nums[i - 1]) { cnt++; if (cnt > 1) return false; if (i - 2 >= 0 && nums[i] < nums[i - 2]) { ...
ALGO
0.999997
5.647401
5810c9e6-aff8-4462-8748-b3797f1cd1c6
zqy1018/my_leetcode
contests/leetcode-b32/c.cpp
#include <bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; template<typename T> ostream& operator <<...
ALGO
0.99987
4.396808
68fbf10a-d1fc-495c-aa59-48865cdcd9f6
singhveer001/Data-Structure
STACK Code Help/Questions/Reverse_string_using_stack.cpp
// Reverse string using stack #include<iostream> #include<stack> using namespace std; int main(){ string str = "Veerbhan"; stack<int> s ; for(int i=0 ; i<str.length() ; i++){ s.push(str[i]); } while( !s.empty()){ cout<< s.top() << " "; s.pop(); } co...
ALGO
0.999809
5.279348
888128ca-e204-4904-9b3d-0b21f01451a2
bioimagesuiteweb/bisweb
cpp/bisJointHistogram.cpp
#include "bisJointHistogram.h" #include "bisUtil.h" #include "math.h" #include <iostream> bisJointHistogram::bisJointHistogram(std::string n) : bisObject(n) { this->numbinsx=0; this->numbinsy=0; this->maxx=0; this->maxx2=0; this->maxy=0; this->maxy2=0; this->intscale=1; this->totalbins=0; this->nu...
ALGO
0.931226
5.410681
64685b08-e60c-41ab-ab4a-50218b1b4758
lamanh2003/DSA_Remake
DSA/Data_Structures_and_Algorithms_PTIT-main/Thực hành/TỔNG CÁC SỐ TỰ NHIÊN.cpp
// Created by Nguyễn Mạnh Quân #include<bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for(int i = a; i <= b; i++) #define FORD(i, a, b) for(int i = a; i >= b; i--) #define F(i, a, b) for(int...
ALGO
0.999563
4.495655
3aa9ec9d-a08a-400b-b495-4e5f4f062634
AdamSturge/quaternion-mesh-construction
shared/libigl/python/py_igl/py_local_basis.cpp
m.def("local_basis", [] ( const Eigen::MatrixXd& V, const Eigen::MatrixXi& F, Eigen::MatrixXd& B1, Eigen::MatrixXd& B2, Eigen::MatrixXd& B3 ) { return igl::local_basis(V,F,B1,B2,B3); }, __doc_igl_local_basis, py::arg("V"), py::arg("F"), py::arg("B1"), py::arg("B2"), py::arg("B3"));
ALGO
0.987145
4.184277
ebe52759-1a80-4b2a-8f97-968ddc828731
Akadza/Practice-at-the-university
practice_C/lab.4/test 4.5.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #define SIZE 10 #define LEFT - 100 #define RIGHT 150 void replace_even(int* array); int main() { srand(time(0)); int* array = (int*)malloc(sizeof(int) * SIZE); for (int i = 0; i < SIZE; i++) { array[i] = LEFT + rand() % (RIGHT - LEFT + 1); } for (i...
ALGO
0.999727
3.284097
40fe7928-8c92-4190-8c21-5f89923da64f
arbenson/tensor-sc
src/network.cpp
#include "common.hpp" #include "cut_tools.hpp" #include "file_io.hpp" #include "network.hpp" #include "Snap.h" #include <iostream> #include <stdexcept> #include <string> // Go through the triple list and increment the counts. // After completion, we have sums T(:, j, k) for all j, k. void CountPairs(Counts& counts, s...
DATA
0.979694
5.130391