uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0dd9e601-c722-48ae-a006-b4fb594f26be
rockyjollyroger/AdventOfCode2020
AdventOfCode/Source/Challenges/Challenge_06.cpp
#include "Challenge_06.h" #include "../Helpers/FileHelpers.h" #include <algorithm> //////////////////////////////////////////////////////////////////////////////////////////////////// std::string const CChallenge_06::sm_inputFilePath = "Inputs/Input_Challenge_06.txt"; //////////////////////////////////////////////////...
ALGO
0.997714
5.099205
f94cb632-d99d-48d0-b2b1-5e6df068b3d7
kimjoe32/Project-Euler-Problems
p54.cpp
#include <iostream> #include <algorithm> #include <string> #include <fstream> #include <vector> #include <map> using namespace std; void sortAgain(string* arr); struct hand { string cards[5]; int wins; hand() : cards({"nc","nc","nc","nc","nc"}), wins(0) {} friend istream& operator>> (istream& is, han...
ALGO
0.999438
3.880121
1fcecf22-c6d3-40e8-ad5d-33935dc9b6a4
2745518585/code
SP1026.cpp
#include<cstdio> using namespace std; int main() { int T; scanf("%d",&T); while(T--) { int n; scanf("%d",&n); double a=1; for(int i=n-1;i>=1;--i) a+=(double)n/(n-i); printf("%.2lf\n",a); } return 0; }
ALGO
0.999691
3.406435
1737e31f-644e-48e9-a67e-94c509c78821
umakanwar/cpp_batch_s
12 september/Q13.cpp
// User se 2 input lena hai, inka difference nikalna hai. Agar difference < 0 hai to // absolute value return karna hai. Agar difference even hai to ek function // call karna hai aur us value ka cube return karna hai. #include <bits/stdc++.h> using namespace std; int findcube(int k){ return k*k*k; } int abosolut...
ALGO
0.99964
4.237938
c5953294-bcb5-4ab0-85a6-30a5b5bd9ff9
Sensrdt/Leet-Code-Sol
String/856. Score of Parentheses.cpp
class Solution { public: int scoreOfParentheses(string S) { stack<int> s; int count = 0; for (auto a : S){ if (a == '('){ s.push(count); count = 0; }else{ count = s.top() + max(count*2, 1); ...
ALGO
0.999551
5.421599
32d3e89c-1488-4bb1-aa2d-23544464ed1e
HaomingMei/Personal_Projects
Leetcode/Implement-Queue-using-Stacks.cpp
#include <stack> class MyQueue { public: stack<int> stack0; stack<int> stack1; int top; MyQueue() { } void push(int x) { // std::cout << "I was at push last" << std::endl; if(stack0.empty()){ top = x; } stack0.push(x); } int pop() { ...
ALGO
0.994789
5.149424
5b94e85d-bc54-491a-b671-13448ec54a53
dinhcanh303/Cpp_Basic
C++_Basic/B34.cpp
#include <bits/stdc++.h> using namespace std; int main(){ long long c1,c2,c3,c4,c5; cin >> c1>>c2>>c3>>c4>>c5; long long sum = c1+c2+c3+c4+c5; long long t = (c1+c2+c3+c4+c5)/5; if(sum%5==0) cout << t; else cout<<-1; return 0; }
ALGO
0.999759
3.749378
8f90abfc-db19-4a8e-b59a-2eb7d61c9fcd
jayin92/NYCU-data-sturctures-and-oop
AbsoluteCpp-code/Ch04-02/src/04-02.cpp
//Program to demonstrate call-by-reference parameters. #include <iostream> #include <cstdlib> #include <fstream> using namespace std; void getNumbers(int& input1, int& input2); //Reads two integers from the keyboard. void swapValues(int& variable1, int& variable2); //Interchanges the values of variable1 and variable2...
ALGO
0.998079
6.071295
f904b29e-d480-4e43-846d-21b58ff344b3
yangbodong22011/C_Plus_Plus_Primer
20151201/4.cpp
/************************************************************************* > File Name: 4.cpp > Author: YangBodong > Mail: <EMAIL> > Created Time: Tue 01 Dec 2015 22:07:46 CST ************************************************************************/ #include<iostream> using std::cout; using std::cin; using std::...
ALGO
0.999992
4.509672
a8e548d0-7c68-4955-a944-9e168902eb5a
u-wyh/luogu-code
P12846.cpp
#include <bits/stdc++.h> using namespace std; struct SegTree { int n; vector<int> sum; vector<int> tag; SegTree(vector<int> &v) { n = v.size(); sum.resize(4 * n + 10, 0); tag.resize(4 * n + 10, 0); if (n > 0) { build(1, 1, n, v); } } void bu...
ALGO
0.999969
4.773253
5aaa9123-ad85-4f22-9a27-448127af25ea
ishandutta2007/codeforces
humbertoyusta/normal/976/B.cpp
#include<bits/stdc++.h> #define maxn 1005 #define mod 1000000007 using namespace std; long long n,m,k,pos,sec,sit,r,c; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); ///freopen("a.in","r",stdin); cin>>n>>m>>k; if(k+1<=n){ cout<<k+1<<" 1\n"; return 0; } if(k+1<n+m){ cout<<n<<' '<<k-n+2; return 0...
ALGO
0.999969
3.131495
0fa2eea8-f1a8-4661-8e94-d014e97a49e9
hoangb0410/Advanced_Programming
Home/TH3/Bai9.cpp
#include <iostream> #include <string> using namespace std; int main() { string s; getline(cin,s); int countStartSpaces=0; for (int i=0;i<s.size();i++) if (s[i]==' ') { countStartSpaces++; cout<<' '; } else break; for (int i=c...
ALGO
0.999915
3.356731
eff073b1-1056-43d6-b6b3-4ace02b0765b
jttmtv/matrix
main.cpp
#include "matrix.h" #include <chrono> #include <iostream> #define ROW_SIZE 10240 #define COL_SIZE 10240 #define SHARE_SIZE 10240 int main() { matrix A, B, BT, C; memory_access(&A, ROW_SIZE, SHARE_SIZE); memory_access(&B, SHARE_SIZE, COL_SIZE); memory_access(&C, ROW_SIZE, COL_SIZE); memory_access(&...
ALGO
0.994
3.641478
fa4b13c5-c1f4-40de-915f-1263f3fd4347
Xudong0722/Algorithm_template
codeforces/cf刷题记录/671 div2/d1.cpp
/* * Author: Moon-light * Time: 2020-10-20 14:51:38 因为每个冰球的价格不一样,我们可以将价格排序,然后从低价到高价将冰球放在下标从2开始且间隔一个的位置(2,4,6,....) 这样就能保证这些冰球一定可以是cheap的(n是偶数的话最后一个除外) 排序可以用sort或者小根堆 */ #include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define IO ios::sync_wi...
ALGO
0.999937
3.238969
c7bfeda8-3333-4ece-ae9b-867522494dd5
Wanncye/LeetCoding
11.graph/canFinish.cpp
#include<iostream> #include<vector> using namespace std; class Solution { public: void dfs(int index){ vistied[index]=1; for(int i=0; i<edge[index].size(); i++){ if(vistied[edge[index][i]]==0) dfs(edge[index][i]); else if(vistied[edge[index][i]]==1){ tag=fal...
ALGO
0.999952
6.232561
9716c8b3-c65a-4b78-a851-4d68b38d4de0
RaymRaym/Codeforces
cpp/1950E.cpp
#include <iostream> #include <vector> #include <unordered_set> #include <unordered_map> using namespace std; int main() { int n; cin >> n; for (int i =0; i < n; i ++) { int len; cin >> len; string s; cin >> s; for (int i = 1; i <= len; i ++) { unordered_map<string, int> ma...
ALGO
0.99995
3.505455
0761816d-0180-49ba-b9e1-214cc3499d5a
SimonBerens/competitive-programming
problems/codeforces/975/D.cpp
// https://codeforces.com/contest/975/problem/D #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; template<typename K> using hset = gp_hash_table<K, null_type>; template<typename K, typename V> using hmap = gp_hash_table<K, V>; using namespace std; #define all(x) (x).beg...
ALGO
0.99788
4.638356
fb6430d5-7a1e-4561-8103-20dcec3420ac
ishandutta2007/codeforces
jjleo/normal/1286/C1.cpp
#include <bits/stdc++.h> #define maxn 100086 using namespace std; int n; char s[maxn]; string S; multiset<string> st; vector<string> v; inline bool cmp(string a, string b){ return a.length() < b.length(); } int cnt[26]; int main(){ scanf("%d", &n); if(n == 1){ printf("? 1 1\n"), fflush(stdout); scanf("%s",...
ALGO
0.999973
3.322616
7fd64c46-15cd-428e-a21b-ecf246b1cbaf
kvnwng11/usaco
LeetCode/Medium/133. Clone Graph.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> neighbors; Node() { val = 0; neighbors = vector<Node*>(); } Node(int _val) { val = _val; neighbors = vector<Node*>(); } Node(int _val, vector<Node*> _neighbors) { val = _val; ...
ALGO
0.999924
6.540569
867d3be4-4e7c-48fd-8997-7a0e44097493
ConnectNitish/cp_practice
src/leetcode/315_Count_of_Smaller_Numbers_After_Self.cpp
// https://leetcode.com/problems/count-of-smaller-numbers-after-self/ #include<bits/stdc++.h> using namespace std; bool cmp(pair<int,pair<int,int>>p1 , pair<int,pair<int,int>>p2){ if(p1.second.second < p2.second.second) return true; return false; } void merge(vector<pair<int,pair<int,int>>>& arr, int left, int ...
ALGO
0.999903
4.393541
5e7275fb-4dc9-4250-95a2-474e4a947209
alexandraback/datacollection
solutions_5669245564223488_0/C++/Vasyl/b.cpp
//#pragma comment(linker, "/STACK:134217728") #include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cctype> #include <cstring> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> #include <algorithm> #includ...
ALGO
0.999837
4.111486
8194257e-538a-433d-9c86-a726a493c4fd
aditya-xx00/Daily_Codes
0643-maximum-average-subarray-i/0643-maximum-average-subarray-i.cpp
class Solution { public: double findMaxAverage(vector<int>& nums, int k) { double sum =0; int n=nums.size(); for(int i=0;i<k;i++){ sum+=nums[i]; } double avg=sum/k; for(int i=k;i<n;i++){ double new_sum=sum-nums[i-k]+nums[k]; if(avg<...
ALGO
0.999976
6.301013
7bafc71a-3cc1-4e63-adf4-206743dba69f
leeeeeyeon/codetree-TILs
240815/가장 많이 겹치는 구간/section-with-maximum-overlap.cpp
#include <iostream> #include <algorithm> #define MAX_X 200'000 using namespace std; int arr[MAX_X+1]; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int x1, x2; int mx = 0; for (int i = 0; i < n; i++) { cin >> x1 >> x2; arr...
ALGO
0.999984
4.462816
6a00300f-df66-4c41-b41d-39d9a7a3d206
sonai99/Leetcode-DP-Study-Plan-1
746. Min Cost Climbing Stairs.cpp
class Solution { public: int minCostClimbingStairs(vector<int>& cost) { int n=cost.size(); vector<int> dp(n+1); for(int i=2;i<=n;i++){ int jumpOneStep=cost[i-1] + dp[i-1]; int jumpTwoStep=cost[i-2] + dp[i-2]; dp[i] = min(jumpOneStep, jumpTwoStep); ...
ALGO
0.999958
6.025535
60157977-bbe4-432b-b51e-359137b234bb
eropova/DE_Sprint
hw-1-7/task6.cpp
/*Написать программу, которая определяет максимальное число из введённой с клавиатуры последовательности положительных чисел. Длина последовательности неограниченна.*/ #include <iostream> using namespace std; int main() { //setlocale(LC_ALL, "Rus"); setlocale(0, ""); int n, t = 0, max = 0; cout << " Введите числа ...
ALGO
0.998618
4.222882
e0caeb72-17ac-44c7-8f69-766a82a22ab8
Akm007git/Coding-questions
Medium/Largest subarray with 0 sum/largest-subarray-with-0-sum.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this function*/ class Solution{ public: int maxLen(vector<int>&A, int n) { // Your code here unordered_map<int,int>mp; // foor sa...
ALGO
0.999708
6.355475
81c82cb3-d9c6-4554-b7b8-fcb097296128
Chen-Dixi/Leetcode
236_lowest-common-ancestor-of-a-binary-tree.cpp
#include <iostream> #include <stack> #include <cstring> #include <vector> #include <map> #include <queue> #include <utility> #include <cstdint> #include <algorithm> #include <climits> using namespace std; /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeN...
ALGO
0.999994
5.94533
d84599d7-9fd1-485b-9413-55b216f5e114
ishandutta2007/codeforces
davi_bart/normal/1207/A.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int main(){ //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int T; cin>>T; while(T--){ int a,b,c; cin>>a...
ALGO
0.999953
4.22153
3a645935-b94d-4720-a83c-7ef7f1577665
wangkai5616/leetcode
96_不同的二叉搜索树/96_Unique Binary Search Trees/Unique Binary Search Trees.cpp
#include<iostream> #include<vector> using namespace std; /* һ n 1 ... n ΪڵɵĶж֣ */ /* ˼· Ϊ 1, 2, 3, ..., n ʱԭĹ BST Ψһԣ i Ϊڵ [1, i-1] ɣ [i+1, n] ɡ */ int numTrees(int n) { vector<int> v(n + 1, 0); v[0] = 1; v[1] = 1; for (int i = 2; i <= n; ++i) { for (int k = 1; k <= i; ++k) v[i] += v[k - 1] * v[i - k]; } ...
ALGO
0.999818
4.541266
23d725ea-4484-47cb-a107-7b35d57a0a51
rapirent/onlinejudge-competition
poj/2533.cpp
#include <cstdio> #include <iostream> using namespace std; int main(void) { int a[1000] = {0},lis[1000]={0},num; scanf("%d",&num); for(int count=0;count<num;count++) { scanf("%d",&a[count]); } for(int i = 0;i<num;i++) { lis[i] = 1; for(int start = 0; start<i;start++) { ...
ALGO
0.999958
3.821566
5e9ce851-9d0b-4104-9194-b58c825faaac
DmitriyIp/Algorithms---Code-Scheme
equations(Iterations)/equations_iterations.cpp
#include <iostream> #include <cmath> using namespace std; // f(x) = x^3 - x - 1 // f'(x) = 3x^2 - 1 // f''(x) = 6x; // [1, 2] // ф(x) = x + λ(x^3 - x - 1) // -1/r < λ < 0, если f'(x) > 0 // 0 < λ < 1/r, если f'(x) < 0 // r = max(|f'(a)|, |f'(b)|) // λ = -1/20 = -0.05 int main() { float x, xPrev; double lambd...
ALGO
0.999996
4.217479
7d133240-4b53-4992-a993-fe6dc1e5d23a
harshvardhanj733/Codechef-Questions
Count_Subarrays_with_XOR_K.cpp
#include<unordered_map> int subarraysWithSumK(vector < int > a, int b) { // Write your code here unordered_map<int, int> m; m[0] = 1; int xr = 0, ans = 0; for(int i = 0; i < a.size(); i++){ xr ^= a[i]; if(m.find(xr^b) != m.end()){ ans += m[xr^b]; } m[xr]++...
ALGO
0.999875
5.680055
19f073a2-3e02-448a-bbcf-951840299e51
f4alt/TAMU-Classes
CSCE430/prob_set_0/B.cpp
#include <iostream> using namespace std; int main() { int quantity=0, total=0; cin >> quantity; int temp; for (int i=0; i<quantity; i++) { cin >> temp; total += temp; } cout << total; }
ALGO
0.97843
4.037869
d8c44e2a-7261-451c-9b4c-7b61422557a5
KnsDev330/supc-contest-oct-6-24
solutions/D_Fair_Treasure_Distribution.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { int a, b; cin >> a >> b; int each = a / b; int used = each * b; int rem = a - used; if(rem > b / 2) { used += b / 2; } else { used += rem; } ...
ALGO
0.99988
3.810145
f4128e9b-2294-4d45-aa5e-cfdea2ab885e
Aaditya7171/DSA-Supreme-3.0
8_recursion/1_liveClass-1/5_caclulateSumFrom1ToN.cpp
#include<iostream> int getSum(int n) { if(n == 1) return 1;//base case int recAns = getSum(n-1);//recursive call int res = n + recAns;//recurive relation / processing return res; } int main() { int n = 5; int sum = getSum(n); std::cout << "Sum from 1 to " << n << " is: " << su...
ALGO
0.999885
5.354432
39bf3373-ebbe-4b9f-a925-b39f437382f3
abhishek18124/PPCPPApril2023
Lecture 09/009Arrays_MaximumProductofTriplet.cpp
#include<iostream> using namespace std; int main() { int arr[] = {-10, -20, 1, 2, 3}; int n = sizeof(arr) / sizeof(int); int fL = INT_MIN; // to track the first largest so far int sL = INT_MIN; // to track the second largest so far int tL = INT_MIN; // to track the third largest so far int fS = INT_MAX; // t...
ALGO
0.999851
3.552726
f1240bc0-6b82-44c2-a340-e80f3397d201
fieryprofessor/My_CPP_Codes
12-recursion/gcd.cpp
// given two numbers x and y.find the gcd of the two numbers. #include<iostream> using namespace std; int gcd(int x,int y){ if(x==0) return y; return(y%x,x); } int main(){ int x,y; cout<<"Enter two numbers"<<endl; cin>>x>>y; cout<<"gcd is:"<<" "; if(y>=x) cout<<gcd(x,y); else cout<<gcd(y,x); return 0; }
ALGO
0.997835
4.460427
6b677322-3739-4e4f-bf96-fb83ca3c3fca
arkadiusz-papaj/HackerRank
problem-solving/data-structures/arrays/sparse-arrays.cpp
#include <vector> #include <string> #include <algorithm> /* * Complete the 'matchingStrings' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accepts following parameters: * 1. STRING_ARRAY stringList * 2. STRING_ARRAY queries */ [[nodiscard]] auto matchingStrings(std::...
ALGO
0.99857
6.402306
7937a613-bdba-49a4-9b7b-a418b91ab92a
nisaruj/algo-implementation
cpp/minimum-spanning-tree.cpp
#include <iostream> #include <vector> #include <utility> #include <algorithm> using namespace std; class Edge { public: int node1, node2; int distance; Edge(int node1, int node2, int distance) { this -> node1 = node1; this -> node2 = node2; this -> distance = distance; } }; ...
ALGO
0.999959
4.308732
45e22650-4950-4322-afa1-54a5eebc6340
KirtiMulchandani/Love-Babbar-DSA-Sheet
Arrays/Find duplicates in an array(GFG).cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: vector<int> duplicates(int arr[], int n) { vector<int> ans; for(int i = 0; i < n; i++){ int index = arr[i] % n; // find out the index by taking element modulo ...
ALGO
0.997846
5.958468
0da137a8-65c6-460e-afe0-0d684c7d366a
novpath/Data-Structure
CodeExample/2.b.7 ExchangeArrLoc.cpp
#include <stdio.h> typedef int ElementType; void ReverseArr(ElementType A[], int left, int right, int ArraySize) { ElementType temp; if(left >= right || right >= ArraySize) return; for(int i = left; i <= (left + right) / 2; i++) { temp = A[i]; // 对称交换两端 A[i] = ...
ALGO
0.999841
3.848132
b3dfeec8-8ffb-4b27-9acd-44ad63ccf08a
ConquerOS/bionic
tools/versioner/src/SymbolDatabase.cpp
#include "SymbolDatabase.h" #include "SymbolFileParser.h" #include <err.h> #include <stdio.h> #include <stdlib.h> #include <fstream> #include <streambuf> #include <string> #include <unordered_set> #include <llvm/ADT/SmallVector.h> #include <llvm/ADT/StringRef.h> #include <llvm/Object/Binary.h> #include <llvm/Object...
TOOL
0.90969
6.684213
19f30d7d-6cc1-4dbd-8b6c-eb595db646d1
LiuXiaoWen1234/.leetcode
111.二叉树的最小深度.cpp
/* * @lc app=leetcode.cn id=111 lang=cpp * * [111] 二叉树的最小深度 */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr),...
ALGO
0.999926
6.825419
24d6ded0-71e3-4804-8f28-b4a11ba88feb
jontystanley/Algorithms
Stack/StockSpan.cpp
#include<bits/stdc++.h> using namespace std; vector<int> stockSpan(vector<int>& nums){ int n=nums.size(); vector<int>ans(n); stack<int>s; ans[0]=1; s.push(0); for(int i=1;i<n;i++){ while(s.size()>0 && nums[i]>=nums[s.top()]){ s.pop(); } if(s.empty()){ ...
ALGO
0.999916
5.37182
83a2392c-ef64-46f7-b02a-f3c74e9971cb
raincross7/code-similarity
codes/train_code/problem423/problem423_249.cpp
#include <cstdio> #include <bits/stdc++.h> #include <algorithm> #include <iostream> #include <string> #include <cmath> #include <functional> #include <vector> #include <stack> #include <queue> #include <map> #define rep(i,n) for (int i=0;i<n;i++) using ll = long long; using namespace std; void solve(){ } int main (){...
ALGO
0.999958
3.323418
a4d3332b-4cb8-40da-9bd7-ea4aef601dfd
dhs347/Dream
Team_Training/36、2019ICPC沈阳网络赛/code/f.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define rep(i, a, b) for(int i = (a); i < (b); i++) #define per(i, a, b) for(int i = (b) - 1; i >= (a); --i) #define de(x) cout << #x << " = " << x << endl #define dd(x) cout << #x << " = " << x << ...
ALGO
0.999987
3.555535
05cf4458-f746-43b9-a060-33b1ee36a33f
Sonofneli7/Cplus
Numbers/main.cpp
#include <iostream> #include <cmath> using namespace std; int main() { cout << 5 + 7 << endl; // can do mathematical operations output: 12 cout << 5 - 7 << endl; // can do mathematical operations output: -2 cout << 5 / 7 << endl; // can do mathematical operations output: 0 due to it having a remainde...
TOOL
0.900223
3.013193
0df8e18e-2e45-4eac-ad0a-b947e62143cb
SaTanBoy/Linked-List-Codes
circularinsertion.cpp
#include <bits/stdc++.h> using namespace std; struct node { int data; node *next; }; node *head = NULL; void insert(int a) { node *ptr; node *temp = new node; temp->data = a; if (head == NULL) { temp->next = temp; head = temp; } else { temp->next = head; ptr = temp; do { ptr = pt...
ALGO
0.999858
3.703162
d3d6fe80-2e25-4219-9479-05c88c434bdb
sakettt07/DSA
CodeForces/800_Rated/Football.cpp
#include <iostream> using namespace std; main() { string s; cin >> s; if (s.find("0000000") != -1 || s.find("1111111") != -1) cout << "YES"; else cout << "NO"; }
ALGO
0.998748
3.15964
3612e9c1-22fc-4394-9f3e-6f7423e26951
HimanshuNegi2001/BCA-3rd-Year-Project-Work
Kadane's Algorithm.cpp
#include<iostream> using namespace std; int kadanes(int array[],int length) { int highestMax = 0; int currentElementMax = 0; for(int i = 0; i < length; i++){ currentElementMax =max(array[i],currentElementMax + array[i]) ; highestMax = max(highestMax,currentElementMax); } return highestMax; } ...
ALGO
0.999211
4.788245
2dd22492-5efc-4c76-b776-89ef0cbb7b4f
njfugit/leetcode
1047.删除字符串中的所有相邻重复项.cpp
/* * @Author: Jack * @Date: 2022-09-22 15:58:27 * @LastEditTime: 2022-09-23 01:01:15 * @LastEditors: your name * @FilePath: /.leetcode/1047.删除字符串中的所有相邻重复项.cpp */ /* * @lc app=leetcode.cn id=1047 lang=cpp * * [1047] 删除字符串中的所有相邻重复项 * * https://leetcode-cn.com/problems/remove-all-adjacent-duplicates-in-string/d...
ALGO
0.999928
6.498822
0a47bd79-a8d3-4d5d-8a1b-0a98be078067
Trident14/Data-Structures-and-Algorithms
Codechef/s21_CovidandTheatreTickets.cpp
#include<iostream> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); /* #ifndef ONLINE_JUDGE // for getting input from input.txt freopen("inputf.in", "r", stdin); // for writing output to output.txt freopen("output.txt", "w", stdout); #endi...
ALGO
0.99995
3.794771
f761e715-4c77-4121-9ab9-33cd800975dc
jay-reiter/p-adic-power-series-visualization
p-adic_draw.cpp
#include "png_utils/PNG.h" #include "png_utils/HSLAPixel.h" #include "p-adic_draw.h" #include "p_adic.h" #include <string> #include <iostream> #include <cmath> #include <vector> #include <pthread.h> #include <stdlib.h> #include <unistd.h> #include <algorithm> // used for scaling the width of drawn lines; higher valu...
ALGO
0.999448
4.843609
238ee745-e532-45a5-9ca0-025891c2dc1e
ishandutta2007/codeforces
ko_osaga/normal/776/B.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pi; typedef long long lint; int isprime(int x){ for(int i=2; i*i<=x; i++){ if(x%i == 0) return 0; } return 1; } int main(){ int n; cin >> n; if(n <= 2) printf("1\n"); else printf("2\n"); for(int i=2; i<=n+1; i++){ printf("%d ", 2 - ispri...
ALGO
0.999933
3.647823
7a724122-2129-449f-9f59-94b857aa3b43
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_12017_0.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; int n, i, a = 0, b = 0, c = 0, z = 0; cin >> s; n = s.length(); for (i = 0; i < n; i++) { if (s[i] == '+') z = 1; else if (s[i] == '=') z = 2; else { if (z == 0) a++; else if (z == 1) b++; ...
ALGO
0.999937
3.585068
763dccf9-fe2f-44cc-9e02-b178228c4c01
ozcoco/cppdemo
concept/main.cpp
// // Created by ozcom on 2023/9/28. // #include <iostream> #include <type_traits> #include <concepts> /* * concept定义概念 * requires定义约束 * 可约束模板参数 * 可约束函数行为 * * */ template<typename T, typename U> concept Addable1 = std::is_same_v<T, int> && std::is_same_v<U, int> /*定义类型约束*/ && requires(T t, U u){ ...
TEST
0.860408
6.682267
64163a23-0f21-4f54-8527-8a0019e6a83b
ishandutta2007/codeforces
zhoushang2003/normal/321/C.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e5+1,I=1e9; bool v[N]; int n,m,g[N],x,y,M,s[N],A[N]; vector<int>a[N]; void D(int k,int f) { s[k]=1; for(int i=0;i<a[k].size();i++) if(a[k][i]!=f&&!v[a[k][i]]) D(a[k][i],k),s[k]+=s[a[k][i]],g[k]=max(g[k],s[a[k][i]]); } void S(int k) { v[k]=true; for(int ...
ALGO
0.999956
4.062299
66f7d36d-8efd-4583-aa47-89f6fe0f3824
andrewdaitruong/Chapter3_CMPR131
Chapter3_CMPR131/nQueens.cpp
#include "nQueens.h" #include "input.h" #include <iostream> using namespace std; //precondition: need dimension size //postcondition: prints the board and size void nQueens::printBoard() { board.printBoard(); } //precondition: valid integer size //postcondition: sets the dimension with only a single integer to make...
TOOL
0.963634
3.79992
b5ea8496-4800-4623-a6b3-8dfcf5870539
iamsile/ACM
Pathfinding.cpp
#include <iostream> using namespace std; int main() { int x,y; while (cin >> x >> y) { if (x>=0&&y>=0) { if (x%2&&y%2) cout << x+y+2 << '\n'; else cout << x+y << '\n'; } else if (x<0&&y>0) { if (x%2&&!(y%2)) cout << -x+...
ALGO
0.999988
3.979613
1b32c39a-0178-4e90-8529-f1ed2d8d90f1
Cyber-bober/tasks
t2n5.cpp
#include <iostream> #include <cmath> using namespace std; double f(double x) { return cos(2*x) + sin(x - 3); } int main() { double a, b; cout << "a: "; cin >> a; cout << "b: "; cin >> b; double value_a = f(a); double value_b = f(b); cout << "значение в точке А: " << value_a << end...
ALGO
0.999222
4.395144
01e95dc9-c405-4b0c-b80e-35fb7f0726db
why-freedom/VIOLearning_Note_Code
Third Lib/eigen-3.2.9/unsupported/test/NumericalDiff.cpp
#include <stdio.h> #include "main.h" #include <unsupported/Eigen/NumericalDiff> // Generic functor template<typename _Scalar, int NX=Dynamic, int NY=Dynamic> struct Functor { typedef _Scalar Scalar; enum { InputsAtCompileTime = NX, ValuesAtCompileTime = NY }; typedef Matrix<Scalar,InputsAtCompileT...
TEST
0.98818
6.193336
14c16523-7cfb-4f97-a8eb-ddd7fc5aa139
janjitsu/kwc-ros-pkg
pkg/branches/robot_stable/highlevel/highlevel_controllers/src/VelocityControllers.cpp
#include <VelocityControllers.hh> #include <set> namespace ros { namespace highlevel_controllers { TrajectoryRolloutController::TrajectoryRolloutController(tf::TransformListener* tf, const CostMapAccessor& ma, double sim_time, int sim_steps, int samples_per_dim, double pdist_scale, doubl...
ALGO
0.993676
3.846351
9db9b04f-5ab6-4fcf-98ec-0a8f714122ec
Rushabhgadhiya9102/cpp-programming
lab-wrk-10/que-1.cpp
// WRITE A PROGRAM TO PRINT THE SUM OF ALL NUMBRS FROM 1 TO N USING FOR LOOP #include <iostream> using namespace std; int main() { int i, num, sum = 0; cout << "enter the number : "; cin >> num; for(i = 1; i <= num; i++) { sum += i; } cout << "the sum of all numbers is: " << sum; ...
ALGO
0.999779
3.515384
4bcbd17d-d868-47b3-871d-f36fb05e6e97
Sambhav0707/DSA_07
Hard/Binary Search/0004-median-of-two-sorted-arrays/0004-median-of-two-sorted-arrays.cpp
#include <vector> #include <algorithm> #include <numeric> using namespace std; class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { for(int i = 0 ; i<nums2.size() ; i++){ nums1.push_back(nums2[i]); } sort(nums1.begin() , nums1.end());...
ALGO
0.999984
6.137323
74987d40-3530-4e7b-8a9a-019b2da2dcd2
RaghavBansal31/C-Programs
specialpractice.cpp
#include<iostream> using namespace std; class A{ int p,q,total; public: void input(int x, int y) { p = x; q = y; } void process() { total = p*q; } int result() { return total; } }; class B{ int p,q,total; public: void input2(int x, int y) { p = x; q = y; } void ...
ALGO
0.972922
4.105133
9c362135-f93a-4b68-9933-9b940f6583d2
csxark/DSA_Cpp
01_Arrays/painter_partition.cpp
#include <iostream> using namespace std; int allocate(int arr[], int m, int n) { int start = 0, end = 0, ans, mid; for (int i = 0; i < n; i++) { start = max(start, arr[i]); end += arr[i]; } while (start <= end) { mid = start + ((end - start) / 2); int page = 0, c...
ALGO
0.99994
4.752088
2b0067f2-0e0e-4542-819f-76ebd4d18023
RahulMittal18/Leetcode_solutions
1008-construct-binary-search-tree-from-preorder-traversal/1008-construct-binary-search-tree-from-preorder-traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999994
6.240383
7be6a8db-7ff5-4749-97f1-142cfe87b977
ishandutta2007/codeforces
arzhantsev64/normal/1672/F1.cpp
#pragma GCC optimize("O3", "unroll-loops") #pragma GCC target("sse4.2") #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define pt pair<int, int> #define x first #define y second const int mod = 998244353; void solve() { int n; cin >> n; vector<int> a; unord...
ALGO
0.999983
5.218023
61d6473c-4b64-46d8-8be8-6bcc4f8c2290
pmclachlan0552/Labs
C++/TTT func check who won/src/TTT func check who won.cpp
#include <iostream> using namespace std; int main() { int Board[3][3] = {0,0,0, 0,0,0, 0,0,0}; // top row if(Board[0][0] == 1 && Board[0][1] == 1 && Board[0][2] == 1) cout << "1x wins"; if(Board[0][0] == 2 && Board[0][1] == 2 && Board[0][2] == 2) cout << "1o wins"; //middle row if(Board[1][0] == 1 && ...
ALGO
0.999318
3.770629
f1a28471-4594-4c84-94e1-ba09cc4a6f3c
edgyJackson/CS260_DataStructures
Map/IndexMap.cpp
#include "IndexMap.h" #include <cassert> #include <algorithm> #include <stdexcept> using namespace std; void IndexMap::grow() { //temp copies of old array and size IndexRecord* oldData = buckets; int oldTableSize = numBuckets; //setup new storage keyCount = 0; //0 values in the new stor...
TOOL
0.926399
4.966819
e8ad6115-23aa-497c-b5cd-1d3d28c7f2c7
PORTIA211204/assignment
DAY 3 Assignment 11.cpp
#include<stdio.h> #include<math.h> int main() { float P,R,T,A,CI; printf("Enter the value of Principal"); scanf("%f",&P); printf("Enter Time"); scanf("%f",&T); printf("Enter Rate"); scanf("%f",&R); A=P*(pow((1+R/100),T)); printf("the value of Compound Interest is"); printf("%f",CI=A-P); return 0; }
ALGO
0.998727
3.28303
499c4c34-9eed-47f8-b040-b29b67c43673
ampl/coin
Ipopt/Ipopt/src/Algorithm/IpAlgBuilder.cpp
#include "IpoptConfig.h" #include "IpAlgBuilder.hpp" #include "IpOrigIpoptNLP.hpp" #include "IpIpoptData.hpp" #include "IpIpoptCalculatedQuantities.hpp" #include "IpCGPenaltyData.hpp" #include "IpCGPenaltyCq.hpp" #include "IpStdAugSystemSolver.hpp" #include "IpAugRestoSystemSolver.hpp" #include "IpPDFullSpaceSolver.h...
TOOL
0.996293
6.845944
bc5d5e33-5182-4fa2-a1b3-1682e6222eb2
HighlightCode/accelerated_c-
ch6/6-5.cpp
#include <vector> #include <iostream> #include <algorithm> #include <iterator> using std::vector; using std::cin; using std::cout; using std::endl; using std::transform; using std::back_inserter; #include "student_info.h" #include "vec.h" double optimistic_median_analysis(const vector<Student_info>& s) { vector<dou...
ALGO
0.997735
4.786164
9d0e8145-b59b-4748-98f0-7a047ef6bd7b
ksanu1998/static_analysis_codegen_llms
feedback_pipeline/generations/cpp/files_with_feedback/question-144-pass-1.cpp
#include <bits/stdc++.h> using namespace std; void getXandYintercept(const int P[], const int Q[]) { // Calculate the slope of the line passing through the given points double slope = (double)(P[1] - P[0]) / (Q[1] - Q[0]); // Calculate the y-intercept of the line double yIntercept = P[0] - slope * Q[0];...
ALGO
0.999525
5.222444
22ec26bd-748f-4486-9344-9f938552bf64
manishsarmaa/gfg-practise
Medium/Transform to prime/transform-to-prime.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool isprime( int num) { if(num==1) return 0; for( int i=2; i<= sqrt(num); i++) { if(num% i==0) return 0; } return 1; } int...
ALGO
0.999915
5.834277
f53726ce-85db-4ce6-b449-0630d63fc7c8
abhijeetSinghRajput/GFG_POTD
august/AUG_19_Subarray_with_given_sum.cpp
class Solution { public: // Function to find a continuous sub-array which adds up to a given number. vector<int> subarraySum(vector<int> arr, int n, long long s) { // Your code here int sum = 0; vector<int> ans; for (int i = 0, j = 0; j < n; j++) { sum += ...
ALGO
0.999626
6.058237
e592d957-f1f1-4a6e-a926-7fb9c9a0e8df
Amrit-Bhaskar-code/Leetcode_coding
convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999994
6.650729
10fc65ce-f840-41c4-9a39-c65db787ed90
ishandutta2007/codeforces
wxhtzdy/normal/1647/A.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int> VI; typedef long long l...
ALGO
0.999619
3.256094
93c728ea-fad7-4cba-9bf1-972b06f9f7d1
aiman-mumtaz/interview-prep
1603-running-sum-of-1d-array/running-sum-of-1d-array.cpp
class Solution { public: vector<int> runningSum(vector<int>& nums) { for(int i=1;i<nums.size();i++){ nums[i]+= nums[i-1]; } return nums; } };
ALGO
0.999748
5.701388
d4a4574e-5d0f-4237-8364-4733e06357fa
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_11_4.cpp
#include <bits/stdc++.h> using namespace std; const int P = 998244353; int n, k; inline int ad(int& x, int& y) { return (x + y > P ? x + y - P : x + y); } int A[200006], las[200006], pr[200006]; const int blo = 233; int bel[200006]; pair<int, int> B[200006]; int S[200006]; int val[200006], gv[200006], lz[200006], cur; ...
ALGO
0.999978
4.227821
4a4f1b7a-3f3b-4c10-871c-1604c4796be6
Aman100/Design-Patterns
SOLIDDesignPrinciple/Liskov Substitution Principle/Rule3_4/eg2.cpp
/* Third, Fourth rules are related to DataType. */ #include<bits/stdc++.h> using namespace std; class Base { public: long long int powerOfTwo(int num) { return 1LL<<num; } }; void caller(Base &b, int num) { long long int res=b.powerOfTwo(num); cout<<res<<endl; } //Above code written in year 2022. //Below code is wri...
ALGO
0.998416
5.751452
2dff703e-651b-4663-8fbe-3d26b4663619
kpgng/interview-prep
leetcode/blind_75/categories/backtracking/word_search.cpp
/* Given a char board & a word, return true if word exists in the grid DFS traversal, set visited cells to '#', search in 4 directions, backtrack Time: O(n x 3^l) -> n = # of cells, l = length of word Space: O(l) */ class Solution { public: bool exist(vector<vector<char>>& board, string word) { ...
ALGO
0.999841
6.533997
9ad54b9c-9de8-40c8-ad24-8b9b41ee1d51
VincentXWD/algorithm
HDOJ/hdoj1754.cpp
#include <algorithm> #include <iostream> #include <iomanip> #include <cstring> #include <climits> #include <complex> #include <fstream> #include <cassert> #include <cstdio> #include <cstdlib> #include <bitset> #include <vector> #include <deque> #include <queue> #include <stack> #include <ctime> #include <set> #include ...
ALGO
0.999816
3.807641
5b81f661-e4eb-430c-8604-43be35bed36c
AlterFritz88/interactive_learn_cpp
task_5_10_8.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n, temp; cin >> n; vector<int> vec; for (int i = 0; i < n; i++){ cin >> temp; vec.push_back(temp); } int a, b, sum = 0; cin >> a >> b; for (int i = a; i <= b; i++){ sum += vec[i]; } cout << sum; ...
ALGO
0.9998
3.86106
5dc57496-ff88-48f1-a479-809057b6aaf6
praveen-Acsia/sample-hackerrank
day-5/q1.cpp
#include<iostream> #include<string> using namespace std; int loopCount(string s) { int count = 0; int ele; for (int i = 0; i < s.length(); i++) { ele = s[i] - '0'; switch (ele) { case 0: count++; break; case 4: count++; break; case 6: count++; break; case 8: count += 2; break;...
ALGO
0.998357
3.923979
5803aa10-7cc8-4d0d-bd1a-1dac86991fae
DaianIvovMilashki/OOP
templates/task3.cpp
#include <iostream> //Напишете шаблонна функция, която приема масив и елемент и проверява дали този елемент принадлежи на масива. template <typename T> bool checkForElement(T arr[], size_t size , T element) { for(int i = 0 ; i < size ; i++) { if(element == arr[i]) { return true; ...
ALGO
0.994823
4.880979
f4c6bbb7-694c-4405-bbbc-8dd7a1235dfb
khalwsh/CP-Problems
HackerRank/queries-with-fixed-length/45566170_AC_880ms_0kB.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace __gnu_pbds; using namespace std; #define line '\n' #define khaled ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int dx[]{1,-1,0,0,1,1...
ALGO
0.999921
4.501244
47e5b991-ee2c-4f0c-bcdc-4986136d9f54
viiccwen/Competitve-programming
LeetCode/Dynamic Programming/96. Unique Binary Search Trees.cpp
class Solution { public: int numTrees(int n) { vector<int> dp(n + 1); dp[0] = dp[1] = 1; for (int i = 2; i <= n; i++) { for (int j = 1; j <= i; j++) { dp[i] += dp[j - 1] * dp[i - j]; } } return dp[n]; } }; // 1 2 5 14 132
ALGO
0.99999
7.136326
fa341c7e-8442-4cd9-9b32-927944f25e63
ishandutta2007/codeforces
poopi/normal/242/B.cpp
/* in the name of Allah */ #include <iostream> #include <algorithm> #include <sstream> #include <string> #include <vector> #include <ctime> #include <set> using namespace std; #define int64 long long #define P pair<int, int> int n, cnt; int arr[100010]; int mat[110][110]; int mn, mx; set <...
ALGO
0.999951
3.800991
89200dca-bda4-47df-8efa-ed042d487a0f
leichong98/CleanStack
llvm-project-cleanstack/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/IR/Instructions.h" #include "llvm/InitializePasses.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; INITIALIZE_PASS_BEGI...
TOOL
0.881042
7.847835
908da18a-d5ea-4f0d-a622-3266f32cef2b
IDA-TUBS/lwW2RP
thirdparty/boost_1_73_0/libs/multiprecision/performance/delaunay_test.cpp
#include <boost/multiprecision/cpp_int.hpp> #include "arithmetic_backend.hpp" #include <boost/chrono.hpp> #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int_distribution.hpp> #include <fstream> #include <iomanip> template <class Clock> struct stopwatch { typedef typename Clock::duratio...
TEST
0.933993
6.547808
ec7bb61c-983e-4b74-a8c7-5e111800ef9f
Scott-Thomas-Dev/eigen
blas/double.cpp
#define SCALAR double #define SCALAR_SUFFIX d #define SCALAR_SUFFIX_UP "D" #define ISCOMPLEX 0 #include "level1_impl.h" #include "level1_real_impl.h" #include "level2_impl.h" #include "level2_real_impl.h" #include "level3_impl.h" double BLASFUNC(dsdot)(int* n, float* x, int* incx, float* y, int* incy) { ...
ALGO
0.999227
5.119097
879af2fd-52bf-4223-82bf-eb8b3768b8e5
liuyue1232/Advanced-Data-Structures
1.ac.cpp
/************************************************************************* > File Name: 1.ac.cpp > Author: > Mail: > Created Time: Fri 16 Apr 2021 12:48:40 PM CST ************************************************************************/ #include<stdio.h> #include<stdlib.h> #include<string.h> #include<iostream> ...
ALGO
0.999868
4.049571
c23eba8a-3568-46a8-aae4-b155bdb99771
Techols2500/COSC-2336.S01-PROGRAM-FIVE
MathTree.cpp
//************************************************************************** // // Programming Excerise 5 // CLASS: COSC 2336.S01 // AUTHOR: TYLER ECHOLS // DAtE: Nov 2017 // //************************************************************************** #include "MathTree.h" MathTree::Node::Node(const Token & T...
ALGO
0.979877
4.141247
8262ac9a-c3ef-429f-8347-a0a01c0bd7bf
MarcosViniciusG/Competitive-Programming
Problems/Unicamp/2024/C/main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; ll gcd_(ll a, ll b) { // cout << "A: " << a << '\n'; // cout << "B: " << b << '\n'; if (a == b) return 0; if (b == 0) return 0; return a / b + gcd_(b, a % b); } signed main() { ll t; cin >> t; while (t--) { l...
ALGO
0.99984
5.336572
57d2014a-fca5-4a17-8a37-0a16e9fb8417
helloftroy/SansModels
Kernel/Kernel-CoreShellCylinder.cpp
__kernel void CoreShellCylinderKernel(__global const real *qx, __global const real *qy, __global real *_ptvalue, const real axis_theta, const real axis_phi, const real thickness, const real length, const real radius, const real scale, const real radius_weight, const real length_weight, const real thickness_weight, cons...
ALGO
0.999058
3.170166
caa598a2-a551-4cb4-a22b-38e3324a0b1c
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/September/AproblemOnSticks_20200904170403.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999687
3.288856
324b6c09-91e8-43a1-952f-34558f5bfe0d
TashinParvez/DSA_1_UIU
DSA_TOPICS/Graph/Learned/creat_Graph_using_adjList_.cpp
// **************** Author : Tashin.Parvez *************************\ // **************** Updated: 18-08-23 *************************\ #include <bits/stdc++.h> #define CRACKED return 0; #define nl endl // NewLine #define null NULL using namespace std; class graph { public: unordered_map<i...
ALGO
0.999836
5.906072
29b6c890-1050-402c-910d-4b8242074560
mrinaald/coding-practice
Codechef/Practice/AMSGAME1.cpp
#include <iostream> #include <vector> using namespace std; #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define pb push_back #define mp make_pair #define FOR(i,l,h,x) for(i=l; i<h; i+=x) #define FORE(i,l,h,x) for(i=l; i<=h; i+=x) #define FORNE(i,l,h,x) for(i=l; i!=h; i+=x) #define FORIT(i,i...
ALGO
0.999902
3.697326
3bb908a3-8ff8-4919-9f99-4185a4fd5ab0
nicolas-springer/programacionCompetitiva
codeforces/a71.cpp
#include <bits/stdc++.h> #define forr(i,a,b) for(int i=(a);i<(b);i++) #define forn(i,n) forr(i,0,n) #define dforn(i,n) for(int i=n-1;i>=0;i--) #define forall(it,v) for(auto it=v.begin(); it!=v.end(); it++) #define sz(c) ((int)c.size()) #define rsz resize #define pb push_back #define mp make_pair #define lb lower_bound ...
ALGO
0.998958
3.825821