uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e8f92273-7850-4854-8db9-1812787abe41
Leanbow1708/Competetive-Programming
Recursion/PowerSet.cpp
#include<bits/stdc++.h> using namespace std; vector<string> v; void fun(string s){ if(s.length() == 1) { v.push_back(s.substr(0,1)); return; } else{ fun(&s[1]); int x = v.size(); // cout<<x; for(int i = 0;i < x;i++) { v.push_back(s[0]+v...
ALGO
0.999978
3.912808
d133fac1-7b39-4c90-a2bc-3c7ecba192f3
Sachindebug/LeetCode-Problems
1876-map-of-highest-peak/1876-map-of-highest-peak.cpp
class Solution { public: vector<vector<int>> highestPeak(vector<vector<int>>& isWater) { int m = isWater.size(), n = isWater[0].size(), dir[5] = {0, 1, 0, -1, 0}, INF = 1e6+1; queue<pair<int,int>> q; for(int i=0; i<m; i++) { for(int j=0; j<n; j++) { if(isWater...
ALGO
0.999985
6.25737
d28086e8-ab8a-4d46-aacc-cc189918ec52
kmjp/procon
srm/661-680/665/LuckyXor.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<to;x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ZERO(a) memset(a,0,sizeof(a)) #define MINU...
ALGO
0.996543
4.83417
b75cd16f-d998-40f7-88a6-cde86eae6464
JusDooEt/BST-Example
BST.cpp
#include "BST.h" BST::BST() : data(0) , left(nullptr) , right(nullptr) { } BST::BST(int value) { data = value; left = nullptr; right = nullptr; } BST::~BST() { } BST* BST::insert(BST* root, int value) { // If root is null then insert a new node. if (root == nullptr) { return new BST(value); } // If t...
ALGO
0.998298
4.73311
da4dea28-2307-4054-9050-a491fff35d6f
aminulrony2024/DSA-Revision
Tree/tree_practice.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int value; Node *lchild; Node *rchild; Node(int value) { this -> value = value; lchild = rchild = nullptr; } }; class Tree { private: Node *root = nullptr; public: void createTree(); void preOrder(Nod...
ALGO
0.999803
4.85067
92cf3fab-1e94-4a28-be53-06620b87bbba
AlexWei061/cpp
contest/CodeForces/round986div2/a.cpp
#include<bits/stdc++.h> using namespace std; int t = 0; int a = 0, b = 0, n = 0; string pat; int main(){ cin >> t; while(t--){ cin >> n >> a >> b; cin >> pat; int x = 0, y = 0, round = 100000; bool can = false; while(round--){ for(int i = 0; i < n; i++){ if(pat[i] == 'N') y++; if(pat[i] == 'S')...
ALGO
0.999907
4.445681
4b18036b-b42b-4094-9596-044fb26b5ad8
ku-alps/sw17_hongin
exercise/14BOJ9465스티커.cpp
#include<iostream> using namespace std; int T, n, arr[100001][2], dp[100001][3], ans[100000]; int main() { cin >> T; for (int t = 0; t < T; t++){ cin >> n; for (int i = 1; i <= n; i++) cin >> arr[i][0]; for (int i = 1; i <= n; i++) cin >> arr[i][1]; dp[0...
ALGO
0.999975
3.740381
bb6939f1-995d-4915-bbd3-cc4f0e243322
ishandutta2007/codeforces
andr0901/normal/1296/A.cpp
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; //vector string deque break continue #define forn(i, s, f) for (int i = (int)s; i < (int)f; i++) #define ll long long #define ull unsigned long long #define ld long double #define pii pair <int, int> #define fs first #define sc second #define...
ALGO
0.999369
4.086978
41f94934-d10e-4c42-bfa1-f278f0904fa0
raul-cerda/Textbook-Indexer
DocumentIndex.cpp
#include <fstream> #include <iostream> #include <string> #include <sstream> #include <vector> // #include <unistd.h> #include "DocumentIndex.h" #include "GetLine.h" using namespace std; typedef string::size_type StringSize; void DocumentFile::Close() { file_.close(); file_.clear(); return; } int DocumentF...
TOOL
0.929825
3.817949
ddae66dc-3e2e-4025-a7de-3e9210db3804
mananb77/cs184-star-sim
ext/nanogui/ext/eigen/bench/geometry.cpp
#include <iostream> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace std; using namespace Eigen; #ifndef SCALAR #define SCALAR float #endif #ifndef SIZE #define SIZE 8 #endif typedef SCALAR Scalar; typedef NumTraits<Scalar>::Real RealScalar; typedef Matrix<RealScalar,Dynamic,Dynamic> A; type...
ALGO
0.946707
5.941502
e638d619-9e01-435b-b172-1d792c4d7204
allkert/leetcode
cpp/ireal/面试/hw516.cpp
#include<vector> #include<queue> #include<algorithm> #include<stack> #include<iostream> #include<math.h> using namespace std; int main(){ string s; cin >> s; int len = s.size(); int n = pow(len, 0.5); string res = ""; if(n * n != len){ cout << "error" << endl; } else{ f...
ALGO
0.998628
3.544192
6f211386-5cff-40c7-ad2a-52001c7b3040
rajvir2003/Data-Structures-Algorithms
Recursion_and_Backtracking/Basic-Problems/fast_exponentiation.cpp
#include<bits/stdc++.h> using namespace std; int power(int a, int b){ // base condition if(b == 0){ return 1; } if(b == 1){ return a; } // recursive call int ans = power(a, b/2); if(b%2 == 0){ return ans * ans; } else{ return a * ans * ans; ...
ALGO
0.999674
4.993775
85b4b8b0-c1d3-47a2-b787-faea95a21a23
YouYeDam/codetree-TILs
240723/재귀함수를 이용한 최댓값/maximum-value-with-recursive-function.cpp
#include <iostream> using namespace std; int GetMaxValue(int n) { if (n == 0) { return 0; } int x; cin >> x; return max(x, GetMaxValue(n - 1)); } int main() { int n; cin >> n; cout << GetMaxValue(n); return 0; }
ALGO
0.999472
4.388082
35f1fad5-e5e6-4614-9bf9-2e5c47a7e386
Fu188/SUSTech_Course
CS203_Data_Structure/Lab9/ProB/ProB.cpp
#include<stdio.h> #include<string.h> #include<vector> using namespace std; int testcases,M,N,K; bool mark[1000+100]; bool can_get; struct monster{ int X; int Y; int S; }; monster mon[1000+100]; vector<int> mons[1000+100]; bool cal(int i,int j){ unsigned long long X2= (unsigned long long)(mon[i].X-mon[j].X)*(unsig...
ALGO
0.999941
3.870855
77152df1-2bcc-4a5c-8d37-2237b9a8f53c
ishandutta2007/codeforces
abc864197532/normal/1538/E.cpp
/* * ## ##### #### #### # # #### * # # # # # # # # # # # # * # # ##### # # # # # # # * ###### # # # # # # ## # # # * # # # # # # # # ## ## # # * # # ##### #### #### # # #### */ #include <bits/stdc++.h> us...
ALGO
0.992079
4.262036
704abb16-8284-43cc-9296-c9aeb230aac7
EshaanSeth/Competitive_Coding
Problem Solutions/CodeChef/SNCKQL19/QABC.cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 100010; int a[MAX], b[MAX]; int main() { #ifndef ONLINE_JUDGE freopen("/Users/sahilbansal/Desktop/input.txt", "r", stdin); freopen("/Users/sahilbansal/Desktop/output.txt", "w", stdout); freopen("/Users/sahilbansal/Desktop/error.txt", "w", stderr); #e...
ALGO
0.999968
4.302688
87ee977a-d9c0-43c4-8c96-637b7f30c384
mayank7jha1/June16
Lecture 21/Frequency_Array2.cpp
#include<iostream> using namespace std; int main() { char ch[1001]; cin >> ch; int n = strlen(ch); int freq[26] {0}; //Iterate over the input array and update the freq array. for (int i = 0; i < n; i = i + 1) { char current_char = ch[i]; // freq[current_char - 97] = freq[current_char - 97] + 1; freq...
ALGO
0.999566
3.859819
90d70190-12ff-4351-9f9e-a66103e4bde0
chinmoy-kumar/competitive-programming
codechef/Front_or_Back.cpp
/*===================================================== Author: Chinmoy Kumar Tirtho Platform: codechef Problem: Front or Back URL: https://www.codechef.com/problems/FRONTBACK =====================================================*/ #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t-...
ALGO
0.999979
5.075416
f01a8ab5-6065-4851-b927-c1cbbcc095f3
syllcs/primer
c10/10.9.cpp
#include <iostream> using std::cout; using std::endl; #include <vector> using std::vector; #include <algorithm> using std::sort; using std::unique; void elimDups(vector<int> vi) { sort(vi.begin(), vi.end()); auto end_unique = unique(vi.begin(), vi.end()); vi.erase(end_unique, vi.end()); for (int i: vi) cout <...
ALGO
0.995918
4.93698
c9503b75-6aaa-4527-9f2e-c41f84fd543e
darrenstrash/ReduVCC
lib/parallel_mh/galinier_combine/construct_partition.cpp
/****************************************************************************** * construct_partition.cpp * * * Source of KaHIP -- Karlsruhe High Quality Partitioning. * Christian Schulz <<EMAIL>> *****************************************************************************/ #include "construct_partition.h" #inc...
ALGO
0.98998
4.482679
48bd83ea-9879-4a57-877e-02206dd8c93c
halogenOS/android_packages_apps_OTAUpdates
jni/boost_1_57_0/libs/iterator/example/permutation_iter_example.cpp
#include <iostream> #include <vector> #include <deque> #include <algorithm> #include <boost/iterator/permutation_iterator.hpp> #include <boost/cstdlib.hpp> #include <assert.h> int main() { using namespace boost; int i = 0; typedef std::vector< int > element_range_type; typedef std::deque< int > index_type; ...
ALGO
0.976368
4.412151
0de77f2d-e136-42de-8584-090805361aad
ishandutta2007/codeforces
bilibilitdasc/normal/1005/C.cpp
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) #define per(i,n) for(int i=(n)-1;i>=0;i--) #define rep1(i,n) for(int i=1;i<=(n);i++) #define per1(i,n) for(int i=(n);i>=1;i--) #define repk(i,a,b) for(int i=(a);i<=(b);i++) #define perk(i,a,b) for(int i=(a);i>=(b);i--) #define rep0(i,a,b) for(int i=(a);i<...
ALGO
0.999975
3.969459
deeb1c3d-0ede-48af-a027-acabac27c0c2
Kawser-nerd/CLCDSA
Source Codes/AtCoder/agc020/C/1977094.cpp
#include <string> #include <algorithm> #include <iostream> #include <vector> #include <cstdio> #include <cstring> #include <sstream> #include <cmath> #include <cassert> #include <queue> #include <bitset> #include <map> #include <set> #define pb push_back #define mp make_pair #define sz(v) ((int)(v).size()) #define all...
ALGO
0.999951
3.91939
b24fa10f-2348-49a4-a4b4-03d5a4cb4fa2
SoorajCS146/Algorithms
DSA/DP(Memoization)/howSum.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; /* Similar to can sum, when a targetsum is given and a numbers is given, we need to return an array combinations that add up to the targetsum. Any valid combination is considered to be the right answer. */ class HowSumFinder ...
ALGO
0.999912
5.196568
7be50625-a65c-448a-9013-bcc214927c42
Snehakri/DSA-with-leetcode
0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.cpp
class Solution { public: // static bool cmp(const vector<vector<int>> & a,const vector<vector<int>> &b){ // return a[1]<b[1]; // } int findMinArrowShots(vector<vector<int>>& points) { ranges:: sort(points,[](const auto &a,const auto &b){ return a[1]<b[1]; }); ...
ALGO
0.999987
6.025387
c30248e3-4d42-46f5-a120-a24fc0313743
diwakar08/simple-
string sum ,divide ,subtract,10 complement.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define pb push_back #define all(v) v.begin(),v.end() #define ff first #define ss second string sumBig(string a, string b) { if (a.length() > b.length()) swap(a, b); ...
ALGO
0.999962
5.570729
e8bc4c38-cce7-45a3-9f6c-8b25ad2af14e
zahidaliayub/solarcoin
src/bloom.cpp
#include <bloom.h> #include <primitives/transaction.h> #include <hash.h> #include <script/script.h> #include <script/standard.h> #include <random.h> #include <streams.h> #include <math.h> #include <stdlib.h> #define LN2SQUARED 0.4804530139182014246671025263266649717305529515945455 #define LN2 0.693147180559945309417...
ALGO
0.944819
7.167306
7d6cf2d8-2dd2-46b8-8d7e-c8fa4206e441
ishandutta2007/codeforces
emiso/normal/580/D.cpp
#include <bits/stdc++.h> #define MN 18 using namespace std; typedef long long ll; int n,m,k; ll c[MN], adj[MN][MN], dp[1<<(MN+1)][MN], best = -1,x,y,v; void solve() { for(int i=0;i<n;i++) dp[1<<i][i] = c[i]; for(int bm = 1; bm < 1<<(n+1); bm++) for(int i=0;i<n;i++) if(bm & (1<<i...
ALGO
0.99995
4.04284
8c20ba7e-8262-4b74-97ce-01309999a1f4
Refeser/CSharp
Theory of algorithms(CSharp)/ТА 1л/№3/№3/3.cpp
#define _USE_MATH_DEFINES #include <iostream> #include <math.h> #include <cmath> using namespace std; int main() { setlocale(LC_ALL, "Rus"); // 4333 double a, b, n; cout << "a = "; cin >> a; cout << "b = "; cin >> b; cout << "n = "; cin >> n; double s = a + b; double f = n++; s /= f; f = a; f += s; whil...
ALGO
0.999212
3.236841
f53cacef-0346-402a-a86f-ae1f4a04059c
bang-yann/kelompok-5-
Tajul 7C++.cpp
#include <iostream> using namespace std; int main() { int var = 19; int *ptr_var = &var; int **ptr_ptr_var = &ptr_var; cout << "Nilai var: " << var << endl; cout << "Alamat var: " << &var << endl; cout << "Nilai ptr_var: " << *ptr_var << endl; cout << "Alamat ptr_var: " << &ptr_var << end...
TOOL
0.963284
4.357765
f44e8d1f-d02e-498a-9d1f-fe37fc320aab
Sahil-yerawar/Data_StructuresAssign
Data_Structures/Assignment_8/hashing2.cpp
/*Name:- Sahil Yerawar Roll No:- CS15BTECH11044 Assignment:- 5 Problem 2:- Implementing hashing using overflow area */ /* the table size is seven(7)*/ #include<iostream> using namespace std; struct node{ //defining the node for the table int value; int prese...
ALGO
0.999394
4.848793
bf5e1298-3cce-49d1-95ef-2338ba623ed6
Aaditya-Kumar-Mittal/Striver-DSA-Course
Graphs/CPP_Graph_Representation_List.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m; // n = number of vertices, m = number of edges cin >> n >> m; // Initialize the adjacency list vector<int> adj[n + 1]; // Read the edges and populate the adjacency list for (int i = 0; i < m; i++) { int u, v; cin >> u >> v; ...
ALGO
0.999869
5.50353
247dee81-9b6c-43f8-a3fc-bb1ae61fa704
Man07har/HeySavvy
numberOfIsland.cpp
/* You are given a n,m which means the row and column of the 2D matrix and an array of size k denoting the number of operations. Matrix elements is 0 if there is water or 1 if there is land. Originally, the 2D matrix is all 0 which means there is no land in the matrix. The array has k operator and each operator has tw...
ALGO
0.999949
5.415959
dad3873a-8fb0-4a20-ac54-722fba939d00
Anggunseptiani/program-anggun-
cek angka positif atau negatif.cpp
#include <stdio.h> int main() { int angka; printf("Masukkan angka: "); scanf("%d", &angka); if (angka >= 0) { printf("Angka positif\n"); } else { printf("Angka negatif\n"); } return 0; }
ALGO
0.990631
3.71985
f984a1ca-e562-4b44-8319-25c28fb9593e
r4pidstart/problems
by_category/math/11442.cpp
// https://www.acmicpc.net/problem/11442 // 2023-03-17 22:23:25 #include"bits/stdc++.h" using namespace std; const int MOD=1'000'000'007; struct matrix{ long long a,b,c,d; }; inline matrix operator*(const matrix& A, const matrix& B) { return { (A.a*B.a+A.b*B.c)%MOD, (A.a*B.b+A.b*B.d)%MOD, (A.c*B.a+A.d*B.c...
ALGO
0.999987
4.746562
92b4292f-aa67-4d92-a359-8fa0c31ca0cc
jyj97/codetree-TILs
240927/합과 평균의 차/sub-of-average-and-sum.cpp
#include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; cout << a + b+ c << endl; cout << (a+b+c)/3 << endl; cout << a + b+ c - (a+b+c)/3; return 0; }
ALGO
0.999805
3.134813
94052f64-e01b-4e40-9957-3c49946303cd
raincross7/code-similarity
codes/train_code/problem051/problem051_340.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }//MAX int lcm(int a, int b) { return a * b / gcd(a, b); } //MIN main() { int a,b,c; cin >> a >> b >> c; if(a==b&&b==c)cout <<"Yes"<<endl; else cout <<"No"<<endl; }
ALGO
0.999982
3.792617
205bf48d-516d-41b4-83c1-e87fa938c932
IronDumpling/computer-graphics-algos
bounding-volume-hiercarchy/libigl/tests/include/igl/bbw.cpp
#include <test_common.h> #include <igl/boundary_conditions.h> #include <igl/readMESH.h> #include <igl/writeDMAT.h> #include <igl/readTGF.h> #include <igl/bbw.h> TEST_CASE("bbw: decimated_knight", "[igl]" "[slow]") { Eigen::MatrixXd V,C; Eigen::MatrixXi T,F,E; igl::readMESH(test_common::data_path("decimated-knigh...
TEST
0.969327
5.714104
6ce5c3ad-75cd-4f04-9771-a240384d1060
Ciekce/Stormphrax
src/tunable.cpp
#include "tunable.h" #include <cmath> namespace stormphrax::tunable { namespace { inline i32 lmrReduction(f64 base, f64 divisor, i32 depth, i32 moves) { const auto lnDepth = std::log(static_cast<f64>(depth)); const auto lnMoves = std::log(static_cast<f64>(moves)); retur...
CONFIG
0.964034
3.101503
3bacfbc6-7e3f-4e5c-aabd-e75036173bab
iagozag/competitive_programming
contests/cf/contest/918d4/f.cpp
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define rep(i,x,n) for(int i=x;i<n;i++) #define repr(i,n,x) for(int i=n;i>=x;i--) #define forr(v) for(auto& x: v) #define all(a) (a).begin(), (a).end() #define endl '\n' #define ff first #define ss second #define pb push_b...
ALGO
0.99993
4.111987
dbd40811-2e0e-4da8-bef9-2c0968f7cf60
forty-twoo/acm-code-record2
uva/uva-10859.cpp
/* * @Don't panic: Allons-y! * @Author: forty-twoo * @LastEditTime: 2019-11-18 23:27:59 * @Description: 树形dp+2个优化目标的解法 * @Source: https://vjudge.net/problem/UVA-10859 */ #include<iostream> #include<cstdlib> #include<cstring> #include<cmath> #include<cstdio> #include<algorithm> #include<vector> #include<map> #incl...
ALGO
0.99982
3.994706
36c71045-fb3c-47eb-9221-884615bcad54
DhirajTakate73/Logic-Building
codes/program221.cpp
#include<iostream> using namespace std; typedef struct node { int data; struct node* next; } NODE, *PNODE, **PPNODE; class singlyLL { private: PNODE first; //characteristics int count; public: singlyLL() // constructor { cout<<"Inside co...
ALGO
0.974841
3.681266
5a3f36c2-94ce-422c-8f4e-f9efbb02fcbf
aruaru0/cpp-myatcoder
ABC/408/d.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) void chmin(int &a, int b) { a = min(a, b); } void solve() { int n; string s; cin >> n >> s; const int INF = 1001001001; vector dp(n + 1, vector<int>(3, INF)); rep(j, 3) dp[0][j] = 0; rep(i, n) ...
ALGO
0.99988
4.517462
123ba8ed-155d-4ead-b168-8545d79906b6
reokashiwa/atcoder
abc345/abc345_b.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { long long X; cin >> X; if ((X < -1 * 10e18) || (X > 10e18)) exit(1); bool sign = true; if (X < 0) sign = false; if (! sign) X = X * (-1); bool mod = true; if (X % 10 != 0) mod...
ALGO
0.999932
3.762679
18a42882-9181-42a7-b606-c8d4627c0172
khushbujain41709/CPP-DSA
Coding/Basics/seriesSum.cpp
// 1 + (1+2) + (1+2+3) + (1+2+3+4) + ..... + (1+2+3+4+.....+n) #include<iostream> using namespace std; int main(){ int n ; cout<<"Enter number till you want to add series : "; cin>>n; int sum = 0; for(int i = 1;i<=n;i++){ // outer loop for row int tem_sum=0; for(int j =1 ;j<= i;j...
ALGO
0.999717
3.58881
4b913e51-18a5-4ef1-a14d-08bf784acc70
yester31/GEMM_Conv2d_cpp
Gemm/Source.cpp
#include <iostream> #include <vector> #include <iomanip> using namespace std; void valueCheck(vector<float>& valueCheckInput, int input_n, int input_c, int input_h, int input_w, int offset = 0) { if (offset == 1) { input_n = 1; } int temp1 = input_w * input_h * input_c; for (int n_idx = 0; n_idx < input_n; n_idx+...
ALGO
0.964823
3.492022
359a920a-30da-435c-8d50-9b99c5c8a269
dl8sd11/online-judge
csacademy/Array_Coloring.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #define REP(i,n) for(int i=0;i<n;++i) #define REP1(i,n) for(int i=1;i<=n;++i) #define SZ(i) int(i.size()) #define eb emplace_back #define ALL(i) i.begin(),i.end() #define X first #define Y second #ifd...
ALGO
0.999869
3.850727
db31e6e2-3ac8-4c81-904b-f0af82c31698
Narayan-A-R/HackerEarth
PairSums.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n,k; cin>>n>>k; vector<int> a(n,0); for(int i=0;i<n;i++) cin>>a[i]; unordered_map<int,int> map; int found=0; for(int i=0;i<n;i++) map[k-a[i]]=i; for(int i=0;i<n;i++) if(map.find(a[i])!=map.end() && i!= map[a[i]]){ fou...
ALGO
0.999993
3.915547
14b95f94-64ed-4d4a-a91e-1a5234f84eb4
PovilasRandis/Vektoriai
testavimas.cpp
#include "vektoriai.hpp" #include <iostream> #include <vector> #include "timer.h" using namespace std; int main() { int kiek = 0, kiek2 = 0; Timer timer; // Pradėti v1 užpildymo laiko matavimą unsigned int sz = 10000; int mem_keitimas_1 = 0; timer.reset(); std::vector<int> v1; for (...
TOOL
0.863165
4.726178
f2d87231-2217-44e8-a0fc-c0a01232c303
anand63-byte/DSA_VScode
ArrayCombined/froml1l2r1r2.cpp
#include<iostream> #include<limits.h> using namespace std; int main(){ int arr[][4]={1,2,-3,4,0,0,-4,2,1,-1,2,3,-4,-5,-7,0}; int l1,r1,l2,r2; cin>>l1>>r1>>l2>>r2; //sum int sum=0; for(int i=l1;i<=l2;i++){ for(int j=r1;j<=r2;j++){ sum=sum+arr[i][j]; } } co...
ALGO
0.999822
3.19578
0302e7c5-a126-45d0-bf6a-e8454ad7b286
Lynx2711/codes
c++codes/assignments/day21/question2.cpp
#include <iostream> #include <string> using namespace std; string reverseString(string str) { int n = str.length(); for (int i = 0; i < n / 2; i++) { swap(str[i], str[n - i - 1]); } return str; } int main() { string str; cout << "Enter a string: "; getline(cin, str); string re...
ALGO
0.868262
5.844614
d8109169-afdf-4501-a4ee-fbacd4132a98
qwefgh90/AlgorithmSolution
GoogleCodeJamPractice/codejam/codejam/MagicTrick.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> //https://code.google.com/codejam/contest/2974486/dashboard int main(){ int testcase; scanf("%d",&testcase); FILE* f = fopen("output.txt", "w"); for(int k = 0 ; k < testcase ; k++){ int userSay; int userSay2; int cards[4][4] = {0,}; int cards2[4][4...
ALGO
0.998746
3.593239
26a3e45c-61a6-49ff-86bb-8c72241014e8
xhixhixx/SPH-Particles-system
SPH/3rdpartylib/glm-0.9.8.5/test/core/core_func_integer_bit_count.cpp
// This has the programs for computing the number of 1-bits // in a word, or byte, etc. // Max line length is 57, to fit in hacker.book. #include <stdio.h> #include <stdlib.h> //To define "exit", req'd by XLC. #include <ctime> unsigned rotatel(unsigned x, int n) { if ((unsigned)n > 63) {printf("rotatel, n out of ...
ALGO
0.999222
4.574697
a67e5995-1adb-4e4f-a754-42acfd0d470d
AbdullahZahra/problemsolving
CodeitVol2/session 1,2/Odd Numbers.cpp
// https://www.urionlinejudge.com.br/judge/en/problems/view/1067 #include<iostream> using namespace std; int main() { int x; cin >> x; for (int i = 1; i <= x; i++) { if (i % 2 != 0) cout << i << endl; } return 0; }
ALGO
0.999538
3.84405
972f2ae2-8209-4975-ba5c-37691c5669c7
skanda99/AtCoder
ABC154-F.cpp
// problem: "https://atcoder.jp/contests/abc154/tasks/abc154_f" #include<bits/stdc++.h> #define ll long long #define p (ll)(1e9+7) #define n (ll)(2e6+3) using namespace std; void calcFact(vector<ll>&V) { V[0] = 1; ll i; for(i=1;i!=n;i++) V[i] = (V[i-1]*i)%p; } ll power(ll a,ll m) { if(!m) ...
ALGO
0.999964
4.387484
843346bc-1093-48c9-aa32-30c62ae41811
inischay/ChatGPT
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
9a996734-bb27-41dd-af91-85a04ee8417d
KwanWaiPang/DBA-Fusion_comment
thirdparty/eigen/unsupported/bench/bench_svd.cpp
// Bench to compare the efficiency of SVD algorithms #include <iostream> #include <bench/BenchTimer.h> #include <unsupported/Eigen/SVD> using namespace Eigen; using namespace std; // number of computations of each algorithm before the print of the time #ifndef REPEAT #define REPEAT 10 #endif // number of tests of t...
TEST
0.995568
6.282691
62ae35c5-76b5-4175-9eb1-06efba0a76ef
aanzolaavila/competitive-problems
codeforces/Resueltos/A. Translation.cpp
#include <cstdio> #include <cstring> #define SZ 101 using namespace std; int main() { char s[SZ]; char t[SZ]; scanf("%s", s); scanf("%s", t); int ls = strlen(s); int lt = strlen(t); bool r = ls == lt; for(int i = 0; i < lt && r ; ++i) { if ( t[i] != s[ls-i-1] ) r = false; ...
ALGO
0.999988
3.635537
75f0f004-7130-4405-b323-4fb34177b03d
bioexcel/bioexcel-exascale-co-design-benchmarks
GROMACS/nonbonded_benchmark/gromacs_source_code/src/gromacs/hardware/detecthardware.cpp
#include "gmxpre.h" #include "detecthardware.h" #include "config.h" #include <algorithm> #include <array> #include <chrono> #include <memory> #include <string> #include <thread> #include <vector> #include "gromacs/compat/pointers.h" #include "gromacs/gpu_utils/gpu_utils.h" #include "gromacs/hardware/cpuinfo.h" #inc...
TOOL
0.873424
6.569928
ff07aed2-caee-4050-95cd-b558e16a4bd3
gskabdwal/Codeforces
Div2A/A_Level_Statistics.cpp
#include <bits/stdc++.h> using namespace std; void solve(){ long long n, a = 0 , b = 0, c = 0, d = 0 , fl = 1, ans = 0; string str; cin>>n; for(int i=0; i<n; i++){ cin>>a>>b; if(a<c || b<d || a<b || (a-c)<(b-d)){ fl = 0; } c = a, d = b; ...
ALGO
0.999932
4.500115
aff2f4f5-b6fd-4a6d-bba5-242baa9f832e
spacefarers/cp
problems/USACO/2017-usopen/s-3.cpp
#include <iostream> #include <fstream> #include <string> #include <cstring> #include <queue> #include <set> #include <cmath> #include <map> #include <algorithm> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef vector<pi...
ALGO
0.998509
4.371625
b912ddeb-9989-405c-8116-64bccac9abb1
aarushi-1601/GFG
Basic/Count the characters/count-the-characters.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int getCount (string S, int N) { unordered_map<char,int>m; int count=0; for(int i=0; i<S.length(); i++){ if(S[i]!=S[i-1]){ ...
ALGO
0.99983
6.40582
5cd230c9-9447-4d80-92ee-d0dbc3443f0f
mfranzil-unitn/unitn-prog1
tutoring/20211115/5.1-ori.cpp
#include <cstring> #include <fstream> #include <iostream> using namespace std; void leggi_e_calcola_massimo(char nome_file[], int &massimo); int main() { char nome_file[] = "input1.txt"; int result = 0; leggi_e_calcola_massimo(nome_file, result); cout << "Il numero massimo in " << nome_file << " e':...
ALGO
0.921501
4.454661
cd149d36-ecdb-481d-82dd-ce6c320702a7
guoliqiang/coding
third_part/boost/boost_1_53_0/libs/numeric/ublas/doc/samples/assignment_examples.cpp
#include <boost/numeric/ublas/assignment.hpp> #include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/vector_proxy.hpp> #include <boost/numeric/ublas/matrix_proxy.hpp> #include <boost/numeric/ublas/vector_sparse.hpp> #include <boost/numeric/ublas/matrix_sparse.hpp> #include <boost/numeric/ublas/io.hpp> ...
TOOL
0.926406
3.670881
7610fe23-38dc-4250-b4f4-4e53b467e91d
xjs-js/leetcode
0036.Valid.Sudoku/sol.cpp
/** * @date: 2021-04-15 21:04 Thur. */ class Solution { public: bool isRowValid(vector<vector<char>>& board, int row) { unordered_set<char> memo; for (int i = 0; i < 9; ++i) { char c = board[row][i]; if (c == '.') { continue; } ...
ALGO
0.999736
6.986607
abfbe3fd-bdad-4232-a65a-03203c7bdadf
Bhuteshkumarmeher07/DSA_SUPREME
DP/lec6/Q2_Longest_Palindromic_Subsequence.cpp
// https://leetcode.com/problems/longest-palindromic-subsequence/description/ class Solution { public: int spaceOpt(string a,string b){ vector<int>curr(b.length()+1,0); vector<int>next(b.length()+1,0); for(int i = a.length()-1;i>=0;i--){ for(int j = b.length()-1;j>=0;j--){ ...
ALGO
0.999975
6.253877
3b9558c9-c791-4a7d-809c-01c0673fed76
Onwaier/CCF
201803-1.cpp
#include<bits/stdc++.h> using namespace std; int main() { //freopen("E://a.txt", "r", stdin); int num, lastscore = 1, sum = 0; while(scanf("%d", &num) != EOF){ if(num == 0){ break; } if(num == 1){//û lastscore = 1; } else{ if(lastscore == 1){// ϴûĻһ lastscore = 2; } else{// las...
ALGO
0.999864
3.39661
f573dcf7-4799-4b22-aa40-15a40a871790
its-sachin/InterviewBit
Maths/gcd.cpp
#include<bits/stdc++.h> using namespace std; //typedef long long int; #define inf 1e18 #define mod 1000000007 #define pb push_back int gcd(int A, int B) { if(A==0) return B; else if (B==0) return A; while(A!=B){ if(A>B) A=A-B; else B=B-A; } ...
ALGO
0.99979
3.453008
d3d241f3-7b69-4a63-b348-7b589a104b09
michaelarakel/uva-solutions
458.cpp
#include <iostream> #include <string> using namespace std; int main() { string s; while (cin >> s) { if (cin.eof()) break; for (int i = 0; i < s.size(); ++i) s[i] = char(s[i] - 7); cout << s << endl; } }
TOOL
0.992557
3.505773
48384705-1c7e-4fe9-a9da-d5832806f8e9
mapin1/autoware.ai-1.14.0
src/autoware/core_planning/waypoint_planner/src/velocity_set/velocity_set_path.cpp
#include <waypoint_planner/velocity_set/velocity_set_path.h> VelocitySetPath::VelocitySetPath() : set_path_(false), current_vel_(0) { ros::NodeHandle private_nh_("~"); private_nh_.param<double>("velocity_offset", velocity_offset_, 1.2); private_nh_.param<double>("decelerate_vel_min", decelerate_vel_min_, 1...
TOOL
0.928354
5.856843
36514490-911b-4618-9d45-21fa5b698ae9
lucas208/poo-c-
CAP 10/q01.cpp
#include <iostream> using namespace std; int main (){ int x = 5, y = 10,x1 = 10; int *x1ptr; x1ptr = &x1; cout << *x1ptr <<" "<< x1ptr << endl; cout <<"X: " << x <<" /// Endereco: " <<&x << endl; cout <<"Y: " << y <<" /// Endereco: " <<&y << endl; }
ALGO
0.953889
3.614228
e1ff6edf-279c-476e-9b1d-9a4020468d3d
Tofsir7/Competitive-Programming
Atcoder Codes/B & C/ABC 44_B.cpp
#include<bits/stdc++.h> using namespace std; int main() { string s; map<char,int>m; cin>>s; for(int i=0;i<s.size();i++) m[s[i]]++; for(char i='a';i<='z';i++) { if(m[i]%2) { cout<<"No"<<endl; return 0; } } cout<<"Yes"<<endl; }
ALGO
0.999991
3.637983
87cc8dfd-eeea-4566-9a63-28c7de9c6e5f
kamrul17/Top-50-Array-Problems
next_permutation.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int arr[] = {1, 3, 2}; next_permutation(arr, arr + 3); cout << arr[0] << " " << arr[1] << " " << arr[2]; return 0; }
ALGO
0.999679
4.16184
f324b273-3c27-4b2d-a0b4-7e1c0888a691
PRANAVJARANDE/CodeForces
C - Even Number Addicts.cpp
//1738C - Even Number Addicts #include <bits/stdc++.h> using namespace std; #define MOD (int)(1e9 + 7) #define ll long long void solve() { ll n;cin>>n; ll e=0,o=0; for(int i=0;i<n;i++) { ll temp;cin>>temp; if(temp%2==0)e++; else o++; } if(o%4==0 || o%4==3 || (o%4==1 &&...
ALGO
0.999978
4.641892
957e24dd-d3e4-4a14-bc0e-4d905882ae41
jzzzzh/HiBench
dataset/Code/c++Selected/13.cpp
class Solution { public: bool isSameAfterReversals(int num) { return (num == 0 || num % 10); } };
ALGO
0.999319
6.001727
09edc856-931c-436f-bb0d-a9391c0472cb
interval-arithmetic-ise/llvm
llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
#include "llvm/Transforms/Utils/BypassSlowDivision.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Derive...
ALGO
0.977373
7.934437
db916da9-15a8-4c03-a141-236805738040
jay196150/cp-180-days
day_1/cses/Number_Spiral.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { long long int y, x; cin >> y >> x; long long int maxi = max(y, x); long long int squre = (maxi - 1) * (maxi - 1); if (maxi & 1) { if ( y > x ) ...
ALGO
0.999723
4.355754
adee5887-24de-410c-b7a8-7e2ab6610597
ishandutta2007/codeforces
imeimi/normal/1007/A.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_map> #include <functional> #include <cstring> #include <cmath> #include <ctime> #include <cstdlib> using namespace std; typedef long long llong; typedef long double ld; typedef...
ALGO
0.99999
4.156401
ec95f687-59e7-4392-b71f-3646b5e44719
AlexCS1337/JediKnightGalaxies
codemp/game/bg_slidemove.cpp
// bg_slidemove.c -- part of bg_pmove functionality #include "qcommon/q_shared.h" #include "bg_public.h" #include "bg_local.h" #if defined(_GAME) #include "g_local.h" #elif defined(IN_UI) #include "../ui/ui_local.h" #elif defined(_CGAME) #include "../cgame/cg_local.h" #endif extern bgEntity_t *pm_entSelf; qboole...
ALGO
0.955605
3.765167
5f5e0b69-8b6e-487d-9227-59cb48212a8b
raincross7/code-similarity
codes/train_code/problem027/problem027_205.cpp
#include<iostream> using namespace std; int main() { int a, b, c, x; char r[10000]; for (int i = 0;; i++) { cin >> a >> b >> c; if (a == b&&b == c&&c == -1){ x = i; break; } else if (a == -1 || b == -1){ r[i] = 'F'; }else if (a + b >= 80){ r[i] = 'A'; }else if (65 <= a + b) { r[i] = 'B'; ...
ALGO
0.999722
3.501906
a272a1d7-5d41-40c9-8c06-9dcff9b6b8b8
PranshuArora07/MyDs
practice/recursion/FindSubsequenes.cpp
#include<iostreaM> #include<string.h> using namespace std; void FindSequences(string str, string &output, int index) { //base case if(index >= str.length()) { //output string print kara do cout << output << endl; return; } char ch = str[index]; //include output.push_ba...
ALGO
0.999971
5.112955
71a3e4e2-e524-47c5-87ad-2b81a51eae06
xiaomingcom-cs/hire-algorithm
xiaohongshu-0806-1.cpp
//输入14行字符串,每两行代表一天的开始时间和结束时间。 //保证开始时间一定迟于17:00,结束时间一定早于03:00(即小红在下午5点之后才会开始刷小红书,且一定会在凌晨3点前睡觉)。 //输出一个整数,代表小红总共刷小红书的时间。 #include<bits/stdc++.h> using namespace std; int main(){ string s[20]; int ans=0; for(int i=0;i<14;i++){ // cout<<i<<endl; cin>>s[i]; } for(int j=0;j<14;j++){ // cout<<i<<en...
ALGO
0.999724
4.429648
bd269225-ae4c-4a8e-8c5c-76b2ced87038
skygupta07/DSA
12_strings1/9_excelSheetColumnTitle.cpp
// excelSheetColumnTitle.cpp #include <bits/stdc++.h> using namespace std; /* Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... Example 1: Input: columnNumber = 1 Output: "A" Example 2: In...
ALGO
0.998202
6.588375
d652e278-f997-47f9-8601-3b4597552dc6
AlbertoSMC72/Flutter_Login_Secure
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.998733
6.76775
9b0e3a31-421c-4f56-8f10-c857d6bd9db6
Ttouch-thareewet/Algo
da67_f_border_extend.cpp
#include <iostream> #include <set> #include <vector> #include <limits.h> #include <queue> using namespace std; vector<vector<int>> m; vector<vector<int>> d; int r,c,k; queue<pair<int,int>> q; void dfs(){ while(!q.empty()){ int f = q.front().first; int s = q.front().second; q.pop(); i...
ALGO
0.999903
3.022168
d841560a-76bf-4639-9560-c00ac2ad8e0a
madhav-bits/Coding_Practice
leetFindPlayersZeroorOneLosses.cpp
/* * //*********************************************2225. Find Players With Zero or One Losses.********************************************* https://leetcode.com/problems/find-players-with-zero-or-one-losses/ *******************************************************************TEST CASES:*******************************...
ALGO
0.999385
5.817151
27e819b9-3401-440e-a454-83487d5a3941
NUsav77/Open-Ended-Capstone-Step-3
geos-3.9.1/src/operation/overlayng/RingClipper.cpp
#include <geos/operation/overlayng/RingClipper.h> namespace geos { // geos namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng /*public*/ std::unique_ptr<CoordinateArraySequence> RingClipper::clip(const CoordinateSequence* cs) const { std::unique_ptr<CoordinateArraySeque...
ALGO
0.942169
6.631406
ba4216de-d5bf-4600-9778-9e9ca4ccdf1e
sexettin78/veri-yapilari
queue1.cpp
#include <stdio.h> #include <stdlib.h> int * dizi = NULL; int sira = 0, sirabasi = 0, boyut = 2; int deque(){ if(sira == sirabasi){ printf("Sra bo"); } if(sira-sirabasi<boyut/4){ int * dizi2 = (int *)malloc(sizeof(int)*boyut/2); for(int i=0;i<=sira-sirabasi && boyut >= 0;i++){ dizi2[i] = dizi[sirabasi+...
ALGO
0.99842
3.989617
9396b0ec-d696-452f-9fb0-bff49033cc3f
coding-blocks-archives/vmc-codingblocks-2017
17-11-29/macroSq.cpp
// Deepak Aggarwal, Coding Blocks // <EMAIL> #include <iostream> using namespace std; #define square(x) x*x int main() { cout << square(2 + 2); }
TOOL
0.966164
4.232065
36bf8f5d-5799-4137-ae14-32eb994b61eb
raincross7/code-similarity
codes/train_code/problem065/problem065_321.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int,int> P; #define rep(i,n) for(int i=0;i<(n);++i) #define repi(i,a,b) for(int i=int(a);i<(b);i++) #define repr(i,b,a) for(int i=int(b);i>=(a);i--) #define all(x) x.begin(),x.end() const ll mod = 1e9+7; const ll INF = 1e9; ll gcd...
ALGO
0.999884
3.49569
db5c330c-fe25-4e1f-b4e3-946c6ccbb7e9
ankeshbanerjee/cpp-and-dsa
Questions/Lecture 48 remove duplicates/02_remove_duplicates_from_unsorted_LL.cpp
#include <iostream> #include <map> using namespace std; class Node { public: int data; Node * next; //constructor Node (int data){ this->data = data; this -> next = NULL; } }; void insertAtHead (Node * &head, Node *&tail, int d){ //in case of empty list (if the list is e...
ALGO
0.999899
5.340858
7d4ec704-0150-44f9-8f8f-e8960605dfd7
J-Solbach/VRAC_sdk
libs/range-v3/test/algorithm/minmax.cpp
#include <range/v3/algorithm/minmax.hpp> #include <range/v3/view/subrange.hpp> #include <memory> #include <numeric> #include <random> #include <algorithm> #include "../simple_test.hpp" #include "../test_utils.hpp" #include "../test_iterators.hpp" RANGES_DIAGNOSTIC_IGNORE_GLOBAL_CONSTRUCTORS namespace { std::mt199...
TEST
0.887987
6.808248
a1c2a7b5-7ea4-444a-b428-2a3f72163177
xBece/DGIIM
FP/Sesión 7/Aula/11 - TipoConjunto.cpp
#include <iostream> using namespace std; const int MAX_COMP = 1000; struct TipoConjunto { int num_elem; int elementos[MAX_COMP]; }; void ComponentesVector(TipoConjunto & conjunto, const char nombre[]); // Guardamos un vector void MostrarVector(TipoConjunto conjunto, const char nombre[]); ...
ALGO
0.982989
4.285464
679dcf8b-47d8-44f7-aaed-5d0bc6a9933a
ice2age/Algorithm
UVA/573.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cctype> #include <string> #include <map> #include <set> #include <vector> #include <cassert> #include <algorithm> #include <sstream> #include <limits> #include <cmath> #include <utility> using namespace std; typedef long long Loong; int main(void) { ...
ALGO
0.998604
3.070737
91ea19f7-1ce1-40cd-bcb5-7cd200fd016e
abhishekrajput55/Oops-AssiAndPracticle
Oops-practicle/26overloadBinary( ).cpp
#include <iostream> using namespace std; class Point { private: int x, y; public: Point(int xValue = 0, int yValue = 0) : x(xValue), y(yValue) {} // Overload the binary addition operator (+) Point operator+(const Point &p) const { return Point(x + p.x, y + p.y); } void display() con...
ALGO
0.970152
6.441684
1b276a0d-8434-4e7f-ac07-e750c9065b43
Yijun-Jeon/BaekjoonOnlineJudge
백준/Review/BOJ/30685. 버터 녹이기/버터 녹이기.cpp
#include <iostream> #include <algorithm> #include <utility> #define MAX_N 300000 #define MAX_TIME 2e9 using namespace std; int N; pair<int,int> map[MAX_N]; int binarySearch(int left, int right){ while(left <= right){ int mid = (left + right)/2; int prev = map[0].first + min(map[0].second,mid); ...
ALGO
0.999962
3.885911
bcb62440-3d6d-4670-9a0f-4847a8fabafd
kupl/apps-sal
apps_sal/data/test/2888/solutions/12.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; #ifdef LOCAL_DEFINE #pragma GCC optimize ("Ofast") #pragma GCC target ("avx2") #endif i...
ALGO
0.999726
3.987678
94d22be6-ad95-4a6b-bd6d-aad4365fec76
ishandutta2007/codeforces
thenymphsofdelphi/normal/19/E.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define endl '\n' #define fi first #define se second #define For(i, l, r) for (int i = l; i < r; i++) #define ForE(i, l, r) for (int i = l; i <= r; i++) #define FordE(...
ALGO
0.999965
4.314209
37e4cb76-0d1a-4032-94d8-17f35113dbba
Yaoguang161/appointment
CLionProjects/sky/day12/2.cpp
// // Created by Asaki on 2021/4/7. //1205. 买不到的数目 #include<bits/stdc++.h> using namespace std; bool dfs(int m , int p , int q){ if(!m) return true; if(m >= p && dfs(m-p,p,q)) return true; if(m >= q && dfs(m-q, p , q)) return true; return false; } int main(){ int p , q; cin >> p >> q; int re...
ALGO
0.99993
3.430635
87149d2d-59c8-411e-8355-c494f8457a37
ishandutta2007/codeforces
farhod_farmon/normal/567/C.cpp
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <map> #include <vector> #include <cstdlib> #include <algorithm> #include <set> #include <deque> #include <queue> #include <stack> #define lli long long int #define sc scanf #define pr printf #define pb push_back #define p_b pop_back #de...
ALGO
0.999745
3.360704