uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0b6dcbe8-ab51-42bf-a8ec-c976fdd70d3a
Aczheng-cai/GSORB-SLAM
Thirdparty/g2o/g2o/types/types_six_dof_expmap.cpp
#include "types_six_dof_expmap.h" #include "../core/factory.h" #include "../stuff/macros.h" namespace g2o { using namespace std; Vector2d project2d(const Vector3d& v) { Vector2d res; res(0) = v(0)/v(2); res(1) = v(1)/v(2); return res; } Vector3d unproject2d(const Vector2d& v) { Vector3d res; res(0) =...
ALGO
0.971574
5.898688
2fa208ba-14f3-4c8e-a9c1-cc4790b8327b
Andriahmd/Pratikum-Multiplatfrom-08
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.998799
6.776823
79bc1bad-b05b-44f6-9793-6e37db396a4e
Amanhacker/Aman-Barnwal-Leetcode-Solutions
Boolean Parenthesization - GFG/boolean-parenthesization.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: const int mod = 1003; int helper(string s, int i, int j, bool isTrue, vector<vector<vector<long long int>>> &dp) { ...
ALGO
0.999984
5.992418
c1019911-9969-4c10-85c8-4ed6a48826ee
knavelazy/MyLLVM
clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp
#include "DirectoryScanner.h" #include "clang/DirectoryWatcher/DirectoryWatcher.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/Path.h" #include <CoreServices/CoreServices.h> #include <TargetConditionals.h> using namespace llvm; using namespace...
TOOL
0.889675
7.561483
7d45416e-5cea-4e83-95a7-6ee13f2ef406
ishandutta2007/codeforces
keshi/normal/368/B.cpp
#include <bits/stdc++.h> using namespace std; map <int,bool> m; int main(){ int n,a[100010],dp[100010],l,k; cin >> n >> k; for (int i=0; i<n; i++){ cin >> a[i]; } dp[n]=0; for (int i=n-1; i>=0; i--){ if (m[a[i]]){ dp[i]=dp[i+1]; } else{ dp[i]=dp[i+1]+1; } m[a[i]]=1; } while (k--){ cin >> l; ...
ALGO
0.999897
3.767509
33ffc11a-f583-49e7-b33f-a3f196c65501
hzfsls/leetcode-supercrawl
data/0271.encode-and-decode-strings/code_snippets/sol.cpp
class Codec { public: // Encodes a list of strings to a single string. string encode(vector<string>& strs) { } // Decodes a single string to a list of strings. vector<string> decode(string s) { } }; // Your Codec object will be instantiated and called as such: // Codec codec...
ALGO
0.989314
6.271173
b0d50e2c-f789-49b4-a802-de2b9af5f92d
nguyenductoandhv/checker
graph/scc/sol/correct.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); } template <class T> using V = vector<T>; template <class T> using VV = V<V<T>>; struct SCC ...
ALGO
0.999954
4.916885
9342f838-5330-4ae3-b013-a8c68bd7bdb8
Nyovelt/CS101-Projects
Assienment 1/P3.cpp
#include <iostream> #include <cstdio> int n, k; char input[1000005]; unsigned long hash[20771][150]; int ans = 0; int alphabet[26]; //using namespace std; int main() { scanf("%d%d ", &n, &k); fgets(input, sizeof(input), stdin); // cout << n << k << endl; // cout << input << flush; for (register in...
ALGO
0.999938
3.67621
0ae4ceba-b4cc-4915-816a-2c987f4a679a
sarvex/leetcode-checked-c
solution/2500-2599/2535.Difference Between Element Sum and Digit Sum of an Array/Solution.cpp
class Solution { public: int differenceOfSum(vector<int>& nums) { int a = 0, b = 0; for (int x : nums) { a += x; for (; x; x /= 10) { b += x % 10; } } return abs(a - b); } };
ALGO
0.999909
6.438102
489812d1-8b1b-47b6-af95-ecec9c3aa152
GrainSack/Coding_Algorithm
w2_4659.cpp
#include<bits/stdc++.h> using namespace std; string str; int vcnt,icnt; bool v_include, flag; bool classify(int idx){ return(idx=='a'||idx=='e'||idx=='i'||idx=='o'||idx=='u'); } main(){ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); while(true){ cin>>str; if(str == "end")break; vcnt =0; icn...
ALGO
0.975814
4.597754
fb2e2d95-e4f9-445a-a5c6-bc3c352ce559
RigoLigoRLC/Fritzing-build
boost_1_82_0/libs/spirit/classic/phoenix/example/fundamental/sample8.cpp
#include <vector> #include <algorithm> #include <iostream> #define PHOENIX_LIMIT 5 #include <boost/spirit/include/phoenix1_operators.hpp> #include <boost/spirit/include/phoenix1_primitives.hpp> #include <boost/spirit/include/phoenix1_composite.hpp> #include <boost/spirit/include/phoenix1_special_ops.hpp> #include <boo...
TOOL
0.867203
5.092925
4fcbda7f-e200-40c4-9e0f-b04a03833894
mcbapo/mpsdyn
src/wrapper/multipliers/BasicMultiplier.cpp
#include "BasicMultiplier.h" BasicMultiplier::BasicMultiplier(const mwArray& A_):A(A_){}; void BasicMultiplier::product(const mwArray& vector,mwArray& result){ result=A*vector; }
ALGO
0.964158
3.768566
7c6bebc0-d9c4-4f6a-a8c4-9f2bb7c70e01
rishabh2907/codsoft
calculator.cpp
#include <iostream> using namespace std; float add(float x, float y) {return x+y;} float sub(float x, float y) {return x-y;} float mul(float x, float y) {return x*y;} float divi(float x, float y) {return x/y;} int main(){ cout<<"enter eqution for calculation"; int n1,n2; char op; cin>>n1>>op>>n...
ALGO
0.996712
3.224091
0dcb7464-3824-4667-aabe-843233e9666c
BeyondCC/LeetCode
SortColors.cpp
/* * Source: https://oj.leetcode.com/problems/sort-colors/ * Description: * Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integers 0, 1, and 2 to represent the color red, wh...
ALGO
0.999776
5.2943
6830fa3a-2ae5-4c69-b48d-dfff9c733a4a
diaaserag/URI-ONLINE-JUDGE-
1240 - Fit or Dont Fit I.cpp
// main.cpp // answer 1240 - Fit or Dont Fit I uri online judge // solved by diaa serag // Try hard before using other programmers' codes #include<iostream> using namespace std; int main() { long long count ,a,b; cin>>count; while(count--) { cin>>a>>b; if(b>a) cout<<"nao en...
ALGO
0.999569
4.929213
f9aad926-7f88-439f-a71b-6deeb5f04f9b
Henry-Hong/ALGORITHM-PRACTICE
[0] ALGO_PRAC/0302_기초1/1.1.2_sum.cpp
#include <iostream> #include <vector> using namespace std; int sum(int n, vector<int>& S){ int result = 0; for(int i=1; i<=n; i++){ result += S[i]; } return result; } int main(){ int n,x,location; cin >> n; vector<int> S(n+1); for(int i=1; i<=n ;i++){ cin >> S[i]; ...
ALGO
0.99967
3.725021
bcc4ede8-6123-451a-89f5-dd2dcb5d7798
nikhilhassija/CompetitiveProgramming
CodeChef/LTIME34/ABABAABA_1.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { string S; cin>>S; if(S.size() == 2 && S[0] == S[1]) cout<<S[0]<<endl; else if(S.size() == 3) { int x = 0; for(int i=0;i<3;i++) if(S[i] == 'A') x++; if(x == 1) printf("B\n"); else if(x ==...
ALGO
0.999956
3.964175
3acefe79-5c71-4549-ab5c-9d3c2fb67405
Vipul1407/DSA--Leetcode-Ques..
1093-recover-a-tree-from-preorder-traversal/recover-a-tree-from-preorder-traversal.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.999749
5.237308
78d635b6-624a-4fbe-b6c7-7310a8da3d90
koosaga/olympiad
ICPC/NAIPC/nac23_a.cpp
#include <bits/stdc++.h> using namespace std; using lint = long long; using pi = array<int, 2>; #define sz(v) ((int)(v).size()) #define all(v) (v).begin(), (v).end() #define fi first #define se second using ll = long long; using pll = pair<ll, ll>; int n, d; int main() { int TC; scanf("%d", &TC); while (TC--) { l...
ALGO
0.999875
4.393996
9ce81173-5ddb-4456-ae21-de0e0a7c8cae
biepin7/Acwing
763. 循环相克令.cpp
#include<iostream> #include<string> #include<algorithm> #include<math.h> using namespace std; bool isPlayer1(string a, string b) { if(a == "Hunter" && b == "Gun") return true; if(a == "Gun" && b == "Bear") return true; if(a == "Bear" && b == "Hunter") return true; return false; } int main() { in...
ALGO
0.999679
3.999758
dc430fd3-63c3-4167-a665-60965452ed9f
ZeroGxMax/LapTrinhNangCao
Tuần 3/Bai_10.cpp
#include <vector> #include <iostream> #include <stdio.h> #include <algorithm> #include <functional> #include <iomanip> #include <cstring> using namespace std; int alphabet = 0, num = 0, special = 0; bool CheckUserName(string s); void charCounter(string s, int &alphabet, int &num, int &special); int main() { st...
TOOL
0.875006
4.60588
da9fea8a-10bd-48c6-91c6-17582282f644
pramodkumarjuit/cpp_programs
tree/print_binary_tree_column_wise.cpp
/* * Problem Statement: print a binary tree column-wisae * * 1 * / \ * 2 3 * / \ / \ * 4 5 6 7 * * Output: 4 2 1 5 6 3 7 * * * Approach: * 1. Nodes are grouped into columns based on their horizontal distance from the root. * 2. Horizontal Distance (HD): * - Root nod...
ALGO
0.999987
6.496903
5fb5470f-5415-45b3-808c-c122c28f63ed
yigitacarli/ktun-library
Algorithm and C Programming/First Semester Homeworks/Homework-1/1.2.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> // Algoritma Ödevi 1-2 int main() { int i, sayi, cifttoplam=0, ciftsayisi=0; double ciftortalama; printf("Herhangi bir sayi giriniz: "); scanf("%d",&sayi); for(i=0; i<=s...
ALGO
0.998805
3.771092
27bcce54-577b-4357-8d2c-6db20afb2fff
Oziach/Code-Challenges-And-Practice
LeetCode/longestRepeatingCharacterReplacement.cpp
class Solution { public: int characterReplacement(string s, int k) { int longest = 0; for(char ch = 'A'; ch <= 'Z'; ch++){ int st = 0; int e = 0; int kDupe = k; while(e < s.length()){ if(s[e] != ch){ ...
ALGO
0.999801
6.18475
44d9300a-fd2f-4e07-9425-8917ca03798e
Rserendipity/win_code_vs2022
C/leetcode/1805. 字符串中不同整数的数目/main.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include <bits/stdc++.h> using namespace std; class Solution { public: int numDifferentIntegers(string word) { string tmp; for (char ch : word) { if (isdigit(ch)) { tmp += ch; } else ...
ALGO
0.999475
5.271031
7a29f69e-55b4-4c18-bdd9-d6809b19f6eb
Sinking-Stone/LearningNotes
Algorithm of Notes/ch05/PATB1019.cpp
// // Created by SinkingStone on 2021/8/31. // #include <iostream> #include <algorithm> using namespace std; bool cmp1(int a, int b) { return a > b; } bool cmp2(int a, int b) { return a < b; } int num1(int n) { int a[4]; a[0] = n / 1000; a[1] = n / 100 % 10; a[2] = n / 10 % 10; a[3] = n % 10; sort(a, a + 4, ...
ALGO
0.998858
3.731807
7df59306-db74-483a-9bbf-280465a89e1f
sayed-amin/practice
Code chef/heap/ipctrain.cpp
// practice heap certificate topic 1 "multiset" #include <bits/stdc++.h> using namespace std; #define int long long struct trainers { /* data */ int arrival_day, lectures, sadness; }; void solve() { int total_tranier, total_day; cin >> total_tranier >> total_day; vector<trainers> person(total_trani...
ALGO
0.999908
4.70619
69420fdf-b51a-4574-8682-b0b91897b2ff
Tell1/ml-impl
com.github.tellmp.ml-algorithms/hmm_python/pyhsmm-master/deps/Eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); Eigen::VectorXf v(2); mat << 1, 2, 6, 9, 3, 1, 7, 2; v << 0, 1; //add v to each column of m mat.colwise() += v; std::cout << "Broadcasting result: " << std::endl;...
ALGO
0.999194
4.136906
0e97558f-7418-4852-8b23-172974b00083
rherdez/ejercicios_C
18_seccion/app8.cpp
#include <iostream> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int factor(int); int main(int argc, char** argv) { int n; cout<<"Ingrese un numero"<<endl; cin>>n; cout<<"El calculo del factorial es: "<<factor(n)<<endl; return 0; } int ...
ALGO
0.997449
3.442372
0fefeb09-c70c-4edd-83d7-9070ca0df5eb
ealvarado97/comunicacionProcesos
sistema_mensajes/listaprioridad.cpp
#include "listaprioridad.h" listaPrioridad::listaPrioridad() { } bool listaPrioridad::insertar(proceso *p){ unsigned int prioridad =p->getPrioridad(); nodo *aux=new nodo(); aux->dato=p; if(size_==0) primero=aux; else{ nodo *temp =primero; nodo *aux2=nullptr; wh...
ALGO
0.999674
3.488381
5d8e577e-fd28-481b-8b9e-7c1ee347ad4b
Lautharo/UTN-1K05-2025
Algoritmo y estructura de datos/Practica Parciales/Practica de parcial 13.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <conio.h> void mayorEnergia(float &p, float &q, float &a, float &b); float recaudacionTotal(float &a, float &b, float &p, float &q); main() { int codigo; float a,b,p=0,q=0,cantidad; printf("Ingrese el precio de kWh de la Estacion rapida (codigo 1): ...
ALGO
0.964562
3.099313
18e92954-9d0f-4d5a-bb4a-00aac50e1933
NilayBadjatya/Leetcode-July-Challenge-2025
Reschedule Meetings for Maximum Free Time II.cpp
class Solution { public: int maxFreeTime(int eventTime, vector<int>& startTime, vector<int>& endTime) { int n = startTime.size(); vector<vector<int>> nums; for(int i = 0; i < n; i++){ nums.push_back({startTime[i], endTime[i]}); } sort(nums.begin(), nums.end()); ...
ALGO
0.999805
5.630258
7700ae56-c399-41af-9e6d-25c9b997b073
gtoo8888/Cplusplustest
1-Algorithm_test/leetcode/3-每日一题/242-有效的字母异位词.cpp
#include<iostream> using namespace std; class Solution { public: bool isAnagram(string s, string t) { int nums[26] = {0}; int n1 = s.size(); int n2 = t.size(); // if(n1 == 0 || n2 == 0)//ĿҪstΪ0Բÿ߽ // return false; for (int i = 0;i < n1;i++) nums[s.at(i)-'a']++; // for (int i = 0;i < 26;i++) // ...
ALGO
0.99996
4.616436
0df698c8-e8f2-405e-931e-aea1b30d7d00
muhammad-sayem/Phitron
Phitron/Semester 2/1. Basic Data Structure/Module 10/6_reverse_singly_linked_list.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node* next; Node(int v){ val = v; next = NULL; } }; void print_recursively(Node* n){ if(n == NULL) return; // Base Case // cout << n->val << " "; print_recursivel...
ALGO
0.999699
4.904571
0e77af19-05af-4c03-a73c-0a35cc28bf01
arsh317/Data-stuctures-and-Algo
Arrays and math/Min jumps array.cpp
int Solution::jump(vector<int> &A) { /* Dp sol if(A.size()==1){ return 0; } int arr[A.size()]; for(int i=0; i<A.size(); i++){ arr[i]=0; } for(int i=1; i<A.size(); i++) { int min=INT_MAX; for(int j=0; j<i; j++) { if(A[j]>=i-j && arr[j]!=INT_MAX &...
ALGO
0.999928
5.51191
6e23f5e2-8586-450f-a86e-124d7081649e
hzhang-coding/CMU-15445-2021
src/storage/index/b_plus_tree.cpp
#include <string> #include "common/exception.h" #include "common/logger.h" #include "common/rid.h" #include "storage/index/b_plus_tree.h" #include "storage/page/header_page.h" namespace bustub { INDEX_TEMPLATE_ARGUMENTS BPLUSTREE_TYPE::BPlusTree(std::string name, BufferPoolManager *buffer_pool_manager, const KeyCompa...
ALGO
0.995931
6.842808
6fa4169e-1348-4ea0-b657-182d11310c18
himanshugupta09/LEETCODE_SOLUTIONS
Arrays_Problems/image-overlap.cpp
class Solution { public: int checkers(vector<int> &v1,vector<int> &v2,int x,int y) { array<int,4> l = {}; int n = v1.size(); for(int i=0;i<n-x;i++) { l[0] += __builtin_popcount((v1[i]>>y)&v2[i+x]); l[1] += __builtin_popcount(v1[i] & ...
ALGO
0.999778
5.86294
6c913ed7-7aff-4165-bba6-c91d69f16ec9
metamorph-inc/openmeta-mms
src/RectangleBinPack/GuillotineBinPack2.cpp
/** @file GuillotineBinPack.cpp @author Jukka Jylnki @brief Implements different bin packer algorithms that use the GUILLOTINE data structure. This work is released to Public Domain, do whatever you want with it. */ #include <utility> #include <iostream> #include <limits> #include <cassert> #include <cstring> #in...
ALGO
0.999544
7.019057
182f3ef6-6430-471a-8f38-415504badd8b
Yasiraalam/Practice-Problems
DSA(youtube + 450)/Recursion topic/isArray_Sorted.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; bool isSorted(int arr[],int size) { //base case if(size==0 || size==1) return true; if(arr[0] > arr[1]) return false; else{ bool ans= isSorted(arr+1, size-1); return ans; } } int main() { int arr[6]={1...
ALGO
0.999193
4.577521
b384964b-df88-41cc-abce-5dc5d4ce4656
KSG072/baekjoon
1008.cpp
#include <iostream> #include <iomanip> using namespace std; int main(){ long double a,b,ans; cout<<setprecision(28); cin>>a>>b; ans = a/b; cout<<ans<<endl; return 0; }
ALGO
0.9967
3.263023
d07feaf9-bbad-409b-9f88-e125f8360f1d
platoTao/HDUOJ
second/2005.cpp
#include<iostream> #include<string> #include<sstream> using namespace std; bool is_leap_year(int year) { if(year%4!=0) return false; else if(year%100!=0) return true; else if(year%400!=0) return false; else if(year%3200!=0) return true; else return false; } ...
ALGO
0.999493
3.609357
47c963ff-b626-4868-801d-e6f12dea9424
ltnscp9028/dimigoAlgorithm
5. 스택/5-8. 쇠막대기.cpp
#include<bits/stdc++.h> using namespace std; stack<char>s; string arr; int i,res; main(){ for(cin>>arr;i<arr.size();i++){ if(arr[i]=='(')s.push('('); else{ s.pop(); if(arr[i-1]=='(')res+=s.size(); else res++; } } cout<<res; }
ALGO
0.995161
3.726927
dcda86c2-fa05-4c58-b47d-e25ea57a7158
tokoharu/onlineJudge
POJ/POJ2883.cpp
#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<vector> #include<string> #include<set> #include<stack> #include<queue> #include<cstdlib> #include<cstring> using namespace std; typedef pair<int,int> PII; #define MP make_pair const int NUM = 511; int parent[NUM]; int getParent(int n) { ...
ALGO
0.999972
4.450933
b70d24c1-3c62-4d9f-b3d5-57e21d0eae64
edge555/Online-Judge-Solves
LeetCode/2838. Maximum Coins Heroes Can Collect.cpp
class Solution { public: vector<long long> maximumCoins(vector<int>& heroes, vector<int>& monsters, vector<int>& coins) { vector<pair<long long,long long>>vec; for(int i=0;i<coins.size();i++){ vec.push_back({monsters[i],coins[i]}); } sort(vec.begin(),vec.end()); v...
ALGO
0.999945
4.634212
08b88435-445d-4842-9b0e-793439f997ec
PS-study-12th/ProblemSolving
16주차/red-sprout/PRG_양과늑대.cpp
#include <string> #include <vector> using namespace std; int n, ans; vector<int> _info; vector<vector<int>> _edges; bool v[17]; void dfs(int sheep, int wolf) { if(sheep > wolf) { ans = max(ans, sheep); } else { return; } for(vector<int> e : _edges) { if(v[e[0]] && !v[e[1]...
ALGO
0.999789
4.944418
f6e35a36-f41a-477a-9655-e16adfa55483
ishandutta2007/codeforces
nishant403/normal/1009/E.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define S second #define F first #define f(i,n) for(int i=0;i<n;i++) #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define vi vector<int> #define pii pair<int,int> const int M = 998244353; const int N = 1e6+...
ALGO
0.99998
4.231991
96b0db12-4242-46fd-84ce-9ca5b1ecbc31
Mr-Python-in-China/LuoguProblem
Luogu_P_1874.cpp
#include <bits/extc++.h> using namespace std; namespace pbds = __gnu_pbds; using ui = unsigned int; using uli = unsigned long long int; using li = long long int; int main(void) { ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); string s; ui n; cin >> s >> n; vector<vector<ui>> c(s.size(), ...
ALGO
0.999968
4.41897
54e2aaaa-1f9a-4a79-8a78-b358975e2366
Ansh718/LeetCode
2024/April 24/23-04-24.cpp
class Solution { public: vector<int> findMinHeightTrees(int n, vector<vector<int>> &edges) { if (n == 1) { return {0}; } vector<unordered_set<int>> adj_list(n); for (const auto &edge : edges) { adj_list[edge[0]].insert(edge[1]); ...
ALGO
0.999995
6.273447
3c4eaad1-6a51-428b-8fbe-be24b420abfb
anishbhujbal7/leetcode
219.cpp
class Solution { public: bool containsNearbyDuplicate(vector<int>& nums, int k) { unordered_set<int> window; for (int i = 0; i < nums.size(); ++i) { if (window.find(nums[i]) != window.end()) { return true; // duplicate found in window } wi...
ALGO
0.99991
6.798757
b446cfc6-86e4-4a1e-a3a2-31e72ce2ecb6
STRUKTUR-DATA-SE-07-02/Modul-10-11-Tree-
2211104051_Ade Fatkhul Anam/UNGUIDED/M13.cpp
#include <iostream> using namespace std; struct Pohon { char data; Pohon *left, *right, *parent; }; // Root pohon Pohon *root = NULL, *baru; // Fungsi untuk menginisialisasi pohon void init() { root = NULL; } // Fungsi untuk memeriksa apakah pohon kosong bool isEmpty() { return root == NULL; } // F...
ALGO
0.998317
6.592699
d1f6e8b3-28bd-49d6-a4c3-33f82caf10d9
xq25478/Master_Job
PyTorch框架/pytorch-master/torch/csrc/jit/tensorexpr/bounds_inference.cpp
#include <torch/csrc/jit/tensorexpr/bounds_inference.h> #include <torch/csrc/jit/tensorexpr/bounds_overlap.h> #include <torch/csrc/jit/tensorexpr/expr.h> #include <torch/csrc/jit/tensorexpr/ir.h> #include <torch/csrc/jit/tensorexpr/ir_printer.h> #include <torch/csrc/jit/tensorexpr/ir_simplifier.h> #include <torch/csrc...
ALGO
0.956112
5.004675
c39054f8-618a-49af-b7a9-a786d4d13c9f
harungunaydin/Competitive-Programming-Solutions
COCI/coci 2011/coci 2011 - 7/(+)Secer_2.cpp
#include <iostream> #define FOR(i,a,b) for(i=a; i<=b; i++) #define FOR2(i,n) FOR(i,0,n-1) #define MAXN 5000 using namespace std; int DP[MAXN+10]; int solve() { int N,i; scanf("%d",&N); DP[0] = 1; FOR(i,0,N) if(DP[i] && (DP[i] + 1 < DP[i+3] || !DP[i+3])) DP[i+3] = DP[i] + 1; FOR(i,0,N) if(DP[i] && (DP[i] + 1...
ALGO
0.999956
3.86181
fed861df-a2b6-4488-bc97-aa284954007c
Henry-Hiles/brook
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.998799
6.776823
bfd84f2b-8203-4f6a-a7ef-ee28edf9727f
cyseria/Algorithm
源码/1-2.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int dotPos; int pos; //求最大公约数 long long GCD(long long a, long long b) { return b == 0 ? a : GCD(b, a%b); } //字符c在str的位置 int getPos(char str[], char c) { for (int i = 0; i < strlen(str) - 1; i++) { if (str[i] == c) return i; } retu...
ALGO
0.999502
3.138776
b9f6ccb8-341d-4364-b6ca-28783c35fef6
RyanMan56/ProjectEulerCpp
src/problem2.cpp
#include "problem2.h" #include "vector_util.h" #include <iostream> #include <vector> #include <numeric> std::vector<int> generateFibonacciUpToMax(int max) { int previous{1}; int current{2}; std::vector<int> v{previous, current}; while (previous + current <= max) { int newValue{previous + ...
ALGO
0.997647
5.757459
fe87b8d8-3483-4850-bc4e-82b2b814c0ce
KatsuyaKikuchi/ProgrammingContest
Codeforces/ProblemSet/1360/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i)) #define REP(i, n) FOR(i,n,0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll) 1e15; ll solve() { ll N, K; cin >> N >> K; ...
ALGO
0.999952
4.620235
0c4cc99d-5b18-44f1-b3d2-3b03559f421c
abhishekkarki/Aoc
practice-problems/arrays/maximum-product-subarray.cpp
#include <iostream> #include <vector> #include <limits.h> using namespace std; int maxProduct(vector<int>& list) { int pre = 0, suf = 0; int n = list.size(); int result = INT_MIN; for (int i = 0; i < n; ++i) { if (pre == 0) pre = 1; if (suf == 0) suf = 1; pre = pre * list...
ALGO
0.999856
5.413672
2d22fa73-67ef-4b80-bc42-28ec6af738cd
AI-4-SE/workload_coverage_companion
misc/code/z3/src/shell/smtlib_frontend.cpp
#include<iostream> #include<time.h> #include<signal.h> #include "util/timeout.h" #include "util/mutex.h" #include "parsers/smt2/smt2parser.h" #include "muz/fp/dl_cmds.h" #include "cmd_context/extra_cmds/dbg_cmds.h" #include "opt/opt_cmds.h" #include "cmd_context/extra_cmds/polynomial_cmds.h" #include "cmd_context/extra...
TOOL
0.876963
5.501991
6793adf1-e1a6-48eb-935e-91e7a45c6fac
imhussain31/Cplusplus-Solved-Problems
Beautiful_matrix.cpp
#include<bits/stdc++.h> #include<math.h> using namespace std; int main () { int i , j , A[5][5] , x , y , ans; for (i=0; i<=4; i++) { for(j=0; j<=4; j++) { cin >> A[i][j]; } } for (i=0; i<=4; i++) { for(j=0; j<=4; j++) { if (A[i][...
ALGO
0.999926
3.494724
f9ddd4b6-2c06-4bd8-87ec-08e6d9b1c00e
Johnny088/CPlusPlusStudies
ConsoleApplication1/HomeworkMatrix.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { srand(time(NULL)); cout << "homework1: \n"; const int row = 3; const int col = 4; int count = 0; int array[row][col] = {}; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { array[i][j] = rand() % 10; cout << array[...
ALGO
0.993408
3.236751
227ef07e-9995-44b2-b779-32cd07ccdb64
saamiyaahsan/LeetCode
0508-most-frequent-subtree-sum/0508-most-frequent-subtree-sum.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.999997
5.981096
00ce8a61-d35a-4786-8015-2fcc38d53e9b
rwightman/boost
libs/program_options/src/split.cpp
#define BOOST_PROGRAM_OPTIONS_SOURCE #include <boost/program_options/parsers.hpp> #include <boost/tokenizer.hpp> #include <string> #include <vector> namespace boost { namespace program_options { namespace detail { template< class charT > std::vector<std::basic_string<charT> > split_unix( const st...
TOOL
0.944557
6.747805
981fd277-6bcf-4953-8312-0451b2e5d64a
luckzhangfengbo/mynode
Hzoj_Code/542-奶酪.cpp
/************************************************************************* > File Name: 542-奶酪.cpp > Author:fangsong > Mail: > Created Time: 2020年03月25日 星期三 19时41分36秒 ************************************************************************/ #include<iostream> #include<cstdio> #include<cmath> #include<cstring> #i...
ALGO
0.999918
3.549797
03c9ff6d-5a8e-4911-a8fb-9d8cd059d029
ifradK/Competitive-Programming-Solutions
C++ Programs/Restore the Permutation by Merger.cpp
#include<iostream> #include <bits/stdc++.h> #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define endl '\n' using namespace std; int main() { fastio; long long t,n,i,val; cin>>t; while(t--) { cin>>n; long long a[n+1]; memset(a,0,sizeof(a)); ...
ALGO
0.999611
3.495729
c6d23dd8-f970-4109-b97f-30ef687ad43c
iamtejasrg/LeetCodeChallenge
LinkedListCycle/main.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool hasCycle(ListNode *head) { ListNode *slow = head, *fast = head; while(fast != NULL && fast->next != NU...
ALGO
0.999768
5.286674
3e959494-3e82-43ce-b6d8-f49a22439d02
hidekiriyuga/leet-luffy
Search in a Rotated Array - GFG/search-in-a-rotated-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: int search(int A[], int l, int h, int target){ // l: The starting index // h: The ending index, you have to search the key in this range //complete the function he...
ALGO
0.999875
5.901348
9ad53f12-0f9f-45a7-bce1-1042a4b5888e
amacalito/leetcode
algorithms/cpp/wordSearch/wordSearch.cpp
// Source : https://oj.leetcode.com/problems/word-search/ // Author : Hao Chen // Date : 2014-07-19 /********************************************************************************** * * Given a 2D board and a word, find if the word exists in the grid. * * The word can be constructed from letters of sequenti...
ALGO
0.99945
5.473686
77408a9e-3853-4d70-92bf-a93cf4ce2706
21111019Harry/CPP-Problems
Problems on array/37.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; void zerocount(int brr[], int length); int main() { int size = 0; int *arr = NULL; cout<< "Enter the size:-"; cin>> size; arr = new int[size]; for(int i = 0; i < size; i++) { cin>>arr[i]; } cout<<endl; ...
ALGO
0.997555
3.778432
ee751956-9e12-44b1-b3d4-edcb0a4645fc
vickykumar123/Data-Structure-And-Algorthim
heap/Check_Completeness_of_a_BinaryTree.cpp
/* Given the root of a binary tree, determine if it is a complete binary tree. In a complete binary tree, every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at the last level h. */ #include <bits/stdc++....
ALGO
0.999017
5.955656
13573bd1-12c9-4deb-9799-a0d2c9e0bda9
sspeedy99/APS-2020
Graph/Sack/Treediff.cpp
#include <bits/stdc++.h> using namespace std; multiset<int> *s[50005],*d[50005]; vector< vector<int> > g(50005); int color[50005]; int size_tree[50005]; int n,m,ans[500005]; int dfs(int u,int par) { int mx=-1,mv=-1,v; for(int i=0;i<g[u].size();i++) { v= g[u][i]; if(v==par) conti...
ALGO
0.999908
3.712094
701610bf-b5bd-4ab7-a68a-fc41c353f4e8
Djokovic0311/LeetCode
problems/minimum_genetic_mutation/solution.cpp
class Solution { public: int minMutation(string start, string end, vector<string>& bank) { vector<char> mut = {'A','C','G','T'}; unordered_set<string> dict(bank.begin(),bank.end()); if(dict.find(end)==dict.end()) return -1; int ans = 0; queue<string> q; q...
ALGO
0.999698
5.549092
c64d003d-bc95-44bd-979a-7642e50b6b77
alamin5G/CSC-284-Lab
CSC-283/9AsscendingSort.cpp
/** * @file 9AsscendingSort.cpp * @author Md. Alamin (<EMAIL>) * I would love be a software engineer at Google. That is why anybody can uses this code without any condition, if you face any difficulty, then try to email me. * @version 0.1 * @date 2022-05-18 * * @copyright Copyright (c) 2022 * */ #include <bit...
ALGO
0.999768
4.426053
1837df70-86a3-461f-8a2c-c29119030727
Jpvsilva/SimpleSnakeGame
SimpleSnakeGame/SimpleSnakeGame/SimpleSnakeGame.cpp
// SimpleSnakeGame.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "Header.h" using namespace std; void placeFruit() { fruitX = rand() % width; fruitY = rand() % height; } void setupGame() { gameOver = false; dir = STOP; x = width / 2; y = he...
TOOL
0.942929
5.516905
7f78eeb0-06e1-4051-b99e-38ad2c954e63
hkwuks/LeetCode
C++/0023.merge-k-sorted-lists.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* mergeKLists...
ALGO
0.9998
5.773022
a0e8e4d9-f130-40e3-892d-bff1d6293429
HasanYahya101/PF_Lab_Solutions
Lab_10/q8.cpp
#include <iostream> using namespace std; int countCharacters(char arr[]) { int count = 0; for (int i = 0; arr[i] != '\0'; i++) { count++; } return count; } int main() { char input[100]; cout << "Enter a string: "; cin.getline(input, 100); int numChars = countCharacters(inpu...
ALGO
0.991702
5.059946
a62c06d1-1b66-4f1f-a847-5d239f86d6f7
lorenzo-ferrari/olinfo
src/ois_ciclismo.cpp
#include <bits/stdc++.h> #define MAXN 10000 #define INF 1000000000 using namespace std; ifstream in ("input.txt"); ofstream out ("output.txt"); int N, M, u, v, cur, prec; vector <int> graph[MAXN]; int H[MAXN]; bool vis[MAXN]; int main() { in >> N >> M; for(int i = 0; i < N; i++) in >> H[i]; ...
ALGO
0.999974
3.974998
aa84a419-bba3-41c9-8e54-fb6fffd45d26
manikantagangam/DSA-practices
Leetcode-Practices/707. Design Linked List.cpp
class MyLinkedList { public: struct Node { int val; Node *next; Node(int x) { val = x; next = NULL; } }; int get(int index) { if (index < 0 || index >= len) return -1; Node *cur = dummy.next; for (in...
ALGO
0.999861
5.289182
47c9e1c2-40ef-4403-8288-97d6c43eb279
NecroSynder/myProgram
yr.2_sem2/Sort/RunningTImeAnalysis.cpp
#include <iostream> #include <chrono> #include <vector> #include <cstdlib> #include <ctime> #include "matplotlibcpp.h" namespace plt = matplotlibcpp; void bubbleSort(int arr[], int size) { bool swapped = true; int j = 0; while (swapped) { swapped = false; j++; for (int i = 0; i < s...
ALGO
0.997651
6.396372
590ddee0-1f10-47e8-ad50-744875510459
AC2-K/Solutions
Main/ABC286/B.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; string s; cin>>n>>s; string t; int pos=0; //iのこと while(pos<n){ if(s.substr(pos,2)=="na"){ t+="nya"; pos+=2; }else{ t+=s[pos]; pos+=1; } } cout<<t<<'\n'...
ALGO
0.999194
3.585126
8f954582-bdce-43f4-b139-fd1a5c0bcc1f
hanswinderix/ami-toolchain
mlir/lib/Dialect/Vector/Transforms/VectorDropLeadUnitDim.cpp
#include "mlir/Dialect/Utils/StructuredOpsUtils.h" #include "mlir/Dialect/Vector/IR/VectorOps.h" #include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h" #include "mlir/Dialect/Vector/Utils/VectorUtils.h" #include "mlir/IR/Builders.h" #include "mlir/IR/ImplicitLocOpBuilder.h" #include "mlir/IR/TypeUtilities.h"...
TOOL
0.951502
7.921481
d92a1481-5dc7-4ec9-9990-318a87ab4463
kim2001sh/codetree
241227/문자열 놀이/play-with-string.cpp
#include <iostream> #include <string> using namespace std; int main() { // 여기에 코드를 작성해주세요. string str; int q; cin >> str >> q; int select, ai, bi; char ac, bc, tmp; for (int i = 0; i < q; i++) { cin >> select; if (select == 1) { cin >> ai >> bi; tmp ...
ALGO
0.999872
4.885148
f5c3a4ba-a113-435a-9d91-25023c0e9340
israkul9/Uva-Problems-
Codes/p10041.cpp
//Bismillah_hir_rahmanir_rahim #include<bits/stdc++.h> using namespace std; vector<int>vec; int main() { int test; cin>>test; while(test--) { int house; cin>>house; int arr[house]; for(int i=0; i<house; ++i) { cin>>arr[i]; } sort...
ALGO
0.999848
4.115885
b6230161-51a6-4f85-a30c-444d70875f44
guojia60180/data-structure
C++/线性表/线性表/线性表.cpp
/*˳ṹĴ洢ṹ*/ #define MAXSIZE 20 typedef int ElemType; typedef struct { ElemType data[MAXSIZE]; int length; }SqList; /*˳洢ṹIJɾ*/ /*Ԫز*/ #define OK 1 #define ERROR 0 #define TRUE 1 #define FALSE 0 typedef int Status; /*Status ǺֵͣǺ״̬*/ Status GetElem(SqList L, int i, ElemType *e) { if (L.length == 0 || i<1 || i>L.lengt...
ALGO
0.994315
3.018642
893a1cb4-d6d5-46bc-8cf5-c57bc62428d7
WitAqua/system_extras
simpleperf/BranchListFile.cpp
#include "BranchListFile.h" #include "ETMDecoder.h" #include "ZstdUtil.h" #include "system/extras/simpleperf/branch_list.pb.h" namespace simpleperf { static constexpr const char* ETM_BRANCH_LIST_PROTO_MAGIC = "simpleperf:EtmBranchList"; std::string ETMBranchToProtoString(const std::vector<bool>& branch) { size_t ...
TOOL
0.880294
7.605518
a69a014b-6575-4d67-903c-282be835eeae
ngocquys/DSA-PTIT
DSA08015.cpp
#include<bits/stdc++.h> using namespace std; #define foru(i,a,b) for(int i=a;i<=b;++i) #define ford(i,b,a) for(int i=b;i>=a;--i) #define ii pair<int,int> #define ll long long #define fi first #define se second #define fill(a,b) memset(a,b,sizeof(a)) const int N=35; struct point{ int x,y,z; }; int t,n1,n2,n3; cha...
ALGO
0.999915
3.446376
bdf0a0cb-8ec0-4a04-97b3-5a1cfe8f911f
pamd/foo
faq/sort/qsort/career_cup5.cpp
// Qsort in Career Cup 5th edition, // Chapter 10: Sorting and Searching. #include <iostream> using namespace std; // Partition: Using the element in the middle of input array as // the pivot, scan both sides of the array, swap elements, // then divide the input array into two parts: // elements in the 1st part <=...
ALGO
0.999995
5.587244
f25c5397-4064-4573-b943-e37f9f784207
shinjukunian/MecabCocoa
MecabCocoa/tagger.cpp
#include "viterbi.h" #include "common.h" #include "param.h" #include "mecab.h" #include "string_buffer.h" #include "writer.h" #include "connector.h" #include "nbest_generator.h" #include "stream_wrapper.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif const char *getGlobalError(); void setGlobalError(const char *st...
TOOL
0.910852
6.129869
c7d7b910-4b04-470f-9025-b4760a760efc
Azeema2904/Azeema-repository
azeema lab task.cpp
#include<iostream> using namespace std; int main() { int n; long factorial=1.0; cout<<"enter a positive integer"<<endl; cin>>n; if(n<0) { cout<<"erroe!factorial of a negative number does not exist"<<endl; } else { for(int i=1; i<=n; i++) { factorial*=i; } cout<<"factorial of "<<n<<" = "<<factori...
ALGO
0.999842
3.43809
291592aa-e15f-4666-bc01-6cfc5963d43f
YunWGui/LeetCode-300
Binary Search/29 Divide Two Integers.cpp
// Given two integers dividend and divisor, divide two integers without using // multiplication, division and mod operator. // Return the quotient after dividing dividend by divisor. // The integer division should truncate toward zero. // Note: // // Both dividend and divisor will be 32-bit signed integers. // The div...
ALGO
0.999346
5.292122
b879db95-1aac-486c-b2e4-4d2efef771fd
zenustech/bullet3
src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp
#include "btConvexPointCloudShape.h" #include "BulletCollision/CollisionShapes/btCollisionMargin.h" #include "LinearMath/btQuaternion.h" void btConvexPointCloudShape::setLocalScaling(const btVector3& scaling) { m_localScaling = scaling; recalcLocalAabb(); } #ifndef __SPU__ btVector3 btConvexPointCloudShape::localG...
ALGO
0.951124
7.407167
4f82b5cc-339f-4ed8-9521-cd075728b7e1
Ashu8408/DSA_CPP
0326-power-of-three/0326-power-of-three.cpp
class Solution { public: bool isPowerOfThree(int n) { if(n==0){ return false; } while(n!=1){ if(n%3!=0){ return false; } else{ n=n/3; } } return true; } };
ALGO
0.999546
5.864866
b2bcf610-cf3f-488e-94f5-afd1ddd4e81c
a6cenna/osninfor
codeforces/1020/2106d.cpp
// author: sofwant || a6cenna #include <bits/stdc++.h> using namespace std; #define suffering_leaves_suffering_leaves ios::sync_with_stdio(false); cin.tie(nullptr); #define ll long long #define pll pair<ll, ll> #define pii pair<int, int> #define fs first #define sc second #define pb push_back void solve() { int ...
ALGO
0.999535
4.005596
6cc53277-8803-4f90-af9d-22e98f1c27fd
KrishnAgrawal1/Sorting-Algorithm-Visualization
sorting/src/Sorting_algo.cpp
#include "../header/game.hpp" void Game::selectionSort() { int numberOfElements = rect.size(); for (int i = 0; i < numberOfElements; i++) { this->rect[i].setFillColor(sf::Color::Red); for (int j = i + 1; j < numberOfElements; j++) { this->isPause(); if(this->isterminateSorting()) return; this->mtx....
ALGO
0.99935
4.589289
a04f82da-6e4b-4593-8143-37c99b6f8d57
gargsujal1/Leetcode-solutions
0div-idbig-omega-company-tagsdiv-idbig-omega-topbardiv-classcompanytagscontainer-styleoverflow-x-scroll-flex-wrap-nowrap-div-classcompanytagscontainer-tag-stylebackground-color-rgba0-10-32-005-divgoogle-divdiv-classcompanytagscontainer-tagoccurence1-div-div-divdiv-classcompanytagscontainer-chevrondivsvg-version11-idico...
class Solution { public: bool areSentencesSimilar(string s1, string s2) { deque<string> d1; deque<string> d2; string temp=""; for(char c:s1){ if(c==' '){ d1.push_back(temp); temp=""; } else{ temp+=c; ...
ALGO
0.999964
5.796953
7ebedd64-4c22-4230-9936-a516d2b67f16
heechan3006/CS
BOJ/boj_16959/boj_16959/소스.cpp
#include <iostream> #include <vector> #include <cstring> #include <queue> #include <algorithm> #define MAXN 10 using namespace std; int map[MAXN][MAXN]; int dist[3][MAXN][MAXN][MAXN*MAXN+1]; int N; int sx, sy; vector<pair<int,int> > dirs[3]; int horse_move[][2] = { {-2,-1},{-2,1},{1,2},{-1,2},{2,1},{2,-1},{1,-2},{-1,-...
ALGO
0.999634
3.477634
e1d76489-63fe-4fff-bcbf-d7c7e76a3fc4
mystic-games-team/Physics-II-Pinball
Pinball/Box2D/Box2D/Collision/Shapes/b2ChainShape.cpp
#include <Box2D/Collision/Shapes/b2ChainShape.h> #include <Box2D/Collision/Shapes/b2EdgeShape.h> #include <new> #include <string.h> b2ChainShape::~b2ChainShape() { Clear(); } void b2ChainShape::Clear() { b2Free(m_vertices); m_vertices = NULL; m_count = 0; } void b2ChainShape::CreateLoop(const b2Vec2* vertices, i...
ALGO
0.977707
6.764051
184167aa-ff73-4fce-bd47-180786d1465b
ishandutta2007/codeforces
ddytxdy/normal/1184/E1.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e5+50,M=1e6+50,inf=1e9; int n,m,X,Y,f[N],Z,ans; int find(int x){return x==f[x]?x:f[x]=find(f[x]);} void merge(int x,int y){ x=find(x),y=find(y); if(x!=y)f[x]=y; } struct node{ int x,y,z; bool friend operator <(node a,node b){return a.z<b.z;} }a[M]; int main(...
ALGO
0.999926
3.880318
1d45c435-f4e3-4bf4-a897-3fcc65c76e86
srv-code/College-Lab-Exercises
MCA/Sem 1/OOPD/src/Week6/complex.cpp
// Author name: Sourav Dey // Date of creation: 24-SEPT-2018 // Week number: 6 // Program name: Add and subtract two Complex Number objects by overloading + and - operators #include <iostream> using namespace std; class Complex { int real, img; public: Complex(const int r, const int i) { ...
ALGO
0.896718
5.613782
72c3f535-ce6f-496d-9f71-ccd54001bc96
trilinos/Trilinos
packages/compadre/examples/GMLS_Staggered.cpp
#include <Compadre_Config.h> #include <Compadre_GMLS.hpp> #include <Compadre_Evaluator.hpp> #include <Compadre_PointCloudSearch.hpp> #include "GMLS_Tutorial.hpp" #include "CommandLineProcessor.hpp" #ifdef COMPADRE_USE_MPI #include <mpi.h> #endif #include <Kokkos_Timer.hpp> #include <Kokkos_Core.hpp> using namespace...
ALGO
0.980565
3.262519
025c88b8-f12d-43a8-9695-5f177248e5e6
alexandraback/datacollection
solutions_5639104758808576_0/C++/dreamoon/pA.cpp
#include <bits/stdc++.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define RI(X) scanf("%d", &(X)) #define RII(X, Y) scanf("%d%d", &(X), &(Y)) #define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y...
ALGO
0.999768
3.372638