uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e21811b9-cc52-4a48-94a2-1ce07741f060
ishandutta2007/codeforces
magicspark/normal/1320/C.cpp
/* Though leaves are many , the root is one. Through all the lying days of my youth I swayed my leaves and flowers in the sun. Now I may wither into the truth. - William Butler Yeats */ #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #pragma GCC targ...
ALGO
0.999932
3.768713
7a8d7658-2f07-41d3-8b2d-b0c5ee4e298a
H-Shen/MyCodeCollection
Leetcode/1684/1684.cpp
class Solution { public: int countConsistentStrings(string allowed, vector<string>& words) { constexpr int MAXN = 26; bitset<MAXN> vis; for (const auto &ch : allowed) { vis[ch - 'a'] = true; } return count_if(words.begin(), words.end(), [&](const string &s) { ...
ALGO
0.99992
6.064195
e94ea4cc-68fc-49d2-a6de-4dc6c688c614
mirza505/PF-PD-Tasks
PFLab5/treeheight.cpp
#include<iostream> #include<math.h> using namespace std; float treeHeight(float,float); main() { float distance, angle, result; cout<<"Enter the distance from the base of tree(in feet):"; cin>>distance; cout<<"Enter the angle of elevation:"; cin>>angle; angle = angle/57.2958; result = treeHeight(distance,angle);...
ALGO
0.99263
4.101302
0bbb2c33-1a0e-4ce7-8b16-a2958ddf05d8
VaishnaviRashankar/-CrackYourPlacement
0303-range-sum-query-immutable/0303-range-sum-query-immutable.cpp
class NumArray { public: NumArray(vector<int>& nums) : prefix(nums.size() + 1) { partial_sum(nums.begin(), nums.end(), prefix.begin() + 1); } int sumRange(int left, int right) { return prefix[right + 1] - prefix[left]; } private: vector<int> prefix; }; /** * Your NumArray object will be instantia...
ALGO
0.999695
6.745793
0894086b-8155-425b-8e4c-d7ebfc50456d
njrafi/Competitive-Programming-Solutions
CodeForces/1148D - Dirty Deeds Done Dirt Cheap - 54949879.cpp
#include <bits/stdc++.h> #ifndef ONLINE_JUDGE #define gc getchar #define pc putchar #else #define gc getchar_unlocked #define pc putchar_unlocked #endif using namespace std; #define vi vector<int> #define si set<int> #define vs vector<string> #define pii pair<int, int> #define vpi vector<pii> #define pri priority_queue...
ALGO
0.999946
3.129073
22ec4ab2-cb0e-454d-8ee3-bcfaaac6d79c
alirezaomidi/acm
uva/1600-patrol-robot/1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef pair<int, ii> iii; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<iii> viii; typedef vector<vii> vvii; typedef vector<vvi> vvvi; typedef set<int> si; typedef vector<si> vsi; t...
ALGO
0.99984
4.626396
417ddbdc-f32e-4c18-90a7-923c45710ab2
NeuroLexDiagnostics/Voice-Analysis-Pipeline
DigiPsych_API/Feature_Extract_API/opensmile-2.3.0/src/functionals/functionalMeans.cpp
/* openSMILE component: functionals: various means, arithmetic, geometric, quadratic, etc. also number of non-zero values, etc. */ #include <functionals/functionalMeans.hpp> #include <math.h> #define MODULE "cFunctionalMeans" #define FUNCT_AMEAN 0 #define FUNCT_ABSMEAN 1 #define FUNCT_QMEAN 2 #define FU...
TOOL
0.96216
5.997815
7489e0f2-8d32-4aaa-9eca-7f01130981e5
Stevengodtjt/C-plus-plus-basic-program-example
课本例题/chapter10 构造函数和析构函数/例10.1 用构造函数对对象初始化(9.3改写).cpp
#include<iostream> #include<cmath> using namespace std; class Tri { private: double a,b,c; public: Tri(double x,double y,double z) //A캯߽гʼ {a=x; b=y; c=z;} //βxyzֵʼ double Peri(void) {return a+b+c;} double Area(void) { double t=(a+b+c)/2; double s; s=sqrt(t*(t-a)...
ALGO
0.999041
3.741165
e634e864-4218-48a5-bcd0-fa02ddc2e89f
LtCoinCidenCe/LeetSolutions
q2306.cpp
#include <algorithm> #include <functional> #include <queue> #include <ranges> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; class Solution { public: long long distinctNames(vector<string> &ideas) { vector<vector<int>> intersection(26, ...
ALGO
0.999812
5.641288
f365fe61-74fc-4a86-8d11-dbb02967b694
adityanjr/code-DS-ALGO
Olympiad Solutions/URI/2403.cpp
// Ivan Carvalho // Solution to https://www.urionlinejudge.com.br/judge/problems/view/2403 #include <cstdio> #include <vector> #include <queue> using namespace std; #define MAXN 100100 int n,m,grau[MAXN]; vector<int> lista,grafo[MAXN]; priority_queue<int,vector<int>, greater<int> > fila; int main(){ scanf("%d %d",&n,&...
ALGO
0.999969
3.520803
1264facc-d076-450d-85ef-e35011b372c0
rbtre/rbtre.github.io
assets/code/P1638.cpp
#include <iostream> using namespace std; int p[1000001], c[2001]; int main() { int n, m, cnt = 0, MIN = 0x7fffffff; cin >> n >> m; for (int i = 1; i <= n; i++) cin >> p[i]; int a = 1, b = n; for (int i = 1, j = 0; i <= n;) { while (cnt < m and j < n) { j++; if (not c[p[j]]) cnt+...
ALGO
0.999998
4.025411
d036b6b9-5b72-469a-9e77-ae19c4c5ed7a
PixelBlaster-OS-11/packages_apps_Nfc
nci/jni/PeerToPeer.cpp
/* * Communicate with a peer using NFC-DEP, LLCP, SNEP. */ #include "PeerToPeer.h" #include <android-base/stringprintf.h> #include <base/logging.h> #include <nativehelper/ScopedLocalRef.h> #include "JavaClassConstants.h" #include "NfcJniUtil.h" #include "llcp_defs.h" #include "nfc_config.h" using android::base::S...
TOOL
0.870467
3.574316
a13c2da3-d408-400f-836f-bd4bc824118a
Manish-CS25/A2Z_DSA_Leetcode
2493-reverse-odd-levels-of-binary-tree/reverse-odd-levels-of-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999981
6.002293
ba687d10-d810-4582-8803-e7fdc09c75c7
lenis2000/homepage
eigen-3.4-rc1/bench/sparse_randomsetter.cpp
#define NOGMM #define NOMTL #define EIGEN_GOOGLEHASH_SUPPORT 1 #include <map> #include <ext/hash_map> #include <google/dense_hash_map> #include <google/sparse_hash_map> #ifndef SIZE #define SIZE 10000 #endif #ifndef DENSITY #define DENSITY 0.01 #endif #ifndef REPEAT #define REPEAT 1 #endif #include "BenchSparseUt...
TOOL
0.91999
4.525928
2fcc70b4-f922-4194-8c02-e1797ecf3e30
pdusan/pap2023
a2/project.cpp
#include <iostream> #include <vector> #include <CL/cl.hpp> #include <chrono> const int matrixSize = 4096; const int TILE_SIZE = 32; const int COLS_PER_THREAD = 8; const int WG_SIZE = 8; //==================================================================================================================================...
ALGO
0.999609
3.158709
1b5857c4-be6e-488d-947e-443e1a8247ea
akshitagit/CPP
Dynamic_Programming/FibonacciSeriesUsingDynamicProgramming.cpp
/* Dynamic Programming Technique used to reduce the total time complexity of the fibonacci function. Time taken = (number of calls) * (t) Number of Calls <= 2*n + 1 => Time Taken= (2*n + 1) * O(1) = O(2*n+1) => O(N) <<< O(2^N) which is the time taken using the recursion approach. */ #...
ALGO
0.999997
5.280697
74af7a3f-1814-4652-9b38-57c96ddff20b
michelle-E12/cpp
Ejercicios/Ejercicio11 - Operador-logico-And/operador-and.cpp
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int a = 5; int b = 10; int c = 7; // if (a > b && a > c){ // cout << "a es el mayor: " << a; // } else if (b > a && b > c){ // cout << "b es el mayor: " << b; // } else { // cout << "c es el...
ALGO
0.998903
3.638932
fa02679f-c418-4b0d-b48e-4bc931401127
veryloooong/cpp
leetcode/1593.cpp
#include <string> #include <unordered_set> using namespace std; class Solution { private: void backtrack(const string &s, unordered_set<string> &seen, size_t idx, size_t &ans) { if (idx == s.length()) { ans = max(ans, seen.size()); return; } for (size_t len = 1; idx + len <...
ALGO
0.999975
6.185947
ce4f6c50-4e4e-487c-b948-00c948bc6ab4
Muneeb19h/Data-Structure-Algorithm-in-C-
project/3.Stack.cpp
#include<iostream> using namespace std; class Stack{ public: const int lb=0; int size,item,top=(lb-1); int *S; Stack() { cout<<"Enter the size of the stack : "; cin>>size; S=new int[size]; choice(); } void display(){ if(top==(lb-1)) { cout<<"Stack is empty"<<endl; sy...
ALGO
0.929985
3.562621
52104d6c-bc38-4f87-a68e-ae16fe487eb1
Rafid13iit/ProblemSolvingPractise
SRBD_contestSetting.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll t; cin >> t; while (t--){ ll B, y; cin >> B >> y; ll problems = B/y; ll ceil_var = (problems+1)/2; ll floor_var = problems/2; while((pow(ceil_var, 2) + pow(floor_var...
ALGO
0.999831
3.730376
aa083463-412e-49ff-818c-13f6c6692b12
areeshaaamir/mini-programs
sum of 50 even numbers.cpp
//a C++ program that calculates and prints the sum of all even numbers between 1 and 50 using a for loop. #include <iostream> using namespace std; int main() { int i=2; int sum=0; for (int i=2; i<=50; i+=2) { sum += i; } cout << "SUM:" <<sum; return 0; }
ALGO
0.998974
3.635729
28930322-e997-483a-8fa2-16964a19ae21
ishandutta2007/codeforces
datastructures/normal/1103/B.cpp
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <set> #include <map> #include <queue> #include <cstring> #include <cmath> using namespace std; string s; int ask(int x,int y){ cout<<"? "<<x<<' '<<y<<endl; fflush(stdout); char ch; cin>>ch; if (ch=='x')return 1; return 0; } int ...
ALGO
0.999735
3.133779
39814fa4-1d5a-47b0-809d-35e2ed733180
Victor-Danilov/ASD_lab
Consegna1/MergeSort/lezione3-4-merge_sort-bench.cpp
#include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> using namespace std; /* Compilazione: g++ lezione3-4-merge_sort-bench.c Opzioni: max-dim: specifica la massima dimensione n del problema -d=<int>: Specifica quanti test lanciare, ciascuno con dime...
ALGO
0.997608
4.999322
ea5c9ac3-fb07-461f-8197-4a00d366d10d
kim-taewoo/TIL_PUBLIC
Algorithm/inflearn_cpp/myCode/dp_9_knapsack.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); // freopen("input.txt", "rt", stdin); int n, m, w, v; cin >> n >> m; vector<int> dy(m + 1, 0); for (int i = 0; i < n; i++) { cin >> w >> v; for (int j = w; j <= m; j++) ...
ALGO
0.999957
4.219685
e5c77bd0-737e-4bb9-ab90-72ced6db91b6
nikhil96970/DSA
pattern2.cpp
#include<iostream> using namespace std; int main(){ int i=1; int n; cin>>n; while(i<=n){ int j=1; while(j<=n){ cout<<i; j=j+1; } cout<<endl; i=i+1; } }
ALGO
0.999959
3.569826
5852a472-e668-4362-93e1-f5fcf26d520a
ishandutta2007/codeforces
darkkcyan/normal/597/B.cpp
#include <iostream> #include <utility> #include <algorithm> using namespace std; #define fff(i, a, b) for (i = a; i != b; ++i) #define ff(i, n) fff(i, 0, n) bool cmpPair(pair<int, int> a, pair<int, int> b) { return a.second < b.second; } #define MAX_N 500010 pair<int, int> arr[MAX_N]; // int tarr[MAX_N] = {0}; in...
ALGO
0.999988
4.437302
67be1879-bc7f-4da7-8f20-5c67e1d421e5
keorls209/Data_Strusture
Graph.cpp
#include "Graph.h" #include <queue> #include <unordered_map> #include <fstream> #include <string> #include <limits> #include <stack> #include <iterator> #include <list> #include <iostream> using namespace std; const int INF = numeric_limits<int>::max(); void Graph::addVertex(string newVertex) { if (checkVertexExist...
ALGO
0.990366
3.816151
5369b380-ca0a-44dc-8002-fe7a714b49f6
bodasadallah/problem-solving
codeforces/concert-tickets/main.cpp
#include <iostream> #include"bits/stdc++.h" using namespace std; int main() { int n,m;cin>>n>>m; multiset<int>s; vector<int>tickets(n), buyers(m); for(int i=0;i<n;++i){ int t;cin >>t; s.insert(t); } for(int i=0;i<m;++i) cin>>buyers[i]; //sort(tickets.begin(),ticket...
ALGO
0.999985
3.712604
f856f3cb-3e2f-427b-8dc9-81321595aa5d
zbomb/Hyperion-Engine
Hyperion Engine/Boost/libs/math/test/compile_test/tools_toms748_inc_test.cpp
#define T double #define Tol boost::math::tools::eps_tolerance<double> typedef T (*F)(T); template std::pair<T, T> boost::math::tools::toms748_solve<F, T, Tol >(F, const T&, const T&, const T&, const T&, Tol, boost::uintmax_t&); template std::pair<T, T> boost::math::tools::toms748_solve<F, T, Tol>(F f, const T& ax, c...
TOOL
0.999615
3.984633
73e33f34-4873-4b58-986f-722351694559
Kinter/TIL
Algorithm/BOJ/DP/1010번 다리 놓기.cpp
#include <iostream> using namespace std; unsigned long long dp[31][31]; int main() { int N; cin >> N; dp[1][1] = 1; dp[1][2] = 2; dp[2][2] = 1; for (int i = 3; i < 31; i++) dp[1][i] = i; for (int i = 3; i < 31; i++) { for (int j = 2; j < 31; j++) { dp[j][i] = dp[j - 1][i - 1] + dp[j][i - 1]; } } ...
ALGO
0.999939
3.863002
681536f4-2e43-4516-ba37-283a615b63cd
AYUSH-002/Competitive-Coding
A_Hall_of_Fame.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ONLINE_JUDGE #define DEBUG_CODE #ifdef DEBUG_CODE #define TRACE(msg, ...) printTrace(__LINE__, __FILE__, msg, __VA_ARGS__) #define PRINT_ARRAY(arr, len, type) myPrint<type>(arr, len) #else #define TRACE(msg, ...) #define PRINT_ARRAY(arr, len,...
ALGO
0.999879
4.610765
39fcf654-cfe9-487c-a102-916ac44dc159
saurabh3240/Competitve-Programming
codeforces/327A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> pii; #define forup(i,a,b) for(int i=a; i<b; ++i) #define fordn(i,a,b) for(int i=a; i>b; --i) #define rep(i,a) for(int i=0; i<a; ++i) #define dforup(i,a,b) for(i=a; i<b; ++i) #define dfordn(i,a,b) for(i=a; i>b; --i) #define ...
ALGO
0.999983
3.927995
219a4b61-2e15-4983-be47-1fca5f2aa9a3
viiku/competitive-programming-problems
codeforces/967B.cpp
#include<bits/stdc++.h> using namespace std; using ll=long long int; int main(){ int n,a,b;cin>>n>>a>>b; int ar[n]; ll sum=0,cnt=0; for(int i=0;i<n;i++){ cin>>ar[i]; sum+=ar[i]; } int ans=ar[0]; sort(ar+1,ar+n); for(int i=n-1;i>0;i--){ if(ans*b/sum >= a){ ...
ALGO
0.999534
3.456382
e1eee650-2c62-413c-a6a0-8e335fbfe8ff
princemahmood117/all-lab
sys-main/Computer/11-Cohen-Line-Clipping/main.cpp
#include <windows.h> #include <GL/glut.h> #include <iostream> using namespace std; // Clipping window boundaries const int X_MIN = 100, X_MAX = 400; const int Y_MIN = 100, Y_MAX = 400; // Region codes const int INSIDE = 0; // 0000 const int LEFT = 1; // 0001 const int RIGHT = 2; // 0010 const int BOTTOM = 4; // 01...
ALGO
0.999896
6.371241
7d90d7af-3183-4264-8c49-2d0b9d340e1a
etienne-p/ofxPolygonTriangulation
src/ofSplitToMonotone.cpp
#include "ofSplitToMonotone.h" #include "ofVertexSweepComparer.h" #include <glm/gtx/vector_angle.hpp> #include <stdexcept> ofSplitToMonotone::VertexType ofSplitToMonotone::classifyVertex(const ofDoublyConnectedEdgeList::Vertex & vertex) { const auto angle = glm::orientedAngle( glm::normalize(vertex.getIncidentEdge(...
ALGO
0.999306
6.762379
e3696dd0-b212-44f9-9f2c-75bc3fbb6c57
Muzahid037/Online-Judge-Problems
codechef problem/Lift Requests.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll t; cin>>t; while(t--) { ll n,q,f,d; cin>>n>>q; ll st=0,ans=0; for(ll i=0; i<q; i++) { cin>>f>>d; ans...
ALGO
0.999257
3.636874
245f7830-2561-4980-aaf9-70affca144e1
TUDSSL/intermittent-risc-v
llvm/llvm-9.0.1/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
#include "llvm/CodeGen/GlobalISel/RegBankSelect.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h" #include "llvm/CodeGen/GlobalISel/RegisterBank.h" #include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h" #include...
ALGO
0.963849
4.573975
fb6b6cf2-23d0-4cde-844d-d0e4e7db8754
DenizIsikli/LeetCode-CPP
Problemsets/Problems/SquaresofaSortedArray.cpp
#include <vector> #include <iostream> #include <algorithm> using namespace std; class Solution { public: vector<int> sortedSquares(vector<int>& nums) { for(int i=0;i<nums.size();i++)nums[i]=abs(nums[i])*abs(nums[i]); sort(nums.begin(),nums.end()); return nums; } };
ALGO
0.99978
5.476978
65dfb533-47ab-4b5e-98bf-44f3139c0b98
Shivapondurthi/Hire_ME
HireMe-backend/.env/Lib/site-packages/sklearn/utils/src/MurmurHash3.cpp
// Note - The x86 and x64 versions do _not_ produce the same results, as the // algorithms are optimized for their respective platforms. You can still // compile and run any of them on any platform, but your performance with the // non-native version will be less than optimal. #include "MurmurHash3.h" //-------------...
ALGO
0.998051
7.198757
03997f77-17ed-48cf-aaec-7476e8585f4d
mengchengguo/Data-cluster-platform
项目代码/project/pthread/book14.cpp
// 本程序演示线程同步-读写锁。 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <pthread.h> #include <signal.h> pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER; // 声明读写锁并初始化。 void *thmain(void *arg); // 线程主函数。 void handle(int sig); // 信号15的处理函数。 int main(int argc,char *argv[]...
TOOL
0.858414
4.875183
efcd3d32-cc47-4984-a4d8-38959839aba7
Nugroho-Dwi-Riyanto-20051397047/PRAKTIKUM-3-12
PRAKTIKUM-6/NO 2.cpp
#include<iostream> using namespace std; int i; int angka(int n ) { cout<<"MASUKKAN ANGKA :"; cin>>n; for (i=0; i<n; i++) { cout<<"Rekursi Dari 0 Ke N : "<<i; cout<<endl; } return n; } int main () { int n; int i; cout<<angka(i); }
ALGO
0.981742
3.594112
ba1dffeb-d9a5-4562-b090-8902556aed32
Alaxe/noi2-ranking
2017/solutions/E/OYM-Sofia/game.cpp
#include<iostream> using namespace std; int main(){ long long a,b,c[200],razlika=99999999999999999999999,index=0,sbor=0; cin>>a>>b; for(int i=0;i<200;i++){ cin>>c[i]; if(c[i]%2==0){ sbor+=c[i]; } if(c[i]>a){ if(c[i]-a<=razlika){ razlika=c[i]-a; index=i+1; ...
ALGO
0.999969
3.336506
8ee234b8-7889-49aa-ae1c-8e15c7d1e40e
dengsutao/AutowareAuto
src/perception/tracking/src/detected_object_associator.cpp
#include <tracking/detected_object_associator.hpp> #include <common/types.hpp> #include <geometry/common_2d.hpp> #include <helper_functions/mahalanobis_distance.hpp> #include <algorithm> #include <limits> #include <vector> namespace autoware { namespace perception { namespace tracking { using autoware_auto_percepti...
ALGO
0.984193
7.46394
15350b60-bc46-431d-953d-b8a21eb21698
lakshitcodes/DSA_Problems
LeetCode/3218_MinimumCostForCuttingCake.cpp
#include <bits/stdc++.h> using namespace std; // Question Link : https://leetcode.com/problems/minimum-cost-for-cutting-cake-i/ class Solution { public: int minimumCost(int m, int n, vector<int> &horizontalCuts, vector<int> &verticalCuts) { std::ios_base::sync_with_stdio(false); ...
ALGO
0.999963
5.489022
d488430d-123a-4cd6-bd4d-743b119ef2e9
Stefanny19/Flutter_Projects
quiz2_practice/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.998641
6.776823
b4ad1037-a814-4478-bd8a-52dafe179651
michaelleerilee/hstm
src/SpatialConstraint.cpp
#include "SpatialConstraint.h" #include "SpatialException.h" #include "Htmio.h" // =========================================================================== // // Member functions for class SpatialSign // // =========================================================================== /////////////CONSTRUCTOR////////...
TOOL
0.952681
6.874202
1a9a6e49-0762-4f03-97f2-f052ddf50a4e
AndreaBarletta/NMPDE-Exams
esame1/src/Parab.cpp
#include "Parab.hpp" void Parab::setup() { // Create the mesh. { std::cout << "Initializing the mesh" << std::endl; GridGenerator::subdivided_hyper_cube(mesh, N + 1, 0.0, 1.0, true); std::cout << " Number of elements = " << mesh.n_active_cells() << std::endl; // Write the mesh to fi...
ALGO
0.998914
6.894799
059641b8-3bb5-4b43-ad10-ae897ddfc7d8
vbhv17/DSA-Questions
Linked List/34. Segregate Even & Odd Nodes In a Linked List.cpp
Approach 1: (Coded by vbhv17) # The idea is to get pointer to the last node of list. # And then traverse the list starting from the head node and move the odd valued nodes from their current position to end of the list. // Algorithm: // …1) Get pointer to the last node. // …2) Move all the odd nodes to the end. // ……....
ALGO
0.999991
4.875563
11d5536a-0591-42e8-a7e7-02b9acfc5021
lucasxia01/Competitive-Programming-Problems
USACO/USACO Plat February 2017/USACO Plat February 2017/nocross.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <algorithm> #include <functional> #include <stdlib.h> #include <time.h> #include <complex> #include <iterator> #include <regex> #include <fstream> #include <utility> #include <vector> #include <string> #include <cstring> #include <stack>...
ALGO
0.99995
4.035716
41efa939-7090-49fa-9234-2043c74d0d5a
ishandutta2007/codeforces
ssrs_/normal/1675/F.cpp
#include <bits/stdc++.h> using namespace std; void dfs(vector<vector<int>> &c, vector<int> &in, int &t, int v = 0){ in[v] = t; t++; for (int w : c[v]){ dfs(c, in, t, w); } } struct heavy_light_decomposition{ vector<int> p, d, sz, in, next; heavy_light_decomposition(vector<int> &p, vector<vector<int>> &c...
ALGO
0.999934
4.202524
d120f2c4-8b97-405f-b585-d81b188b3db8
ishandutta2007/codeforces
mjhun/normal/157/C.cpp
#include <bits/stdc++.h> #ifdef DEMETRIO #define deb(...) fprintf(stderr,__VA_ARGS__) #define deb1(x) cerr << #x << " = " << x << endl #else #define deb(...) 0 #define deb1(x) 0 #endif #define pb push_back #define mp make_pair #define fst first #define snd second #define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i) #...
ALGO
0.999966
3.416221
a3637512-cd3e-4c27-a45c-2e997311da3e
Max2772/LB3
Task_2/2.cpp
#include <iostream> using namespace std; long int pow(long int num, long n){ long int res = 1; for(int i = 0; i < n; i++){ res *= num; } return res; } int readIntegerInLine() { int number; while (!(cin >> number) || (cin.peek() != '\n')) { cin.clear(); while (cin.g...
ALGO
0.999829
3.595963
9b3de6f4-09ac-4b46-956a-831c6e09a248
hlebec-tukallec/ITMO-University
Labs DM/3/7.cpp
#include <iostream> #include <string> #include <cmath> using namespace std; int n; void generate(string x) { if (x.size() == n) { for (int i = 0; i < n; i++) { cout << x[i] << " "; } cout << endl; } else { for (int i = 1; i <= n; i++) { if (x.find(to_stri...
ALGO
0.999564
5.075018
2ab0089c-c451-4721-bf91-6bd4bd0e4616
kumarsaurav123/Tess2
jni/com_googlecode_tesseract_android/src/tesseract-ocr/cube/feature_chebyshev.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string> #include <vector> #include <algorithm> #include "feature_base.h" #include "feature_chebyshev.h" #include "cube_utils.h" #include "const.h" #include "char_samp.h" #ifdef _WIN32 #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #endif name...
CONFIG
0.867519
6.428928
c9765f48-cd64-4760-aaa3-48ad49cf1a1d
DvDC13/GPGPU_IMAGE
cpu-sources/main.cpp
#include <algorithm> #include <filesystem> #include <fstream> #include <iostream> #include "featuresExtractionC.h" #include "featuresExtractionT.h" #include "image.h" #include "similarityMeasuresC.h" #include "similarityMeasuresT.h" #include "utility/choquet.h" shared_bit_vector getBitVector(shared_image image) { ...
TOOL
0.853788
4.852257
9425a21f-379e-4073-8e0b-c97a746c12e3
harshit-sat/open-test-12
modules/video/src/tracking/detail/tracking_online_mil.cpp
#include "../../precomp.hpp" #include "tracking_online_mil.hpp" namespace cv { namespace detail { inline namespace tracking { #define sign(s) ((s > 0) ? 1 : ((s < 0) ? -1 : 0)) template <class T> class SortableElementRev { public: T _val; int _ind; SortableElementRev() : _val(), _ind(0) { ...
ALGO
0.999829
6.173899
fb1a6330-9c69-4583-b268-45905f8e592f
Leapense/problems
22683번: Square Route/generate.cpp
#include "testlib.h" #include <bits/stdc++.h> using namespace std; static constexpr int MIN_N = 1; static constexpr int MAX_N = 1500; static constexpr int MIN_V = 1; static constexpr int MAX_V = 1000; struct SuiteCfg { int extraRandom = 6; int randNLo = 1, randNHi = 1500; int randMLo = 1, randMHi = 1000; ...
TEST
0.976442
4.717234
26cee55b-c1ee-4c70-b5a1-19881d1f9102
bredwrd/BilliardBuddy
BilliardBuddy/PointLocator.cpp
#include "PointLocator.h" PointLocator::PointLocator() { } PointLocator::~PointLocator() { } cv::vector<pocket> PointLocator::infer(cv::vector<cv::KeyPoint> orangeKeyPoints, cv::vector<cv::KeyPoint> greenKeyPoints, cv::vector<cv::KeyPoint> purpleKeyPoints, cv::vector<cv::KeyPoint> pinkKeyPoints) { //Defin...
ALGO
0.99231
4.59363
1659f401-aab7-4ef7-9b13-1a327f0048c5
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_valid_69_3.cpp
#include <bits/stdc++.h> using namespace std; const int mod = 1000000007; const long long INF = 9223372000000000000; const int inf = 2147483647; const long double PI = acos(-1); const int MAXN = 20005; void solve() { return; } int main() { ios::sync_with_stdio(false); cin.tie(NULL); int t = 1; cin >> t; vecto...
ALGO
0.999711
4.772768
4bc1233e-6bcb-4d14-b8be-d2f22e23f3c6
ankitsharm877/dsa
Love-Babbar-450-master/11_heap/18_min_sum_of_2_no_formed_from_digits_of_an_array.cpp
/* link: https://practice.geeksforgeeks.org/problems/minimum-sum4058/1 sol: https://www.geeksforgeeks.org/minimum-sum-two-numbers-formed-digits-array/ sol2: https://www.geeksforgeeks.org/minimum-sum-two-numbers-formed-digits-array-2/ what is c_str ? https://www.geeksforgeeks.org/basic_string-c_str...
ALGO
0.99998
5.975763
db3482d7-db6e-47c5-bccd-5e8e0e49e5e5
yosupo06/library-checker-problems
data_structure/point_set_range_composite_large_array/gen/near_0_and_N.cpp
#include "random.h" #include <iostream> #include "../params.h" using namespace std; int main(int, char* argv[]) { long long seed = atoll(argv[1]); auto gen = Random(seed); int n = N_MAX; int q = Q_MAX; printf("%d %d\n", n, q); auto idx = [&]() -> int { int t = gen.uniform<int>(0, 2); if (t == 0)...
TOOL
0.889199
3.70437
23bb6a65-94f5-409e-a7bd-e57acaa292e8
hjk9984/Algorithm_study
src/week4/kim_sung_hyun/개별문제_촌수관리.cpp
#define _CRT_SECURE_NO_WARNINGS #include<cstring> #include<iostream> #include<vector> #include<algorithm> #include<queue> #include<string> #include<math.h> using namespace std; int N, M, K, NM; bool check[101]; vector<int> arr[101]; int bfs() { queue<pair<int, int>> q; q.push(make_pair(M, 0)); while (!q.empty()) ...
ALGO
0.999956
4.099562
e5104b5f-644c-4166-9855-e51dbc935c76
Fresh-hongsi/BaekjoonCpp
11725-트리의 부모 찾기.cpp
#include <iostream> #include <algorithm> #include <vector> #include <memory> #include <queue> using namespace std; vector<int>map[100001]; //인접리스트 bool visited[100001] = { false, }; //벙문표시배열 vector<int> parent[100001]; //각 정점의 부모 저장할 인접리스트 void bfs(pair<int,int> s) { visited[s.second] = true; queue<pair<int,int>> q...
ALGO
0.999987
4.71089
3343d7c5-7390-45ae-896b-24787a4d0fc1
AdnanKahveci/-survival_balance_game
Library/PackageCache/com.unity.ide.visualstudio@2.0.22/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp
#include <iostream> #include <sstream> #include <string> #include <filesystem> #include <windows.h> #include <shlwapi.h> #include <fcntl.h> #include <io.h> #include "BStrHolder.h" #include "ComPtr.h" #include "dte80a.tlh" constexpr int RETRY_INTERVAL_MS = 150; constexpr int TIMEOUT_MS = 10000; // Often a DTE call m...
TOOL
0.94874
6.933585
636482bb-544d-4fd8-9102-5cb7d268c8b9
Takanashi-Rikka-O/File_Transportor
lib/libFTPR_Server.cpp
// libFTPR_Server.cpp // Version : 0.1 // Date : Thu Jul 16 10:15:35 2020 // Last revise : Sat Jul 18 21:18:? 2020 // Symbol-Constraint : // _Xx..._ - Function Symbol // Xx...|x|X - Variable Symbol // Description : // This file contain some server interfaces,them will as shared library and link to program.For upga...
WEB
0.952532
3.026464
6fed5024-fe24-4f84-b027-049837286834
VivekKumarMishra1301/competative-coding
Leetcode Problems/Dynamic_Programming_Number_Of_Cutting_Pizzas.cpp
class Solution { public: int ways(vector<string> &pizza, int k) { int m = pizza.size(), n = pizza[0].size(); vector<vector<vector<int>>> dp(vector(k, vector(m, vector(n, -1)))); vector<vector<int>> preSum(vector(m + 1, vector(n + 1, 0))); for (int r = m - 1; r >= 0; r--) ...
ALGO
0.999822
5.238505
66d36a7e-570b-4105-b8e6-9a564b7cd9b2
south37/atcoder
atc001/a/a.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <map> #include <unordered_map> #include <cassert> using namespace std; #define rep(i, n) for(int i = 0; i < n; ++i) #define all(s) s.begin(), s.end() #define MAX_W 500 #define MAX_H 500 int dx[] = { 1, -1, 0, 0 }; int dy[] = { 0, 0...
ALGO
0.99984
3.64788
5fbf3e21-cc58-49a6-89e1-c8bacbc58a31
Arom1a/competitive-programming
[U]-cpid_992.cpp
#include "bits/stdc++.h" typedef long long ll; using namespace std; template <typename T> void print_vector(const vector<T>& my_vec) { for (const T& i : my_vec) cout << i << ' '; cout << endl; } int MAX_N = 1e5 + 1; int N, M; vector<int> p(MAX_N); vector<vector<pair<ll, ll>>> adj(MAX_N); vector<pair<...
ALGO
0.999974
3.860135
dc0ecd04-e735-4efe-824b-fda4da8f804c
craftzbay/e-olymp
3000-3999/3171 - Point within a circle - Точка внутри круга - Çevrə daxilində nöqtə - Точка всередині круга.cpp
#include <iostream> using namespace std; int main(){ int x0, y0, R, x, y; cin >> x0 >> y0 >> R; cin >> x >> y; cout << ((x - x0)*(x - x0) + (y - y0)*(y - y0) <= R*R ? "YES" : "NO"); return 0; }
ALGO
0.999644
3.678106
d4e1ae44-1cf4-4011-aafa-712361afa3aa
mdmt98/flutter-auto-route-test
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998859
6.785645
c22e4f2a-ac21-4bf3-8ff8-42ec22a82ebe
AFaltin/-
Match.cpp
#include "Match.h" #include "CreateTeam2.h" Match::Match(const Team& team11, const Team& team22, const Scheme& scheme11, const Scheme& scheme22, int goalsTeam11, int goalsTeam22) { team1 = team11; team2 = team22; scheme1 = scheme11; scheme2 = scheme22; goalsTeam1 = goalsTeam11; goalsTeam2 = goa...
ALGO
0.932946
3.328947
5985f666-ab15-40ac-8a2e-da3156345351
bibledit/windows
server/search/strongs.cpp
#include <search/strongs.h> #include <assets/view.h> #include <assets/page.h> #include <assets/header.h> #include <filter/roles.h> #include <filter/string.h> #include <filter/passage.h> #include <webserver/request.h> #include <locale/translate.h> #include <database/config/bible.h> #include <database/kjv.h> #include <ip...
WEB
0.850567
3.31213
089d5f11-9489-4935-bef9-57e3b1a0ebb3
TecHAyusH6476/Interview-Prep-DSA-HacktoberFest-2023
Linked-List/Odd-Even-Linkedlist.cpp
class Solution { public: ListNode* oddEvenList(ListNode* head) { if(head == NULL || head->next == NULL) return head; ListNode* odd = head; ListNode* even = head->next; ListNode* evenSteady = head->next; while(even != NULL && even->next != NULL) { odd->next = even...
ALGO
0.999963
5.91051
291edcfd-ff72-4586-85bc-6bf8091da01d
Feroz455/DATA-STRUCTURE-By-Seymour-Lipschutz
Chapter-08/SOLVED PROBLEMS/8-11.cpp
#include <bits/stdc++.h> using namespace std; // DSU data structure // path compression + rank by union class DSU { int *parent; int *rank; public: DSU(int n) { parent = new int[n]; rank = new int[n]; for (int i = 0; i < n; i++) { parent[i] = -1; ...
ALGO
0.999965
4.740195
bf57de4a-5b00-4d4d-b4b1-4d3e98ae6c94
thangitus/LeetCode-Solution
C++/Sorting/786. K-th Smallest Prime Fraction.cpp
#include <bits/stdc++.h> using namespace std; class Solution { private: static bool compare(pair<int, int> &a, pair<int, int> &b) { double v1 = a.first * 1.0 / a.second; double v2 = b.first * 1.0 / b.second; return v1 < v2; } public: vector<int> kthSmallestPrimeFraction(vector<int...
ALGO
0.999929
4.944707
4f41811e-daa3-46fa-baeb-c04e9b9e73ac
luvilun/ads-college
Language-Prog-Techniques/Listas-1BIM/lista_1/EX05.cpp
#include <stdio.h> #include <cmath> int main () { float raio, diametro, perimetro; printf("Digite o raio do circulo: "); scanf("%f", &raio); diametro = raio + raio; perimetro = M_PI * diametro; printf("A area do circulo: %.2f", perimetro); }
ALGO
0.982462
3.48264
90b70ff9-c962-40bb-83ff-de36a2fbae1a
commonapi-someip/boost_1_71_0
libs/coroutine/example/cpp03/symmetric/dice_game.cpp
#include <cstdlib> #include <iostream> #include <boost/bind.hpp> #include <boost/coroutine/all.hpp> #include <boost/move/move.hpp> #include <boost/random/random_device.hpp> #include <boost/random/uniform_int_distribution.hpp> typedef boost::coroutines::symmetric_coroutine< void > coro_t; class player { private: ...
TOOL
0.964817
4.784198
4715884c-f71a-4470-a64d-591c73336650
Ehteshamr/DSA
998-check-completeness-of-a-binary-tree/check-completeness-of-a-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999641
6.267447
3b5502c8-821f-4c82-a8cb-d979181e97b1
ljghy/glmmd
src/core/InterpolationCurve.cpp
#include <cmath> #include <glmmd/core/InterpolationCurve.h> namespace glmmd { float evalCurve(const InterpolationCurvePoints &curve, float x) { const float x1 = curve[0], y1 = curve[1], x2 = curve[2], y2 = curve[3]; float t = x, a = 3.f * (x1 - x2) + 1.f, b = 2.f * x2 - 4.f * x1; float t2, s, f, df; ...
ALGO
0.999497
6.859908
aff68296-0cf6-41ce-9333-9343c54652f7
Aniket965/clestini-iot
Celestini /sparse_matrix_multiplication_and_convolution(question 2).cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define mp make_pair #define pb push_back #define fi first #define sec second #define pii pair < ll, ll > #define N 100005 vector <list < pii > > a(N), b(N), c(N); void insertinC( pii x , ll val) { bool inserted = 0; list < pii > :: iterator it = ...
ALGO
0.999839
3.276166
27dc2873-fb5b-44e6-8308-97c0aadc105c
Azoad/Operating_Systems
PP/FiFo.cpp
#include<iostream> using namespace std; int main() { int n,nf,k,c=0; int p[100],pf[100]; bool hit; cout<<"Enter the number of pages :"; cin>>n; cout<<"Enter the page sequence :"; for(int i=0;i<n;i++){ cin>>p[i]; } cout<<"Enter the size of page frame :"; cin>>nf; ...
ALGO
0.999877
3.609403
5c70a1d0-dd76-4890-8aab-dd3f58896577
SaurabhP7/FastDSA
min_Coins_memo.cpp
#include<bits/stdc++.h> using namespace std ; typedef long long ll ; int coins[3]={1,3,4} ; bool ready[3] ; int value[3] ; int min_coins(int x){ if(x<0) return 1e9 ; if(x==0) return 0 ; if(ready[x]){ return value[x] ; } int best=1e9 ; for(auto c:coins){ best=min(best,min_coins(x-c)+1)...
ALGO
0.999679
4.616532
5b278267-de5e-4449-b0bf-fc9e97f22d5e
smadan07/CPP
Size_of_array.cpp
#include <iostream> using namespace std; int main() { // 1D Array int arr[5] = {12, 28, 34, 34, 34}; int n = sizeof(arr) / sizeof(arr[0]); cout << "The size of an array is : " << n << endl; for (int i = 0; i < n; i++) { cout << "\n" << arr[i] << endl; } return 0; } ...
TOOL
0.982378
4.222848
5a03dfbb-e292-4beb-9abc-9678af4e054c
ekut-es/pulp-llvm
libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp
// UNSUPPORTED: c++98, c++03, c++11, c++14 // XFAIL: libc++ // <functional> // boyer_moore_horspool searcher // template<class RandomAccessIterator1, // class Hash = hash<typename iterator_traits<RandomAccessIterator1>::value_type>, // class BinaryPredicate = equal_to<>> // class boyer_moore_horspoo...
TEST
0.88558
6.556483
c4d39f42-04cb-4ac6-9e57-c0cd75e690fe
dhingrahimanshu/CompetitiveProgramming
LeetCode/2381. Shifting Letters II.cpp
class Solution { public: string shiftingLetters(string s, vector<vector<int>>& shifts) { int n = (int) s.size(); int l = 'a', r = 'z'; vector <int> pref(n + 1, 0); for (auto &it: shifts) { int sign = ((it[2]>0)?1:-1); pref[it[0]] += sign; pref...
ALGO
0.999951
6.135697
4f0a683a-7a54-4360-95b0-d6fbc33bf3b7
shobhit00dixit/guviprograms
s1/guvi_s1_q5.cpp
#include <iostream> using namespace std; int main() { int a,b,c,max; cin>>a>>b>>c; max= a > b ? ( a > c ? a : c) : (b > c ? b : c) ; cout<<max; }
ALGO
0.999529
3.610481
6165a6ca-bde5-486d-a794-9ea26e1c377f
MohamedElbashar/ProblemSolving-Archive
shageer sheets/Sagheer pubil sheet/Graphs/Basic Algos/ConnectedComponent&FloodFill,coloring conCom/11953 - Battleships(FloodFill).cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<pi> vpi; #define PI 3.1415926535897932384626433832795 #define ll long long #define pb push_back #define mp make_pair #define all(v) v.begin(),v.end() #define mem(a,b) memset(a,b,sizeof a) #define oo 1e8 #defi...
ALGO
0.999475
4.097723
58a1590a-f129-43a7-890b-15d36d9fb759
TomaszPrzydzial/SPOJ
FR_AA_04.cpp
#include <iostream> #include <set> using namespace std; int main() { int d; cin >> d; set <int> temperatures; while(d--) { int temp; cin >> temp; temperatures.insert(temp); } cout << temperatures.size() << endl; return 0; }
ALGO
0.99901
4.247091
4e55a1e6-2e05-43ad-bb4d-2cf657e22e12
shivamkr022/my-codes
codessss/stack/stack/nextgreatestELE.cpp
#include<iostream> #include<stack> using namespace std; int main(){ int arr[]={3,1,2,7,4,6,2,3}; int n= sizeof(arr)/sizeof(arr[0]); for(int i=0;i<n;i++){ cout<<arr[i]<<" "; } cout<<endl; // now we do for next greater ele; int ans[n]; stack<int> st; // we follow pop ,ans and push ; ans[n-1]...
ALGO
0.999969
3.92391
13a5165a-f203-4e61-9f93-4e24e295dbd0
codeplaysoftware/clang-leg
test/SemaCXX/constexpr-factorial.cpp
// RUN: %clang_cc1 -std=c++11 -fsyntax-only %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.993784
6.445701
10cd6bdc-5c68-4422-9c14-c825737d56f6
rogeliomolina1/LPC_Projects
HashCode/src/HashCode.cpp
#include <iostream> using namespace std; int HashCode(string key); const int INITIAL_SIZE = 7; class HashTable { private: string * table; /// dynamically allocated array int tableSize; /// should be a prime number public: HashTable(); void Insert(string key); void Remove(string key); bool Find(string key); }; ...
ALGO
0.999389
5.736633
5b6bf75d-7c83-4a77-a70a-2505bf1f2abd
anugoyal998/DSA
CSES/Tree Algorithms/Subordinates.cpp
#include <bits/stdc++.h> using namespace std; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MOD 1000000007 #define MOD1 998244353 #define INF 1e18 #define nline cout << endl; #define pb push_back #define ppb pop_back #define mp make_pair #define ff first #define ss second #defi...
ALGO
0.999948
4.489327
e17160ae-8db0-441a-b44a-6bc0ff0862cc
shubhamcodingblocks/DSA
G8-DSA/12-01-2024/first_k_even_numbers.cpp
#include<iostream> using namespace std; int main(){ int a[100]; int n; cin >> n; for(int i=0;i<n;i++){ cin >> a[i]; } int s = 0, e = n-1; int ans = -1; while(s<=e){ // step 1 int mid = (s+e)/2; // step 2 if(a[mid]%2==0){ ans = mid; s = mid+1; } else{ e = mid-1; } } cout << ans+1 <<...
ALGO
0.99994
3.995532
6256f372-c864-4bab-b702-8973041a078f
PatelManav/Codeforces_Backup
ChessPlacing.cpp
/*May The Force Be With Me*/ #include <bits/stdc++.h> #define ll long long #define MOD 1000000007 using namespace std; ll N; vector<ll> arr; void Input(){ cin >> N, arr.clear(), arr.resize(N/2); for(auto &z:arr) cin >> z; sort(arr.begin(), arr.end()); } void Solve(){ ll ans1 = 0, ans2 = 0; ...
ALGO
0.99902
4.680671
08c2a535-dd34-4c70-aa20-4b2652f0f768
Seyamalam/DMOJ
Ioi14p2.cpp
// Ivan Carvalho // Solution to https://dmoj.ca/problem/ioi14p2 #include <algorithm> #include <cstdio> #include <cstring> #define MAXN 2000010 #define esq(S) ((S << 1) + 1) #define dir(S) (esq(S) + 1) #define mid(A, B) (((A + B) >> 1)) using namespace std; typedef struct node { int minimo, maximo; } no; int aumenta...
ALGO
0.999952
4.042455
6a14e434-e706-424b-89a0-4d86576a48be
dujingyao/Yao
算法学习/acwing/算法基础课/Floyd求最短路.cpp
#include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N=210,INF=1e9; int n,m,k; int x,y,z; int d[N][N]; void floyd(){ for(int k=1;k<=n;k++){ for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ d[i][j]=min(d[i][j],d[i][k]+d[k][j]); } ...
ALGO
0.999994
4.017884
eb1b115d-f9c7-4c18-bdc5-7cf424d7d6ec
J-AugustoManzano/UnderCPP
Cap07/c07ex03.cpp
// c07ex03.cpp #include <iostream> #include <print> #include <thread> #include <mutex> std::mutex mtx; // Mutex para sincronizar o acesso int contador = 0; void incrementar(void) { for (int32_t i = 0; i < 1000000; ++i) { mtx.lock(); // Bloqueia o mutex antes de acessar a varivel compartilhada c...
ALGO
0.870131
5.752598
096c425a-e992-4b1c-8259-c75b9145b604
ishandutta2007/codeforces
nuip/normal/1737/E.cpp
#include <string> #include <vector> #include<iostream> #include<cstdio> #include<cstdlib> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<functional> #include<list> #include<deque> #include<bitset> #include<set> #include<map> #include<unordered_map> #include<unordered_set> #include<cstring>...
ALGO
0.999978
3.451949
b738dba7-eff0-40b5-baa5-bea2c8926533
ishandutta2007/codeforces
est_stella/normal/1616/C.cpp
#include<bits/stdc++.h> using namespace std; #define fast ios::sync_with_stdio(false); cin.tie(0); #define fi first #define se second #define pb push_back #define em emplace #define eb emplace_back #define mp make_pair #define all(v) (v).begin(), (v).end() #define pre(x) cout<<fixed; cout.precision(x); typedef long l...
ALGO
0.999824
4.727518
c1ce11d5-7ca0-4b7a-8a93-162cf4bbc389
ShivanshKumarJha/Coding-Dump
CodingNinjas/Tries/TrieNode.cpp
#include<bits/stdc++.h> using namespace std; class TrieNode { public: char data; TrieNode** children; bool isTerminal; TrieNode(char data) { this->data = data; children = new TrieNode*[26]; for (int i = 0; i < 26; i++) { children[i] = NULL; } isTermi...
ALGO
0.999673
5.60135