uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
58cba6b8-14f5-4f53-a695-718af9004db6
AndanteKim/LeetCode_Practice
2248-intersection-of-multiple-arrays/2248-intersection-of-multiple-arrays.cpp
class Solution { public: vector<int> intersection(vector<vector<int>>& nums) { unordered_map<int, int> counts; for (const vector<int> &arr: nums){ for (const int x: arr) ++counts[x]; } int n = nums.size(); vector<int> ans; for (const auto key: counts) if (...
ALGO
0.99998
5.472868
be4df4e9-2176-467f-be57-2bfe2c53e6ec
InTheBloodHorse/ACM
codeforces/285C.cpp
#include<bits/stdc++.h> using namespace std; const double eps = 1.0e-6; // int dir[4][2]={1,0,-1,0,0,1,0,-1}; struct node { __int64 x,y; }po[100005]; int cmp1(node a,node b) { if(a.x==b.x) { return a.y < b.y; } else return a.x < b.x; } int cmp2(int a,int b) { return a>b; } int gcd(int a,int b) { int c=a; ...
ALGO
0.999879
3.623636
3196b108-da49-4874-9d1b-b2e00d310046
A8N0RMAL/problem-solving-with-c-
DIVs/Codeforces Round 817 (Div. 4)/C. Word Game/main.cpp
/****************************** * * * Author : Mahmoud Saleh * * Created: __.__.2023 * * * ****************************** ******************************************************* * * * ***--> ...
ALGO
0.999427
3.840209
5dfb6f46-80e6-408e-a457-853df7ee6b9e
wuxiaolang/Cube_SLAM_wu
line_lbd/libs/LSDDetector.cpp
#include "precomp.hpp" //using namespace cv; namespace cv { namespace line_descriptor { Ptr<LSDDetector> LSDDetector::createLSDDetector() { return Ptr<LSDDetector>( new LSDDetector() ); } /* compute Gaussian pyramid of input image */ void LSDDetector::computeGaussianPyramid( const Mat& image, int numOctaves, int sc...
ALGO
0.990409
5.218522
a0ab5a3f-8dd9-4585-8411-b3aa998f0de9
Saleh7127/CPP-solution-by-Fellow_junior
Codeforces/cf1619E.cpp
/*** created: 2022-01-20-16.37.36 ***/ #include <bits/stdc++.h> using namespace std; #define ll long long #define test int tt; cin>>tt; for(int cs=1;cs<=tt;cs++) #define get_lost_idiot return 0 #define nl '\n' int main() { ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0); test { ll n,m,i,j,k=...
ALGO
0.999876
3.991974
2f4e4128-fe1f-4a40-ad23-5d6f3d0e27b8
Vaibhaviitian/har-jagah-dp
CSES/Dice.cpp
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 vector<int> dp(1e6 + 1, -1); int rec(int n) { // Base Cases if (n == 0) return 1; if (dp[n] != -1) return dp[n]; int ans = 0; for (int i = 1; i <= 6; i++) { if (n - i >= 0) { ans = (ans + rec(n - i)) % MOD; ...
ALGO
0.999986
5.466212
11c58472-772d-423f-9215-7d0645b40028
Aditya-K-Vyas/TCS_NQT_SHEET
Arrays/largest_ele.cpp
/* Find the Largest element in an array Problem Statement: Given an array, we have to find the largest element in the array. Examples Example 1: Input: arr[] = {2,5,1,3,0}; Output: 5 Explanation: 5 is the largest element in the array. Example2: Input: arr[] = {8,10,5,7,9}; Output: 10 Explanation: 10 is the largest ...
ALGO
0.999039
5.038977
be49e657-0abe-43f9-a466-998129784630
CamRW/CalPoly_AGV
isaac_ros-dev/src/isaac_ros_nvblox/nvblox/nvblox/src/interpolation/interpolation_3d.cpp
#include "nvblox/interpolation/interpolation_3d.h" #include "nvblox/utils/logging.h" namespace nvblox { namespace interpolation { bool interpolateOnCPU(const Vector3f& p_L, const TsdfLayer& layer, float* distance_ptr) { CHECK_NOTNULL(distance_ptr); CHECK(layer.memory_type() == MemoryType::k...
ALGO
0.994521
6.968253
c4d5af49-7f34-45e9-88c7-7fc3f57ab5ce
MohamadCM/Parallel-Programming-Practice
OpenMP_determinant.cpp
// // Created by mohamad on ۲۰۲۱/۵/۲۷. // #include <iostream> #include <math.h> #include <omp.h> using namespace std; #define threads_count 5 void allocate(int **); void freeArr(int **); void fillArray(int **); void printArray(int **arr); int determinantOfMatrix(int **mat); int N = 128; volatile int threads = 1...
ALGO
0.999878
4.512199
cbb6b613-02bf-46a1-841f-2a0e6f042ace
pmusau17/CodingChallenges
Cpp/Chapter7/ruler.cpp
// ruler.cpp -- divide and conquer #include <iostream> const int Len = 66; const int Divs = 6; void subdivide(char ar[], int low, int high, int level); int main() { // declare a character array of length 66 char ruler[Len]; int i; for (i=1; i < Len -2;i++) { ruler[i] = ' '; } ru...
ALGO
0.997187
3.191639
c6cb978b-66bd-4e50-92d5-56bd8d45d99f
03-prathamesh/DSA_LEETCODE_PROBLEMS
0003_Matrix/0014_modify_the_matrix.cpp
class Solution { public: vector<vector<int>> modifiedMatrix(vector<vector<int>>& matrix) { for(int j = 0; j < matrix[0].size(); j++) { // Iterate over columns int greater = 0; // Find the maximum value in the column for(int i = 0; i < matrix.size(); i++) { ...
ALGO
0.999919
6.117107
b7e4aaf3-c084-4be6-a5eb-06c0747c9e9c
saurabhkr4/Contest
tempCodeRunnerFile.cpp
while(t--){ int n; cin>>n; int odd = 0, even = 0; for(int i=1; i<=n; i++){ if(n%i==0){ if(i%2==1) odd++; else even++; } } if(even>odd) cout<<1<<endl; else if(even==odd) cout<<0<<endl; else cout<<-1<<endl;...
ALGO
0.999776
3.953962
7f61d778-10e1-4259-8c95-3b98442ac58f
Conless/sjtu-cs1951
contest/0/1803.cpp
#include <iostream> #include <cstring> using namespace std; const int MAXN = 1e6 + 5; int pi[MAXN], ans[MAXN]; int get_ans(int pos) { if (ans[pos]) return ans[pos]; if (!pi[pos - 1]) return pos; return ans[pos] = get_ans(pi[pos - 1]); } int main() { ios::sync_with_stdio(false); int T; cin >> T; while (T...
ALGO
0.999937
5.033933
5cdd06be-42d8-4016-938a-d34b321f016f
vfolunin/archives-solutions
EOlymp/11023.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); long long limit; cin >> limit; int res = 0; for (int half = 10; 1; half *= 10) { ...
ALGO
0.999283
3.908913
e94ce1b3-077c-44d6-baf6-38359f4a5ecd
Dayof/integrate-c-python
test-boost/boost_1_60_0/libs/graph/example/subgraph_properties.cpp
/* Sample output: After initializing properties for G1: Global and local properties for vertex G0[C]... G0[C]= A1 G1[A1]= A1 Global and local properties for vertex G0[E]... G0[E]= B1 G1[B1]= B1 Global and local pr...
ALGO
0.945695
5.294638
78eb53d5-4252-4cf8-8502-ab9bcdadbf35
tranhuy105/hocdot
ttud/graph/mazebfs.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1004; int a[maxn][maxn]; int d[maxn][maxn]; // Mảng lưu số bước int n, m, r, c; int dx[4] = {0, 1, -1, 0}; int dy[4] = {1, 0, 0, -1}; void inp() { cin >> n >> m >> r >> c; for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { ...
ALGO
0.999748
5.412481
2b37fbf6-dc49-4dd9-8a06-69b126d1b7ad
Cabbage-Cat/OJ_Solution
SCUACM/newbie/a.cpp
#include <bits/stdc++.h> #define MAX_N 1000005 typedef long long i64; using namespace std; int N,Q; int T; int num[MAX_N]; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); cin >> T; while (T-- > 0) { fill(num,num+MAX_N,0); cin >> N >> Q; int l,r; int...
ALGO
0.999924
3.727738
a1f2d032-c544-4b03-8ce8-d24df04994f8
athrpf/drops
partests/MzelleNMRParamEst.cpp
/// \file MzelleNMRParamEst.cpp /// \brief one phase flow in a meassurement device for a parameter estimation problem /// \author LNM RWTH Aachen: ; SC RWTH Aachen: Oliver Fortmeier // include std header for two-phase flows #include "partests/two_phase_hdr.h" #include "levelset/mzelle_hdr.h" // include parallel compu...
ALGO
0.999393
5.549504
dc635113-f041-49d9-8953-04f710e59181
LongyueChang/android11
frameworks/av/media/libstagefright/codecs/amrwb/src/interpolate_isp.cpp
/* ------------------------------------------------------------------------------ Filename: interpolate_isp.cpp Date: 05/08/2004 ------------------------------------------------------------------------------ REVISION HISTORY Description: ---------------------------------------------------------------------...
ALGO
0.999549
5.00794
b5bb79a9-a1df-4006-ad77-a96f74292064
shash42/Competitive-Programming
CF/1348/E.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define pb push_back #define F first #define S second #define int long long #define lint long long #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define sz(x) (int)x.size() #define all(x) begin(...
ALGO
0.99998
3.843248
6d59d503-6c39-4916-b028-3962154190ab
nikhilmehlan/Dsa
0052-n-queens-ii/0052-n-queens-ii.cpp
class Solution { public: int totalNQueens(int n) { vector<bool> col(n), diag(2*n-1), anti_diag(2*n-1); return solve(col, diag, anti_diag, 0); } int solve(vector<bool>& col, vector<bool>& diag, vector<bool>& anti_diag, int row) { int n = size(col), count = 0; if(row == n) return 1; for(int column = 0; co...
ALGO
0.999913
6.19505
9043d90e-c3be-4f44-a0ad-8ada2bcb3dff
seraph27/competitve-programming
atcoder/abc365/c.cpp
#include <bits/stdc++.h> #define ll long long #define ar array #define all(x) x.begin(), x.end() #define pii pair<ll, ll> #define pb push_back using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define rint(l, r) uniform_int_distribution<int>(l, r)(rng) template<typename T> bool c...
ALGO
0.999988
4.405427
da0aa3fd-0e2c-472c-8458-fcc8b8be7680
ferhatyk95/linkedlist
linkedlist.cpp
#include<stdio.h> #include<stdlib.h> struct n{ int x; n *next; }; typedef n node; void bastir(node *r){ while(r!=NULL){ printf("%d\n",r->x); r=r->next; } } int main(){ node *root; root=(node*)malloc(sizeof(node)); root->x=12; root->next=(node*)malloc(sizeof(node)); root->next->x=111; root->next->next=(nod...
ALGO
0.999165
3.008358
9d59b689-c43c-4da4-a829-05d19c5b8b71
yisusrgg/competitive-programming
A. Bear and Big Brother.CPP
#include <bits/stdc++.h> using namespace std; void solve() { string n; cin>>n; int cont1= 0, cont2= 0; for(int i=0; i<6; i++) { if(i<3) { n[i]-=48; cont1+=n[i]; } else { n[i]-=48; cont2+=n[i]; } } ...
ALGO
0.999813
3.70168
6770e3e8-8a4b-4f84-8def-0e19a75a8dca
metanull/adventofcode
2024/Day16-v2/Day16.1.cpp
#include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <stdexcept> #include <stack> #include <algorithm> #include <filesystem> #include <thread> #include <chrono> #include <set> #include "Constant.h" #include "charmap.h" #include "math.h" // ---------------------------...
ALGO
0.972229
5.504466
d927698d-6e53-4b23-866e-0e4b626c9e76
bbhulani/sdc_p11_path_planning
src/Eigen-3.3/bench/sparse_setter.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.935109
4.152793
10debe82-07d5-4322-acd1-5f85e3263f96
ishandutta2007/codeforces
miepu/normal/1635/C.cpp
#include<bits/stdc++.h> #define int long long const int N=1000005; using namespace std; void solve(){ int n;cin>>n; vector<int> a(n); int pr=-1e9,fl=1; for(int i=0;i<n;i++){ cin>>a[i]; if(a[i]<pr)fl=0; pr=a[i]; } if(fl){ cout<<0<<endl; return ; } if(a[n-1]>=0&&a[n-2]<=a[n-1]){ cout<<n-2<<endl; fo...
ALGO
0.999789
3.887341
e6b3ed6e-af07-4e3e-bdfa-d1b76f4b0437
heavenMOJANG/ICPC
.history/AtCoder/abc379/C_20241109205913.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #define int long long using namespace std; constexpr int INF = 0x7fffffff; void solve() { int n, m; cin >> n >> m; vector<int> x(m + 1), a(m + 1); int sum{}; for (int i = 0; i < m; ++ i) c...
ALGO
0.999811
3.758225
24e99a78-9d2e-4d9c-9d40-409bf4c483bb
silicos-it/filter-it
src/filters/filterAtomsInLargestNonaromaticRing.cpp
#include <filters/filterAtomsInLargestNonaromaticRing.h> FilterAtomsInLargestNonaromaticRing::FilterAtomsInLargestNonaromaticRing(void) { _keyword = "ATOMS_IN_LARGEST_NONAROMATIC_RING"; } FilterAtomsInLargestNonaromaticRing::~FilterAtomsInLargestNonaromaticRing(void) { } FilterAtomsInLargestNonaromaticRing::Filte...
TOOL
0.894314
5.798555
35a826f6-db4d-45ce-b636-224cb6885dea
MohammedHany1/Problem-Solving
vjudge/Raising Bacteria.cpp
//vjudge.net/problem/CodeForces-579A #include <iostream> using namespace std; int main() { int num; cin >> num; int sum = 0; while (num > 0) { if (num % 2 == 1) sum++; num = num / 2; } cout << sum << endl; return 0; }
ALGO
0.999857
4.057643
2db92021-64f9-46f3-b41e-e8d4bdc20d6c
TheDwoon/AdventOfCode
AdventOfCode2021/Day07.cpp
#include <string> #include <iostream> #include <chrono> #include <sstream> #include <iterator> #include <vector> #include <algorithm> #include <immintrin.h> #define TITLE "Day 07" std::vector<std::string> tokenize(const std::string &input, const std::string &separator); typedef std::vector<int> day_t; day_t parseInp...
ALGO
0.99687
6.031649
27ad7114-c6f8-42b7-b901-6ea134bca498
Imtiaz-Rafi/Leetcode
155-min-stack/155-min-stack.cpp
class MinStack { public: stack<int>st; MinStack() { } void push(int val) { st.push(val); } void pop() { st.pop(); } int top() { return st.top(); } int getMin() { int mn = INT_MAX; stack<int>temp = st; wh...
ALGO
0.999731
6.144078
82b3320e-2ab2-48d7-a6f0-08d5c96ace15
applebuddy/BJAlgorithmStudy
BaekJoonPS/BaekjoonAlgorithmPS/Graph/_MinimumPath/축사배정_2188.cpp
/// MARK: - 축사배정_2188 // MARK: 배열+벡터 혼합 형 복습답안) #if 0 #include <iostream> #include <vector> using namespace std; int Visit[201] = {false, }; int Cage[201] = {0,}; int Cow[201] = {0,}; vector<int> Pref[201]; bool DFS(int cowNum) { Visit[cowNum]=true; for(auto &pref: Pref[cowNum]) { int selectedCage = ...
ALGO
0.999864
4.697
01235a30-1c35-4605-b128-310d7dafffe6
sun1218/openjudge
ch0105/ch0105_03.cpp
#include <iostream> #include <cstdio> using namespace std; int main(void){ int n; double y; scanf("%d",&n); for(int i = 0;i<n;i++){ double temp; scanf("%lf",&temp); y += temp; } y /= n; printf("%.4f",y); return 0; }
ALGO
0.987441
3.485301
37853227-11db-4a9c-a27e-59c9f471add1
shivajreddy/codeforces
1620/A/main.cpp
// https://codeforces.com/problemset/problem/1620/A #include <bits/stdc++.h> using namespace std; void setupIO() { ios::sync_with_stdio(false); cin.tie(nullptr); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif } void solve() { } int main() { setupIO(); int tc; cin >> tc; w...
ALGO
0.992808
3.622829
4f113a8d-48bd-44de-9f5d-47f4aa043eb7
Tushar0508/DSA-PRACTICE
689-maximum-sum-of-3-non-overlapping-subarrays/maximum-sum-of-3-non-overlapping-subarrays.cpp
class Solution { public: typedef long long ll; ll dp[20001][4]; ll f(int i,int j,int k, vector<int>&v){ if(i>=v.size()){ if(j==0)return 0; return -1e9; } if(j<0)return -1e9; if(dp[i][j]!=-1)return dp[i][j]; ll notTake = f(i+1, j,k, v); ...
ALGO
0.999953
5.106316
b4229fcf-8f91-45b8-abec-399ce944ea9a
ModularBitcoin/tryrepo3
reference-07-groth16-prover/depends/libff/libff/algebra/curves/bn128/bn128_g2.cpp
/** @file ***************************************************************************** * @author This file is part of libff, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) ***********************************************************************...
ALGO
0.960092
6.813828
88838cd8-64fc-4c64-85fa-f469ed4ce92a
Bearsharks/dev-note
PS/BJ/1700_greedy.cpp
#include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; int main() { cin.tie(NULL); ios::sync_with_stdio(false); int n, k; cin >> n >> k; vector<int> v(1); cin >> v[0]; set<int> isset; int ans = 0; int setcnt = 0; for (int i = 1; i < k; i++) { int a; cin >> a; ...
ALGO
0.999848
3.670649
0381d6ee-8831-498f-a0a3-7519cb990d29
hgyuhyeon/Algorithm-old
Leetcode/20_Valid_Parentheses.cpp
class Solution { public: bool isValid(string s) { stack<char> stk; for (auto c: s) { if (c == '(' || c == '{' || c == '[') stk.push(c); else if (!stk.empty() && (c == ')' && (stk.top() == '(') || (c == '}' && stk.top() == '{') || (c == ']' && stk.top() == '['))) stk.pop(); ...
ALGO
0.999454
6.451457
b2fd6a02-2397-4ddc-ae73-bedf6904f535
miriyalatarunkumar/DSA_Practice
0047-permutations-ii/0047-permutations-ii.cpp
class Solution { private: void fun(int pos, vector<int>& arr, int n, vector<vector<int>>& ans) { if(pos==n-1){ if(find(ans.begin(),ans.end(),arr)==ans.end()){ ans.push_back(arr); } } else{ for(int i = pos; i<n; i++){ ...
ALGO
0.999991
6.164135
b6973e06-a049-4b61-b3a8-63cc452633ab
sravanthi194/DSAByAbdulBari
EssentialC++Concepts/ModularProgramming.cpp
#include<iostream> using namespace std; int area(int length,int breadth) { return length*breadth; } int perimeter(int length,int breadth) { return 2*(length+breadth); } //Modular programming everything inside main() int main() { int length=0,breadth=0; cin>>"Enter Length And Breadth"<<endl; cin>>length>>br...
ALGO
0.982135
4.061515
aa2ead9b-588f-45fe-9125-f4c6d44be4e1
JackHanke/dlproj
stockfish-5-mac/src_c++11/evaluate.cpp
#include <algorithm> #include <cassert> #include <iomanip> #include <sstream> #include "bitcount.h" #include "evaluate.h" #include "material.h" #include "pawns.h" #include "thread.h" #include "ucioption.h" namespace { // Struct EvalInfo contains various information computed and collected // by the evaluation fun...
ALGO
0.998495
4.186467
d873f3a4-00c6-48e5-89ef-22bdb15af947
blockspacer/bootstrap-redux
ext/boost-1.70.0/libs/sort/example/sample.cpp
// See http://www.boost.org/libs/sort for library home page. #include <boost/sort/spreadsort/spreadsort.hpp> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <vector> #include <string> #include <fstream> #include <sstream> #include <iostream> using namespace boost::sort::spreadso...
ALGO
0.994018
4.604353
8208ded8-54b6-4129-b8af-92ab321c4a4f
Kestrel-omega/Baekjoon
src/1654.cpp
#include <iostream> using namespace std; typedef long long int lli; int main() { ios_base ::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int K, N, answer = 0; int lan_length[10001]; lli low = 1, mid, high = 0; cin >> K >> N; for (int i = 0; i < K; i++) { cin >...
ALGO
0.999893
4.171017
3d999f71-f74e-4d23-975d-2b2b98bd999e
Yashkhare198/LeetHub
Buy Stock 2 - GFG/buy-stock-2.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: long long maximumProfit(vector<long long>&prices, int n) { // Code here long long int total = 0; for(int i = 1; i<n;i++) { if(prices[i]>prices...
ALGO
0.999384
6.281825
14ece3f2-0e9c-4915-8f95-6ba612d96fb6
benjaminhuanghuang/ben-leetcode
0925_Long_Pressed_Name/solution.cpp
/* 925. Long Pressed Name https://leetcode.com/problems/long-pressed-name/ */ #include <string> #include <algorithm> using namespace std; class Solution { public: bool isLongPressedName(string name, string typed) { int i = 0; int j = 0; while (i < name.size() && j < typed.size()) { if (name...
ALGO
0.999729
6.25421
a21c0966-2023-4c89-9fae-c97787e9f5ed
leslieyip02/kattis
completed/evenupsolitaire.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, x; cin >> n; vector<int> c; for (int i = 0; i < n; i++) { cin >> x; if (!c.empty() && c.back() % 2 == x % 2) { c.pop_back(); ...
ALGO
0.999925
4.464065
43ca6adc-4f18-49f3-ac4b-0ff8ca22075b
pratyushmishra007/DSA-Questions
transpose_of_a_matrix_using_dynamic_memory_allocation.cpp
__Transpose of a Matrix using dynamic memory allocation__ Problem statement Write a program to take a matrix of size m*n as the input from the user and print the transpose of the matrix. The transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of a matrix A[][] is...
ALGO
0.99955
7.405765
7ce37a08-cf88-4d7b-b72c-7575b77bee31
zwshen/notes-learning
skills/Acm/acm/V300/386.cpp
/* @JUDGE_ID: 13160EW 386 C++ */ // 06/09/03 00:06:33 //@BEGIN_OF_SOURCE_CODE #include <stdio.h> int main() { int a,b,c,d; for( a = 6 ; a <= 200 ; a++) //for( a = 6 ; a <= 24 ; a++) for(b = 2; b < a; b++ ) for(c = b+1; c < a; c++ ) for(d = c+1; d < a; d++ ) if( a*a*a == b*b*b + c*c*c + d*d*d ) ...
ALGO
0.999532
3.50865
46440411-8027-43c5-82c4-f3d8debc0f8e
xKarnSinghx/ProblemSetSolution
CF/SignOfFriendship.cpp
/* B - Sign of Friendship / Time Limit: 2 sec / Memory Limit: 1024 MB Score : 200 points Problem Statement You are now standing under a very high tower, of height 1000 . At a position whose distance from the tower is D , there is a UFO up in the sky at height H (see the figure at Sample Input / Output 1), and...
ALGO
0.999922
3.679238
9146eb9e-7925-4dec-a044-9c09b735cb1f
sanchitpandya/100-programs
84.cpp
#include<stdio.h> int main() { int n; printf("Enter the number of elements in the array: "); scanf("%d",&n); printf("Enter the elements in the array: "); int arr[n]; for(int i=0;i<n;i++) scanf("%d",&arr[i]); int min,smin; if(arr[0]<arr[1]) { min=arr[0]; smin...
ALGO
0.999459
3.651214
be8d6c52-2407-4825-9469-16de2c910579
hungg261/baitap-thayHai
solutions/LARES.cpp
#include <bits/stdc++.h> #define int long long using namespace std; signed main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); freopen("LARES.INP","r",stdin);freopen("LARES.OUT","w",stdout); int m,n,k;cin>>m>>n>>k; cout<<min({m/2,n,(m+n-k)/3}); return 0; }
ALGO
0.999954
3.60906
9f93a831-77c1-409e-84e9-a58596574a7b
raincross7/code-similarity
codes/train_code/problem001/problem001_482.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; long long MOD = 10000000000 + 7; int main(){ cout << setprecision(10); int r,d,x; cin >> r >> d >> x; for(int i = 0; i < 10; i++){ x = r * x - d; cout << x << endl; } }
ALGO
0.999481
3.235815
019fb7ba-c9e4-46f1-b997-83fb30db8692
VasisthaPrakhar/LC_Questions
1688-count-of-matches-in-tournament/1688-count-of-matches-in-tournament.cpp
class Solution { public: int numberOfMatches(int n) { if(n==1 || n==0){ return 0; } if(n%2){ return (n-1)/2 + numberOfMatches(((n-1)/2)+1); }else{ return n/2 + numberOfMatches(n/2); } } };
ALGO
0.999951
5.508128
e4aa115a-b6ba-453f-be66-a4cccd8f150b
a-r-r-o-w/cpp-metaprog
selection-sort/selection-sort.cpp
#include <iostream> #include <array> template<typename T> concept ForBody = std::is_invocable_v<T, int>; template<typename T> concept ArrayType = requires(T t) { t[0]; }; template<int i, int j, int jump> struct LoopBasedFor { static_assert(jump != 0); template<ForBody F> static constexpr void compute(F &&...
ALGO
0.99976
6.424386
00c23c8c-c62a-4b20-9785-aed8d6d73def
snehil21/Codeforces
StoneGame.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; int a[n]; int maxi = INT_MIN, mini = INT_MAX; int max_index = 0, min_index = 0; for (int i = 0; i < n; i++) { cin >> a[i]; if (a[i] > maxi) { maxi = a[i]; max_index ...
ALGO
0.999912
4.847369
a6e96bda-1fd1-4921-b745-c061dc17b310
dqx-1005/training
2023寒假训练赛/05第五场/B题.cpp
#include<bits/stdc++.h> using namespace std; int w[105][105]; typedef long long LL; int main() { int t; cin>>t; for(int k=1; k<=t; k++) { int n; cin>>n; for(int i=1; i<=n; i++)w[k][i]=i; int sum=0,final=1; for(int i=2; i<=n; i++){ sum+=i; if(sum>=n) { w[k][0]=i; final=i; break; } }; ...
ALGO
0.999961
3.318883
55dc8ea4-94e0-4037-8445-2c0554341ccd
NICAdist/boost
libs/algorithm/minmax/example/minmax_timer.cpp
#include <utility> #include <functional> #include <algorithm> #include <numeric> #include <iterator> #include <vector> #include <list> #include <set> #include <iostream> // What's the proper BOOST_ flag for <iomanip.h> vs <ios> #include <iomanip> #include <boost/timer.hpp> #include <boost/algorithm/minmax.hpp> templa...
TEST
0.910676
6.443194
b7f5ba7f-27ef-4292-9db1-aa654380c9b0
CGAL/cgal-dev
Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/optimal_rotation_polar.cpp
#include <CGAL/trace.h> #include <CGAL/Timer.h> #include <iostream> #include <string> #include <fstream> #include <Eigen/Eigen> #include <Eigen/SVD> double norm_1(Eigen::Matrix3d X) { double sum = 0; for ( int i = 0; i < 3; i++ ) { for ( int j = 0; j < 3; j++ ) { sum += abs(X(i,j)); } } re...
ALGO
0.999702
5.532041
09ed6774-241a-4792-b31f-98bf48d0d3e9
Time1ess/MyCodes
LintCode/888-Valid Word Square/solution.cpp
class Solution { public: /** * @param words: a list of string * @return: a boolean */ bool validWordSquare(vector<string> &words) { // Write your code here int n = words.size(); for(int i = 0; i < n; i++) for(int j = 0; j < words[i].length(); j++) ...
ALGO
0.999759
5.980199
3c3f239f-fd5e-40f0-afe3-e6d19709cce5
pnm6054/Algorithm_exercise
SW_Academy/Q1289.cpp
#include <iostream> #include <string> using namespace std; int main(void) { int t, l, e; string s; char c; cin >> t; for (int tc = 1; tc <= t; tc++) { cin >> s; c = s[0]; l = s.length(); e = 0; for (int i = 1; i < l; i++) { if (s[i] != s[i - 1]) e++; } cout << "#" << tc << " " << e << '\n'; }...
ALGO
0.999576
3.567603
a4ecafd0-b82d-44bc-b139-02c9b8f8852a
raincross7/code-similarity
codes/train_code/problem321/problem321_413.cpp
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++) typedef long long ll; typedef vector<vector<ll>> vvl; typedef vector<ll> vl; typedef vector<vector<char>> vvc; typedef vector<char> vc; typedef p...
ALGO
0.999973
3.719521
66d278eb-5447-4721-842b-e5f69682f245
Rakib-Mondal-One8/Rakib_18-CONTESTS
Codeforces/Codeforces Round 986 (Div. 2)/B.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> /*Problem Link -> https://codeforces.com/contest/2028/problem/B*/ typedef long long ll; typedef unsigned long long ull; typedef long double lld; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie...
ALGO
0.99974
4.243792
9f4d7c18-c781-48b4-b855-8a70b7b82d64
PerfectLifeG/Algorithm-Competition
PracticeMakesPerfect/PTA/Advanced Level/1007_.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define all(x) x.begin(),x.end() #define no cout<<"No"<<endl #define yes cout<<"Yes"<<endl typedef pair<int,int> PII; const int N=200010; const int mod=998244353; const int INF=0x3f3f3f3f; void solve() { int n;cin>>n; vector<int>a(n+1); vect...
ALGO
0.999909
3.403231
752d5a45-c4e3-4c9d-858e-339fb5e58e6b
Pulkitbarala/gfg_self_paced_answers
Graph/Strongly connected component (Tarjans's Algo).cpp
class Solution { public: vector<vector<int>> tarjans(int V, vector<int> adj[]) { vector<vector<int>> result; vector<int> disc(V, -1); vector<int> low(V, -1); vector<bool> inStack(V, false); stack<int> st; int time = 0; function<void(int)> dfs = [&](int u) { ...
ALGO
0.999992
6.448023
ca308840-a5c1-4087-a75e-7f4776dd4ffe
yielding/code
cpp.boost/bounded.buffer/bounded.buffer.cpp
#include <boost/circular_buffer.hpp> #include <condition_variable> #include <thread> #include <mutex> #include <string> #include <vector> #include <iostream> const unsigned long QUEUE_SIZE = 1000L; using namespace std; mutex io_mutex; //////////////////////////////////////////////////////////////////////////////// /...
TOOL
0.912125
5.666764
9fabb39a-acdb-4dc4-9ddb-ac7e25ccd693
ArcticFoox/1day1commit
binser2.cpp
#include<algorithm> #include<iostream> #include<vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); int m; cin >> m; for (int i = 0; i < m; i++) { int number; ...
ALGO
0.999974
4.424041
1b8ae901-73f7-480c-aaf9-6bbf628d2cd8
Captimize/Algorithm
baekjoon/10987/solutioncpp.cpp
#include <iostream> #define MAX 101 using namespace std; char input[MAX]; int idx = 0; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cin >> input; int res = 0; while (input[idx] != '\0') { if (input[idx] == 'a' || input[idx] == 'e' || input[idx] == 'i' || input[idx] == 'o' || input[idx] == 'u') res++...
ALGO
0.99963
4.205123
efbdf093-9374-43ed-a29a-c171d58ff147
VachelChen/-
PAT_A1036/PAT_A1036/main.cpp
#include <iostream> #include <algorithm> using namespace std; const int maxn = 10010; struct stu{ string name; char gender; string id; int grade; }m[maxn],f[maxn]; bool cmp1(stu a, stu b){ return a.grade < b.grade; } bool cmp2(stu a, stu b){ return a.grade > b.grade; } int n; int main(int a...
ALGO
0.980152
4.483305
f33a1ce4-c7ba-435a-b509-e89b4f45fcd4
Anurag1008/DATA_STRUCTURES_AND_ALGORITHMS
DSA_SHEET/BT_sheet/9.LeftView.cpp
/* https://practice.geeksforgeeks.org/problems/left-view-of-binary-tree/1 Left View of Binary Tree ** using queue next time using recussion vector<int> leftView(Node *root) { vector<int>ans; if(root == NULL) return ans; queue<Node*>q; q.push(root); while(!q.empty()){ int size = q.size(); ...
ALGO
0.999352
5.264632
ff523593-1b27-447b-a86d-10d71e8a6e21
ishandutta2007/codeforces
gabrielwu/normal/1669/H.cpp
#include <bits/stdc++.h> using namespace std; #define forn(i, n) for (int i = 0; i < (n); i++) #define pb push_back #define mp make_pair #define MOD 1000000007 #define f first #define s second #define rand(i, j) uniform_int_distribution<ll>((ll)(i), (ll)(j))(rng) mt19937 rng(std::chrono::steady_clock::now().time_since...
ALGO
0.999964
4.047191
b45b784d-02b5-499f-92c9-195768b7e67f
Kawser-nerd/CLCDSA
Source Codes/AtCoder/abc003/B/1477080.cpp
#include <iostream> #include <cstring> bool atCoder(char c){ if(c == 'a' || c == 't' || c == 'c' || c == 'o' || c == 'd' || c == 'e' || c == 'r'){ return 1; } return 0; } using namespace std; int main(){ char s[12]; char t[12]; cin >> s; cin >> t; int len = strlen(s); for(int i = 0; i < len; i++){ if(s[i...
ALGO
0.99998
3.286274
40f53020-4acc-4046-b99c-92d1679876fd
SWSeongJaeKIM/C-Programming
2023-11-06(4)/회귀함수.cpp
#include <iostream> using namespace std; float fxy(float x, float y) { return (x - 3) * (x - 3) + (y - 4) * (y - 4); } float dfxydx(float x, float y, float dx) { return (fxy(x + dx, y) - fxy(x, y)) / dx; } float dfxydy(float x, float y, float dy) { return (fxy(x, y + dy) - fxy(x, y)) / dy; } float EE(float x0, f...
ALGO
0.999975
3.839306
c30c8904-4adf-4e7d-8a72-e37bc0d384a0
agral/CompetitiveProgramming
LeetCode/0933_NumberOfRecentCalls/lc0933.cpp
#include <cassert> #include <deque> class RecentCounter { public: int ping(int t) { q.push_back(t); while (q.front() < t - 3000) { q.pop_front(); } return q.size(); } private: std::deque<int> q; }; int main() { RecentCounter rc; assert(rc.ping(1) == 1); assert(rc.ping(100) == 2); ...
TOOL
0.95952
7.160106
49902f86-64d8-4df7-81de-b9ab9f7a10c1
kyoo-147/all_application_pyqt5_UI_NaVin
camera-system-object-detection/flutter_android_app/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.99809
6.785645
268e763e-4949-4aad-9292-861de85d9c48
redsand/bl4ckJack
bl4ckJack/boost_1_45_0/libs/bimap/example/tagged_simple_bimap.cpp
// VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overruns or other possible security issues if misused. // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx // But the wording of the warning is misleading and unsettling, there are no // po...
TOOL
0.932748
5.94737
092dbf0f-918f-4e04-a442-bd4aa4f4ba71
jeevan01/python-extra-class
opencv/samples/cpp/travelsalesman.cpp
#include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <opencv2/ml.hpp> using namespace cv; class TravelSalesman { private : const std::vector<Point>& posCity; std::vector<int>& next; RNG rng; int d0,d1,d2,d3; public: TravelSalesman(std::vector<Point> &...
ALGO
0.999995
4.584006
9adb808e-7335-439b-bcdf-6817849d374f
HossamSaberr/Problem-Solving-Library
Most Tech Used/DP/Problems/Edit Distance.cpp
// CSES : https://cses.fi/problemset/task/1639/ /* بسم الله الرحمن الرحيم الْحَمْدُ لِلّهِ الَّذِي هَدَانَا لِهَـذَا وَمَا كُنَّا لِنَهْتَدِيَ لَوْلا أَنْ هَدَانَا اللّهُ اللهم حرر فلسطين من كيد الصهاينة واجعل كيدهم في نحورهم اللهم انصر الأقصى والقدس وأهالي غزة وفلسطين اللهم اطمس على أعداء الدين والمدنسين */ #includ...
ALGO
0.999961
4.775448
2851450f-86a5-4894-936c-a1e44cfb6e02
Tajam/game-physics
src/Box2D/Collision/Shapes/b2PolygonShape.cpp
#include <Box2D/Collision/Shapes/b2PolygonShape.h> #include <new> b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(b2PolygonShape)); b2PolygonShape* clone = new (mem) b2PolygonShape; *clone = *this; return clone; } void b2PolygonShape::SetAsBox(float32 hx,...
ALGO
0.986704
7.926646
8ab5d7ff-d922-401f-b1d0-7a7ae2f5b459
fshi2006/my_leetcode
148排序链表.cpp
class Solution { public: ListNode* sortList(ListNode* head) { ListNode dummyHead(0); dummyHead.next = head; int length = 0; auto list_ptr = head; while(list_ptr) { length ++; list_ptr = list_ptr->next; } for(int i = 1;i < length...
ALGO
0.999996
5.82264
e9255eb2-89d1-48f7-9508-9bd31bb2423d
heisenberg0042/C-Programming-11-to-12-30
C++/Inheritance/InheritanceInC++.cpp
#include<iostream> #define PI 3.14 using namespace std; class Area { public: int width; int bredth; int side; int radius; }; class Circle : public Area{ public: void findArea(int r){ this->radius=r; cout<<(PI * radius * radius)<<endl; } }; class Rectangle : public Area{ public: v...
ALGO
0.971773
3.514225
84816ec2-4d9f-4f1a-b4d5-2b9a64bee3bb
qinzhounick/Deck-Games
HoldEmGame.cpp
//File Name: HoldEmGame.cpp //Authors: Qinzhou(Nick) Song, Xinyu(Jack) Li //Email: <EMAIL>, <EMAIL> //Summary: source file for HoldEmGame // define constructor and functions #include "HoldEmGame.h" using namespace std; //HoldEmGame constructor // construct base class and initialize state HoldEmGame::HoldEmGame(in...
ALGO
0.935942
5.521391
165dba5a-5e62-43a7-ae82-a5e701c537e1
stcai/leetcode
algorithms/00139.word-break/cpp/test.cpp
#define CATCH_CONFIG_MAIN #include <string> #include "../../../third_party/catch2/catch.hpp" #include "solution.hpp" using namespace std; TEST_CASE("test_sample_1") { Solution solution; string s = "leetcode"; vector<string> wordDict = {"leet", "code"}; bool result = true; CHECK(solution.wordBreak(s, wordD...
ALGO
0.997835
5.838155
bf3f9be0-ab00-47f2-bdc6-67e195bb6a41
BoxOfPandor/RayTracer
src/RayTracer/Scene.cpp
/* ** EPITECH PROJECT, 2025 ** B_OOP_400_LIL_4_1_raytracer_thibault_pouch ** File description: ** Scene.cpp */ #include "Scene.hpp" #include <limits> #include <algorithm> #include <ostream> #include <iostream> using namespace RayTracer; using namespace Math; Scene::Scene(const Camera& camera, int width, int height) ...
ALGO
0.90965
6.497736
d3167693-d94b-4aa6-95a0-e15a0ca44006
prafull321/DSA
mathematics/armstrong.cpp
#include<bits/stdc++.h> using namespace std; bool armstrong(int n) { int res=0; int num=n; while(num>0) { int digit=num%10; res=res+(digit*digit*digit); num=num/10; } return (res==n); } int main() { int n; cin>>n; cout<<armstrong(n); }
ALGO
0.999922
4.282602
433272a6-7ace-45fa-ae78-1423f603453c
ishandutta2007/codeforces
saketh/normal/1487/A.cpp
#include <bits/stdc++.h> using namespace std; // template {{{ #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple #define lb lower_bound #define ub upper_bound #define f first #define s second #define resz resize #define sz(x) int((x).size()) #define all(x) (x).begin(), (x).end() ...
ALGO
0.999855
5.863906
16fb3be0-b09d-4b60-8800-417b68871e59
AnkitShome/Leetcode
1918-maximum-score-of-a-good-subarray/1918-maximum-score-of-a-good-subarray.cpp
class Solution { public: int maximumScore(vector<int>& nums, int k) { int n=nums.size(); vector<int> NSE(n,n),PSE(n,-1); stack<int> st; for(int i=0;i<n;i++){ while(!st.empty() and nums[st.top()]>=nums[i]) st.pop(); if(!st.empty()) PSE[i]=st.top(); ...
ALGO
0.999992
5.524964
aa1db090-54a4-4948-95bf-c42a4f48aba3
wavelet-and-multiscale-library/Marburg_Software_Library
WaveletTL/tests/test_ldomain_laplacian.cpp
#include <iostream> #include <set> #include <utils/function.h> #include <algebra/sparse_matrix.h> #include <interval/spline_basis.h> #include <interval/ds_basis.h> #include <numerics/iteratsolv.h> #include <numerics/bezier.h> #include <numerics/corner_singularity.h> #define _WAVELETTL_LDOMAINBASIS_VERBOSITY 0 #include...
TEST
0.98656
6.024896
30ee01bb-e84a-4061-ba7f-a45b1126e2f4
Michcio1208/lekcjesort
4 klasa/20.11.2024/wydawaniereszty2.cpp
#include <iostream> #include <string> #include <cctype> #include <algorithm> #include <cstdlib> #include <ctime> #include <fstream> using namespace std; const int N=4; const int nominaly[]={1,2,4,5}; const int kwota=8; int resztadynamicznie2tablice(int Reszta[]){ int i,j,k; int IleM[kwota+1]; int ResztaM[kwota+1][N];...
ALGO
0.997453
3.814556
b4e75d99-9570-43b6-998d-985755cf3959
blackbird2003/acm_cpp
2022PreSummer_DP_V_monotonosQueueDP.cpp
// // Created by vv123 on 2022/5/20. // #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; const int inf = 0x3f3f3f3f; int n, T, tp[N], p[N], range[N], d[N], f[N]; int q[N]; bool check(int r) { //printf("r=%d\n", r); /* memset(f, 0x3f, sizeof f); f[1] = 0; for (int i = 2; i <= n; ...
ALGO
0.999994
4.41725
51b5ff09-d889-4a6a-90a3-2e0400408724
Mikomori-san/AdventOfCode2023
AdventOfCode2023/AdventOfCode2023/03/D3_Two.cpp
#include "D3_Two.h" #include "../stdafx.h" #include <vector> #include "D3_One.h" int checkAdjacentNr2(NrTupel& nr, std::vector<std::string>& lines, int line, int row); std::string getNrLeft2(int i, int j, std::vector<std::string>& lines); std::string getNrRight2(int i, int j, std::vector<std::string>& lines); void D3...
ALGO
0.990142
4.663756
f4f95ea5-977d-4b48-8dae-a387d4f2b443
minigalaxy/Baekjoon
cpp/10801/main.cpp
#include <iostream> using namespace std; int eval = 0; int A[10], B[10]; int main() { for(int i = 0; i < 10; i++) cin >> A[i]; for(int i = 0; i < 10; i++) cin >> B[i]; for(int i = 0; i < 10; i++){ if(A[i] > B[i]) eval++; else if(A[i] < B[i]) eval--; } if(eval > 0) cout << 'A'; ...
ALGO
0.999939
3.481283
597612d6-5acd-4503-8a8b-f2ccaad5fc52
LasseSteinhoff/ATfP
is_palindrom.cpp
// enable assertions in release build #ifdef NDEBUG #undef NDEBUG #endif #include <stack> #include <cassert> #include <iostream> #include <cstdint> using namespace std; struct Node { uint64_t data; Node* next; }; /************** begin assignment **************/ // Write a program that takes the head of a singly ...
ALGO
0.992935
5.960613
4ba6ca6b-9866-4a85-8b85-fc8b5cbb315d
alexandraback/datacollection
solutions_5753053697277952_0/C++/smarterthanu1234/A.cpp
#include<iostream> #include<algorithm> #include<cstdio> #include<string.h> #include<climits> #include<vector> #include<stack> #include<set> #include<math.h> using namespace std; #define FOR(i,a,b) for(i=a;i<=b;i++) #define sint(i) scanf("%d",&i) #define ss(s) scanf("%s",s) #define pii pair<int,int> #define mp(i,j) make...
ALGO
0.999885
3.495655
949aa52b-04ac-4134-8d0e-9ef7bf181985
GrimshawA/Nephilim
includeext/Box2D/Dynamics/Contacts/b2Contact.cpp
#include <Box2D/Dynamics/Contacts/b2Contact.h> #include <Box2D/Dynamics/Contacts/b2CircleContact.h> #include <Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h> #include <Box2D/Dynamics/Contacts/b2PolygonContact.h> #include <Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h> #include <Box2D/Dynamics/Contacts/b2EdgeAnd...
ALGO
0.99189
7.738435
5bf38347-ca4f-40bb-aa0f-8e7216931592
Rimki/boj_algorithm
2981.cpp
#include<iostream> #include<cstdio> #include<algorithm> #include<vector> using namespace std; int num[101]; int gcd(int x,int y){ if(y==0) return x; return gcd(y,x%y); } int main(void){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N,g; cin>>N; for(in...
ALGO
0.999935
3.308714
8609953f-7c4f-4e92-93b7-ad615d73f2a1
MagnoCarlos/Edge_Detection
Image Processing/Threshold.cpp
// ADD real time edge detection #include "Threshold.hpp" #include <iostream> #include <vector> #include <math.h> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" using namespace std; using namespace cv; Mat img_threshloding7 = imread("/Users/GreatestBrain/Desktop/Lenna.png", 0); /*The 0 ...
ALGO
0.982629
3.661125
72016366-2fc6-4853-9699-e5303f856dbf
Navyam-Raushan/cpp_blog
arr_sort.cpp
#include <iostream> #include <cmath> #include <string> #include <algorithm> using namespace std; int main() { int arr[30]; int i, n, j, del; cin >> n; for (i = 0; i < n; i++) { cin >> arr[i]; } // sorting the given array in ascending order. sort(arr, arr + n); // printing ...
ALGO
0.999897
4.044664
6026720d-27e2-4f5b-b60b-cacb04dbea55
bughunter9/DataStructuresandAlgorithms
Divjyot/RatInAMaze.cpp
#include<bits/stdc++.h> using namespace std; bool isSafe(int **arr,int x,int y,int n) { if(x<n && y<n && arr[x][y]==1) { return true; } return false; } bool ratInMaze(int **arr,int x,int y,int n,int **solArr) { if(x==n-1 && y==n-1) { solArr[x][y] = 1; return true; }...
ALGO
0.999988
4.411453
c82853fd-fb87-42ad-be7c-9fdb89664b7b
abhijitmanna912001/DSA-Problem-Solving
Patterns/Pattern2.cpp
#include <iostream> using namespace std; int main() { for (int i = 0; i < 3; i = i + 1) { for (int j = 0; j < 5; j++) { cout << "*"; } cout << endl; } return 0; }
ALGO
0.999406
3.300836