uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
33c7b040-87f8-42a2-b1a7-102d11b962c7
Darshan-2021-11/cp
CF/2102/C.cpp
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false), cin.tie(nullptr), cout.precision(15), cout.setf(ios::fixed); int t, n, n2, x, y, d, s, v; const int dx[4] = { 0, 1, 0, -1 }; const int dy[4] = { 1, 0, -1, 0 }; cin >> t; while (t--) { cin >> n; n2 = n * n; vector<vector<...
ALGO
0.999946
4.044537
472843cf-f579-48d2-90a2-cbce1b0227b5
gusibi/moli_ai
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.9988
6.76073
4de32a5e-e5bb-4fb7-805a-1a7c0be5be0f
yxshwxnt/leetcode
0523-continuous-subarray-sum/0523-continuous-subarray-sum.cpp
class Solution { public: bool checkSubarraySum(vector<int>& nums, int k) { // [1] here, we store first seen indices for prefix sums (mod k); // remainder 0 (when prefix sum equals k) is the only // one that is allowed to occur just once, thus, we add // it to the map ...
ALGO
0.999878
6.075887
57b6b015-6cbb-4eda-a9dd-d34bebcbe868
Aniumbott/LeetCode-Submissions
0433-minimum-genetic-mutation/0433-minimum-genetic-mutation.cpp
class Solution { public: int minMutation(string start, string end, vector<string>& bank) { unordered_set<string> st{bank.begin(),bank.end()}; if(!st.count(end)) return -1; queue<string> q; q.push(start); int stp=0, s; string cur,t; while(!q.empty()){ ...
ALGO
0.999763
5.793438
45061c88-3442-4dec-baf4-3d9ae815e472
flummoxedShubh/DS-Algo
DS Algo Prac/Interview_questions/frolic_frog.cpp
/* Question by Frolic Frog Studios CHUTYA COMPANY CHUTYA INTERVIEWER BEWARE OF THIS SHEET. Solved by Shubh Sharma PROBLEM STATEMENT:--------------------------------------------------------------------------------------------------------------- Consider a two dimensional array, arr of size n*n where ...
ALGO
0.999982
6.19699
c3cd7613-aceb-4e40-b0a2-fced530504e7
RoumaisaTanveer/LeetCode_Problems
12intoRoman.cpp
#include <bits/stdc++.h> using namespace std; string intToRoman(int num) { vector<pair<int, string>> roman = { {1000, "M"}, {900, "CM"}, {500, "D"}, {400, "CD"}, {100, "C"}, {90, "XC"}, {50, "L"}, {40, "XL"}, {10, "X"}, {9, "IX"}, {5, "V"}, {4, "IV"}, {1, "I"}}; string result = ""; for (auto &pa...
ALGO
0.999592
6.205595
f925fee8-d9c7-4eb0-a9bd-f480ff8619f2
AdityaShekharTiwary/geeks_for_geeks
cycle_in_directed_graph.cpp
class Solution { public: // Function to detect cycle in a directed graph. bool dfs(vector<int> adj[], vector<bool> &vis, vector<bool> &dfsvis, int node) { vis[node] = true; dfsvis[node] = true; for (auto it : adj[node]) { if (!vis[it]) { if (dfs(adj, vis, dfs...
ALGO
0.999934
6.236302
c62fa4aa-5808-4662-9d4d-250c8c676710
ZulfahmiCP/Competitive-Programming-Recources
CodeForces/Educational/Packet_150/Round_156/B_Fear_of_the_Dark.cpp
#include <iostream> #include <functional> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <iomanip> #include <cstring> #include <numeric> #include <vector> #include <string> #include <array> #include <cmath> #include <queue> #include <stack> #include <tuple> #include <deque> #include <se...
ALGO
0.999752
4.987772
fb69e2fb-e070-4acb-a1ef-eeee83ed8e8a
daidai21/Leetcode
Algorithms/C++/7-Reverse_Integer.cpp
// Runtime: 4 ms, faster than 92.23% of C++ online submissions for Reverse Integer. // Memory Usage: 8.2 MB, less than 68.28% of C++ online submissions for Reverse Integer. class Solution { public: int reverse(int x) { int res = 0; while (x != 0) { if (res > INT_MAX / 10 || res < INT_MIN...
ALGO
0.999942
5.972892
d1796108-f1b6-4df0-9f9b-d258e4f82c8f
devraj2018/Programming_Pathshala
Amazon_Most_Frequently_Asked/77)-Snake_and_Ladder_I.cpp
class Solution{ public: int minThrow(int N, int arr[]){ vector<int>nums(31,-1); for(int i=0;i<2*N;i+=2) { nums[arr[i]]=arr[i+1]; } queue<pair<int,int>>q; vector<bool>visited(31,false); visited[1]=true; q.push({1,0}); w...
ALGO
0.999919
4.595154
d3054735-40b1-41e1-9fc5-5e50d9deac2b
qwaker00/Olymp
PetrSu/Winter 2014/Day3/B/hax.cpp
#include <iostream> #include <string> #include <cstdio> #include <memory.h> #include <string.h> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <functional> #include <climits> typedef long long LL; type...
ALGO
0.999949
4.320577
8183bbb5-2c2f-4c10-8905-578883edb7b3
facebook/hhvm
third-party/mcrouter/src/mcrouter/tools/mcpiper/Util.cpp
#include "Util.h" #include <memory> #include <fmt/format.h> #include <glog/logging.h> #include <folly/Format.h> #include "mcrouter/lib/mc/msg.h" namespace facebook { namespace memcache { namespace { boost::regex::flag_type getRegexFlags(bool ignoreCase) { boost::regex::flag_type flags = boost::regex_constants:...
TOOL
0.917782
7.479202
d675bacd-8169-45eb-b4f9-0bd709e7eb19
FelemixX/Parallel-Programming-Open-MP-MPI-
Writers && Readers OpenMP.cpp
#include <omp.h> #include <stdio.h> #include <iostream> #include <windows.h> using namespace std; void main() { int reader, writer; omp_lock_t lock; omp_init_lock(&lock); printf_s("Input number of readers: "); scanf_s("%d", &reader); omp_set_num_threads(reader); printf_s("Input number of writers: "); scanf_...
ALGO
0.988814
4.07918
94590054-c2bd-4bf6-a27c-c1c13eeb4064
lucaski2/Competitive-Programming
Calico/Solidworks/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; // Number of test cases while (t--) { int H, W, D; cin >> H >> W >> D; vector<string> original(H); cin.ignore(); for (int i = 0; i < H; i++) { getline(cin, original[i]); ...
ALGO
0.998315
5.499496
157ef483-3a24-417d-8a40-33534857e296
ryzom/opennel_svn
nel/tools/3d/plugin_max/nel_patch_lib/vertex_neighborhood.cpp
/** \file vertex_neighborhood.cpp * TODO: File description * * $Id$ */ #include "stdafx.h" #include "vertex_neighborhood.h" #define AVERAGE_NUM_POINT 1000 // ********************************************************************** CVertexNeighborhood vertexNeighborhoodGlobal; // *********************************...
ALGO
0.879645
4.904117
74f56612-fab5-4222-8124-1b7288c628a6
SVA-BL00/LeetCode
0027-remove-element/0027-remove-element.cpp
class Solution { public: int removeElement(vector<int>& nums, int val) { if(nums.empty()){ return 0; } int i = 0; for(int j = 0; j < nums.size(); j++){ if(nums[j] != val){ nums[i] = nums[j]; i++; } } ...
ALGO
0.99877
6.144815
3a0d884e-5287-41de-b603-f6f9900b2113
MuhammedImdaad/multithreading
05_conditional/main.cpp
#include <thread> #include <iostream> #include <condition_variable> volatile bool ready = false; // Flag to signal worker to start volatile bool processed = false; // Flag to signal main that work is done std::mutex mtx; std::condition_variable cv; // Worker thread waits for 'ready', processes, then signals 'proc...
TOOL
0.922223
7.01957
a63a6716-d050-4e1f-9bd0-56c456b0c873
streagle/Penn-State-CPP
CMPSC 122/Homework/InLab_10/coins.cpp
// Academic Integrity Affidavit: // I certify that this program code is my work. Others may have // assisted me with planning and concepts, but the code was written, // solely, by me. // I understand that submitting code that is totally or partially // the product of other individuals is a violation of the Academic // ...
ALGO
0.99909
6.282428
2f89cd41-14f3-4491-b231-bdd84e0c5c8d
NestZ/competitive-programming
AtCoder/C-AverageLength.cpp
#include<bits/stdc++.h> using namespace std; // make pair, tuple // __gcd(int, int) // bool isPrime(int n){ // if(n <= 1)return false; // if(n <= 3)return true; // if(n % 2 == 0 || n % 3 == 0)return false; // for(int i = 5;i * i <= n;i += 6){ // if(n % i == 0 || n % (i + 2) == 0)retu...
ALGO
0.999577
3.735777
26c8fc5e-95a4-47f1-a9de-970384cf240e
CLDP/USACO-Contest
2011-2012 Season/2012 February/Silver/relocate.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <set> #include <queue> using namespace std; const int MAXN = 10010; const int MAXK = 5; const int INF = 1000000000; int n, m, k; vector<pair<int, int> > x[MAXN]; int d[MAXK][MAXN]; int SPFA(int T, int s) { vector<bool> z(n, fal...
ALGO
0.999919
3.828176
45db15a0-7747-4731-b172-63e10dc7e140
article16/6Companies30days
Adobe/q09.cpp
class Solution { public: string nextPalin(string s) { int i, j, n = s.length(); string ans = s.substr(0, n / 2); for (i = (n - 4) / 2; i >= 0; i--) { if (s[i] < s[i + 1])break; } reverse(ans.begin() + i + 1, ans.end()); if (i != -1) { for (j = ...
ALGO
0.999975
5.304536
a99bffa0-a4f6-49fd-a545-9f323e08faae
Francisco-GV/maze-generator
src/algorithms/RecursiveBacktracker.cpp
#include "algorithms/RecursiveBacktracker.h" void RecursiveBacktracker::start(std::function<void()> callback) { random.setSeed(seed); int first = random.getInRange(0, maze.getWidth() - 1); // The maze will start at the top calculate(0, first, callback); } void RecursiveBacktracker::calculate(int y, i...
ALGO
0.99984
5.485188
ef62908b-b3d7-4c60-a825-69d9b8dd0fda
NandeeshPuri/CSES
Introductory/weirdAlgo.cpp
#include <iostream> using namespace std; int main() { long long int n; cin >> n; cout << n << " "; while (n > 1) { if (n & 1) n = (3 * n) + 1; else n >>= 1; cout << n << " "; } return 0; }
ALGO
0.999984
4.113827
8e3aea46-68ca-458b-a1ed-568b7b5efe7e
divyansh12git/cf
0contest/1000/problemC2.cpp
// Author: * Divyansh Gupta ( divyansh_8 ) * #include<iostream> #include<vector> #include<unordered_map> #include<map> #include<set> #include<queue> #include<deque> #include<stack> #include<string.h> #include<cmath> #include<limits.h> #include<algorithm> #include<time.h> #include <ext/pb_ds/assoc_container.hpp> /...
ALGO
0.999353
5.037359
2f897385-09d3-4c94-9ed4-22816c22a700
ljzhu/LASegmenter
CLILASegmenter/ShapeMoments/ZernikeMoments.cpp
#ifndef ZERNIKEMOMENTS_CPP #define ZERNIKEMOMENTS_CPP #include "ZernikeMoments.h" // ---------- implementation of ComplexCoeff struct ------------- /** * Copy constructor */ template<class T> ComplexCoeff<T>::ComplexCoeff (const ComplexCoeff<T>& _cc) : p_ (_cc.p_), q_ (_cc.q_), r_ (_cc.r_), value_ (_cc.value_)...
ALGO
0.997617
5.023423
1fc6be04-ca12-4069-8d9f-c8d138303a03
aric-chan/Leetcode
0145-binary-tree-postorder-traversal/0145-binary-tree-postorder-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.999853
6.24493
7790a3ff-16e1-4d9b-bd19-960a4ce3abf0
SehoonKwon/Study_Baekjoon
BJ_13419.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int main() { std::ios::sync_with_stdio(false); cin.tie(NULL); int T; cin >> T; while (T--) { string s; cin >> s; vector<char> v1, v2; if (s.size() % 2) { for (int i = 0; i < s.size(); i++) { if (i % 2) v2.push...
ALGO
0.999978
4.116483
a1ef0c57-8aa2-46dc-8ca0-6c56458bc690
junlong-gao/recreations
src/code_practise/leetcode/cpp/00108.cpp
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include <vector> #include <deque> #include <algorithm> #include <unordered_map> #include <unordered_set> namespace{ using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; str...
TEST
0.998314
6.727087
1fec4956-7592-4ca5-bc3a-c7ed92cdc325
akshatshah21/Data-Structures-and-Algorithms
C++/BinarySearch/Count_Occurence_in_Sorted_Array.cpp
#include<iostream> using namespace std; int lower_bound(int arr[], int lo, int hi, int key) { int mid, ans = hi+1; while(lo <= hi) { mid = lo + (hi-lo) / 2; if(arr[mid] >= key) { ans = mid; hi = mid-1; } else lo = mid+1; } return ans; } int upper_bound(int arr[], int lo, int hi, int key) { int m...
ALGO
0.999881
3.8747
1efb3c62-8c4f-41fa-94dd-c47931423c68
sorious77/codility
lesson/04. counting elements/missing integer.cpp
#include <algorithm> int solution(vector<int> &A) { int min = 1; sort(A.begin(), A.end()); for(int i=0;i<A.size();i++){ if(min == A[i]) min++; } return min; }
ALGO
0.999698
5.020681
9db5bf38-d2b8-41a9-b16e-8a730b35e9e0
GuhanSGCIT/Trees-and-Graphs-problem
Split a Circular Linked List into two halves.cpp
/* Given a Cirular Linked List split it into two halves circular lists. If there are odd number of nodes in the given circular linked list then out of the resulting two halved lists, first list should have one node more than the second list. The resultant lists should also be circular lists and not linear lists. Input...
ALGO
0.999936
5.348742
bcb4a4bd-da6f-4bc7-a29f-8a56a6897b5f
dicabreras/Coding-Problems-CP-
CodeForces/CP-Sheet/1100/Subsequence adittion (HV).cpp
/* Coded by Diego Cabrera */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef vector<int> vi; #define ff first #define ss second #define pb push_back #define mp make_pair #define ln '\n' #define yes "YES" #define no "NO" template <typename TT> using min_heap...
ALGO
0.999559
4.495152
66198c9f-ed9c-4f18-8882-72aa19ead3b8
tedchain/game-crypto-p2p
src/miner.cpp
#include "txdb.h" #include "miner.h" #include "kernel.h" using namespace std; ////////////////////////////////////////////////////////////////////////////// // // BitcoinMiner // extern unsigned int nMinerSleep; int static FormatHashBlocks(void* pbuffer, unsigned int len) { unsigned char* pdata = (unsigned char...
ALGO
0.998738
4.680272
a3b703bc-189b-479f-ab13-b341955271f2
Ahmed-Amamou/CP
Codeforces/Practice/rockpaperscissors.cpp
/* ▄▀▀▄ ▄▄ ▄▀▀█▄ ▄▀▀▄ ▄▀▄ ▄▀▀▀▀▄ ▄▀▀▀▀▄ ▄▀▀█▄▄ █ █ ▄▀ ▐ ▄▀ ▀▄ █ █ ▀ █ █ █ █ █ █ ▄▀ █ ▐ █▄▄▄█ █▄▄▄█ ▐ █ █ █ █ █ █ ▐ █ █ █ █ ▄▀ █ █ █ ▀▄ ▄▀ ▀▄ ▄▀ █ █ ▄▀ ▄▀ █ ▄▀ ▄▀ ▄▀ ▀▀▀▀ ▀▀▀▀ ▄▀▄▄▄▄▀ █ █ ▐ ▐ █ █ ...
ALGO
0.999671
5.099783
2a860f2d-5237-4de3-a115-db2f097fb575
yueshinian/clone_eskf
src/FBUS-EKF/C++/utils/calibrate_camera.cpp
#include <iostream> #include <sys/types.h> #include <dirent.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include <sys/stat.h> #include <opencv2/opencv.hpp> #include <opencv2/core.hpp> #include "opencv2/imgproc.hpp" #include "opencv2/calib3d.hpp" #include <opencv2/highgui.hpp> #include <string> #includ...
TOOL
0.85607
3.074596
265be61d-3845-4d94-bb7f-2ebcc62de5a2
NirobNabil/CP
random_CF/1389C.cpp
#include "bits/stdc++.h" using namespace std; #define ll long long int char a[] = {'0','1','2','3','4','5','6','7','8','9'}; char s[200005]; int check(char x, char y, int l){ int i=0, r=0; char z=x; for(; i<l; i++) { if(s[i]==z) r++, z=(z==x)?y:x; } return (r==1 || x==y)?r:r-r%2; } int main(){ int t, l, res;...
ALGO
0.999755
3.971753
afa8eebf-a21c-4eea-9419-4b4754f24a4a
TTHuangTT/2023aaib3
week09/week09-3.cpp
class Solution { public: double average(vector<int>& salary) { sort(salary.begin(),salary.end()); //從大到小排好 double total = 0; //陷阱,有小數點 for(int i=1;i<salary.size()-1;i++){ total +=salary[i]; } return total / (salary.size()-2); } };
ALGO
0.999519
4.8959
10e50e4c-d63a-4bb4-a99c-b945decdeb98
123pk/100DaysofCompetitiveProgramming
Day04/check if one string swap can make strings equal.cpp
/* Platform :- Leetcode Problem :- check if one string swap can make strings equal Contest :- Leetcode contest 232 Approach:- Number of swap is one so either 2 or 0 index should have different elemnts and on sorting both strings are equal */ class Solution { public: bool areAlmostEqual(string s1, string s2) { ...
ALGO
0.999993
6.444829
229f0718-8308-4df9-99a0-84af012249b2
Guillaume5255/nomad
src/Algos/Mads/MadsInitialization.cpp
/*---------------------------------------------------------------------------------*/ /* NOMAD - Nonlinear Optimization by Mesh Adaptive Direct Search - */ /* */ /* NOMAD - Version 4.0.0 has been created by ...
ALGO
0.986487
6.441855
6718cb3c-7275-4b2c-991e-c2bf62841ac8
nnminh-sam/Problem-List
Self/c++/function/sum-2/setup.cpp
#ifndef CREATE_TESTCASES #define CREATE_TESTCASES #include <bits/stdc++.h> #include "libraries/GeneratingMethods.h" #include "libraries/SideFunctions.h" using namespace std; void makeInput(const int testNumber, ofstream& cout) { cout << testNumber << endl; return; } double sqr(double x) { return x * x; } ...
ALGO
0.993757
4.329772
7d43c491-62f0-4a0f-b7e5-1e417eea8370
guanlun/algorithms
longest-palindrome/Solution.cpp
class Solution { public: int longestPalindrome(string s) { map<char, int> lookup; for (int i = 0; i < s.length(); i++) { char c = s[i]; lookup[c]++; } int totalLen = 0; bool hasOdd = false; for (auto pair : lookup) { int count =...
ALGO
0.999986
6.40413
0e189dc6-5e7a-4b85-82ae-1e201caebd53
jeetsavsani1173/LeetCode-Solution
Ceil The Floor - GFG/ceil-the-floor.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; pair<int, int> getFloorAndCeil(int arr[], int n, int x); int main() { int t; cin >> t; while (t--) { int n, x; cin >> n >> x; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; ...
ALGO
0.999956
5.85899
07d78492-3f2d-4513-9c68-d15ea894f462
ishandutta2007/codeforces
cookiedoth/normal/928/D.cpp
#include <bits/stdc++.h> using namespace std; const int mx = 1e6; const int K = 26; int go[mx][K], sum[mx], term[mx], ptr = 1; int ans = 0; set<string> diff; int add_string(string s) { int n = s.size(); int v = 0; vector<int> a; for (int i = 0; i < n; ++i) { int c = s[i] - 'a'; if (go[v][c] == -1) { go...
ALGO
0.999759
3.83534
fb72f212-8c4e-444a-aee9-19a89fe28c80
mrowan137/puzzles
leetcode/125.cpp
// Runtime: 9 ms // Memory Usage: 7.7 MB class Solution { public: bool isPalindrome(string s) { // remove non-alphanumeric characters string::iterator erase_start = std::remove_if( s.begin(), s.end(), [](const unsigned char& c){ return !std::isalnum(c); } ); // returns iterator to sta...
ALGO
0.991265
6.880672
aad8d2d5-7221-4374-b31c-a4821ea897ae
kondra/CPP-Training
samples/link.cpp
#include <iostream> using namespace std; int& f(int n) { int& t = *(new int [1]); t = n; return t; } int main() { int j, n; unsigned int k; cin >> n; if (k < j) { cout << 1; } j = f(n); cout << ++j << endl; return 0; }
ALGO
0.999926
3.277652
27fb3832-6682-4b13-8287-a0d5f22631cc
Mishra1796/DSA_QANS
Leetcode Daily Challenge/May-2021/13. Ambiguous Coordinates.cpp
/* Ambiguous Coordinates ===================== We had some 2-dimensional coordinates, like "(1, 3)" or "(2, 0.5)". Then, we removed all commas, decimal points, and spaces, and ended up with the string s. Return a list of strings representing all possibilities for what our original coordinates could have been. Our o...
ALGO
0.980634
5.864537
72a7805c-4979-4f5f-bbcb-566639e8d508
kaner918/competitive-programming
online judge.kaner murillo/c++/10448.cpp
//https://onlinejudge.org/external/104/10448.pdf //10448 #include<cstdio> #include<iostream> #include<vector> #include<tuple> #include<climits> using namespace std; int dp(int coste, int sum, int node, int destiny, vector<vector<pair<int, int>>>&graph, vector<vector<int>>&paths, vector<vector<int>>&mem){ int an...
ALGO
0.999954
4.162327
f7ddcd56-ea1b-46e7-bc99-fb3cae85f4aa
kumihoclub/entt-reactive
dep/Box2D/Collision/b2TimeOfImpact.cpp
#include "Box2D/Collision/b2Collision.h" #include "Box2D/Collision/b2Distance.h" #include "Box2D/Collision/b2TimeOfImpact.h" #include "Box2D/Collision/Shapes/b2CircleShape.h" #include "Box2D/Collision/Shapes/b2PolygonShape.h" #include "Box2D/Common/b2Timer.h" #include <stdio.h> float32 b2_toiTime, b2_toiMaxTime; int3...
ALGO
0.999776
6.477284
2025ab34-deb3-46fa-93ad-24e3e09148b9
aliammari1/Leetcode_problems
solutions/power-of-four/Accepted/8-5-2023, 6_50_37 PM/Solution.cpp
// https://leetcode.com/problems/power-of-four class Solution { public: bool isPowerOfFour(int n) { if(n == 0) return false; while(n!=1) { if(n%4 != 0) return false; n/=4; } return true; } };
ALGO
0.999638
6.086174
586fe560-e61f-41c2-aafb-a95d42c6dc19
MarcosZanardii/Artigo-Grafo
t2.cpp
#include "Graph.h" #include <queue> #include <iomanip> #include <ctime> #include <vector> using namespace std; //funcao que realiza caminhamento void bfs(Graph& g, Node& v, char& c, int& maior) { vector<int> cont(5,0);//array com cont de personagem conforme pos-> cont[0] = 'A', cont[1] = 'B', cont[2] = 'C'...
ALGO
0.999966
5.118924
1659b17c-94f0-4168-bcc1-cea2e4f14b31
TURX/Algorithm-CodeLib
Luogu/01bagtemplete.cpp
#include <stdio.h> #define N 1050017 int wei[N],val[N],f[N]; int main() { int i, j, n, m; while(scanf("%d",&n)!=EOF) { scanf("%d", &m); for(i=0; i<n; i++) scanf("%d%d", &wei[i],&val[i]);//wei[i]Ϊval[i]Ϊֵ for(i=0; i<n; i++) { for...
ALGO
0.999972
3.300991
ce6e7ed8-2199-4550-b3b5-71413df12c9c
Maylen44/cpp_Snake
Snake.cpp
#include <SFML/Graphics.hpp> #include <vector> #include <iostream> #include <algorithm> #include "Snake.h" static const sf::Vector2f UpDirection(0.f, -20.f); static const sf::Vector2f DownDirection(0.f, 20.f); static const sf::Vector2f LeftDirection(-20.f, 0.f); static const sf::Vector2f RightDirection(20.f, 0.f); Sn...
TOOL
0.895578
6.222343
5c145280-3b15-452d-bba4-00f0951333e9
Beau-Will/cpp_project
compititions/蓝桥杯比赛/第 23 场 小白入门赛/3.cpp
// Problem: 3. 屏蔽信号【算法赛】 // Contest: Lanqiao - 第 23 场 小白入门赛 // URL: https://www.lanqiao.cn/problems/20057/learning/?contest_id=224 // Memory Limit: 256 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) #include<bits/stdc++.h> using i64 = long long; using u64 = unsigned long long; using u32 =...
ALGO
0.999539
4.498827
6b253be7-b27c-4876-b65a-ef094d544648
maiswati/DSA-Practice
LinkedLists/Medium-Problems-Of-LL/reverse-a-linked-list-iterative.cpp
//Iterative approach to reverse a linked list #include<bits/stdc++.h> using namespace std; struct Node{ int data; Node* next; public: Node(int data1, Node* next1) { data = data1; next = next1; } public: Node(int data1) { data = data1; next = nullptr; }...
ALGO
0.999986
5.647203
b45e4ef1-76dd-4821-833a-cb964940e942
Mian-Muhammad-Bilal/Cpp
DSA/Practice_miniQuiz_Tasks/practice/rec.cpp
#include <iostream> using namespace std; void print1(int n) { if (n == 0) return; print1(n - 1); cout << n << endl; } void print(int n) { if (n == 0) return; cout << "n\n"; print(n - 1); } int main() { // print(4); print1(11); return 0; }
ALGO
0.999902
4.725537
8a6c93fa-1c5e-42e9-b86b-dbcd34a3d18d
SakibFahad/Codeforces-Solution
contests/increasing_sequence.cpp
#include<bits/stdc++.h> using namespace std; void solve() { int n; cin>>n; long long int a[n],b[n]; for(int i=0;i<n;i++) { cin>>a[i]; } b[0]=1; for(int i=0;i<n;i++) { if(b[i]==a[i]) b[i]=b[i]+1; b[i+1]=b[i]+1; } cout<<b[n-1]<<endl; } int main() { ...
ALGO
0.999895
4.040576
85d5b85a-4fb1-4317-8f03-09150200fba5
liuq901/code
CF/cd_100417_A.cpp
#include <cstdio> #include <vector> #include <utility> #include <algorithm> using namespace std; int a[10],b[10],sum[65540][2]; pair <int,int> same[10][100]; bool init() { int Q; scanf("%d",&Q); while (Q--) { int h1,m1,h2,m2; char p1,p2,c1,c2; scanf("%d:%d%c%c=%d:%d%c%c",&h1,&m1,...
ALGO
0.99986
3.463224
18dc9a53-eb69-48fa-951e-ca5423d6690b
Hunter08gg/ConsoleApplication18
ConsoleApplication18/ConsoleApplication18.cpp
#include <iostream> #include <cstdlib> #include <ctime> enum class Player { Bot, User }; int diceRoll() { return std::rand() % 6 + 1; } int main() { // Инициализация генератора случайных чисел std::srand(static_cast<unsigned int>(std::time(nullptr))); int botDice[5]; int userDice[5]; // Бросок костей для б...
ALGO
0.999698
5.51169
e6e8cd07-1757-4779-8d9e-038573085f14
swfsql/university
federal-university-itajuba/old/eco-010/fabiana/Aula 8 - Ordenacoes Simples e Complexas, Recursividade/claudia/0 - pilha/9 - palindroma.cpp
#include<cstdlib> #include<iostream> #include<cstring> #include<cstdio> using namespace std; /* clipboard para teste 1 3 aba 6 4 6 */ struct No { char info; No* next; }; struct Pilha { // variveis No* topo; int tam; // funes void init() { topo = 0; tam = 0; } ...
ALGO
0.996536
3.717571
d1e08a0a-40f3-4227-a2bc-01ff1a0102d5
ch-saty/Hackerrank
viral advertissing.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n,c=0,s=5,sum=0; cin>>n; for(int i=0;i<n;i++){ sum+=floor(s/2); s=floor(s/2)*3; } cout<<sum<<endl; return 0; }
ALGO
0.999738
3.184137
2e76fb83-1306-45f9-b7be-a95e19e7df7d
dimaystinov/bitcoin
src/chain.cpp
#include <chain.h> void CChain::SetTip(CBlockIndex *pindex) { if (pindex == nullptr) { vChain.clear(); return; } vChain.resize(pindex->nHeight + 1); while (pindex && vChain[pindex->nHeight] != pindex) { vChain[pindex->nHeight] = pindex; pindex = pindex->pprev; } } C...
ALGO
0.999029
6.569997
e5403976-6f15-404e-8bc1-ee15fe06b8e3
mjdave/majicweather
thirdparty/glm/test/core/core_func_integer_find_msb.cpp
// This has the programs for computing the number of leading zeros // in a word. // Max line length is 57, to fit in hacker.book. // Compile with g++, not gcc. #include <cstdio> #include <cstdlib> // To define "exit", req'd by XLC. #include <ctime> #define LE 1 // 1 for little-endian, 0 for big-endian. ...
ALGO
0.999145
3.230461
4b9e4eaa-61fb-4130-be94-b6f2e2462151
Shamiul-Lipu/problem-crunching-exercises
PH/Basic/white_cells.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int H, W, h, w; cin >> H >> W >> h >> w; int result = (H - h) * (W - w); // int result = (H * W) - ((h * W) + (H * w) - (h * w)); cout << result; return 0; } // https://atcoder.jp/contests/abc121/tasks/abc121_a?lang=en // 1. cell r...
ALGO
0.995761
3.905738
16cdf5af-ddf0-4d9a-b3c7-621d589e6dd8
tkoike880/atcoder-logs
abc/abc366/a/main.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep1(i, n) for (int i = 1; i <= (int)(n); ++i) #define defin(type, var) type var; cin >> var typedef long long ll; int main() { int n,t,a; cin >> n >> t >> a; int r = n - a - t; cout << ((min(a,t) + r > ...
ALGO
0.999871
3.570977
e229a2f7-cc94-44e0-8c59-90cbc0405394
Muthumuthu007/CPP-PROGRAMS
c++/mth maxi nth mini.cpp/main.cpp
#include <iostream> using namespace std; int main() { int i,n,a[10],max; cout<<"enter the number of entities:"; cin>>n; for(i=0;i<n;i++) { cout<<"enter the numbers"<<i+1<<"="; cin>>a[i]; } sort(a,a+i); cout<<"shorted array:"; for(i=0;i<n;i++) { cout<<a[i]<<","...
ALGO
0.99975
3.583045
174f368e-8c07-4983-8da8-4e624cbac111
akshat0069/DSA-code
11-Linked list/221-reverse-doubly-LL.cpp
#include <iostream> using namespace std; struct Node { struct Node *prev; int data; struct Node *next; } *first = NULL; void create(int A[], int n) { struct Node *t, *last; int i; first = new Node; first->data = A[0]; first->prev = first->next = NULL; last = first; //last pointer i...
ALGO
0.999963
4.343422
85c0713f-3af8-4538-a069-0ddb36a29d24
nmd1406/CPP
CPP0515.cpp
#include<iostream> #include<string> #include<iomanip> #include<sstream> #include<cctype> #include<algorithm> using namespace std; struct SinhVien { string ma{"B20DCCN"}; string name{}; string lop{}; string dob{}; double gpa{}; }; string chuanHoa(string& name) { string newName{}; string to...
ALGO
0.960985
4.672084
bb8dd420-f26f-4e23-a33f-43421aac7837
ragibKhandoker/University-CSE-Coding-Assignments-
CSE-221/Lab-assignment_new1/bubble_sort_optimized.cpp
#include <bits/stdc++.h> using namespace std; void bubble_sort(vector<int> &array){ bool swap; for(int i=0; i<array.size()-1; i++){ swap = false; for(int j=0; j<array.size()-1-i; j++){ if(array[j] > array[j+1]){ int temp = array[j]; array[j] = array[j+...
ALGO
0.999973
5.283025
9d60e1b5-d128-464e-820b-9be1782b1983
Rodagui/CodeForces-Solutions
roadsNotOnlyInBerland.cpp
/*D. Roads not only in Berland*/ #include <bits/stdc++.h> using namespace std; class DisjointSet { public: int size; vector <int> rank; vector <int> parents; DisjointSet(const int& n):size(n), rank(n, 1), parents(n){ //inicializa parent[i] = i iota(begin(parents), end(parents), 0); } inline int getParent...
ALGO
0.999949
4.216319
638695bf-a003-4f72-a209-d0f73909a5b4
RaghavSekhri/C-_prog
palindrome_calsses/main.cpp
#include <iostream> using namespace std; class palindrome { private: int a; public: void getdata(); void palindromecheck(); }; void palindrome::getdata() { cin>>a; } void palindrome::palindromecheck() { int r,rev=0; int z; z=a; while(a!=0) { r=a%10; rev=rev*10+r; a...
ALGO
0.999615
4.814032
8ef4035f-359a-4a40-90d9-114d1c154486
Shivansh-Gaur2/Leetcode_Problems
0034-find-first-and-last-position-of-element-in-sorted-array/0034-find-first-and-last-position-of-element-in-sorted-array.cpp
class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int prev = -1, after = -1; int left = 0, right = nums.size()-1; while(left <= right){ int mid = left + (right - left)/2; if(nums[mid] == target){ int k = mid; ...
ALGO
0.99996
6.685232
004e6b30-7970-4c8e-811f-4b701e4b731a
felrock/aoc20
day18/day18_part1.cpp
#include <fstream> #include <iostream> #include <string> #include <vector> #include <unordered_set> #include <iomanip> #include <functional> long long calculate(std::string str, int start, int end) { long long sum = 0; bool latest_op = true; for(int i=start; i < end; ++i) { if(str[i] == ' ') ...
ALGO
0.999918
4.035518
7ca6f95d-a1a4-4e47-853e-675c8bccf015
radraerae/CPP-Projects
ch7hw.cpp
/*What I know about pointers is they help me not need global variables, objects like the tic-tac-toe board are passed as constant pointers instead of references. The address of a tic-tac-toe board must be passed instead of the board itself*/ //I've removed all previous comments from the code and added comments that ai...
ALGO
0.994263
5.344518
b093574b-ebbd-4729-bbfe-8309f8714637
syedtawqeer/cse_university
5th Semester/Design and Analysis of Algorithms/01-Matrix/04-Transpose-of-matrix.cpp
// Transpose of the matrix #include <iostream> using namespace std; // To get elements of a 2-D array void get_array(int a[100][100], int r, int c) { for (int rows = 0; rows < r; rows++) { for (int columns = 0; columns < c; columns++) { cin >> a[rows][columns]; } } } /...
ALGO
0.999787
4.429608
b76b0851-b726-4af6-ae18-5fb00ec337c2
Symom-Hossain-Shohan/Competitive_Programming
zip/Competitive_Programming-master/K_Labyrinth.cpp
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; //defines... #define ll long long #define boost ios_base::sync_with_stdio(false);cin.tie(NULL); #define pb push_back #define mp make...
ALGO
0.999656
3.270054
49524b5f-7409-49b5-9c56-06d663581d61
ishandutta2007/codeforces
bmerry/normal/954/B.cpp
//#pragma GCC optimize("O3") //#pragma GCC target("arch=corei7-avx") #include <bits/stdc++.h> #ifndef ONLINE_JUDGE # include <sys/time.h> # include <sys/resource.h> #endif /*** TEMPLATE CODE STARTS HERE ***/ #ifndef M_PI #define M_PI 3.1415926535897932384626433832795028841971693993751 #endif using namespace std; ty...
ALGO
0.999876
4.249795
56b1eccd-2e8d-4c22-a9d6-e773b2ef2ff7
GT3CH1/Mazer
src/maze/Solver.cpp
// // Created by GT3CH1 on 7/24/24. // #include "Solver.h" #include "Maze.h" Solver::Solver(const SolveType solveType) { setSolveType(solveType); } void Solver::push(MazeNode* node) { visited.insert(node); switch (solveType) { case BFS: bfsQueue.push(node); break; case DFS: ...
ALGO
0.997492
6.343998
43b33987-b0fd-4ddf-97fc-4d82b463084d
ishandutta2007/codeforces
ivan100sic/normal/513/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; int n; int l[5], r[5]; ld p[10005]; ld eq(int i, int x) { if (l[i] <= x && x <= r[i]) return ld(1) / (r[i]-l[i]+1); else return 0; } ld le(int i, int x) { return min<ld>(1, max<ld>(0, x...
ALGO
0.999185
3.736244
c762fdbe-c342-4eae-b5dd-5e276d271607
luisa-maria1111/Hacker_Blocks_CPP
simple_input.cpp
/* HACKER BLOCKS : SIMPLE INPUT @author: Luísa Maria Mesquita */ #include <iostream> using namespace std; int main() { int a; int sum = 0; while(sum >= 0 && cin >> a) { if(a < -1000 || a > 1000) { cout << "Outside valid range!" << endl; exit(1); ...
ALGO
0.984208
3.548858
9cfae9c2-4c8a-40a5-983b-4c5101c8f1ed
drimmovka/linalg
src/matrix.cpp
#include "matrix.hpp" namespace linalg { Matrix::Matrix(int rows, int cols, Scalar scalar) { if (rows < 0 || cols < 0) { throw LinalgError("Invalid shape"); } _m.assign(rows, std::vector(cols, scalar)); } Matrix::Matrix(const std::vector<std::vector<Scalar>>& matrix) { int cols = (matrix.empt...
ALGO
0.973979
6.626832
2be93669-a430-4335-bc72-1800aaf1a21f
stefdasca/CompetitiveProgramming
Infoarena/subset.cpp
/// #bettercoderthanshebeautiful #include<bits/stdc++.h> using namespace std; ifstream f("subset.in"); ofstream g("subset.out"); int n; long long nr,qq; int main() { f>>n>>nr; for(int i=1;qq<nr && i<=n;++i) { if(nr>qq+(1LL<<(n-i))) qq+=(1LL<<(n-i)); else g<<i<<" ",++q...
ALGO
0.999935
3.440983
824d5823-ecc2-4cb9-b97f-1e311e7db5fc
thearpitanand/Data-Structures-and-Algorithms-in-cpp
OOPs/02_FractionCode.cpp
#include <iostream> using namespace std; class Fraction { private: int numerator; int denominator; public: // Constructors Fraction(int numerator, int denominator) { this->numerator = numerator; this->denominator = denominator; } Fraction() { this->numerator = 0...
TOOL
0.975689
6.315405
5a874f25-f78d-47ae-98f5-f269eb642b9a
sarvex/leetcode-rect
solution/1800-1899/1870.Minimum Speed to Arrive on Time/Solution.cpp
class Solution { public: int minSpeedOnTime(vector<int>& dist, double hour) { int left = 1, right = 1e7; while (left < right) { int mid = (left + right) >> 1; if (check(dist, mid, hour)) { right = mid; } else { left = mid + 1; ...
ALGO
0.999989
5.903009
5d6c7b9a-5a92-4a41-99db-01577fdcef5c
o4p1f5/Programming_language
cpp_DesignPattern/220110/25_operator7.cpp
#include <iostream> using namespace std; // 증감(++ / -- ) 연산자 class Integer { int value; public: Integer(int n = 0) : value(n) {} /* void Print() const { cout << value << endl; } */ Integer& operator++() // 전위 연산 { value += 1; return *this; } ...
ALGO
0.922477
4.708623
11ec6f8c-a23a-4e5b-8411-60bcc59d4eac
PawelMierzwa/zadania-matury
Czerwiec 2020/zad1.cpp
#include <iostream> #include <fstream> #include <string> int getNumber(std::string Str) { size_t pos = Str.find(' '); if (pos == 2) { return std::stoi(Str.substr(0, 2)); } else if (pos == 1) return Str.front() - '0'; } bool isPrimeNumber(int number) { if (number == 0 || number == 1) { return false; } fo...
ALGO
0.999555
3.613504
24c97d91-8526-4794-b86e-8305850668c9
delta4d/AlgoSolution
zoj/02/1130.cpp
#include <cstdio> #include <memory> using namespace std; int res[16][1<<15]; bool visit[1<<15]; bool find; void dfs(int d, const int &n) { if (d == 1 << n) { if (res[n][d-1] == 1 << (n-1)) { find = true; return; } } int t = (1 << (n-1)) - 1; int x1 = (res[n][d-1] & t) << 1; int x2 = x1 + 1; if (!vi...
ALGO
0.999795
3.239725
29b602f0-8958-4998-bb59-8e18317baee7
Nermeen-Mohammad/Problem_Solving_Level2_Using_Cpp
Join_String.Cpp
#include <iostream> #include<vector> #include<string> using namespace std; string JoinString(vector <string> sVector, string sprit) { string NewString = ""; for (int i = 0; i < sVector.size(); i++) { NewString += sVector[i] + sprit; } return NewString.substr(0, NewString.length()-sprit.length()); } int main(...
TOOL
0.986064
3.803803
898cea29-95ec-4a16-98ce-36afbe2e346b
BGMer7/LeetCode
155. Min Stack/minStack.cpp
#include <stack> #include <iostream> #include <math.h> #include <vector> using namespace std; class MinStack { private: stack<int> x_stack, min_stack; public: /** initialize your data structure here. */ MinStack() { } void push(int x) { x_stack.push(x); min_stack.push(mi...
ALGO
0.999982
5.861642
b233cdb7-0d7f-428c-9963-9b50aef8e215
ishandutta2007/codeforces
yutaka1999/normal/348/A.cpp
#include <cstdio> #include <cstdlib> #include <algorithm> #define SIZE 100005 #define INF 1000000000000000005 using namespace std; typedef long long int ll; int in[SIZE]; int n; bool ok(ll k) { ll sum=0; for(int i=0;i<n;i++) { if(in[i]>k) return false; sum+=k-in[i]; sum=min(sum,k); } return sum>=k; } int ...
ALGO
0.999861
3.771065
89ee6faa-f1cc-4dee-aeb4-498a4cb3c4e0
mlakenya/ft_irc
srcs/execute/commands/JOIN.cpp
#include "../../../includes/CmdList.hpp" #include "../../../includes/Server.hpp" std::string GetChannelName(std::string &params); std::string GetPassword(std::string &passwords); void SendChanInfos(Channel *channel, Client *client); void JOIN(Server *server, Client *client, cmdList *cmd) { std::string nickname =...
WEB
0.891766
4.657027
a190960f-592e-4acb-9dab-f0d3dce91ad6
yjnnlee/Algorithm
21-2_Coding_Algorithm_Contest/prob1.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> #include <stack> #include <sstream> using namespace std; vector<int> page(100, 0); vector<int> before; int main() { before.push_back(0); //인덱스를 1부터 시작하기 위해 string s; getline(cin, s); //공백 포함한 1줄 입력 //1 2 3 4 B B 4 2 B F F string을 1 2 3 4 B...
ALGO
0.999436
4.037857
7a71db34-16c1-4df5-9f52-fccff2fc50a8
monircse061/My-All-Codes
CODEFORCE/codef471A.cpp
#include<bits/stdc++.h> using namespace std; int main() { double x,y,z,h,d,c,n,p,q,r,m,g,j,k=20,l=100,s; int a,b; scanf("%lf %lf %lf %lf %lf %lf",&x,&y,&h,&d,&c,&n); if(x>=20&&x<=23) { a=(int)h/n; g=h/n; if(a!=g) {a=a+1;} s=(a*c)-((a*c)*(k/l)); pr...
ALGO
0.986222
3.027215
4dbd8b51-b08f-4c44-8d16-9e275224e7da
mukkund27/HIDOC
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
0657df2d-e5f3-44fa-85fd-2939d0d93fda
elador/FeatureDetection
sdmTracking/sdmTracking.cpp
/* * sdmTracking.cpp * * Created on: 11.01.2014 * Author: Patrik Huber */ // For memory leak debugging: http://msdn.microsoft.com/en-us/library/x98tx3cf(v=VS.100).aspx //#define _CRTDBG_MAP_ALLOC #include <stdlib.h> #ifdef WIN32 #include <SDKDDKVer.h> #endif /* // There's a bug in boost/optional.hpp that...
TOOL
0.937515
5.734434
1fb59e50-6f9e-4ac7-a5a8-4b66cc16c45a
yanjusong/CPP-Study
cast/const_cast_change_value.cpp
#include <iostream> using namespace std; int fun(int *ptr) { *ptr = *ptr + 10; return (*ptr); } int fun(int &ptr) { ptr += 10; return ptr; } void test1() { cout << "in test1()" << endl; const int val = 10; const int *ptr = &val; int *ptr1 = const_cast<int *>(ptr); fun(ptr1); c...
TEST
0.908049
3.541174
544fee4e-13fa-4169-ac97-6f6d598c5ec4
ukmaurya/GFG
Difficulty: Easy/N meetings in one room/n-meetings-in-one-room.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { bool static comp(pair<int, int>&p1 , pair<int, int >&p2){ return p1.second<p2.second; } public: //Function to find the maximum number of meetings that can //be performed in a meeting...
ALGO
0.999929
6.008455
ecd60370-ea73-45c1-a989-a4f2fd8ef59f
tomohide-itt/Libigl_Proj
610_CSGTree_original/include/igl/dijkstra.cpp
template <typename IndexType, typename DerivedD, typename DerivedP> IGL_INLINE int igl::dijkstra( const IndexType &source, const std::set<IndexType> &targets, const std::vector<std::vector<IndexType> >& VV, const std::vector<double>& weights, Eigen::PlainObjectBase<DerivedD> &min_distance, Eigen::PlainObjec...
ALGO
0.999935
4.092758
362fd921-4a24-4383-b165-367d6fadf2c9
ishandutta2007/codeforces
krijgertje/normal/1284/C.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <cstring> #include <list> #include <cassert> #include <climits> #inclu...
ALGO
0.99998
4.613322
39c6f3ee-5971-45b7-a59b-480624782ba2
kmjp/procon
yuki/0001-1000/501-600/575.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 ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999971
3.948701
3cf1cc9c-007d-4d08-9880-4b01cd8fdcc0
lucasdbr05/competitive-programming
fase_2/fr_check.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define esp ' ' #define int long long int #define vii vector<vector<int>> #define vi vector<int> #define pii pair<int, int> #define pb push_back #define ff first #define ss second #define sws ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);...
ALGO
0.999892
4.10746