uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
3ac52c37-e466-4ff1-ae0c-ddc34135e19d
ishandutta2007/codeforces
potassium/normal/1037/D.cpp
#pragma GCC optimize ("O3", "unroll-loops") //#pragma GCC target ("avx2") //#pragma comment(linker, "/stack:200000000") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include "bits/stdc++.h" #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define distinct...
ALGO
0.999942
4.922913
78754609-d3d1-4d65-9290-f2dd2f3b4eba
Uday-Mi/Interview-Bit
Programming Interview Bit/Strings/CompareVersionNumber.cpp
/* Compare two version numbers version1 and version2. If version1 > version2 return 1, If version1 < version2 return -1, otherwise return 0. You may assume that the version strings are non-empty and contain only digits and the . character. The . character does not represent a decimal point and is used to separate num...
ALGO
0.998956
4.801949
c4c4c749-c51f-42b8-bcef-a9b1ea7ccc30
steffanc/Practice
CTCI/8_2robotpaths.cpp
#include <iostream> #include <string.h> using namespace std; void gridpaths(unsigned &ans, unsigned n, unsigned x, unsigned y) { if (x == n & y == n) { ans++; return; } if (x!=n) gridpaths(ans,n,x+1,y); if (y!=n) gridpaths(ans,n,x,y+1); } int main() { unsigned num=0; gridpaths(num,3,1,1); cout << num << e...
ALGO
0.999926
4.170351
87a0f566-8ba5-45a8-9950-b68aebba104d
YunHaaaa/DataStructure
lab11-1 윤하은.cpp
/////////////////////////////////////////////////////////////////////// // lab11-1 : Kruskal Algorithm (Minimal Spanning Tree) // Name: Yun Ha Eun // ID: 20203110 //////////////////////////////////////////////////////////////////////// #include <iostream> using namespace std; struct inputdata { char ff; int edges; ...
ALGO
0.999809
4.408898
c173629d-b981-4e42-8da4-f36f4a806dad
ishandutta2007/codeforces
wenhao801/normal/1206/A.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> using namespace std; inline int read () { int ret = 0, t = 1; char c = getchar(); while ((c < '0' || c > '9') && c != '-') c = getchar(); if (c == '-') t = -1, c = getchar(); while (c >= '0' && c <= '9') ret = ret * 10 +...
ALGO
0.999973
3.319993
f88589a1-38b4-473e-a749-506c9fda715e
Darkelmo/LivingLegend
dep/g3dlite/source/stringutils.cpp
/** @file stringutils.cpp @maintainer Morgan McGuire, http://graphics.cs.williams.edu @created 2000-09-09 @edited 2008-01-10 */ #include "G3D/platform.h" #include "G3D/stringutils.h" #include "G3D/BinaryInput.h" #include <algorithm> namespace G3D { #ifdef _MSC_VER // disable: "C++ exception handler used" ...
TOOL
0.966468
6.705832
3fd79ae8-4f2c-40d0-8760-b05e8665a122
JackyXu866/LeetCodeSoln
0905_SortArrayByParity.cpp
class Solution { public: vector<int> sortArrayByParity(vector<int>& nums) { for (int i = 0, j = 0; j < nums.size(); j++) if (nums[j] % 2 == 0) swap(nums[i++], nums[j]); return nums; } }; // class Solution { // public: // vector<int> sortArrayByParity(vector<int>& nums) { // ...
ALGO
0.999995
5.653777
b4aeb84b-4790-4c8e-9877-59070d8b1bf6
ryotgm0417/AtCoder
problems/A/abc148a.cpp
#include <iostream> #include <string> using namespace std; int main(){ int a,b; cin >> a >> b; if(a*b==2){ cout << 3 << endl; }else if(a*b==3){ cout << 2 << endl; }else{ cout << 1 << endl; } return 0; }
ALGO
0.999462
3.566784
c83abe2e-4056-4024-ae7f-efa5bccfaef0
MoeinGhaniyoun/LLVM-SLH-RISCV
llvm/tools/llvm-mca/Views/BottleneckAnalysis.cpp
#include "Views/BottleneckAnalysis.h" #include "llvm/MC/MCInst.h" #include "llvm/MCA/Support.h" #include "llvm/Support/Format.h" namespace llvm { namespace mca { #define DEBUG_TYPE "llvm-mca" PressureTracker::PressureTracker(const MCSchedModel &Model) : SM(Model), ResourcePressureDistribution(Model.getNumP...
ALGO
0.996607
7.126658
1b3f343d-3117-4d4f-b9c3-32fb27525e65
spelldeed/Data-Structures-and-algorithms-
Contests and Practice session/PSSHOT.cpp
#include<iostream> #include<algorithm> #define f(i,a,n) for(int i=a;i<=(n-1);i++) using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; string s; cin >> s; int suma = 0, sumb = 0,p=-1,ra=n,rb=n; f(i, 0, (2*n)) { i % 2 == 0 ? ra-- : rb--; if ((i % 2 == 0) && (s[i] == '...
ALGO
0.999894
3.680076
7e8d6966-e01d-4b39-a178-ae8823014302
Chikzz2001/LC-solution-chikzz
1674-minimum-moves-to-make-array-complementary/1674-minimum-moves-to-make-array-complementary.cpp
class Solution { int dp[200100]; public: int minMoves(vector<int>& nums, int l) { int n=nums.size(); for(int i=0;i<n/2;i++) { int a=nums[i],b=nums[n-i-1]; dp[2]+=2; dp[min(a+1,b+1)]--; dp[a+b]--; dp[a+b+1]++; dp[max(a+l,b+l)...
ALGO
0.999954
4.541088
b91f8387-3a8b-461b-9827-3f4d87d454d2
ishandutta2007/codeforces
stevenkplus/normal/380/A.cpp
#include <cstdio> #include <iostream> using namespace std; const int MAXN = 100100; typedef long long ll; int ar[MAXN]; ll lens[MAXN]; int A[MAXN]; int B[MAXN]; int M, Q; int main() { scanf("%d", &M); int pos = 0; for(int i = 1; i <= M; ++i) { int qtype; scanf("%d", &qtype); if (qtype == 1) { ...
ALGO
0.999942
3.433405
af4bd272-b061-4b77-af63-4a87a0e51549
kaityo256/python2cpp
header/main.cpp
#include <cstdio> #include "add.h" #include "add.h" int a = 3, b = 5; int main() { int c = add(a, b); printf("%d\n", c); }
TOOL
0.960926
4.234968
c92bbf0e-5438-4f89-a4fc-74bcc3f0bf0f
tmachalewski/PA_2021
C-1_KOS_Koszulki/C-1_KOS_Koszulki.cpp
// C-1_KOS_Koszulki.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; #define CERR_NEEDED false int const MAX_POINTS = 120; int const MAX_POINTS_BUFFER = MAX_POINTS + 1; int main() { int n, k; cin >> n >> k; int countOfPla...
ALGO
0.999895
4.09587
ba646c6d-0d8a-4343-82a2-bc96a3933613
MarcusTL12/School
19Var/TDT4102/VSProj/Oving4/Oving4/utilities.cpp
#include "utilities.h" int incrementByValueNumTimes(int startValue, int increment, int numTimes) { for (int i = 0; i < numTimes; i++) { startValue += increment; } return startValue; } int incrementByValueNumTimesRef(int& startValue, int& increment, int& numTimes) { for (int i = 0; i < numTimes; i++) { startVa...
ALGO
0.997223
3.474251
b3d2cb54-e84f-4f0e-ab27-730e4f49af2a
thomasxm/Akira-obfuscator
libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<input_iterator I, weakly_incrementable O> // requires indirectly_copyable<I, O> // constexpr ranges::copy_n_result<I, O> // ranges::copy_n(I first, iter_difference_t<I> n, O result); #include <algorithm> #include <array> #include <cassert>...
TEST
0.922748
7.611901
c617504b-b671-4c94-9d69-bc743908840c
Raka-coder/algoritma-struktur-data
tests/uts_1.cpp
#include <stdio.h> void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } void selectionSortDescending(int arr[], int n) { for (int i = 0; i < n - 1; i++) { int max_idx = i; for (int j = i + 1; j < n; j++) { if (arr[j] > arr[max_idx]) { max...
ALGO
0.999942
5.510086
28807e6a-7ac6-4b46-9d28-b123643f0977
CH6832/exploratory-tech-studio
tech-studio-projects/algorithms/divide-and-conquer/lowest-common-ancestor/cpp/main.cpp
#include <iostream> #include <vector> using namespace std; class Node { public: int val; Node* left; Node* right; Node(int key) { val = key; left = right = nullptr; } }; /** * Find the path from the root node to the given node. * * @param root The root of the tree. * @param p...
ALGO
0.999997
7.312703
cca7d3f1-010d-4bc8-816e-68a6bfacd598
21A91A1255/Owlcoder3.0
Medium/Distinct occurrences/distinct-occurrences.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this method*/ class Solution { public: int dp[1001][1001]; int mod=1000000007; int fun(string s,int i,int j,string t) { if(j==t.size()) { return 1; ...
ALGO
0.999979
6.309121
639566a1-3d57-439d-9793-51e628322a24
Divyalok123/LeetCode_Practice
(Sept)30_Days_Challenge/MaximumProductSubarray.cpp
/* https://leetcode.com/explore/featured/card/september-leetcoding-challenge/555/week-2-september-8th-september-14th/3456/ */ #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int maxProduct(vector<int>& nums) { if (nums.size() == 1) retur...
ALGO
0.999988
6.099979
cd1262a8-bd02-4602-887c-966185fb99e0
xivid/aoapc-bac1nd
part2/chapter5/5.5/5.5.3/Big Number/424.cpp
//uva可以再坑爹点吗?直接说做n(n<=100)个高精度(len<=100)的加法会死? #include<iostream> #include<string> #include<cstring> using namespace std; int a[120],b[120]; int main() { string s; memset(a,0,sizeof(a)); for(;;) { cin >> s; if(s[0]=='0'&&s.length()==1) break; int l=s.length(); memset(b,0,sizeof(b)); for(int ...
ALGO
0.999848
3.115401
064df025-8287-42ce-9a45-017c6d24b4c3
ishandutta2007/codeforces
yokozuna57/normal/316/G1.cpp
#include<iostream> #include<string> #include<vector> using namespace std; string s,t[12],u; int n,x[12],y[12],ts[12]; vector<string> ansans; string sub(int l,int r){ string sss=""; for(;l<=r;l++)sss+=s[l]; return sss; } int main(){ cin>>s>>n; for(int i=0;i<n;i++){cin>>t[i]>>x[i]>>y[i]; ts[i]=t[i].size();} int...
ALGO
0.999931
3.548204
2eb0ca49-300b-4d07-b86a-2ec95018623e
Harshitkumar07/DSA-in-cpp
Linked List/Leetcode Solutions/203. Remove Linked List Elements.cpp
** Leetcode Problem 203 :- ** Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head. Example 1: Input: head = [1,2,6,3,4,5,6], val = 6 Output: [1,2,3,4,5] Example 2: Input: head = [], val = 1 Output: [] Example 3: Input: head = ...
ALGO
0.999988
6.741879
c531f73e-f545-4e40-80fa-36914f3921ce
SKT-FlyAi/Algorithm
3주차/4)동전 0/동전 0_이예지.cpp
#include <iostream> #include <vector> using namespace std; //코인 가치 저장 vector<int> coin_val; int main() { int n,k,x; cin >> n >> k; for(int i =0; i<n; i++) { cin >> x; coin_val.push_back(x); } //코인 개수 int count = 0; //뒤에서 부터 돌기 for(int i = n-1; i >= 0; i--) { count += k/coin_val[i...
ALGO
0.999843
4.117372
76b0e5bb-3af3-4731-b3dc-8c65c623dcc5
neuroimaging-mug/relaxometry
src/mex/clm_expr2.cpp
/* * File: clmf_expr2.cpp * Author: christiantinauer * * Created on September 23, 2015, 1:54 PM */ #include "mex.h" #include "../processors/IProcessor.hpp" #include "../processors/ProcessorContext.hpp" #include "../models/Model.hpp" #include "../io/data/ProcessorData.hpp" void mexFunction(int nlhs, mxArray *...
DATA
0.981328
5.678147
28491136-9f2a-41b3-b8c1-5a05db54955c
vadimkantorov/acm
acm.timus.ru_33735/1347.cpp
#include <cstdio> #include <vector> #include <string> #include <iostream> #include <algorithm> using namespace std; string tmp; struct blogger { string name; vector<string> frs; blogger(string _name) : name(_name) { } void addfriend(string fr) { if(fr != name && find(frs.begin(), frs.end(), tmp) == frs.end())...
ALGO
0.99104
3.531639
609e5004-36f4-4abb-afa7-f77f68c481fe
khodand/spbsu-homework
semester_1/hometask_6/Source_6.2/cList_2.0.cpp
#include "cList_2.0.h" void push(int value, CycleList &list) { if (isEmpty(list)) { list.current = new ListElement; list.current->value = value; list.current->next = list.current; list.current->prev = list.current; } else { ListElement *newElement = new ListElement; newElement->value = value; newEle...
TOOL
0.861675
3.557456
d0cf30a1-6b8a-4ad8-8a22-46d86eaaefd8
WJ-self/algorithm
.history/acwing/basic/贪心/Huffman/区间dp_20230913182556.cpp
#include<bits/stdc++.h> using namespace std; const int N = 310; int v[N],s[N]; // v:各个重量,s:前缀和 int dp[N][N];// dp[i][j]: 区间i->j的最小合并代价 int n; int main(){ cin>>n; for (int i=1; i<=n; i++) { cin >> v[i]; s[i] = s[i-1]+v[i]; } }
ALGO
0.999945
3.322768
b69c6af3-46d5-48dc-83e6-e76006b82c07
zatursure/yuji
砍树.cpp
#include <bits/stdc++.h> using namespace std; long long N, M; vector<long long>a; bool check(long long height) { long long sum = 0; for(int i = 0; i < N; i++) { if(a[i] > height) { sum += a[i] - height; } } return (sum >= M); } int main() { cin >> N >> M; a.resize(N...
ALGO
0.999995
4.925288
a98d0fd5-2384-43f4-86a7-0edde9debccf
sonic247897/2024_algorithm_study
0121-best-time-to-buy-and-sell-stock/0121-best-time-to-buy-and-sell-stock.cpp
class Solution { public: int maxProfit(vector<int>& prices) { // 정렬이나 탐색이 아님. 순서가 유지되어야 함. // min, max가 필요함. // 현재 가리키는 원소가 min이라고 가정하고, 오른쪽에 있는 max와의 차이를 계산한다. // O(N)으로 풀려면 왼쪽부터 역순회하면서 max를 저장하고, 앞으로 마주치는 원소와 뺄셈하여 profit을 구한다. int max_profit = 0; int max = prices[pr...
ALGO
0.999938
5.951233
754fd69b-abfe-468e-bfff-c56dc48e3b4c
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4011_24.cpp
#include <bits/stdc++.h> using namespace std; long long ans = 1; int n, s[64], x[64]; int carry(int i) { if (i == 0) { if (s[i] == 1 and x[i] == 0) { return 1; } else if (s[i] == 1 and x[i] == 1) { ans *= 2; return 0; } } if (i == n - 1 and s[i] != x[i]) { ans = 0; return 0; ...
ALGO
0.999982
3.492845
682c9301-3d5b-4f5f-9819-5f5aa0a39b43
brocoinofficial/Brocoin3
src/addrman.cpp
#include <addrman.h> #include <hash.h> #include <serialize.h> int CAddrInfo::GetTriedBucket(const uint256& nKey) const { uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << GetKey()).GetCheapHash(); uint64_t hash2 = (CHashWriter(SER_GETHASH, 0) << nKey << GetGroup() << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_...
TOOL
0.909716
6.669269
b93db57c-01e7-4c84-8adf-8b8194432aa4
greenfox-zerda-sparta/javorszkymazsi
week-03/day-2/exercises/exercise-04.cpp
#include <string> #include <iostream> #include <algorithm> using namespace std; struct Pirate { string name; bool has_wooden_leg; short int gold_count; }; // Create a function that takes an array of pirates (and it's length) then returns the sum of the golds of all pirates // Create a function that takes an a...
TOOL
0.861196
4.312873
ea349d2d-d06b-4170-a716-778f9cecc096
kaiqiz8/Content-based-Image-Retrieval
customDesign.cpp
/* Kaiqi Zhang Spring 2024 CS 5330 Project 2 Use color histogram as feature vector and chi square as distance metric */ #include <cstdio> #include <cstring> #include <opencv2/opencv.hpp> #include <boost/filesystem.hpp> #include "csv_util/csv_util.h" #include <iostream> #include <fstream> #include <sstream...
ALGO
0.985345
4.578367
7188f7f0-0b69-4115-800e-4a58bba58bf6
Panjaksli/UpscalerNN
BNN/eigen/doc/special_examples/Tutorial_sparse_example_details.cpp
#include <Eigen/Sparse> #include <vector> #include <QImage> typedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double typedef Eigen::Triplet<double> T; void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs, Eigen::VectorXd& b, co...
ALGO
0.999065
5.425998
e5c0b047-10c8-4bc1-bcf5-9a7fc210aafb
bss9395/bss9395.github.io
_en/Computer/Algorithm/List/List_Palindrome.cpp
/* List_Palindrome.cpp Author: BSS9395 Update: 2025-05-26T21:24:00+08@China-ShangHai+08 */ #include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; struct List { struct Node { int _data = -1; Node *_next = nullptr; Node(int data) { _data = data; _next = nullptr; } ...
ALGO
0.999203
5.503493
d42ab37e-91f7-4547-88ef-64a8dd6ac255
mpfeifer1/Euler
041.cpp
#include <algorithm> #include <iostream> #include <cmath> using namespace std; typedef long long ll; bool isprime(ll n) { for(int i = 2; i <= sqrt(n); i++) { if(n % i == 0) { return false; } } return true; } int main() { string s = "7654321"; while(prev_permutation(s...
ALGO
0.999954
5.113781
468f5282-d768-474d-b277-4fe8c5b28444
Sproc01/8BallPool
src/showSegmentationColored.cpp
// Author: Alberto Pasqualetto #include <opencv2/highgui.hpp> #include "ball.h" #include "table.h" #include "constants.h" #include "metrics.h" #include <iostream> #include <fstream> using namespace std; using namespace cv; // simple main to see the ground truths and to test the code for the metrics int main(){ Mat ...
TEST
0.873921
3.589136
8c73b2d4-0ebe-4fe9-ba6d-51ea85f2d06d
henrymound/2018-Summer-Research
Golang/Tello/references/opencv-master/modules/features2d/src/fast.avx2.cpp
/* The references are: * Machine learning for high-speed corner detection, E. Rosten and T. Drummond, ECCV 2006 * Faster and better: A machine learning approach to corner detection E. Rosten, R. Porter and T. Drummond, PAMI, 2009 */ #include "precomp.hpp" #include "fast.hpp" #include "opencv2/core/hal/intrin.h...
ALGO
0.998385
6.417059
c85fde35-591d-4ea8-bfd1-b19c7e7f5155
ishandutta2007/codeforces
brunovsky/normal/1019/E.cpp
#include <bits/stdc++.h> #ifdef LOCAL #include "code/formatting.hpp" #else #define debug(...) (void)0 #endif using namespace std; template <typename Fun> class y_combinator_result { Fun fun_; public: template <typename T> explicit y_combinator_result(T&& fun) : fun_(std::forward<T>(fun)) {} templa...
ALGO
0.99991
4.887837
5a6d0666-6bd2-4f4e-b97e-b563e861c1a6
Algorithm-study-seoul22/Algorithm-Study
정영훈/Week01/요리사.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <cstring> using namespace std; // 시너지 차이 최소화하기 // N = 16 -> 16C8 = 12870 // 12870 / 2 = 6435 /* 6 123 456 124 356 125 346 126 345 134 256 135 246 136 245 145 236 146 235 156 234 -- 0원소 고정 후 실행 -- 볼 필요 없음 234 156 235 146 236 145 245...
ALGO
0.999861
4.56248
96e819ea-371d-4ade-aa4c-9abae03da629
MichaelMoroz/TensorFrost
TensorFrost/Compiler/Steps/Autodiff.cpp
#include "Compiler/KernelGen.h" namespace TensorFrost { void ComputeNodeGradients(Node* value, const Tensor* grad, NodeGrads& grads) { try { string op_name = value->name; //add input arguments if(value->flags.has(NodeProp::PassGrad)) { op_name = "passthrough_grad"; } if(value->flags.has(NodeProp::Detach...
ALGO
0.893493
7.012515
17d04283-7499-4da2-a938-b074290463df
ishandutta2007/codeforces
crackersamdjam/normal/1385/G.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define gc getchar() #define pc(x) putchar(x) template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;} template<typename T> void printn(T n...
ALGO
0.999909
3.7072
78445c14-38e9-41dc-a273-a7bd2f71fa2b
gabriellisboaconegero/desafios
semana02/d.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { int n, k; ll sum = 0; cin >> n >> k; vector<tuple<ll, string, ll>> v(n); for (auto &i : v) cin >> get<0>(i) >> get<1>(i) >> get<2>(i); sort(v.begin(), v.end(), [](tuple<ll, string, ll> a, tuple<ll, string, ll> ...
ALGO
0.999705
3.759943
60ac6ab9-28c6-48d2-9c2b-2d29e04dd5a3
tiger0132/code-backup
Codeforces/1000~1999/1344/C.cpp
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <queue> #include <stack> #include <vector> const int N = 2e5 + 52; std::vector<int> g[N][2]; int col[N][2]; void dfs(int x, int id, int c) { x[col][id] = c; for (int nx : x[g][id]) if (!nx[col][id]) dfs(nx, id, c); } int n, m, ...
ALGO
0.999858
3.8255
d579bd43-720a-466b-a1bb-81f54ea61242
LukeInkster/CSharpCorpus
coreclr/src/vm/reflectioninvocation.cpp
#include "common.h" #include "reflectioninvocation.h" #include "invokeutil.h" #include "object.h" #include "class.h" #include "method.hpp" #include "typehandle.h" #include "field.h" #include "security.h" #ifdef FEATURE_REMOTING #include "remoting.h" #endif #include "eeconfig.h" #include "vars.hpp" #include "jitinterfac...
TOOL
0.872723
7.119591
6ea1d822-a99e-4b01-90ef-437d3b4b583a
ishandutta2007/codeforces
i_love_tanya_romanova/normal/1039/C.cpp
/* Don't try to tell us what is right for us We don't give a fuck anyway Don't try to steal imagination from us Things we believe and we will never betray, never betray Those who have the power to Suck us dry - throw us away Those who never could create Destroy the music of today Those devoid of any feeling Those who...
ALGO
0.999995
3.863724
fa59387d-dfa2-4541-b0da-a43179595b45
Jaspreet-10/LeetCode
Subarray with given sum - GFG/subarray-with-given-sum.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find a continuous sub-array which adds up to a given number. vector<int> subarraySum(int arr[], int n, long long s) { vector<int>v; long long sum=0; ...
ALGO
0.999903
5.424574
75ac8d06-a072-4223-ad45-5444bf165da7
SimonLi12342/ag_study
ext/eigen/doc/examples/Tutorial_ArrayClass_interop.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); MatrixXf n(2,2); MatrixXf result(2,2); m << 1,2, 3,4; n << 5,6, 7,8; result = (m.array() + 4).matrix() * m; cout << "-- Combination 1: --" << endl << result << endl << e...
ALGO
0.999711
4.541172
f5cc2dd9-2b11-44b1-84c0-311f5713c331
XDEv11/Codeforces
SIT_STAR_Contest_2021/B.cpp
#include <iostream> #include <array> #include <algorithm> using namespace std; void solve() { array<int, 3> x, y; for (int i{0}; i < 3; ++i) cin >> x[i] >> y[i]; sort(x.begin(), x.end()); sort(y.begin(), y.end()); cout << (x[0] == x[1] ? x[2] : x[0]) << ' ' << (y[0] == y[1] ? y[2] : y[0]) << '\n'; } int main(...
ALGO
0.999953
4.559934
f57c0fee-49ec-48a5-89a4-b513b4f50841
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_9695_10.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, a[100], c = 0, i, j; cin >> n; for (i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); for (i = 0, j = i + 1; i < n, j < n; i += 2, j += 2) { c += a[j] - a[i]; } cout << c; return 0; }
ALGO
0.999606
4.458557
0b8f5008-78f0-481b-9d23-e19e1038e546
gabkidner/CS_2130Programs
Program5/Program5.cpp
#include <iostream> using namespace std; int main() { string andOr, notP, notQ; cout << "Do you want to use And or Or? (a/o)" << endl; cin >> andOr; cout << "Do you want to NOT p? (y/n)" << endl; cin >> notP; cout << "Do you want to NOT q? (y/n)" << endl; cin >> notQ; if(andOr[0] == 'a'&&notP[0] == 'n'...
ALGO
0.998914
4.044001
448cbade-c95e-4376-a87e-7df36a993b3e
Hemaant-3/cplusplus
Assignment/week3/classroom.cpp
#include<iostream> using namespace std; // count zero and one in array void countzero(int arr[],int size){ int count0 = 0; int count1=0; for (int i = 0; i < size; i++) { if (arr[i]==0) { count0++; } else{ count1++; } } printf("The no of zero is: %d\n The number of One is: %d",c...
ALGO
0.988584
3.926645
7ea79623-8b6a-49dc-932c-adb883b0a93b
denis-gubar/Leetcode
Two Pointers/2422. Merge Operations to Turn Array Into a Palindrome.cpp
class Solution { public: int minimumOperations(vector<int>& nums) { int result = 0; int const N = nums.size(); long long left = 0, right = 0; int a = 0, b = N - 1; while (a <= b) { if (left == right) { left += nums[a]; ...
ALGO
0.999993
5.818711
63f14130-85f4-49df-819e-90586971b1c2
adityaazad79/CP
Next_Greater_Element_I.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; #define endl '\n' const int N = 1e7 + 10; const int M = 1e9 + 7; // vector<int> nextGreaterElement(vector<int> &nums1,vector<int>&nums2){ // int n=nums1.size(); // int m=nums2.size(); /...
ALGO
0.999937
4.527764
b61b49d9-e66a-4fd7-ba84-a9820779535b
up-ak/asdh2025
Java5/examples.cpp
#include <iostream> #include <chrono> using namespace std; // 2 => O(2) => O(1) void example0(int A[]) { cout << A[0]; cout << A[1]; } // 1 + 1 + b (i < b) + b ( res *= a) + b (i++) + 1 // 3 + 3b => O(3 + 3b) => O(1 + 1b) => O(b) int example1(int a, int b) { int res = 1; if (b == 4) { // rasti me...
ALGO
0.993013
3.42591
f6ea2d9c-5bf3-4b8f-afae-afdc3201340b
okaryo/CompetitiveProgramming
AtCoder/OtherContest/2019/M-SOLUTIONS/A.cpp
#include <bits/stdc++.h> typedef long long LL; using namespace std; int main() { int n; cin >> n; cout << (n - 3 + 1) * 180 << endl; }
ALGO
0.999831
3.222993
b397571b-61af-436d-b70c-e385db4a8ed2
lasersson/aoc15
src/21.cpp
#include <aoc.h> struct actor { int HitPoints; int Damage; int Armor; }; struct item { int Cost; int Damage; int Armor; }; item Weapons[] = { {8, 4, 0}, {10, 5, 0}, {25, 6, 0}, {40, 7, 0}, {74, 8, 0} }; item Armor[] = { {0, 0, 0}, {13, 0, 1}, {31, 0, 2}, {53, 0, 3}, {75, 0, 4}, {102, 0, 5} }; item Rings[] = { ...
ALGO
0.992479
4.463055
1608f2bd-20f1-4fb5-8ad6-4a9faeabde51
viana-code/exercises_for_competitions
OBI/2010/Nivel_01/times.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ios::sync_with_stdio(0); cin.tie(0); ll n, t, h; vector<pair<int, string>> alunos; vector<pair<string, int>> times; string nome; cin >> n >> t; alunos.reserve(n); times.reserve(n); for...
ALGO
0.999865
3.364823
cb26b5b0-fd6d-427c-842b-aebce05af2a9
algorithm001/algorithm
Week_02/id_56/LeetCode_242_56.cpp
bool isAnagram(string s, string t) { if(s.size() != t.size()) return false; vector<int> just(26, 0); for(int i=0; i<s.size(); i++){ just[s[i]-'a']++; just[t[i]-'a']--; } for(int p: just) if(p!=0) return false; return ...
ALGO
0.999972
5.437052
abeac852-9176-4bf0-98cc-d0c27a326b9b
Anshu1Gupta/Leetcode_-_GFG_Solved_Problems
19-remove-nth-node-from-end-of-list/19-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.999973
5.968607
fc501bb1-9efd-4dc7-b705-2b4a635bd4e0
andrew-canada/competitive-programming
codeforces/problems/1600/dp/1976c-jobInterview/1976c-sol2.cpp
// LUOGU_RID: 161051822 #if defined(LOCAL) or not defined(LUOGU) #pragma GCC optimize(3) #pragma GCC optimize("Ofast,unroll-loops") #endif #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "dbg.h" #else #define dbg(...) (__VA_ARGS__) #endif namespace Fread { const int SIZE = 1 << 16; char buf[...
ALGO
0.99999
3.391093
78ef8e69-cb1c-4f11-8c3b-734be9de3f5b
zhanzhanfu/Games101
Include/eigen3/demos/opengl/quaternion_demo.cpp
#include "quaternion_demo.h" #include "icosphere.h" #include <Eigen/Geometry> #include <Eigen/QR> #include <Eigen/LU> #include <iostream> #include <QEvent> #include <QMouseEvent> #include <QInputDialog> #include <QGridLayout> #include <QButtonGroup> #include <QRadioButton> #include <QDockWidget> #include <QPushButton...
ALGO
0.901526
5.860771
dee53aa2-cc11-4772-88f2-65cb0ab3b9cd
shivamkaushik12007/practice
apc/deleteLast.cpp
#include <stdio.h> #include <stdlib.h> struct node{ int data; struct node* next; }; void insertBeg(struct node **h,int val){ struct node* n=(struct node*)malloc(sizeof(struct node)); n->data=val; n->next=*h; *h=n; } void deleteLast(struct node** h,int k){ struct node* curr=*h; struct node* curr1=*h; int j=...
ALGO
0.999969
3.197924
8622d1ef-cf90-45c7-b729-77df660080bf
ado1d/Code
binary_palindrome(greedy).cpp
#include<bits/stdc++.h> using namespace std; #define faster_ayman ios_base::sync_with_stdio(false);cin.tie(NULL); #define int long long #define pb push_back #define rep(i, a, b) for (auto i = a; i < b; i++) #define all(a) (a).begin(), (a).end() #define testcase int tt;cin...
ALGO
0.999934
4.619772
15caeaa9-da34-461d-996b-60bd4db8d18a
Limworld98/Algorithms
Lab Work4-3/Lab Work4-3.cpp
#include<iostream> #include<fstream> #include<string> #include <sstream> #include <vector> #pragma warning(disable: 4996) using namespace std; class strArr { public: char str[255]; int count = 1; }; bool find_str(const string& str, strArr* splited, int recent_size) { for (int i = 0; i < recent_size; i++) { if...
ALGO
0.998189
4.145792
af63b6d8-ba14-47bc-a93d-4363a4581ca5
maheshjainckd/Hacktoberfest2022-for-everyone
CPP/Remove Letter To Equalize Frequency.cpp
class Solution { public: bool equalFrequency(string word) { vector<int> x; unordered_map<char, int> m; for(auto &i : word) m[i]++; for(auto &i : m){ x.push_back(i.second); } sort(x.begin(), x.end()); if(x.size() == 1) return 1; els...
ALGO
0.99998
5.578207
368f3edd-9ebf-401a-aa39-1e8e75cd22e6
NipenPaul/Program-Catagory-Document
DP/LeetCode/maximum-number-of-moves-in-a-grid.cpp
class Solution { public: int mx = 0; int maxMoves(vector<vector<int>>& grid) { int ans = 0; int n = grid.size(); int m = grid[0].size(); int dx[] = {-1, 0, 1}; int dy[] = {1, 1, 1}; vector<vector<int>> dp(n+1, vector<int>(m+1)); for(int col = m-1; col >= 0...
ALGO
0.999995
5.352136
873e1c64-cb86-4e0d-b54b-eeb6573ba928
revyos-rocm/llvm-project-rocm
clang/test/SemaCXX/constexpr-factorial.cpp
// RUN: %clang_cc1 -std=c++11 -fsyntax-only %s // RUN: %clang_cc1 -std=c++11 -fsyntax-only -fexperimental-new-constant-interpreter %s constexpr unsigned oddfac(unsigned n) { return n == 1 ? 1 : n * oddfac(n-2); } constexpr unsigned k = oddfac(123); using A = int[k % 256]; using A = int[43];
ALGO
0.972216
6.235468
2b8aae42-ad39-4b56-ae63-9ce7453636e0
Muskankhosla/leetcode
74-search-a-2d-matrix/74-search-a-2d-matrix.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int r = 0 ; int c = matrix[0].size()-1; while(r < matrix.size() && c >= 0 ){ if(matrix[r][c] == target) return true; else if (matrix[r][c] > target){ c--; ...
ALGO
0.999968
6.103903
4ced0d5a-b049-4493-9538-d839e2f00bdc
shikharbhatia/Algorithm-and-DataStructures
mirror.cpp
#include <bits/stdc++.h> using namespace std; struct node { int data; struct node *left; struct node *right; }; struct node *newNode(int data){ struct node *newnode; newnode = (struct node*)malloc(sizeof(struct node)); newnode->data = data; newnode->left = NULL; newnode->right = NUL...
ALGO
0.999968
5.237896
d7d7356b-6495-44b4-92ea-789fb50f7af4
mengzhenp/leetcode
459. Repeated Substring Pattern/substr.cpp
class Solution { public: bool repeatedSubstringPattern(string s) { int l = s.length(); if (l < 2) return false; for (int i = 1; i < l; i++) { if (s[i] == s[0] && l%i == 0) { int j = i; while (j < l) { if (s.substr(0, i).compare(...
ALGO
0.999915
6.002792
e7594a8e-8441-4939-be5a-78db598569b0
odubayodaniel/bmi_calculator_app
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.998693
6.797273
4aba70a3-752e-411a-be15-39d98c600bc2
robertsdionne/textengine
libraries/Box2D_v2.3.0/Contributions/Platforms/Box2D.Net/Matrix.cpp
#pragma once #include "Stdafx.h" #include "Vector.cpp" namespace Box2D { namespace Net { public ref class Matrix { internal: Matrix(const b2Mat22 &matrix) : col1(gcnew Vector(matrix.col1)), col2(gcnew Vector(matrix.col2)) { } b2Mat22 getMat22() { return b2Mat22(col1->getVec2(), col2->getVec2()); ...
TOOL
0.996417
6.819283
315b6823-d7fe-43e4-b78d-111a103311c1
Barathvajs/Compiler-design-
token recognition.cpp
#include <stdio.h> #include <stdbool.h> #include <ctype.h> #include <string.h> bool isKeyword(const char *word) { const char *keywords[] = { "auto", "break", "case", "char", "const", "continue", "default", "do", "double", "else", "enum", "extern", "float", "for", "goto", "if", "int", "...
ALGO
0.996184
4.041111
f415b6ea-388b-44e5-ad78-8a310cc68b10
shreyash-Pandey-Katni/placementPractice
Graph/motherVortex.cpp
#include<iostream> #include<vector> #include<algorithm> #include<stack> #include<unordered_map> using namespace std; stack<int> st; vector<bool> visited; void dfs(int V, vector<int>adj[]){ if(visited[V]) return; visited[V] = true; for(int i=0;i<adj[V].size();i++){ dfs(adj[V][i],adj); } st.p...
ALGO
0.999773
5.152841
629b1ace-1b93-447b-8c98-ef5f7bb43caa
HoTmain/Approximate-Nearest-Neighbours-ANNS-
programs/graph_search.cpp
#include "../include/graph_search.h" int main(int argc, char* argv[]) { Graph_opt opt= Graph_options(argc, argv); if(opt.method == 1) GNNS_method(opt); else if(opt.method == 2) MRNG_method(opt); return 0; }
ALGO
0.995301
3.937936
f32f61e6-1d5a-45fb-925c-3179d5039e01
seo-bo/ProblemSolving
백준/Gold/13003. 배수열/배수열.cpp
#include <bits/stdc++.h> #include <unordered_set> #define MOD 1000000007 using namespace std; typedef long long ll; typedef long double lb; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const char* yes = "Yes"; const char* no = "No"; int main(void) { cin.tie(0)->ios::sync_with_stdio(0); int n = 0, l = 0; ci...
ALGO
0.999996
4.64388
39377578-eb12-4b48-8afc-cb596530192e
jcazevedo/leetcode
src/0231-power-of-two.cpp
// 231. Power of Two // https://leetcode.com/problems/power-of-two/ class Solution { public: bool isPowerOfTwo(int n) { if (n < 0) return false; return __builtin_popcount(n) == 1; } };
ALGO
0.91363
7.004552
af35dbfa-2678-42b9-a5cd-9182813e6bcf
cfreeze111/ncnn_face_rec
third_party/ncnn/src/layer/arm/concat_arm.cpp
#include "concat_arm.h" #include "cpu.h" namespace ncnn { Concat_arm::Concat_arm() { #if __ARM_NEON support_packing = true; #if NCNN_ARM82 support_fp16_storage = cpu_support_arm_asimdhp(); #endif #endif // __ARM_NEON #if NCNN_BF16 support_bf16_storage = true; #endif } int Concat_arm::forward(const std:...
ALGO
0.982498
5.945059
22c81ff7-39d7-4764-b7bf-9b4d8ad460c3
plctlab/llvm-project
llvm/lib/CodeGen/ScheduleDAG.cpp
#include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/iterator_range.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/ScheduleHazardRecognizer.h" #include "llvm/CodeGen/SelectionDAGNodes.h" #include "...
ALGO
0.99964
7.672828
d29c3da4-08cb-4497-b4e7-c57ec790a676
SniKuz/CoadingTest
프로그래머스/2/176962. 과제 진행하기/과제 진행하기.cpp
#include <bits/stdc++.h> using namespace std; #define leftTime first #define planNum second vector<string> Split(string str) { istringstream iss(str); string buffer; vector<string> ret; while(getline(iss, buffer, ':')) { ret.push_back(buffer); } return ret; } int GetTime(str...
ALGO
0.99361
4.128536
fe4396e4-fd0c-44f7-82e4-557589f5e622
Luke-zhang-04/Sorting-Algorithms
selectionSort/main.cpp
#include <vector> #include "./main.h" #include "../utils/max.h" int indexOf(std::vector<int> &array, int search) { for (unsigned int i = 0; i < array.size(); i++) { if (array[i] == search) { return i; } } return -1; } void selectionSort(std::vector<int> &array) { int ind;...
ALGO
0.999451
4.893514
80317e41-6b12-4803-9b0a-829bbca11104
amritesh09/cpp-solutions
solutions/TwoSum.cpp
// Problem 1: Two Sum // Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. #include <unordered_map> #include <vector> #include <iostream> using namespace std; vector<int> twoSum(const vector<int>& nums, int target) { unordered_map<int, int> n...
ALGO
0.999883
6.805142
950dbde7-6666-4901-98f0-0da7d43aeeb4
ishaq183/My-programs
Library Management System.cpp
#include <iostream> #include <string> #include <ctime> #include <fstream> #include<unistd.h> using namespace std; #define MAX 100 //Max class Book{ string title, author, genre, ISBN; bool isAvailable = true; string borrowedBy; public: void setBookDetails(const string &title, const string &author, con...
TOOL
0.898429
3.660509
82a97a74-0278-42bf-a1c1-a98e87917239
manavdoda7/CPP-Programs
1 to x.cpp
#include<iostream> using namespace std; int min(int a, int b){ if(a <= b && a != 0) return a; else if(b != 0) return b; } int value(int x, int* p){ int s1 = 0, s2 = 0, s3 = 0, steps; if(x == 1){ p[0] = x; return 0; } if(x%3 != 0){ s1 = value(x-1,p+1); p[...
ALGO
0.99999
4.01857
784de165-2d6a-44f2-86b7-243c5f4ccdfd
Alfeim/njuee_LeetCode_Solutions
Cpp/Submit Records/918. Maximum Sum Circular Subarray.cpp
/******************************************** 作者:Alfeim 题目:环形子数组的最大和 时间消耗:80ms 解题思路:DP 分两种情况 1.只有一个数组 2.包含前后两个数组 ********************************************/ class Solution { public: int maxSubarraySumCircular(vector<int>& A) { int n = A.size(); int res1 = A[0]; int res2 = A[0]; ...
ALGO
0.999894
5.14414
df6f48bd-b4f0-4c67-913c-def9e3b3af8a
hirakuuuu/kyopro
AGC/018/agc018_b.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for(int i = a; i < n; i++) #define rrep(i, a, n) for(int i = a; i >= n; i--) #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> // constexpr ll MOD = 1000000007; constexpr ll MOD = 998244353; constexpr int IINF = 1001001001; conste...
ALGO
0.99996
4.806613
557e406b-fa06-46a5-8be2-dcc6294ab941
therealsamas/leetcode_grind
221-maximal-square/maximal-square.cpp
class Solution { public: int maximalSquare(vector<vector<char>>& matrix) { vector<vector<int>> dp(matrix.size(),vector<int>(matrix[0].size(),0)); int ans = 0; for(int i=0; i<matrix.size(); i++){ if(matrix[i][0] == '1'){ dp[i][0] = 1; ans = 1; ...
ALGO
0.99979
6.145668
a02263b3-143e-45b9-93ce-a43f26f10eb9
rishitc/Codeforces-Codes
131A-cAPS_lOCK.cpp
#include <iostream> #include <regex> #include <string> int main() { constexpr int Debugging = false; if constexpr (not Debugging) { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL); } std::string text; std::regex caps_lock_pattern("^([a-z]...
ALGO
0.931654
5.900505
cb715fd3-9a5b-4cd7-a076-0b1da05b794a
itom-project/plugins
FittingFilters/numericalRecipes.cpp
/* licence TODO */ #include "numericalRecipes.h" #include <qnumeric.h> void SVD::solve(VecDoub_I &b, VecDoub_O &x, Doub thresh /*= -1.*/) { Int i,j,jj; Doub s; //if (b.size() != m || x.size() != n) throw("SVD::solve bad sizes"); //this don't allow openMP parallelization VecDoub tmp(n); tsh = (t...
ALGO
0.999722
5.792104
f8b195db-5dce-41be-95bf-6d220ea73e82
hjiang13/LLMs-in-IR
POJ-104/59/147.cpp
#include <iostream> using namespace std; int main() { int n1,v; cin >> n1 ; cin.get(); const int n=n1; char a[100][100]={ 0} ; char b[100][100]={ 0} ; int i,j,k,l; for(i=1; i<=n; i++) { for(j=1; j<=n; j++) { cin >> a[i][j]; b[i][j]=a[i][j]; } } cin >> v; int sum=0,t=0; while(t<v-1) { t++; for(i=1; i<=n; i++) { for(j=1;...
ALGO
0.999421
3.221289
1e00fcb4-9f88-46ce-82cf-0c19c13c999d
enricava/leetcode
longest-substring-without-repeating-characters/Wrong Answer/12-17-2021, 1_39_03 PM/Solution.cpp
// https://leetcode.com/problems/longest-substring-without-repeating-characters class Solution { public: int lengthOfLongestSubstring(string s) { int n = s.size(); int count = 0, m = 0; unordered_set<char> set; for(int i = 0; i < n; ++i){ if(set.count(s[i])){ ...
ALGO
0.999894
6.287212
dc8417b2-652d-4cf6-9c93-b4192df81c8d
iprincekumark/LeetCode-Questions
509-fibonacci-number/509-fibonacci-number.cpp
class Solution { public: int fib(int n) { if(n<=1) return n; return fib(n-1) + fib(n-2); } };
ALGO
0.99994
5.852878
1f79bccd-54b5-4d6a-872d-6235d53dc61d
Meet118/LeetCode
1每日一题/LeetCode2293.cpp
class Solution { public: int minMaxGame(vector<int>& nums) { int n = nums.size(); work(nums, n); return nums[0]; } void work(vector<int>& a, int n) { if (n == 1) return; int k = 0; for (int i = 0; i < n; i += 2) { if (k % 2 == 0) a...
ALGO
0.999982
5.453339
3d0f29d6-9688-45b5-8ce6-e3114019f323
Christinezy/MLOpsSuite
codeporting/TransCoder/data/evaluation/geeks_for_geeks_successful_test_scripts/cpp/CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD_1.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; bool f_gold ( int n ) { return ( ! ( n & 1 ) ); } //TOFILL int main() { int n_success = 0; vector<int> param0 {57,73,79,36,71,23,41,66,46,50}; fo...
ALGO
0.996687
5.534116
9debe9d9-03d0-465b-98ff-28b87f06b744
seifmohamed0/Leetcode-solutions
intersection-of-two-linked-lists/intersection-of-two-linked-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { if(headA == NULL || headB == NULL) return NULL...
ALGO
0.999877
5.146789
8239be8d-fe33-4d0a-9ffb-5dc4b33c2657
jkarolczak/ligand-classification
src/models/contiguous/utils/lib/src/ball_query.cpp
#include <torch/serialize/tensor.h> #include <vector> #include <THC/THC.h> #include <cuda.h> #include <cuda_runtime_api.h> #include "ball_query_gpu.h" extern THCState *state; #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") #define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x, " ...
ALGO
0.856826
5.920712
6501ae50-b8b6-48ef-9324-88d88c0d4c38
Falstring/smolderforge-core-709f33c6e865
dep/recastnavigation/Detour/DetourNavMeshBuilder.cpp
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "DetourNavMesh.h" #include "DetourCommon.h" #include "DetourNavMeshBuilder.h" #include "DetourAlloc.h" #include "DetourAssert.h" static unsigned short MESH_NULL_IDX = 0xffff; struct BVItem { unsigned short bmin[3]; unsigned short ...
ALGO
0.991892
7.029079
ae8fbdd8-0111-4f46-9ff2-48b5a38a3dce
P79N6A/Codes-1
OJ-HDU/BestCoder Round #86/NanoApe Loves Sequence Ⅱ.cpp
#include<algorithm> #include<cctype> #include<cmath> #include<cstdio> #include<cstring> #include<iomanip> #include<iostream> #include<map> #include<queue> #include<set> #include<sstream> #include<stack> #include<string> #define ll long long #define pr(x) cout << #x << " = " << (x) << " "; #define prln(x) cout << #x <<...
ALGO
0.999403
3.315569