uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
f0011927-4d74-453a-a2fb-51a6a0a62215
raincross7/code-similarity
codes/train_code/problem114/problem114_346.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <ctime> #include <cassert> #include <complex> #include <string> #include <cstring> #include <chrono> ...
ALGO
0.999693
4.065444
b015ba9e-e0ac-437d-bf13-00d5110e265d
geoloqi/polysplit
polysplit.cpp
#include <cstdlib> #include <iostream> #include <vector> #include <ogrsf_frmts.h> #define MAXVERTICES 250 #define OUTPUTDRIVER "ESRI Shapefile" #define OUTPUTTYPE wkbPolygon #define IDFIELD "id" typedef std::vector<OGRPolygon *> OGRPolyList; typedef int feature_id_t; static bool debug = false; void split_polygons(O...
DATA
0.934275
6.219742
f49852e0-5507-44f7-99c4-769e7e778026
DOASNB/ProgettoPiattaformeFrontend
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998784
6.761023
9e0a9850-ed32-4d4d-8051-94e86d225f7a
sammyne/hacker-rank
data-structures/linked-lists/print-the-elements-of-a-linked-list/main.cpp
#include <iostream> using namespace std; /* Print elements of a linked list on console head pointer input could be NULL as well for empty list Node is defined as */ struct Node { int data; struct Node *next; Node(int d) { data = d; next = NULL; } }; void Print(Node *head) { ...
ALGO
0.994651
4.983798
bccdb7d1-629f-4e83-959f-d2430d6f23d7
ThienTheCreator/Programing
1337c0d3/190_ReverseBits.cpp
/* 190. Reverse Bits Reverse bits of a given 32 bits unsigned integer. Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, both input and output will be given as a signed integer type. They should not affect your implementation, as the integer's internal binary represent...
ALGO
0.999877
6.116014
5e3a6fa3-5640-433e-8303-179cf9bc3d37
julianadesouzamartins/consumo_dio
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
c6b8acc2-e116-4e7b-bb3b-bfc465a98662
Vojlok/tsmp_project
components/MagicFm/Source/Numerics/MgcFastFunction.cpp
// The approximation formulas are from // // Handbook of Mathematical Functions // Edited by M. Abramowitz and I.A. Stegun. // Dover Publications, Inc. // New York, NY // Ninth printing, December 1972 // For the inverse tangent calls, all approximations are valid for |t| <= 1. // To compute ATAN(t) for t > 1...
ALGO
0.993012
6.319524
ef182309-fd2f-4a5e-9446-10a48b6c82d8
freezer-glp/leetcode-submit
src/Lowest Common Ancestor of a Binary Search Tree.cpp
/*Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia: The lowest common ancestor is defined between two nodes v and w as the lowest node in T that has both v and w as descendants (where we allow a node to be a descendan...
ALGO
0.999992
6.174401
fedcb82e-0dcc-48f8-912c-9719421f7a42
GayaneBaghramyan/specops_tasks
abs.cpp
# include <iostream> # include <cmath> int main () { int sum=0; int sum_mul=0; int mul_sum=0; for (int i=0;i<5;++i) { sum+=i; mul_sum+=i*i; } sum_mul=sum*sum; std::cout<<abs(mul_sum-sum_mul)<<std::endl; return 0; }
ALGO
0.999127
3.757262
f565c12e-3a24-40ab-9f0a-f85dd7823308
Mrsandman327/windows-book-code-c-
3rdparty/rapidjson/example/serialize/serialize.cpp
// Serialize example // This example shows writing JSON string with writer directly. #include "rapidjson/prettywriter.h" // for stringify JSON #include <cstdio> #include <string> #include <vector> using namespace rapidjson; class Person { public: Person(const std::string& name, unsigned age) : name_(name), age_(...
TOOL
0.866197
7.00667
624d1c9a-324f-4347-86d8-664ea144d31d
Sitto2002/LeetCode
binarySearch.cpp
#include<iostream> using namespace std; bool binarySearch(int *arr, int s , int e , int search){ if(s>e){ return false; } int mid = (e-s)/2; if ( arr[mid] == search ){ return true; } if ( arr[mid] < search){ return binarySearch(arr , mid+1 , e , search); ...
ALGO
0.999941
3.471959
08bb9e88-35b9-4b52-8136-79010a41c2ec
paul-bartlett/LeetCode
C++/AddTwoNumbers.cpp
/** * You are given two non-empty linked lists representing two non-negative integers. * The digits are stored in reverse order and each of their nodes contain a single digit. * Add the two numbers and return it as a linked list. * You may assume the two numbers do not contain any leading zero, except the number ...
ALGO
0.999978
7.004166
c26f4040-63a2-4746-ac6e-4d3456600cc8
Athiraksagm/c2512
Phase2_Evaluation1/Task2.cpp
#include<iostream> #include<vector> #include<string> #include<thread> class LabTest{ private: std::string testId; double resultValue; public: LabTest(std::string id, double result) : testId(id), resultValue(result) {} double getResult() const{ return res...
ALGO
0.998511
5.781401
dc0a8df6-9991-4f33-84cc-7cc3afbcc665
guinao/LeetCode
Remove Duplicates from Sorted Array.cpp
#include <cstdio> class Solution { public: int removeDuplicates(int A[], int n) { if(n == 0) return 0; int pre = 0; int cur = pre+1; while(cur < n){ if(A[pre] != A[cur]){ A[++pre] = A[cur]; } cur++; } return pre+1; } }; //#include <algorithm> //using namespace std; // //class Solution { ...
ALGO
0.999844
4.768969
be7eb2bc-3410-4384-b749-e8e1d15f7379
Ps066/Competitive-programming-practise
bit_manipulation/negative_dec_to_binary.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; // Check if the number is negative if (n < 0) { int absValue = -n; // Convert negative number to positive (absolute value) int ans = 0; int i = 0; // Finding the binary representation of the a...
ALGO
0.999976
6.301351
bc905cee-12b8-46ed-89c3-113f40f22956
KimDaewWoong/algorithm
1920์ˆ˜์ฐพ๊ธฐ.cpp
#include<cstdio> #include<algorithm> using namespace std; int arr[100100]; int main() { int n, m; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", &arr[i]); sort(arr, arr + n); scanf("%d", &m); for (int i = 0; i < m; i++) { int val; scanf("%d", &val); int a = lower_bound(arr, arr + n, val) - arr; ...
ALGO
0.999982
4.078906
f24d15f1-24a0-46c9-9886-588c5e1c7002
luis01qs/Repositorio
Entrenamiento/Codeforces/Contest 04-03-2023/b.cpp
# include <bits/stdc++.h> # define ll long long using namespace std; int main() { freopen("prueba.txt", "r", stdin); int tt; cin>>tt; while(tt--) { int n; cin>>n; vector<ll> a(n); int cont = 0; for(int i=0;i<n;i++) { cin>>a[i]; ...
ALGO
0.999969
3.453111
b5720555-2066-4514-a084-8c1a4daecfb5
MuhammadHamza00/Leetcode-Sessions
1146-greatest-common-divisor-of-strings/greatest-common-divisor-of-strings.cpp
class Solution { public: string gcdOfStrings(string str1, string str2) { if(str1+str2 == str2+str1){ int a, b; if (str1.length() > str2.length()) { a = str1.length(); b = str2.length(); } else { a = str2.length(); b = str1.length(); } int R = 0; int Q = 0...
ALGO
0.99994
5.966604
06c68fec-1bf6-48a7-842b-52946bc83bd6
FHead/PhysicsJetShapeExploration
CommonCode/source/CATree.cpp
#include <algorithm> #include <cmath> #include <iostream> #include "include/CATree.h" #include "include/BasicUtilities.h" Node::Node() : P(0, 0, 0, 0), Child1(NULL), Child2(NULL), Parent(NULL), N(1) { } Node::Node(FourVector &p) : P(p), Child1(NULL), Child2(NULL), Parent(NULL), N(1) { } Node::Node(Node *n...
ALGO
0.999683
4.097847
39b14e8d-8b6c-4ce1-b938-c97fc8a90819
whyntcs2/B-i-t-p
B1.cpp
#include<stdio.h> #include<string.h> int main (){ int t; scanf("%d", &t); getchar(); while(t--){ char s[501]; gets(s); int sum = 0; int l = strlen(s); for(int i=0; i<l; i++){ sum +=s[i]-'0'; } if (sum%3==0) printf("YES\n"); else printf("NO\n"); } }
ALGO
0.999843
3.832115
6c6a5336-4396-4a3d-80a8-e9d8a4ff9b12
GorkemOkur/Cpp-How-to-Program-9-e
Chapter05/exercise_5-05.cpp
/* * ===================================================================================== * * Filename: exercise_5-05.cpp * * Description: 5.5 (Summing Integers) * * * Version: 1.0 * Created: 13/05/18 01:10:00 * Revision: none * Compiler: g++ * * ...
ALGO
0.99653
3.452504
f038108f-7c15-4c38-9f99-6eb964c4ed96
ishandutta2007/codeforces
ivan100sic/normal/364/C.cpp
// I've decided to retire from ALL contests // It's been a nice ride... but I need to move on #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; const int SITO_MAX = 10000; int f[SITO_MAX+1]; vector<int> prosti; struct sito { sito() { for (...
ALGO
0.999855
3.685158
c6a64fc4-5cdb-4a97-aa1e-3ee009de8f69
resulkizmaz/FPS-Survival-Shoter-Game
FPS Survival-Shoter Game/Library/PackageCache/com.unity.ide.visualstudio@2.0.15/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp
#include <iostream> #include <sstream> #include <string> #include <filesystem> #include <windows.h> #include <shlwapi.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 made to Visual Studio can fail after ...
TOOL
0.952264
6.969462
fbbdbe10-04f7-4221-90d9-c7b651fb4a46
bjbjkidrock/LeetCode-1
Algorithms/super-ugly-number.cpp
313. Super Ugly Number https://leetcode.com/problems/super-ugly-number/ Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k. For example, [1, 2, 4, 7, 8, 13, 14, 16, 19, 26, 28, 32] is the sequence of the first...
ALGO
0.99998
5.749802
9bf59b39-13f7-43bf-a109-99b2061c817f
AkshatAggarwal14/Competitive-Programming
CodeForces/Gym/103185N.cpp
//**********************master._.mind********************** //-----------------Author: Akshat Aggarwal----------------- //If you don't understand the code below... dont worry, i didn't either #include <bits/stdc++.h> using namespace std; #define ll long long #define lld long double #define ull unsigned long long #defi...
ALGO
0.996105
3.485009
0d996e98-599d-4f9d-92da-959e0fa52132
adamczykpiotr/MonteCarlo-OrthogonalSampling
MonteCarlo-OrthogonalSampling/MonteCarlo-OrthogonalSampling.cpp
#include <iostream> #include "MonteCarlo.h" #include <vector> #include <fstream> float matyas(float x, float y) { return 0.26f * (x * x + y * y) - 0.48f * x * y; } float mcCormick(float x, float y) { return sin(x + y) + (x - y) * (x - y) - 1.5f * x + 2.5f * y + 1.f; } float zEquals4(float x, float y) { return 4; ...
ALGO
0.992019
4.618318
060ea968-6cc2-4ea3-9c79-d8ae8b6208a1
isac322/BOJ
10211/10211.cpp
#include <cstdio> #include <algorithm> using namespace std; int main() { int v[1000]; int n, t; scanf("%d", &t); while (t--) { scanf("%d", &n); for (int i = 0; i < n; ++i) scanf("%d", v + i); int maxSoFar = v[0], curr_max = v[0]; for (int i = 1; i < n; ++i) { curr_max = max(v[i], curr_max + v[i]);...
ALGO
0.999694
3.98906
77cfa601-1d92-4eb5-8cba-6e997f1a2226
ramderoy1234/leetcode_problems
0106-construct-binary-tree-from-inorder-and-postorder-traversal/0106-construct-binary-tree-from-inorder-and-postorder-traversal.cpp
class Solution { TreeNode*solve(vector<int>& inorder, vector<int>& postorder, int start,int end, int &idx){ if(start>end) return nullptr; int rootVal=postorder[idx--]; int i=start; for(;i<=end;i++){ if(inorder[i]==rootVal) break; } TreeNode*root=new TreeNode(rootVal); root->right=so...
ALGO
0.999969
6.126901
dadc2daf-9618-49f4-b16b-abf655f8cd0d
JoaoTurolla/collegeClasses
class7/codes/code2class7.cpp
#include <iostream> #include <stdlib.h> using namespace std; void doubling(int *n){ *n = *n * 2; } //When using pointers, remember to always pass the parameter as its address: '&a' for example int main(){ int a; int vector[5] = {1, 2, 3, 4, 5}; for(int i = 0; i < sizeof(vector)/sizeof(vector[0]); i++){ ...
ALGO
0.994566
3.330825
323f71fe-436b-4689-a40d-4be58f8fcbf7
Dr-Khatib/PT1-SESJ1013
Students/Zulqarnain/arrayexercise1.cpp
#include <iostream> using namespace std; void medal_num(int medal[5][3],int i); int medal_total(int medal[5][3],int i); int highest(int total[5],int i); int smallest(int total[5],int i); int gold(int medal[5][3],int i); int bronze(int medal[5][3],int i); int main(){ int medal[5][3]; int temp,highests=0,smalle...
TOOL
0.993112
4.56271
d755cacd-74e4-4cfe-a49c-511f6c836345
charlessuh/ffdshow
src/Teval.cpp
#include "stdafx.h" #include "Teval.h" Teval::Teval(const char_t *Ic, const Tvariable *Ivars): expr(Ic), vars(Ivars) { expr.ConvertToLowerCase(); expr = stringreplace(expr, _l(" and "), _l("&&"), rfReplaceAll); expr = stringreplace(expr, _l(" or "), _l("||"), rfReplaceAll); expr = stringreplace(expr, _...
ALGO
0.87446
4.199094
040582de-7171-44c9-a95b-134c3dddb00d
Rishi838/code-freak
cpp/Vishal Dubey/pairs as a iterators.cpp
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> v={1,5,3,65,3}; // for(int i=0;i<v.size();i++){ // cout<<v[i]<<" "; //}cout<<endl; // vector<int> ::iterator it =v.begin(); //for(it=v.begin();it!=v.end();it++){ // cout<<*it<<" "; //} vector<pair<int,int>...
ALGO
0.969426
3.264543
3e0d94f3-2912-4efe-a3cb-5178e0a030bd
hs094/CP
Codeforces/Codeforces Round #784 (Div. 4)/A_Division.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__) #else #define dbg(...) #endif #define ar array #define ll long long #define ld long double #define sza(x) ((int)x.size()) #define all(a) (a).begin(), (a).end() #define forn(i, n) for (in...
ALGO
0.998848
4.568406
5c78d1cb-b8e3-4516-bf08-ab843ce8af21
ansh-h-mehta/GFG-POTD
Padovan Sequence 13-06-2024 POTD.cpp
/* Given a number n, find the nth number in the Padovan Sequence. A Padovan Sequence is a sequence which is represented by the following recurrence relation P(n) = P(n-2) + P(n-3) P(0) = P(1) = P(2) = 1 Note: Since the output may be too large, compute the answer modulo 10^9+7. Examples : Input: n = 3 Output: 2 Expl...
ALGO
0.999996
5.944691
f8a55996-f525-495c-ab6e-b13c92a1b41a
Baxterminator/ECN_Baxter
src/utils/jacobian.cpp
/**โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• * ? ABOUT * @maintainer : Timothรฉe Corroรซnne * @email : <EMAIL> * @repo : https://github.com/Baxterminator/ecn_baxter/ * @createdOn : 08/02/2023 * @description : Jacobian ...
ALGO
0.975136
6.869246
992c0351-a0aa-4b9a-a59b-523ce913533e
ishandutta2007/codeforces
aloneknight/normal/1172/C1.cpp
#include<bits/stdc++.h> using namespace std; const int N=200005,M=3005,P=998244353; int n,m,s,w,a[N],b[N],dp[M][M]; inline int pw(int a,int b){int r=1;for(;b;b>>=1,a=1ll*a*a%P)if(b&1)r=1ll*r*a%P;return r;} inline int pr(int a,int b){return 1ll*b*pw(a,P-2)%P;} int main() { scanf("%d%...
ALGO
0.999975
3.477627
157cff29-9eb8-465c-8bea-5b63dd925c42
Prakhar-002/LEETCODE
๐Ÿ“š Study ๐ŸŽง Plan ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป/๐Ÿจ LeetCode 75 - ๐Ÿชป Ace Coding Interview/๐Ÿ”ฌ Examine Thoroughly ๐Ÿงฌ/06 Stack/Day โžบ 24 ๐Ÿชป 2390. Removing Stars From a String โ˜ƒ๏ธ ๐Ÿ ๐Ÿฐ ๐ŸŽฒ/๐ŸŽฒCPP - 2390. Removing Stars From a String.cpp
//! https://github.com/Prakhar-002/LEETCODE // Todo ๐Ÿ’Ž QUESTION NUMBER 2390 //? โŒš Time complexity โžบ O(n) ๐Ÿ‘‰๐Ÿป n = len(s) //? ๐Ÿงบ Space complexity โžบ O(n) #include <iostream> #include <stack> #include <string> using namespace std; class Solution { public: string removeStars(const string& s) { // St...
ALGO
0.999817
6.530952
663f7ac5-cff8-401f-a050-3eb433eb40a9
ishandutta2007/codeforces
calabash_boy/normal/959/E.cpp
#include<bits/stdc++.h> using namespace std; typedef long long LL; LL n; LL bas[100]; int main(){ cin>>n; bas[0]=1; for (int i=1;i<64;i++){ bas[i] = bas[i-1]<<1; } LL ans =0; for (int i=0;i<64;i++){ bool dig = n&bas[i]; if (dig)ans+=bas[i]; } for (int i=0;i<64;i++...
ALGO
0.999931
4.114102
47735aec-abb9-4072-99a1-448180376239
Jack-420/Nandu-Da-Dhaba
C++/RecSort.cpp
#include<bits/stdc++.h> #include <iostream> using namespace std; #define jack420 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); void BubbleSort(int a[], int n){ if(n==0||n==1) return ; for(int i=0;i<n-1;i++) if(a[i]>a[i+1]) swap(a[i],a[i+1]); BubbleSort(a,n-1); } int main(){ ...
ALGO
0.999961
4.359392
fc79d1ad-595b-47b3-b263-d4edb4f7fa1f
tempest-shields/tempest-shields
src/storm-pars/analysis/AssumptionChecker.cpp
#include <storm/solver/Z3SmtSolver.h> #include "AssumptionChecker.h" #include "storm-pars/utility/ModelInstantiator.h" #include "storm/exceptions/NotSupportedException.h" #include "storm/modelchecker/CheckTask.h" #include "storm/modelchecker/prctl/SparseDtmcPrctlModelChecker.h" #include "storm/modelchecker/results/Che...
ALGO
0.99896
5.288682
3f34e654-3475-45a6-b0a3-7cbb7333b642
quanganh208/DSA-CodePTIT
DSA04001 - LลจY THแปชA.cpp
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; long long power(long long a, long long k) { if (k == 0) return 1; long long tmp = power(a, k / 2); return (k & 1) ? tmp * tmp % mod * a % mod : tmp * tmp % mod; } void solve() { long long n, k; cin >> n >> k; co...
ALGO
0.999956
4.850442
90e5924d-419f-40f9-89d4-170873f5b6f3
prashant695/DSA_350
Linked List/4. Merge Two Sorted Linked List.cpp
// https://leetcode.com/problems/merge-two-sorted-lists/submissions/ class Solution { public: ListNode *mergeTwoLists(ListNode *head1, ListNode *head2) { ListNode *curr = new ListNode(0); ListNode *tmp = curr; while (head1 and head2) { if (head1->val < head2->val) ...
ALGO
0.999901
6.00789
4b389296-1cf8-49f3-ae61-341d8e34c021
Yaroslavcoder47/cpp_labs
C++/lab05/Task6/library.cpp
#include <iostream> #include <vector> #include <algorithm> using std::pair; using std::cin; using std::cout; using std::vector; void inputData(vector<int>& container, int& n, int& k) { cout << "Input number of elements n: "; cin >> n; cout << "Input elements:\n"; container.resize(n); for (int i = 0; i < n; ++i) ...
ALGO
0.999877
3.955135
d907711e-2146-4e4a-9a59-d5bf87d64d32
0xj0hn/testproject
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998784
6.761023
aa8a61fc-2b95-4c1f-9071-6b3f507424de
vanshika-13/DSA_280
StacksQueues/Q11RottenOranges.cpp
/*Given a grid of dimension nxm where each cell in the grid can have values 0, 1 or 2 which has the following meaning: 0 : Empty cell 1 : Cells have fresh oranges 2 : Cells have rotten oranges We have to determine what is the minimum time required to rot all oranges. A rotten orange at index [i,j] can rot other fresh ...
ALGO
0.999838
6.23466
42a4966c-c0a3-4bed-9cab-9fcc8679f6ab
kalyansub/Test
bst.cpp
/* Code to learn how to build Binary Search Tree and associated funtions. This topic seems to be a frequently occusrring theme in SW interviews; Points to note: A binary tree is made of nodes, where each node contains a "left" pointer, a "right" pointer, and a data element. The "root" pointer points to th...
ALGO
0.99995
6.562009
f3df9412-b532-4f14-90e8-c8b5c2b57330
canakdag06/Algorithm-Practise-with-C
8/8_44.cpp
#include<stdio.h> #include<locale.h> int main() { int sayi; setlocale(LC_ALL,"Turkish"); printf("Sekizlik tabanda say giriniz: "); scanf("%o",&sayi); printf("------------------------------"); if(sayi>=0 && sayi<=77777777) printf("\nOnluk tabandaki karl : %d",sayi); else printf("\nUygun bir say girmediniz.")...
TOOL
0.874716
3.500473
4261d38e-007b-4703-aea2-38f4f158ee1c
Nikhil-Singla/the-daily-grind
leetcode/cpp/01_easy/0561_ArrayPartition.cpp
class Solution { public: int arrayPairSum(vector<int>& nums) { sort(nums.begin(), nums.end()); int sum = 0; for(uint i = 0; i < nums.size(); i += 2) {sum += nums[i];} return sum; } };
ALGO
0.999711
5.875391
c65e0ba2-c994-4ba1-9ea5-47083ab97a98
PaukIsUha/optimizing_formating_code
predictions/full_output_predicted_submissions/Codenet/p01515/224425242/0.cpp
#include <algorithm> #include <cctype> #include <iostream> #include <string> #include <vector> using namespace std; int mask; template <class T> struct Parser { typedef string::const_iterator State; T solve(const string &S) { State begin = S.begin(); return equation(begin); } T equation(State &begin) { ...
ALGO
0.999667
3.870251
e12ace2d-5505-471a-82f8-4a04386bcb27
Azhar221/DSA-Sheet
LOVE BABBAR DSA SHEET PROBLEMS/04_searching&sorting/Job Scheduling Algo/sol.cpp
/* Job Scheduling Algo Given N jobs where every job is represented by following three elements of it. Start Time Finish Time Profit or Value Associated Find the maximum profit subset of jobs such that no two jobs in the subset overlap. Example: Input: Number of Jobs n = 4 Job Details {Start Time, Finish Time...
ALGO
0.999985
6.140127
4159173a-9127-4a5d-8b77-d0174749cd5f
K0nnyaku/Code
Data/CSP-JS2021ไบŒ่ฝฎๆ้ซ˜็ป„ๆ•ฐๆฎ/SD-00150/bracket/bracket.cpp
#include<cstdio> #include<iostream> inline int read() { register char c(getchar()); register int x(0); while(c<'0'||c>'9')c=getchar(); while(c>='0'&&c<='9') { x=(x<<1)+(x<<3)+(c^48); c=getchar(); } return x; } inline void write(int x) { register int s[11],t(0),y; while(x) { y=x/10; s[++t]=x-(y<<1)-(y<...
ALGO
0.9999
3.26815
32f30be7-6164-4642-b3a3-ccaf9ea7388b
Sahil-Badkul/StriverSDESheet60DaysChallenge
Day3/majorityElement2.cpp
#include<bits/stdc++.h> using namespace std; /* Approach 1. hashing TC : O(n) SC : O(n) 2. Extended Moore's voting algo */ vector<int> majorityElementII(vector<int> &arr) { int num1 = 0, num2 = 0; int c1 = 0, c2 = 0; for(auto &x : arr){ if(c1 == 0){ num1 = x; ...
ALGO
0.999993
5.308229
cb5663a9-7560-49cb-8467-032ef3847fd7
treeswift/royalreward
algos/mission/military.cpp
#include "military.h" #include "dat_defs.h" #include "map_defs.h" #include "aynrand.h" #include <vector> #include <array> namespace mil { // Naive estimates on a small selection: // Continent 1: 105 lines (35x3) // A: HW=17 Fairies=16 Scare=17 Woods=14 Gob=15 Lun=8 Minesf=9 ... Can=2 FB=2 Bat=1 Sp=1 // D: HW=14 ......
CONFIG
0.975234
5.730029
4e8feda9-af25-4f71-bb6d-a0e3ee104e30
hafidissar101/robert-lafore
Chapter 3/7.cpp
/* Write a program that calculates how much money youll end up with if you invest an amount of money at a fixed interest rate, compounded yearly. Have the user furnish the initial amount, the number of years, and the yearly interest rate in percent. */ #include<iostream> using namespace std; int main(){ int year; ...
ALGO
0.997521
4.666385
dfe97785-5ca6-4cd1-bf6b-236a28971940
vitoriaoliferreira/ccp
inf 110/aulas praticas/mmc.cpp
#include <iostream> #include <cmath> using namespace std; int main() { int a,b,resto,mmc; cin >> a >> b; for (mmc=1; mmc>0; mmc++) { resto=(a*mmc)%b; if(resto==0) break; } cout << (a * mmc) << endl; return 0; }
ALGO
0.999937
3.730348
aa2986bb-3338-49b8-9cf2-d5eb61a03e4a
xuyanbo03/Algorithm
PAT/B1023/main.cpp
#include <iostream> using namespace std; int main(){ int s[10]; int num=0; for(int i=0;i<10;i++){ cin>>s[i]; num+=s[i]; } int z[num]; for(int i=1;i<10;i++){ if(s[i]!=0){ z[0]=i; s[i]--; break; } } int k=0; for(int i...
ALGO
0.999659
3.373798
7e420c46-b6bc-43a9-92a2-df4cfc5a6f02
Shell-Wataru/AtCoder
Codeforces/ECR089/B.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <iomanip> #include <cmath> #include <map> #include <bitset> using namespace std; using ll = long long; ll BASE_NUM = 1000000007; int solve() { ll n,x,m; cin >> n >>x >> m; ll lx = x; l...
ALGO
0.999912
4.204858
e565fdd6-c357-4979-bff8-fce4d0d52528
FennelDumplings/leetcode-maxed_out
algorithm/cpp/prob1001-1500/prob1408_easy_String-Matching-in-an-Array.cpp
// prob1408: String Matching in an Array /* * https://leetcode-cn.com/problems/string-matching-in-an-array/ */ #include <vector> #include <string> using namespace std; class Solution { public: vector<string> stringMatching(vector<string>& words) { int n = words.size(); vector<string> result; ...
ALGO
0.999897
5.451545
ff9cb523-9210-4565-b7ca-c0c2860f3c24
ishandutta2007/codeforces
y0105w49/normal/739/C.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define fi first #define se second typedef long long ll; typedef long double ld; const int inf=1e9+99; const int N=1<<19; struct dat { ll d; int ans; int dL,dR; int lenL,lenR,len; void inc(ll dd) { d += dd; dL=dR=(d>0)-(d<0); lenL=lenR=ans=...
ALGO
0.999973
4.132758
c4bb2c20-1bf4-4b45-aeb0-3816f858231d
camunozv/Algorithms-CSES
2-Sorting&Searching/23-ConcertTickets/main.cpp
#include <bits/stdc++.h> using namespace std; void count_appearances(vector<int> &A, map<int, int> &B); void assign_tickets(vector<int> &C, map<int, int> &F); int main() { ios::sync_with_stdio(0); cin.tie(0); int tickets = 0; int customers = 0; cin >> tickets; cin >> customers; vecto...
ALGO
0.999931
4.339855
ce2fac79-fa26-4df0-963b-ef2961ff753c
chrisfranko/MIM-MA-MM
src/qt/guiutil.cpp
#include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "bitcoinunits.h" #include "qvalidatedlineedit.h" #include "walletmodel.h" #include "core.h" #include "init.h" #include "util.h" #ifdef WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0501 #ifdef _WIN32_IE #undef _WIN32_IE ...
TOOL
0.892421
7.403416
72039021-45f5-40d2-92bc-99d77de0f030
imanolgzz/ICPC-CrusadersMTY
TrainingCamp_Mexico2024/day_4/L.cpp
#include <iostream> #include <vector> #include <algorithm> #include <math.h> using namespace std; int main(){ int n,k,q; int leftIt = 200004, rightIt = -1; cin >> n >> k >> q; vector<int> recommended(200000+5); vector<int> acceptable(200000+5); for(int it = 0; it < n; it++){ int l, r...
ALGO
0.999861
3.667686
771f5bdb-efcf-448b-986e-50aa18cad679
kushpo357/DSA_practice
GFG_POTD/word_search.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool dfs(vector<vector<char>>& board, int n, int m, int i, int j, string &word, int len, int ind) { if(ind == len) return 1; if(i < 0 || j < 0 || i >= n || j >= m) return 0; ...
ALGO
0.999801
5.976511
8c23a280-4780-4a19-8fb9-cf8efed670ff
SeanHsu-pub/zerojudge_practice
zerojudge_code/a248-2.cpp
#include<bits/stdc++.h> using namespace std; int main(void){ int a, b, n; while(cin >> a >> b >> n){ cout << a/b << "."; for(int i=0; i<n; i++){ a%=b; a*=10; cout << a/b; } cout << endl; } return 0; }
ALGO
0.999745
3.170753
bac58511-541e-4ffc-becc-f6b2625b34d3
doviethung11192023/code_c_pluss_pluss_2
bai tap string tao email.cpp
#include<iostream> #include<vector> #include<string> using namespace std; int main(){ int t; cin>>t; cin.ignore(); while(t--){ string s; getline(cin,s); for(int i=0;i<s.length();i++){ s[i]=tolower(s[i]); } vector<string>v; stringstream ss(s); string word; while(ss>>word){ v.push_ba...
ALGO
0.99884
4.395441
63ad7879-bc06-472c-a56a-7cdc78d4c926
Chiki1601/Codechef-Solution-
Beginners/NW1.cpp
/* * @author Pooja Anilkumar Patel (chiki1601) * github: http://www.github.com/chiki1601 * Created on 26/08/2022. * Problem link: https://www.codechef.com/problems/NW1 */ #include <iostream> #include <algorithm> #include <map> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int t; s...
ALGO
0.999932
4.101229
91685423-636e-42d4-98bf-2a6d27dcc36d
aks47u/HackerRank
Data-Structures/Delete_a_Node.cpp
#include <cstdio> #include <cstdlib> #include <iostream> using namespace std; Node* Delete(Node *head, int position) { Node * p = head; if (position == 0) { Node * q = head->next; free(p); return q; } while (--position) { p = p->next; } Node * q = p->next; p->next = p->next->next; free(q); retur...
ALGO
0.998516
3.395401
dd112808-8605-408a-9b11-b0e096d6c6a4
baofuhann/FISCO_BCOS_FL
deps/src/boost/libs/proto/example/mixed.cpp
#include <list> #include <cmath> #include <vector> #include <complex> #include <iostream> #include <stdexcept> #include <boost/proto/core.hpp> #include <boost/proto/debug.hpp> #include <boost/proto/context.hpp> #include <boost/proto/transform.hpp> #include <boost/utility/enable_if.hpp> #include <boost/typeof/std/list.h...
TOOL
0.901163
6.611748
2165b6fd-3efc-4b43-9446-c1c86200bf88
prajjwal1999/C-CODES
car_queue.cpp
#include <iostream> #include<queue> #include<vector> #include<functional> using namespace std; class Car{ public: int x; int y; int id; Car(int id,int x,int y){ this->id = id; this->x = x; this->y = y; } int dist(){ return x*x + y*y; } void print()...
ALGO
0.999781
4.843782
c2149d1d-4d49-43c8-8743-f870b2703c09
i-m-shivendra/LeetCode-Daily-Challenge
3405-count-the-number-of-arrays-with-k-matching-adjacent-elements/3405-count-the-number-of-arrays-with-k-matching-adjacent-elements.cpp
class Solution { public: int mod = 1e9 + 7; using ll = long long; int binpow(int a,int b){ int ans = 1; while(b){ if(b%2){ ans = (1LL * a * ans)%mod; } b = b/2; a = (1LL * a * a)%mod; } return ans; } in...
ALGO
0.999989
5.372464
a922ddf9-bec5-4af1-8ae6-cdfb2cd95100
copilco/qfishbowl
version00_0/Examples/MainTestHamiltonian.cpp
#include <iostream> #include "grid.h" #include "wavefunction.h" #include "hamiltonian.h" int main() { /****************************/ //These are grid parameters int nx=800; int ny=800; int nz=1; double dx=0.3; double dy=0.3; double dz=1.; /****************************/ grid g1; ...
ALGO
0.999844
4.360514
ded3f77d-c29d-4419-b03a-a1dcbd7a5d5f
lpan18/Mesh-Subdivision-Decimation-OpenGL
W_edge.cpp
#include <cmath> #include <Eigen/Geometry> #include <iostream> #include "W_edge.h" using namespace std; // v0, v1, and v2 are ordered clock-wise. Vector3f calculateNormal(Vector3f v0, Vector3f v1, Vector3f v2) { Vector3f e1 = v2 - v0; Vector3f e2 = v1 - v0; Vector3f normal = (e1.cross(e2)).normalized(); return n...
ALGO
0.999419
6.688422
011d86e6-5ac2-4fe1-82fc-0cb8d7a6769a
hjiang13/LLMs-in-IR
POJ-104/82/950.cpp
#include <iostream> using namespace std; int main() { int n,i,j,a,b,p,q; //????n????i?j???a???b???????p???????q cin >> n; //???? // p = 0; //p??????0 q = 0; //q??????0 j = 0; //j??????0 for (i = 1; i <= n; i++) //??n? { cin >> a >> b; //??a?b if (a >= 90 && a <= 140 && b >= 60 && b <= 90) //?????? { j = j+1; //?...
ALGO
0.999869
3.478929
6231135a-f0d1-4b28-8241-355432863e08
Lawrence-ID/GEM5
src/systemc/tests/systemc/misc/v1.0/dash2/pulse.cpp
/***************************************************************************** pulse.cpp -- Implementation of the pulse generator. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /*****************************************************...
TOOL
0.958331
6.358956
78d8aea5-edc2-4bb9-90ed-34870e4ba316
luechow-group/inPsights
src/Methods/MaximaProcessing/source/GeneralStatistics.cpp
#include "GeneralStatistics.h" #include <CoulombPotential.h> GeneralStatistics::Result GeneralStatistics::calculate( Cluster &maxima, std::vector<Sample> &samples, const AtomsVector& atoms) { Result result; auto Vnnmat = CoulombPotential::energies(atoms); result.Vnn_ = 0; for (int i = 0; i < ...
ALGO
0.948762
6.570175
746b23ed-6765-4c34-95a6-cfdcb181f682
fatimaimran22/C-plus-plus-Programming-Fundamentals
Labs/Lab 10/22L-6946_Q4.cpp
#include <iostream> #include <stdio.h> using namespace std; //To check the length of the sentence int strlen(char sen[], int start) { int count = 0 ; for(int j = start ; (sen[j] != ' ') && (sen[j] != '\0') ; j++) { count++; } return count; } int main() { int length , end; char sen[20]; cout<<"Enter the sente...
ALGO
0.999945
3.534538
c6d49bc6-da98-4012-ade2-9405718ee513
adityakotkar47/cpp-dsa
04_recursion/sorted_arr.cpp
#include <bits/stdc++.h> using namespace std; bool isSorted(vector<int> a, int idx = 1) { // base case if (idx > a.size()-1) return true; // base case if (a[idx] < a[idx-1]) return false; // recursive relation return isSorted(a, idx+1); } int main() { vector<int> a = {1, 2, 1, 4, 5}; ...
ALGO
0.999986
4.76107
fba5155f-1396-44a2-8a54-d3d48c383485
yiyuanwang1988/NuPBO-DeepOpt-plus
NuPBO-DeepOpt+/tool/opb-to-wecnf-translator++/opb+cnf_to_wcnf.cpp
#include <iostream> #include <string> #include <sstream> #include <fstream> #include <vector> using namespace std; void convertor(string opb_file_name, string cnf_file_name, string output_file_name) { long long num_vars, num_clauses, num_softclauses, num_hardclauses, num_constraints; long long top_clause_weig...
TOOL
0.990657
3.364352
6e1b04a1-3bc2-4c58-9a16-3119b8110aaf
abdul-aual/Codeforces-Solution
456A - Laptops.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { ios::sync_with_stdio(false);cin.tie(nullptr); int n; cin >> n; vector<pair<int, int>> laptops(n); for (int i = 0; i < n; ++i) { cin >> laptops[i].first >> laptops[i].second; } sort(laptops...
ALGO
0.999829
3.755532
7726dba3-857c-4430-b4e8-b87b5a4d180c
ooici-dm/CGAL-Mesh
examples/Arrangement_on_surface_2/curve_history.cpp
//! \file examples/Arrangement_on_surface_2/curve_history.cpp // Constructing an arrangement with curve history. #include "arr_rational_nt.h" #include <CGAL/Cartesian.h> #include <CGAL/Arr_segment_traits_2.h> #include <CGAL/Arrangement_on_surface_with_history_2.h> #include <CGAL/Arrangement_with_history_2.h> #include...
ALGO
0.995662
5.574022
dfb63394-2a0a-4d23-b40f-841c3e28ec2c
johnsmith0x3f/CompetitiveProgramming
codeforces/contest/2063/E.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; const int N = 3e5 + 5; int dep[N], siz[N]; vector<int> G[N]; void DFS(int v, int p) { siz[v] = 1; for(int u : G[v]) if(u != p) dep[u] = dep[v] + 1, DFS(u, v), siz[v] += siz[u]; } inline void solve() { int n; cin >> n; for(int i = 1; i <= n...
ALGO
0.999787
4.792413
613d16bb-6fcd-4b47-adf8-bc1782ad4232
AndreicaRadu/Infoarena-and-Codeforces-Problems
HonestOrUnkind2AC.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<vector<pair<int , int>>> s(n+1); for(int i=1 ; i<=n ; i++) { int aux; cin >> aux; for(int j=0 ; j<aux ; j++) { int x , y; cin >> x >> y; s[i].push_...
ALGO
0.999678
3.785614
f07ecbbb-299d-4bd3-a2a2-e582addb508b
asma12a/challenge-s6
flutter_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.998007
6.76775
c0dc22c1-2bae-4761-ac36-9b6039b9dac5
NH333/MICCAI2020
graph/realworld_s2v_maxcut/maxcut_lib/src/lib/graph.cpp
#include "graph.h" #include <cassert> #include <iostream> #include <random> Graph::Graph() : num_nodes(0), num_edges(0) { adj_list.clear(); adj_Matrix.setZero(0,0); } Graph::Graph(const int _num_nodes, const int _num_edges, const int* edges_from, const int* edges_to, const double* weights) : num_nodes...
ALGO
0.909206
4.423872
33ee2848-e1ae-4c1a-89ba-164f2eb84721
kasabuta/AtCoder
Question/b208/Questionb208A.cpp
#include "Questionb208A.h" #include "../../Utility/AtCoderInOut.h" #include "../../Utility/Utility.h" namespace Questionb208A { namespace { const char* INPUT_CASE[] = { R"(2 11)", R"(2 13)", R"(100 600)", }; const char* OUTPUT_CASE[] = { R"(Yes)", R"(No)", R"(Yes)", }; static_assert(SIZEOF(OUTPUT_CASE) == SI...
ALGO
0.999789
3.963458
036440e0-a739-47b3-b964-90f263dc3acd
aditya-sengupta/simea
lib/boost_1_70_0/libs/graph/example/reverse_graph.cpp
#include <algorithm> #include <vector> #include <utility> #include <iostream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/reverse_graph.hpp> #include <boost/graph/graph_utility.hpp> int main() { using namespace boost; typedef adjacency_list < vecS, vecS, bidirectionalS > Graph; Graph G(5); ...
ALGO
0.998347
5.486599
267dab5b-320d-46fd-b614-cd2e716a3516
wooyn730/Problem-Solving
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/0/181933.โ€…flag์—โ€…๋”ฐ๋ผโ€…๋‹ค๋ฅธโ€…๊ฐ’โ€…๋ฐ˜ํ™˜ํ•˜๊ธฐ/flag์—โ€…๋”ฐ๋ผโ€…๋‹ค๋ฅธโ€…๊ฐ’โ€…๋ฐ˜ํ™˜ํ•˜๊ธฐ.cpp
#include <string> #include <vector> using namespace std; int solution(int a, int b, bool flag) { return (flag ? a+b : a-b); }
ALGO
0.999327
4.744573
4402500f-1a71-49c7-b605-b949dd3a767a
neeagwl/CSES_Solutions
intro_problems/increasing_array.cpp
/******** All Required Header Files ********/ #include <iostream> #include <bits/stdc++.h> using namespace std; /******* All Required define Pre-Processors and typedef Constants *******/ #define MEM(a, b) memset(a, (b), sizeof(a)) #define all(cont) cont.begin(), cont.end() #define rall(cont) cont.end(), cont.begin...
ALGO
0.999829
4.017565
f11110a8-52dc-45fd-ac68-a472e9742d05
sanketgautam/Hackerrank_Submissions
submissions/Cycle Detection.cpp
/*----------------------------------------------------------------------- Problem Title: Cycle Detection Problem Link: https://www.hackerrank.com/challenges/detect-whether-a-linked-list-contains-a-cycle Author: sanketgautam Language : C++ -----------------------------------------------------------------------*/ bool...
ALGO
0.999909
4.773746
23554d80-1e9a-44de-a8cf-3c9d949901f8
scyllacore/algorithm
C++ ํ’€์ด/programmers/Level2/๋‘ ์› ์‚ฌ์ด์˜ ์ •์ˆ˜ ์Œ - ์žฌํ’€์ด.cpp
#include <cmath> using namespace std; bool isInteger(double val) { return val == (long long)val; } long long solution(int r1, int r2) { long long answer = 0; for (int x = 1; x < r2; x++) { // x<=r2 x r2 วต cnt 0 อผ double inner = sqrt(powl(r1, 2) - powl(x, 2)); double outer = sqrt(powl(r...
ALGO
0.999235
4.140825
c2c40b14-809a-4330-b2d3-4fbe075d7d19
vusec/stickytags
llvm-project/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
#include "Debug.h" #include "Interface.h" #include "Mapping.h" #include "State.h" #include "Synchronization.h" #include "Types.h" #include "Utils.h" using namespace ompx; #pragma omp begin declare target device_type(nohost) namespace { uint32_t determineNumberOfThreads(int32_t NumThreadsClause) { uint32_t NThread...
TOOL
0.855198
6.514498
28fc4bc3-4f0a-4d4a-bd05-6ef5f8d42d1a
shiningstarpxx/newstart
algorithm/leetcode/cpp/random_519lt_tle.cpp
// // Created by Pei Xingxin on 27/11/2021. // #include <random> using namespace std; class Solution { public: Solution(int m, int n) { init(m, n); } vector<int> flip() { if (index_.empty()) return {}; int index = rand() % index_.size(); int val = index_[index]; int row = val / n_; in...
ALGO
0.994689
6.684181
03630903-b981-4476-9aaa-d87376909702
utcoupe/coupe18
ros_ws/src/navigation_pathfinder/src/pathfinder/map_storage.cpp
#include "pathfinder/map_storage.h" #include <cmath> using namespace std; MapStorage::Vect2DBool MapStorage::loadAllowedPositionsFromFile(const string& fileName) { ROS_DEBUG_STREAM("MapStorage: loading " << fileName); sf::Image image; image.loadFromFile(fileName); Vect2DBool allowedPos; ...
TOOL
0.905147
5.985307
a1f03197-05bc-4278-9782-7768a5f3cbee
mkiken/CompetitiveProgramming
cpp/string/trie.cpp
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef vector<int> VI; typedef vector<ll> VL; typedef ...
ALGO
0.993275
3.541873
02009abe-f981-4383-a0a4-94a2a09f8d8e
SingularDuo/C-COMPETITIVE-TRAINING
ROADMAP MARISA/LVL2/MATH/Prime_factors.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define KING_PHAT signed main() #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl '\n' #define vec(type, a, size, value) vector<type> a(size, value); #define all(x) x.begin(), x.end() #define I_O(inpu...
ALGO
0.999784
5.033198
4564eae8-9429-4800-8521-0f5dd11b17a2
ishandutta2007/codeforces
t1dus/normal/430/C.cpp
#include<bits/stdc++.h> using namespace std; int n; vector<int> adj[100005]; int ch[100005]; vector<int> ans; void dfs(int s,int par,int fir,int sec){ if(ch[s]^fir){ ans.push_back(s+1); for(auto u: adj[s]){ if(u != par){ dfs(u,s,sec,fir^1); } } } else{ for(auto u: adj[s]){ ...
ALGO
0.999991
4.018695
f3ce3460-58dd-457e-a0e9-d6c46e3b9646
priincce/competitiveProgramming
Atcoder/toyota/p1.cpp
#include<bits/stdc++.h> using namespace std; void solve() { string s,x; cin>>s; x="ABC"; sort(s.begin(),s.end()); (s==x)?cout<<"Yes"<<endl:cout<<"No"<<endl; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t = 1; // cin>>t; while (t--) { solve(); ...
ALGO
0.999962
4.223695
07179974-6ff5-4ab7-8e6b-a108ed7f9568
has2/Problem-Solving
boj-solved.ac/Gold4/16938.cpp
#include <cstdio> #include <algorithm> using namespace std; int N,L,R,X,a[15],ans; int main(){ scanf("%d%d%d%d",&N,&L,&R,&X); for(int i=0;i<N;i++) scanf("%d",&a[i]); for(int i=1;i<(1<<N);i++){ int ml=2e9,mr=0,sum=0,cnt=0; for(int j=0;j<N;j++){ if((i&(1<<j))>0){ mr...
ALGO
0.999941
3.548318
9a06fd5d-374a-4701-9a51-798aa44a2bfc
eglrp/ETE
Math_Algorithm/cpp/Ti_Optimization.cpp
#include "stdafx.h" #include "ti_optimization.h" #include "ti_memory.h" #include <stdio.h> #include<math.h> #include <assert.h> //#include "marquarth.h" #include <malloc.h> ////////////////////////////////////////////////////////////////////// // Construction/Destruction ///////////////////////////////////////////////...
ALGO
0.999987
5.269318
5f4bbbae-62c8-43a3-b559-357a36ac5b9b
ragib04/DSA
Difficulty: Basic/GCD of two numbers/gcd-of-two-numbers.cpp
class Solution { public: int gcd(int a, int b) { // code here while(a>0 && b>0){ if(a>b) a = a%b; else b = b%a; } if(a==0) return b; else return a; } };
ALGO
0.999856
4.460218