uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
68a80acd-1d6e-4458-a9e3-0d816142551f
andersonmrib/Competitive-Programming
UVA/11417 - GCD.cpp
#include <bits/stdc++.h> #define speedBoost ios::sync_with_stdio(0); cin.tie(0); using namespace std; typedef long long ll; int main(){ speedBoost; int N; while((cin >> N), N){ ll ans = 0; for(int i=1; i<N; i++) for(int j=i+1; j<=N; j++) ans += __gcd(i, j); cout << ans << "\n"; } ...
ALGO
0.999613
4.442165
58dd8fe6-4ac5-4856-8fad-3031e1c3fdda
ishandutta2007/codeforces
milisav/normal/1726/C.cpp
#include<bits/stdc++.h> #define maxn 200005 using namespace std; int t; int n; char s[maxn]; int pref[maxn]; map<int,int> mp; int main() { scanf("%d",&t); while(t--) { scanf("%d",&n); scanf("%s",s+1); mp.clear(); pref[0]=0; for(int i=1;i<=2*n;i++) { pref[i]=pr...
ALGO
0.999037
3.492884
64c2126f-fbcc-4467-9f5d-ead89dc0276f
KoSangWon/Algorithm
BOJ_c++/Baekjoon2606(바이러스)/Baekjoon2606(바이러스)/main.cpp
#include <iostream> #include <vector> using namespace std; vector<int> v[101]; int visited[101] = {0}; int cnt; void dfs(int x){ if(visited[x]) return; visited[x] = 1; cnt++; for(int i = 0; i < v[x].size(); i++){ int y = v[x][i]; dfs(y); } } int main(int argc, const char * argv[])...
ALGO
0.999925
4.848551
de381a04-232a-457b-a039-07e470787c71
zaidtech786/c-Placement-Series
Strings/CapitalizeFirstAndLastChar.cpp
#include<iostream> using namespace std; string capitalize(string str){ int len = str.length(); for(int i = 0;i < str.length(); i++){ if(i == 0 || i == (len-1)) str[i] = toupper(str[i]); if(str[i] == ' '){ str[i + 1] = toupper(str[i + 1]); str[i - 1] = toupper(str[i - 1]); } } retur...
ALGO
0.997337
4.811205
2efb90b8-e676-4578-b9d4-c1664970fa4a
chetan541/new
Money_Sums.cpp
#include <bits/stdc++.h> using namespace std; // Shortcuts for "common" data types in contests typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int, int> pi; typedef vector<pi> vii; typedef set<int> si; typedef map<string, int> msi; #define all(x) (x).begin(), (x).end() #define pb pu...
ALGO
0.999972
3.211374
e6a0ee35-d655-44dd-aa3d-b878d68796da
MDK8888/DataStructure-DSA-
Practice_Que._Leetcode/Mobile_Keyboard.cpp
//link // https://leetcode.com/problems/letter-combinations-of-a-phone-number/ class Solution { private: void solve(string digit, string output, int index, vector<string>& ans, string mapping[] ) { //Base case if(index>=digit.length()) { ans.push_back(output); retu...
ALGO
0.999949
6.744352
3cc06ca1-5e50-4bdc-9d75-46040fae5af4
sgolodetz/millipede
tags/20100606-ipfgrid/source/common/segmentation/CTIPFBuilder.cpp
#include "CTIPFBuilder.h" #include <itkCastImageFilter.h> #include <itkGradientAnisotropicDiffusionImageFilter.h> #include <itkGradientMagnitudeImageFilter.h> #include <common/adts/RootedMST.h> #include <common/dicom/volumes/DICOMVolume.h> #include <common/exceptions/Exception.h> #include <common/segmentation/waterfa...
DATA
0.911066
6.00659
52f5c018-8e8e-4679-9bab-1322393191e6
pipinovi4/TreesAndGraphs
Trees/CompleteBinaryTrees/examples/complete_binary_tree_example.cpp
#include "../include/complete_binary_tree.h" // Include the CompleteBinaryTree class #include <iostream> // Include iostream for printing int main() { // Create an instance of the Complete Binary Tree CompleteBinaryTree tree; // Insert values into the tree std::cout << "Inserting values into the Compl...
ALGO
0.999666
6.634845
b55dff54-646e-4ed9-92e3-e166d1203560
tiagoanoliveira/Programacao
Pratical_Exercices_P/P03/mandelbrot.cpp
// // Created by tiago-oliveira on 15-03-2025. // #include "complex.h" #include <iostream> using namespace std; void mul(const complex& a, const complex& b, complex& r) { r.x=(a.x*b.x-a.y*b.y); r.y=(a.x*b.y+b.x*a.y); } void add(const complex& a, const complex& b, complex& r) { r.x=a.x+b.x; r.y=a.y+b.y; ...
ALGO
0.992755
4.182932
439b4450-3618-44c2-80c1-fc5b44f05300
Evolution-X/frameworks_av
media/module/codecs/amrwb/dec/src/phase_dispersion.cpp
/* ------------------------------------------------------------------------------ Filename: phase_dispersion.cpp Date: 05/08/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: --------------------------------------------------------------------...
ALGO
0.999951
5.090826
e91bd9b9-10ed-46a9-a2e8-3cc72eb7e552
deepakharidass/C-Programming-
op26.cpp
#include <iostream> int factorial(int num) { if (num == 0 || num == 1) return 1; return num * factorial(num - 1); } bool isStrong(int num) { int originalNum = num, sum = 0; while (num > 0) { int digit = num % 10; sum += factorial(digit); num /= 10; } return sum == origi...
ALGO
0.999591
5.520718
7fc680f7-aa25-4f85-bca6-71b9e415b7bf
ZJU-FAST-Lab/Active-Relative-Localization
src/uav_simulator/so3_quadrotor_simulator/include/ode/libs/numeric/odeint/examples/mtl/implicit_euler_mtl.cpp
#include <iostream> #include <fstream> #include <utility> #include "time.h" #include <boost/numeric/odeint.hpp> #include <boost/phoenix/phoenix.hpp> #include <boost/numeric/mtl/mtl.hpp> #include <boost/numeric/odeint/external/mtl4/implicit_euler_mtl4.hpp> using namespace std; using namespace boost::numeric::odeint; ...
ALGO
0.996536
4.987206
990757c8-0790-4d99-ac7a-f1d5192a8c7b
mkohlhaas/Professional-CPP-Edition-6
No-Modules/Examples/Ch23/01_Random/05_generate.cpp
#include <functional> #include <print> #include <random> #include <ranges> #include <vector> using namespace std; int main() { random_device seeder; mt19937 engine{seeder()}; uniform_int_distribution<int> distribution{1, 99}; auto generator{bind(distribution, eng...
TOOL
0.935248
4.337842
8a2123d5-d18b-4339-967a-bc9b2bc85e60
Mhmd-Hisham/Problem-Solving
Codeforces/A. Points in Segments.cpp
#include <bits/stdc++.h> /* Problem: A. Points in Segments Link : https://codeforces.com/contest/1015/problem/A Solution by: Mohamed Hisham El-Banna Gmail : <EMAIL> Github : www.github.com/Mhmd-Hisham LinkedIn: www.linkedin.com/in/Mhmd-Hisham */ using namespace std; int N, M; int l, r, cnt = 0; bool axis[101] ...
ALGO
0.999987
3.358716
34fa7da0-4ba9-439d-b20a-23e9a2417ff7
jagonzalezmaita/trees-CPP
src/AvlTree.cpp
#include "AvlTree.h" #include <iostream> #include <algorithm> // Para std::max using namespace std; AvlTree::AvlTree() : root(nullptr) {} void AvlTree::insert(int value) { root = insertRecursive(root, value); } int AvlTree::height(AvlNode* node) { return node == nullptr ? 0 : node->height; } int AvlTree::ba...
ALGO
0.993331
5.609282
0c8a9d48-8724-4c59-9e02-80433ac08ab5
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_2935_7.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") using namespace std; using ll = long long; using db = long double; using pi = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<db, db>; using vi = vector<int>; using vb = vector<boo...
ALGO
0.999906
4.440592
3ae215aa-5dc1-4b96-a4cb-f34ef542f432
prakhar-pipersania/LeetCode-Solutions
Questions Level-Wise/Easy/assign-cookies.cpp
class Solution { public: int findContentChildren(vector<int>& g, vector<int>& s) { int c=0,k=0; sort(begin(g),end(g)); sort(begin(s),end(s)); for(int i=0;i<s.size();i++) if(g[k]<=s[i]) { ++c,++k; if(k==g.size()) ...
ALGO
0.999885
5.65763
ce8134cc-d80b-4048-8e1a-b71e275b2c51
krozv/codetree-TILs
240629/n부터 1까지 숫자 출력/print-n-to-1.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; while (n > 0){ cout << n << " "; n--; } return 0; }
ALGO
0.999724
4.382987
41c9733e-32b0-49ba-a35e-5a3f4372fc81
rdirobots/motion_studio_editor
intern/cycles/bvh/build.cpp
#include "bvh/build.h" #include "bvh/binning.h" #include "bvh/node.h" #include "bvh/params.h" #include "bvh/split.h" #include "scene/curves.h" #include "scene/hair.h" #include "scene/mesh.h" #include "scene/object.h" #include "scene/pointcloud.h" #include "scene/scene.h" #include "util/algorithm.h" #include "util/fo...
ALGO
0.914013
4.987265
795b577f-239d-43a6-a0f1-3de047f30ec9
ishandutta2007/codeforces
emiso/normal/1204/A.cpp
#include <bits/stdc++.h> #define MN 1001000 using namespace std; typedef long long ll; ll n, ans, a[MN], gret; char s[MN]; string str; int main() { scanf("%s", &s); str = s; n = str.size(); ans = (n + 1) / 2; for(int i = 1; i < n; i++) { if(str[i] == '1') gret = 1; } if(!gret && (n % 2)...
ALGO
0.999927
4.026541
818c6da0-f98d-486f-9ea1-af3ed6e02636
zy2438633945/oceanbase
src/sql/rewrite/ob_transform_min_max.cpp
#define USING_LOG_PREFIX SQL_REWRITE #include "ob_transform_min_max.h" #include "ob_transformer_impl.h" #include "lib/allocator/ob_allocator.h" #include "lib/oblog/ob_log_module.h" #include "common/ob_common_utility.h" #include "common/ob_smart_call.h" #include "share/schema/ob_column_schema.h" #include "share/schema/o...
TOOL
0.957628
6.244222
0791c754-cedc-43d3-9c24-0fdadc222e1d
alexandraback/datacollection
solutions_5658282861527040_0/C++/phi16/main.cpp
#include<iostream> #include<vector> #include<map> #include<string> #include<queue> #include<iomanip> #include<cmath> __int64 solve(int a,int b,int p,int z,int as,int bs){ if(as>=a || bs>=b)return 0; if(z==-1)return 1; //std::cout << "[" << z << ":" << as << "-" << bs << "]" << std::endl; if(p & (1<<z)){ ...
ALGO
0.998891
3.47385
331a8145-fef0-485b-bade-852de7f0164d
proghead00/Interview-Competitive-Cpp
Number Theory/primeinRangeFASTER.cpp
#include <iostream> using namespace std; void prime_sieve(int *p) { // first make all odd numbers prime for (size_t i = 3; i <= 1000000; i += 2) { p[i] = 1; } // sieve for (size_t i = 3; i <= 1000000; i++) { // if curr number is not marked, it is prime if (p[i] =...
ALGO
0.999863
4.523713
17a508fb-5438-4aa8-be05-3fd8ba63adb2
M-J-Y-21/Competetive-Programming
codeforces/800/InsomniaCure.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; void solve(); int main() { /** * @brief Super speed boost */ ios::sync_with_stdio(false); cin.tie(NULL); solve(); return 0; } void solve() { int k, l, m, n, d; cin >> k >> l >> m >> n >> d; int count...
ALGO
0.999608
4.279762
28f133a9-774e-4abf-88f1-64cb86e17d44
compilerai/counter
llvm-project/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
#include "llvm/InitializePasses.h" #include "llvm/Pass.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/CFG.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/IR/Dominators.h" #incl...
ALGO
0.925465
7.903476
9ff13e6e-5e63-42ed-80cd-b944ce61eab0
Yang-Junjie/AlgorithmSolutions
codeforces/Con179eduvp/D/main.cpp
#include <bits/stdc++.h> using namespace std; #define ALL(x) (x).begin(), (x).end() #define MAXV(a, l, r) *std::max_element((a).begin() + (l), (a).begin() + (r)) #define MINV(a, l, r) *std::min_element((a).begin() + (l), (a).begin() + (r)) using ll = long long int; using ull = unsigned lon...
ALGO
0.999275
4.553637
23c6ca46-9012-4917-812d-124f4d29e646
sakibakon/template-
minimum difference between any pair.cpp
#include <bits/stdc++.h> using namespace std; int ar[2]; int findMinDiff(int arr[], int n) { int diff = 100000; for (int i=0; i<n-1; i++){ for (int j=i+1; j<n; j++){ if (abs(arr[i] - arr[j]) < diff){ diff = abs(arr[i] - arr[j]); ar[0]=arr[i]; ar[1]= arr[j]; ...
ALGO
0.999909
4.446425
4b5638a7-5df1-455f-8918-0a60862e1a0b
suhas4122/Competitive-Programming
Educational Codeforces Round 126/A_Array_Balancing.cpp
#include <bits/stdc++.h> using namespace std; string to_string(string s) { return '"' + s + '"';} string to_string(char s) { return string(1, s);} string to_string(const char* s) { return to_string((string) s);} string to_string(bool b) { return (b ? "true" : "false");} template <typename A> string to_string(A); tem...
ALGO
0.999965
3.97086
befb8ff3-a2f7-4ead-a21c-6cf002663801
SDoHao/OnlineJudge
Nowcoder/NC61_twoNumberSum_unordered_map.cpp
#include<iostream> #include<vector> #include<unordered_map> using namespace std; class Solution { public: vector<int> twoSum(vector<int>& numbers, int target) { unordered_map<int, int> _map; int n = numbers.size(); int st, ed; for (int i = 0; i < n; i++) { ...
ALGO
0.999493
5.31276
c01959b8-506f-4001-95c6-6532e7994846
LucasKIJ/Cplusplus
helloworld/helloworld.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int main() { vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"}; for (const string& word : msg) { cout << word << " "; } cout << endl; }
TOOL
0.885348
3.87438
3f7846b1-0dd3-48bd-a0e4-6f071a9ce288
Xiarain/Rain_IMU
Eigen3/bench/product_threshold.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #define END 9 template<int S> struct map_size { enum { ret = S }; }; template<> struct map_size<10> { enum { ret = 20 }; }; template<> struct map_size<11> { enum { ret = 50 }; }; template<> struct ...
TOOL
0.974315
5.096755
112c6097-70c0-4faf-8273-5e57491dac5d
k4t4u/WSBNLU
C++/Abstrakcja_Wirtualnosc_k4t.cpp
#include <iostream> using namespace std; class Data { private: int dzien; int miesiac; int rok; public: Data(int dzien, int miesiac, int rok) :dzien(dzien), miesiac(miesiac), rok(rok) { } void Drukuj() const { ...
TOOL
0.879085
4.984836
62602f0a-4bf3-4234-8f1d-7fe760dc7db6
sjcode99/LeetcodeSubmissions
ZigZag Tree Traversal - GFG/zig-zag-tree-traversal.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val...
ALGO
0.999865
6.265189
73230fc5-fe51-42e3-a0fe-51f8c861c284
dizzygz/professional-cplusplus
src/ch25/03_NameDB/FirstAttempt/NameDB.cpp
#include "NameDB.h" #include <fstream> #include <stdexcept> using namespace std; // Reads the names from the file and populates the database. // The database is a vector of name/count pairs, storing the // number of times each name shows up in the raw data. NameDB::NameDB(const string& nameFile) { // Open the file a...
TOOL
0.889069
6.071661
ed4ea38a-e396-4131-9b3b-e7684b8a4e9f
bhanu6193/Leetcode
0011-container-with-most-water/0011-container-with-most-water.cpp
class Solution { public: int maxArea(vector<int>& height) { int i,j; int max=0; for(i=0,j=height.size()-1;i!=j;){ int c=(height[i]<height[j] ? height[i] : height[j])*(j-i); max=max<c?c:max; int d=height[i]<height[j] ? i++ : j--; } return ma...
ALGO
0.99997
6.520715
f0a1a786-2f20-434a-a8d6-10fe583026c6
Ankit0225/Leetcode-and-gfg-solution
Sum of leaf nodes in BST - GFG/sum-of-leaf-nodes-in-bst.cpp
//{ Driver Code Starts //Author- SAJAL AGRAWAL //<EMAIL> #include <stdio.h> #include <stdlib.h> #include<string.h> struct Node { int data; struct Node *left; struct Node *right; Node(int x){ data = x; left = NULL; right = NULL; } }; Node *insert(Node *r,int num); int sumOfLeafNodes(Node *r); vo...
ALGO
0.999854
6.44868
75a505f4-b46f-40b3-9fad-cf3736d9129f
YoungWizard/cppdemo
leetcode/567.permutation-in-string/source.cpp
#include <iostream> #include <unordered_map> using namespace std; class Solution { public: bool checkInclusion(string s1, string s2) { int need[128] = {0}; int window[128] = {0}; for (auto c : s2) need[c]++; int left = 0, right = 0, valid = 0; while (right < s...
ALGO
0.999913
5.770976
3c111a9d-cda7-41c8-8b02-c5759cf07608
intristin/digitalcredits
src/zerocoin/AccumulatorProofOfKnowledge.cpp
/** * @file AccumulatorProofOfKnowledge.cpp * * @brief AccumulatorProofOfKnowledge class for the Zerocoin library. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This pro...
ALGO
0.982396
6.576852
874ae714-ec04-4121-96c3-11f2db50724d
Xie-Minghui/ACM
newcoder/牛客第9场/H-Cutting Bamboos-主席树+二分.cpp
#include<bits/stdc++.h> #define per(i,a,b) for(int i = (a);i <= (b);++i) #define rep(i,a,b) for(int i = (a);i >= (b);--i) using namespace std; typedef long long LL; const double eps = 1e-8; const int maxn = 2e5 + 10; int n = 0,q = 0; int h[maxn]; int tim = 0; struct Node{ int l,r,cnt; LL sum; }tree[40*maxn]; int root...
ALGO
0.999973
3.220085
ac68d74e-b73d-4e1b-94a6-3dbcbbf8c0be
saifullah-talukder/Competitive_Programming
Codes/Codeforces/Accepted/CF_380_C.cpp
/* Bismillahir Rahmanir Rahim */ #include <bits/stdc++.h> using namespace std; class info { public: int len, a, b; info operator+(info B) { info A; int t; t = min(this->a, B.b); A.len = this->len + B.len + t; A.a = this->a + B.a - t; A.b = this->b + B.b ...
ALGO
0.999912
4.176912
6b51f153-94f3-4ba7-999b-72bbaf2f4d1f
ishandutta2007/codeforces
dlalswp25/normal/1628/A.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; int N; int A[202020]; int cnt[202020]; bool chk[202020]; int main() { int tc; scanf("%d", &tc); while(tc--) { scanf("%d", &N); for(int i = 0; i <= N; i++) cnt[i] = 0; for(int i = 1; i <= N; i++) scanf("%d", &A[i]); int mx = N + 1; ...
ALGO
0.999923
4.130137
97886ccd-3585-403a-a1f0-5048b0f55706
luumod/algorithm-problems
P_2249_深基_13_例_1_查找.cpp
#include <bits/stdc++.h> int main(){ int n,m; std::cin>>n>>m; std::vector<int> vec(n+1); for (int i=1;i<=n;i++){ std::cin>>vec[i]; } auto binary_search1=[&](int x){ int l=0,r=n+1; while (l+1<r){ int mid=l+r>>1; //大于等于x的第一个数字 if (vec[mi...
ALGO
0.999991
4.612908
3d387c43-8c91-4110-a0af-3b82a9fb9e78
avinashsastry/justcode
objects/mastermind.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_SLOTS 4 #define HIT 1 #define PHIT 2 enum colour { NONE, RED, YELLOW, GREEN, BLUE }; void getHits(unsigned int* answer, unsigned int* guess, int* hits, int* phits) { if (!answer) return; if (!guess) return; int foundhits[MAX_SLOTS]; me...
ALGO
0.998816
3.900681
f092aad7-a563-440f-b1bd-e55199239d05
ayaanlehashi11/LeetCode-Solutions
integerToRoman/integerToRoman.cpp
// Source : https://oj.leetcode.com/problems/integer-to-roman/ // Author : Hao Chen // Date : 2014-07-17 /********************************************************************************** * * Given an integer, convert it to a roman numeral. * * Input is guaranteed to be within the range from 1 to 3999. * ...
ALGO
0.99467
5.838363
ce9bbe65-e655-461b-8f38-1782095e3c79
abhi2666/Greedy-Questions
twoSum.cpp
#include <bits/stdc++.h> using namespace std; pair<int, int> twoSum(int a[], int n, int value) { pair<int, int> p; int i = 0, j = n - 1; int sum = 0; while(i < j) { sum = a[i] + a[j]; if(sum == value) { p.first = i; p.second = j; return p;...
ALGO
0.999968
6.430651
8d9817cb-c915-4445-a0df-e55315a12b05
ishandutta2007/codeforces
l7-56/normal/200/D.cpp
#include<iostream> #include<cstdio> #include<string> #include<vector> using namespace std; struct Func{ string name; vector <int> type; Func(){ name = ""; type.clear(); } }f[1010]; struct Value{ string name; int type; Value(){ name = ""; type = -1; } }v[1010]; bool check(Func a, Func b){ if(a.name !...
ALGO
0.995817
3.23949
0dbe4b3b-4654-42f9-83e7-d6198c70bcd1
tose4160/test.c
10.1.1.cpp
//题目:/*家里养了一对刚出生的兔子,兔子出生第三个月起每个月都会生一对小兔子,出生后的兔子同样第三个月起也会生一对小兔子,如果兔子不不死,n个月后会有几只兔子。设计一个程序:数入n,输出兔子数量*/ #include<stdio.h> /*int a = 1;//表示初始有1对兔子 int sum = 0; int time = 0; printf("请输入消耗时间:"); scanf_s("%d", &time); printf("%d\n", sum);*/ int rabbitCount(int n) {//函数 if (n <= 2) { retu...
ALGO
0.999739
4.119268
b14e8347-15fd-4282-942e-47d2e9c9008e
ishandutta2007/codeforces
forza_ferrari/normal/1261/A.cpp
#include<iostream> #include<cstdio> #include<string> #include<vector> #include<algorithm> using namespace std; int t,n,k; string s,p; vector<pair<int,int> > ans; int main() { cin>>t; while(t--) { cin>>n>>k>>s; s=" "+s; p.clear(); p+=" "; for(register int i=1;i<k;++i) ...
ALGO
0.999147
3.078974
32f668f5-f7b4-4257-a990-a9ab981cfe00
adityaparmar9813/daily-leetcode
maximum_unique_subarray_sum_after_deletion.cpp
class Solution { public: int maxSum(vector<int>& nums) { vector<bool> mp(201, false); int ans = 0; for (int num : nums) { if (mp[num + 100] != false || num <= 0) { continue; } ans += num; mp[num + 100] = true; } return ans == 0 ? *max_element(nums.begin(), nums.end()) : ans; } }; // Ti...
ALGO
0.999805
6.38796
49310152-59df-45d7-8475-5aca72dbde60
Almanova/ADS
sorting/nn.cpp
#include <bits/stdc++.h> using namespace std; int bfs(vector<vector<int> >graph, vector<int> used, int node) { cout << node << " "; int ans = 1; for (int neighbour = 0; neighbour < graph[node].size(); neighbour++) { if (used[neighbour] == 0) { used[neighbour] = 1; ans = max...
ALGO
0.99972
4.052303
a9b2e3d1-f5b6-4fb7-a2e2-7c5527552177
youessaitch/myDSA
0932-monotonic-array/0932-monotonic-array.cpp
class Solution { public: bool isMonotonic(vector<int>& nums) { bool ch1 = true; bool ch2 = true; int n = nums.size(); for(int i=0;i<n-1;i++){ if(nums[i]>nums[i+1]) ch1 = false; if(nums[i]<nums[i+1]) ch2 = false; } if(ch1 || ch2) return true;...
ALGO
0.999965
5.948306
792ead29-50b3-4950-a38a-1a7138f7e991
sasidharan10/Cpp
Leetcode/prefix/1370_lngst_substr_vowels_cnt.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: // Better - using map of string int findTheLongestSubstring2(string s) { // TC: O(n) // SC: O(n) int n = s.length(); unordered_map<string, int> mp; mp["00000"] = -1; int vowelsCount[5] = {...
ALGO
0.999285
5.572873
af12d498-d173-4799-aceb-337eeb90ca5f
stytim/AzureKinect-ToolTracker
extern/eigen/src/lapack/cholesky.cpp
#include "lapack_common.h" #include <Eigen/Cholesky> // POTRF computes the Cholesky factorization of a real symmetric positive definite matrix A. EIGEN_LAPACK_FUNC(potrf,(char* uplo, int *n, RealScalar *pa, int *lda, int *info)) { *info = 0; if(UPLO(*uplo)==INVALID) *info = -1; else if(*n<0) ...
ALGO
0.99898
6.009887
747f5056-c89f-43a9-a000-42b47f8dd6d6
MohammadMazrouei/Competitive-Programming
Data_Structures/Sparse_Table_2D.cpp
#include <bits/stdc++.h> using namespace std; // Sparse Table 2D for RMQ // build -> O(n*m*log(n)*log(m)), query -> O(1) template <typename T, typename Compare = less<T>> struct SparseTable2D { int n, m; vector<vector<vector<vector<T>>>> t; Compare cmp = Compare(); SparseTable2D() : n(0), m(0) {} ...
ALGO
0.999923
5.074487
78773df1-23f4-4ad9-8b51-bd74ca7262e2
SaintCEN/Data-Structure
算法/动态规划/分类/背包dp/分组.cpp
//同一组只能选一个 #include<bits/stdc++.h> using namespace std; const int N=110; int f[N]; int v[N][N],w[N][N],s[N]; int n,m,k; int main(){ cin>>n>>m; for(int i=0;i<n;i++){ cin>>s[i]; for(int j=0;j<s[i];j++){ cin>>v[i][j]>>w[i][j]; } } for(int i=0;i<n;i++){ for(int j=...
ALGO
0.999982
3.565617
d293d5ba-fbf2-4092-8df5-0ae2a4205bcf
Ahmedsab9912/PushNotifications
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.998784
6.761023
6dcf3d08-4977-466a-b0cb-cdaac3f894a4
Orang123/ACMAlgorithmExercises
字符串/AC自动机/AC自动机算法模板/洛谷 P3808 [模板]AC自动机(简单版).cpp
/* :nģʽsi,һıt жٸͬģʽıֹ ģʽͬҽDZŲͬ n<=10^6,|t|<=10^6,|si|<=10^6. :https://www.luogu.com.cn/problem/P3808 ˼·:ģʽƥ,ACԶ,ѱĺ׺ӴҪ, ظ. */ /* Aho-Corasick automaton ACԶ Alfred Aho Margaret Corasick1975ڱʵҷĶģʽƥ㷨 ʵACԶͨԤfailָչı켣ʹ ƥģʽʱͨǰ׺ƥֱַתijģʽ֧ǰ׺ıַǸȥƥ ʡ´Ӹڵ㿼ǰ׺мijӴƥḶ́ʡҪߵ·Ȼʱ硣 failָǽtrieij֧һǴһģʽ,תijַ·Ƿ ܳģʽּıģʽ ACԶkmp㷨ıȽ: ڶģʽƥkmp㷨,ôÿ...
ALGO
0.999686
3.881443
bd6b3e78-7008-4832-9e09-17cd96c047b3
MCKG-L/codes
课程实验及作业/C++语言课/作业/ch2/2212080115_孙利伟_2.18.cpp
/* 姓名:孙利伟 学号:2212080115 班级:二班 */ #include <iostream> #include <cmath> #include <stdio.h> using namespace std; int main() { cout << "a b pow(a, b)" << endl; for(int i=1;i<=5;i++){ printf("%-5d %-5d %-5d\n",i,i+1,(int)pow(i,i+1)); } return 0; }
ALGO
0.986215
3.583106
b0361609-3952-42b0-8766-183e9bb0b21d
raincross7/code-similarity
codes/train_code/problem208/problem208_87.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL<<62 #define inf 1000000007 ll a[52]; int main() { ll n; cin>>n; for(ll i=0;i<50;i++){ a[i]=i; } ll s=n/50; for(ll i=0;i<50;i++){ a[i]+=s; } s=n%50; for(ll i=0;i<s;i++){ a[49-i]++; } cout << 50<<endl; for(ll i=0;i<50;i...
ALGO
0.999864
3.132403
9d9e5eaf-2118-46d1-830a-326a773cb699
dbdon1/xmrig
src/backend/opencl/OclConfig.cpp
#include "backend/opencl/OclConfig.h" #include "3rdparty/rapidjson/document.h" #include "backend/common/Tags.h" #include "backend/opencl/OclConfig_gen.h" #include "backend/opencl/wrappers/OclLib.h" #include "base/io/json/Json.h" #include "base/io/log/Log.h" namespace xmrig { static const char *kCache = "cache";...
CONFIG
0.910463
6.958256
e663f2b2-5704-4c41-954f-19a7d050711a
am-aakash/dsa
interviewBit/level 1-3/maxContiguousArray.cpp
int Solution::maxSubArray(const vector<int> &A) { int maxi = INT_MIN, sum = 0, maxNum = INT_MIN; for (int i = 0; i < A.size(); i++) { maxNum = max(maxNum, A[i]); sum += A[i]; if (sum < 0) sum = 0; if (sum > maxi) maxi = sum; } if (maxNum < 0) ...
ALGO
0.999418
5.867423
66ba34da-d8a6-419c-bdd1-7947fcb52fc2
Eason1223/CPSC221-PA2
filler.cpp
/* * File: filler.cpp * Description: Implementation of functions in the filler namespace. * */ /* * Performs a flood fill using breadth first search. * * PARAM: config - FillerConfig struct to setup the fill * RETURN: animation object illustrating progression of flood fill algorithm */ animation filler::F...
ALGO
0.945047
6.239337
a24ed8bd-8a5d-4f3b-8fa8-1bcf18e638f9
ishandutta2007/codeforces
lyc_music/normal/1682/F.cpp
// Lynkcat. // Problem: F. MCMF? // URL: https://codeforces.com/contest/1682/problem/F // Memory Limit: 256 MB // Time Limit: 3000 ms // ----------------------------------------------- #include<bits/stdc++.h> #define poly vector<int> #define IOS ios::sync_with_stdio(false) #define ll long long #define mp make_pair #de...
ALGO
0.999711
3.766638
6966e698-6a5d-484e-ac3d-4ff69f5ec62e
AnujYeole/Sapdos_Patient
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
426f3b52-f3b6-4788-b856-240619a2819f
ishandutta2007/codeforces
dreamoon_love_aa/normal/1741/A.cpp
/*{{{*/ #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<string> #include<iostream> #include<sstream> #include<set> #include<map> #include<queue> #include<bitset> #include<vector> #include<iomanip> #include<limits.h> #include<assert.h> #define SZ(X) ((int)(X).size()) #de...
ALGO
0.999974
3.137723
11ff6df4-0879-4b82-85ad-4e33e0f1144e
rishabh27goel/DSA-Extra-Questions
Leetcode/Construct_Smallest_Number_From_DI_String.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: bool createValidSequence(int size, string &pattern, string &sequence, vector<bool> &digitVisited, char prevChar, int currentIdx) { if(currentIdx == size) return true; for(int digit = 1; digi...
ALGO
0.999977
6.543889
0aeb4479-6c9d-4f11-b5bf-a06fe7cdc152
greghaynes/xsbs
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.998959
6.989757
46c44ab8-5f18-4676-8752-425de3478615
VillaKeth/Competitive-Programming
1700/Trapmigiano-Reggiano.cpp
#include <cstdlib> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <iostream> #include <string> #include <deque> #include <queue> #include <stack> #include <cmath> #include <climits> #include <algorithm> #include <chrono> #include <cstdint> #include <fstream> ...
ALGO
0.999962
4.54161
559af5c0-7288-48e0-b253-d5d1346c75fb
linuxdeepin/opencv-mobile
opencv-4.5.4/samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo2.cpp
/** * @file BackProject_Demo2.cpp * @brief Sample code for backproject function usage ( a bit more elaborated ) * @author OpenCV team */ #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <iostream> using namespace cv; using namespace std; /// Global Variable...
ALGO
0.943424
6.89959
61091514-735b-4b7c-93cf-337bbd91a82e
rachit77/DSA-solutions
29-divide-two-integers/29-divide-two-integers.cpp
class Solution { public: int divide(int dividend, int divisor) { int sign =(dividend>0 ^ divisor>0)?0:1; long int ans=0; long int a=abs(dividend); long int b=abs(divisor); // if(b>a) return 0; while(a>=b){ int k=0; w...
ALGO
0.999949
5.845691
a4f07e52-bc74-43b1-aece-ff011a241d02
pnnv/hyprland-dotfiles
VSCodium/User/History/b2f887d/OgUr.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; void snu() { int l, r; cin >> l >> r; int p = int(log2(r)); int cnt = 0; for(int i = l; i <= r; i++) if(!(i & (1 << p))) cnt++; cout << cnt << endl; } int32_t main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; ...
ALGO
0.999787
4.725736
60ef527d-7dcc-4cce-9ff8-0811fff668e4
Hourglass-Resurrection/Hourglass-Resurrection
source/application/Utils/File/FileDialog.cpp
#define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <CommDlg.h> #include <algorithm> #include <map> #include "../File.h" namespace { /* * The pipe characters are just placeholders for the null characters to ease string manipulation */ std::map<Utils::File::FileFilter, LPCWSTR> file_type_map =...
TOOL
0.954508
6.624406
9498a7e3-94bb-46ca-8655-b284ec11897e
Ash-codes18/Lpu-colab-CPP-DSA-Soln
CSE-202 C++/Unit-5/Lecture-31/Suji.cpp
#include <iostream> using namespace std; int main(){ int wl=-1; if(wl==0){ cout<<"new delete"; } int n; cin>>n; if(n<1){ cout<<"Size of the array should be positive!"; } else{ int arr[n]; cout<<"Original Array: "; for(int i=0;i<n;i++){ ...
ALGO
0.998513
4.372787
78bf0dec-5301-4857-bcda-18c12cf159ab
silasxue/FaceDetectDatasetCreatation
main.cpp
#include <iostream> #include <vector> #include <string> #include "boost/filesystem.hpp" #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <dlib/image_processing/frontal_face_detector.h> #include <dlib/image_processing/render_face_detecti...
TOOL
0.930189
4.012863
d60e6ad6-f2a7-485d-b897-e873ecb173f9
khalid2696/AutopilotFlightController
Firmware/simulation/Support Files/eigen-eigen-67e894c6cd8f/test/sparse_solvers.cpp
#include "sparse.h" template<typename Scalar> void initSPD(double density, Matrix<Scalar,Dynamic,Dynamic>& refMat, SparseMatrix<Scalar>& sparseMat) { Matrix<Scalar,Dynamic,Dynamic> aux(refMat.rows(),refMat.cols()); initSparse(density,refMat,sparseMat); refMat = refMat * refMat.adjoint(); for (i...
TEST
0.90101
5.181122
67badd08-3316-4e05-8ff5-cb187e2de5a9
kelvin-yu/Algorithms
Cplusplus/DP/DP_Optimization_2.cpp
//COMMANDO #include<bits/stdc++.h> #define __ENABLE_EXPERIMENTAL_TADPOLE_OPERATORS using namespace std; char _; #define PI 3.14159265359 #define scan(x) while ((x=getchar())<'0'); for (x-='0';(_=getchar())>='0'; x = (x<<1)+(x<<3)+_-'0') #define INF (int)2e9 #define LLINF ...
ALGO
0.999943
3.747441
a82fa02e-a321-4f9b-ad61-9cdb7aa34e65
harsh-narayan-nishad/Leetcode
0242-valid-anagram/0242-valid-anagram.cpp
class Solution { public: bool isAnagram(string s, string t) { int freq[256] = {0}; for(int i=0; i<s.size(); i++){ freq[s[i]]+=1; } for(int i=0; i<t.size(); i++){ freq[t[i]]-=1; } for(int i=0; i<256; i++){ if(freq[i] != 0){ ...
ALGO
0.999983
6.495783
9aef1f6b-044d-4fad-bd1f-afa1e92a7c01
equadras/CompetitiveProgramming
Contests udesc/rinhaTest/e.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL_DEBUG #include "debug.h" #else #define debug(...) #endif #define endl "\n" typedef long long ll; void solve(){ ll n; cin >> n; ll res; if (n & 1) res = (n/2) * ((n/2)+1); else res = (n/2) * ((n/2)); cout << res << endl; } signed main(){...
ALGO
0.999906
5.700193
9c13504b-f5a8-46f2-9d10-f49e415db23b
ishandutta2007/codeforces
yuma_/normal/1036/F.cpp
#include "bits/stdc++.h" #include<vector> #include<iostream> #include<queue> #include<algorithm> #include<map> #include<set> #include<iomanip> #include<assert.h> #include<unordered_map> #include<unordered_set> #include<string> #include<stack> #include<complex> #pragma warning(disable:4996) using namespace std; using ld...
ALGO
0.999839
3.96702
5e5ac89c-c6d0-4b9e-9b2e-9d092320b459
hathu2004/thuat-toan
buoi 1.1.cpp
#include <iostream> using namespace std; void quick_sort(int arr[],int left, int right) { int i=left, j=right; int pivot=arr[(left+right)/2]; while(i<=j) { while(arr[i]>pivot) i++; while(arr[j]<pivot) j--; if(i<=j) { swap(arr[i],arr[j])...
ALGO
0.999984
3.457105
6367384f-e644-4986-97eb-e7a08f3d067c
matumoto1234/atcoder
arc/118/C/main.cpp
#include <bits/stdc++.h> using namespace std; // clang-format off #define range(i, l, r) for ( int i = (int)(l); i < (int)(r); (i) += 1 ) #define rrange(i, l, r) for ( int i = (int)(r)-1; i >= (int)(l); (i) -= 1 ) #define debug(x) cerr << "(" << __LINE__ << ") " << #x << ": " << (x) << endl; template <typename T1, typ...
ALGO
0.99953
4.478516
e49d5ddf-f85e-426a-859b-fb491ecf98fa
yulonglong/UVa-Solutions
11423.cpp
//Steven Kester Yuwono - UVa 11423 //Fenwick Tree (Binary Indexed Tree) #include <cstdio> #include <iostream> #include <vector> #define MAX 31 #define MAXFT 10000100 #define MAXARR 20000100 using namespace std; int N; int stat[MAX]; int maxSize[MAX]; int visitedCounter[MAXARR]; int counter = 0; // BEGIN Fenwick Tree...
ALGO
0.995034
3.625526
0e29bec9-653f-4746-aee7-3504ac7b4d7c
sarvex/leetcode-haskell
lcci/03.02.Min Stack/Solution.cpp
class MinStack { public: /** initialize your data structure here. */ MinStack() { stk2.push(INT_MAX); } void push(int x) { stk1.push(x); stk2.push(min(x, stk2.top())); } void pop() { stk1.pop(); stk2.pop(); } int top() { return stk1.top(...
ALGO
0.999882
6.471636
7d9880fd-3bd9-4d97-a2d3-8c2a738e45ec
dat20026969/DSA
Week07/home/b74/main74.cpp
#include "b74.h" int main() { Node* root = newNode(1); root->left = newNode(2); root->right = newNode(3); root->left->left = newNode(4); root->left->right = newNode(5); root->right->left = newNode(6); root->right->right = newNode(7); cout << "LCA(4, 5) = " << foundLCA(root, 4, 5); co...
ALGO
0.999787
5.180887
d2ec8e27-c5f2-4859-9aa4-456ea296f0ab
Richard-m-j/LeetCode
567-permutation-in-string/permutation-in-string.cpp
class Solution { public: bool checkInclusion(string s1, string s2) { ios::sync_with_stdio(0); cin.tie(0); int n = s1.length(); int m = s2.length(); if (n > m) return false; vector<int> mp1(26, 0); vector<int> mp2(26, 0); for (int i = 0; i <...
ALGO
0.999967
5.632874
8c7db3c9-c172-4f26-9384-924d2123848b
shelltdf/osgall
prebuild/pcl-master/doc/tutorials/content/sources/correspondence_grouping/correspondence_grouping.cpp
#include <pcl/io/pcd_io.h> #include <pcl/point_cloud.h> #include <pcl/correspondence.h> #include <pcl/features/normal_3d_omp.h> #include <pcl/features/shot_omp.h> #include <pcl/features/board.h> #include <pcl/filters/uniform_sampling.h> #include <pcl/recognition/cg/hough_3d.h> #include <pcl/recognition/cg/geometric_con...
ALGO
0.990287
6.75768
58cdcec6-163b-46ba-a382-afa2596da86f
Abhinav30072003/A2Z-Solutions
3sum.cpp
#include <vector> #include <algorithm> using namespace std; class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> result; sort(nums.begin(), nums.end()); for (int i = 0; i < nums.size(); ++i) { if (i > 0 && nums[i] == nums[i - 1]...
ALGO
0.999968
6.359029
fc5999cb-5876-45e6-8d94-bcbf11365810
StanleyJo-37/competitive-programming-chatbots-comprasion
submissions/deepseek/sub50.cpp
#include <iostream> #include <string> using namespace std; string numberToWords(int s) { // Arrays to hold the words for numbers const string units[] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen"...
ALGO
0.994585
6.783016
17e550b0-4add-4282-9ffd-f24a3d1e4799
theodore-norvell/the-teaching-machine-and-webwriter
trunk/tm web site/courses/advanced/content/review/functions2.cpp
double function1(double arg1, double arg2); int main(){ double x=3., y= 17.5; double w, z; w = function1(x,y); z = function1(y,x); return 0; } double function1(double a1, double a2){ if (a1 > a2) return a1*a2; else return -a2; }
TOOL
0.994241
4.373705
94a0f34d-0075-4d42-a336-f89e2b57a7b3
djaessel/MB-Studio
openBrf/projects/vcglib/apps/plyrefine/main.cpp
// mesh definition #include <vcg/simplex/vertex/with/afvn.h> #include <vcg/simplex/face/with/af.h> #include <vcg/complex/complex.h> #include <vcg/complex/algorithms/update/topology.h> #include <vcg/complex/algorithms/update/flag.h> #include <vcg/complex/algorithms/update/normal.h> #include <vcg/complex/algorithms/r...
ALGO
0.932688
4.333009
7dab9f6a-24f6-4958-ae28-dddb67552ebe
s28961-pj/CPP
PPRG_02c/Zadanie09/Zadanie09.cpp
#include <iostream> using namespace std; int main() { int liczba1, liczba2, suma, reszta; cout << "\nSUMA LICZB - PARZYSTA CZY NIEPARZYSTA ?\n" << endl; cout << "------------------------------" << endl; cout << "Wprowadz pierwsza liczbe: "; cin >> liczba1; cin.ignore(); cout <...
ALGO
0.999732
4.698128
6ab76b12-d14f-41eb-8cae-90d8c97ca97e
642755747/ocfi
ocfi/mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp
#include "mlir/Analysis/DataFlow/SparseAnalysis.h" #include "mlir/Analysis/DataFlow/DeadCodeAnalysis.h" #include "mlir/Analysis/DataFlowFramework.h" #include "mlir/IR/Attributes.h" #include "mlir/IR/Operation.h" #include "mlir/IR/Region.h" #include "mlir/IR/SymbolTable.h" #include "mlir/IR/Value.h" #include "mlir/IR/Va...
ALGO
0.998652
7.89486
896e40fe-f8fa-47de-9e39-e16e4e21b794
coin-or/Bonmin
src/Algorithms/BonBonminSetup.cpp
#include "BonminConfig.h" #include "OsiClpSolverInterface.hpp" #include "BonBonminSetup.hpp" #ifdef BONMIN_CURVATURE_BRANCHING #include "BonCurvBranchingSolver.hpp" #endif #include "BonChooseVariable.hpp" #include "BonRandomChoice.hpp" #include "BonDiver.hpp" #include "BonQpBranchingSolver.hpp" #include "BonLpBranchin...
TOOL
0.992691
5.759687
72daa3e7-8537-4cbd-86c4-4bfb507f8ed5
ShineJune-Lin/Ardupilot_Learning
libraries/AP_ONVIF/sha1.cpp
#include <string.h> /* for memcpy() etc. */ #include "onvifhelpers.h" #include <endian.h> #ifdef __BYTE_ORDER #define SHA1_BLOCK_SIZE 64 #define rotl32(x,n) (((x) << n) | ((x) >> (32 - n))) #define rotr32(x,n) (((x) >> n) | ((x) << (32 - n))) #define bswap_32(x) ((rotr32((x), 24) & 0x00ff00ff) | (ro...
ALGO
0.99716
6.712171
9571d608-f6c3-4ec6-8e5e-a84eaa52e1bf
BaeJ1H021/codetree-TILs
241012/최단 거리 9/shortest-distance-9.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; const int INF = 2e9; int n,m; int from, to; int d[1010]; int trace[1010]; vector<pair<int,int>> vec[1010]; void find_trace() { int x = to; vector<int> v; v.push_back(x); while(true) { v.push_back(trace[x]); ...
ALGO
0.999994
4.718626
39f2c3c8-d354-4703-88c6-d2d0fb44b985
kangyijie5473/Daily_Work
Exercise/cpp/dehui8.cpp
/************************************************************************* > File Name: cpp > Author: Jack Kang > Mail: <EMAIL> > Created Time: 2017年03月03日 星期五 08时59分49秒 ************************************************************************/ #include<iostream> using namespace std; int f(int a[], int c, int &max...
ALGO
0.999779
3.611079
073395ef-2ee7-4997-b1db-73e60554f10b
atul21mangla/DSA-code
Binary Trees/PathSumI.cpp
#include<bits/stdc++.h> using namespace std; class TreeNode{ public: int val; TreeNode* left; TreeNode* right; TreeNode(int x){ this->val = x; this->left = NULL; this->right = NULL; } }; bool pathSum(TreeNode* root , int target){ // Base Case if(!root)return 0; ...
ALGO
0.999978
5.677663
95282fa8-7a6a-48a7-87d4-4bd6e30ee129
khushvantkr12/Striver-A-Z
DP/Minimum Path Sum.cpp
//https://leetcode.com/problems/minimum-path-sum/description/ class Solution { public: int solve(int i, int j, vector<vector<int>>& grid, vector<vector<int>>& dp) { if(i >= grid.size() || j >= grid[0].size()) { return 1e9; } if(i == grid.size()-1 && j == grid[0].size()-...
ALGO
0.999998
6.825454
5913f913-6022-4ad9-b688-6cee83dc86d1
Oga29/Pinball_Project
Pinball/Box2D/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.cpp
#include <Box2D/Dynamics/Contacts/b2ChainAndCircleContact.h> #include <Box2D/Common/b2BlockAllocator.h> #include <Box2D/Dynamics/b2Fixture.h> #include <Box2D/Collision/Shapes/b2ChainShape.h> #include <Box2D/Collision/Shapes/b2EdgeShape.h> #include <new> b2Contact* b2ChainAndCircleContact::Create(b2Fixture* fixtureA, ...
ALGO
0.979363
6.49728
877cca31-fc68-4cf9-ac44-15c4d7ce983b
dzungpng/material-point-method-jello-simulation
Deps/SuiteSparse/Mongoose/Source/Mongoose_QPNapUp.cpp
/* ========================================================================== */ /* === Source/Mongoose_QPNapUp.cpp ========================================== */ /* ========================================================================== */ /* =========================================================================...
ALGO
0.999968
5.829247