uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
225094d4-823c-4ebb-b7f2-05ccda583603
luisortiz11/prog-utp
parcial3/prob3.cpp
/*Nombre del Programa:Parcial2_problema3.cpp Programador: Luis Ortiz Fecha de compilacion: 13/07/2021 Version del programa: 0 */ #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <ctype.h> int main() { int i; float promedio = 0; char nombres[5][40]; float p[3][5]; char notas[5]; for (i ...
TOOL
0.994839
3.285854
8c1a33f6-3bdf-4fc3-94d9-f9ce45d6ae81
Ankush-Chander/Data-Structure-Lab
code/Lecture6_7/vector_shallow_copy_improved.cpp
#include <iostream> #include <stdexcept> #include <memory> class IntVector { private: struct SharedData { std::shared_ptr<int[]> data; size_t size; size_t capacity; }; std::shared_ptr<SharedData> sharedData; void resize() { size_t new_capacity = sharedData->cap...
TOOL
0.866825
6.80215
384feb24-d555-4cd2-819b-e44cea389eb3
lovelyzzkei/Baekjoon_cpp
Gold/22866.cpp
#include <iostream> #include <cstdlib> #include <stack> #include <utility> #define N 100001 #define FAST_IO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); using namespace std; stack<pair<int, int>> s; int n, tower[N], ans[N], towerNum[N][2]; int main(void) { FAST_IO; cin >> n; for (int i = 1; i <...
ALGO
0.999958
3.207588
d2e0b2c1-1369-4027-98e3-4ef098aec6a9
navinkrnirala76/LeetCode-Practice
First Bad Version.cpp
// The API isBadVersion is defined for you. // bool isBadVersion(int version); class Solution { public: int firstBadVersion(int n) { unsigned int s=1; unsigned int e=n; unsigned int mid=(s+e)/2; while(s<=e) { mid=(s+e)/2; if(isBadVersion(mid)==tr...
ALGO
0.999887
6.487548
b7050753-c391-4d67-a826-863869dbfd0a
alexander-romanov-edu/parallel-computing
03-transport-equation/main.cpp
#include "grid.hpp" #include "transport_equation.hpp" #include "transport_equation_solver.hpp" #include <boost/mpi.hpp> #include <boost/program_options/option.hpp> #include <boost/program_options/options_description.hpp> #include <boost/program_options/parsers.hpp> #include <boost/program_options/variables_map.hpp> #i...
ALGO
0.99924
6.038177
8bd6f2de-c140-4058-bf30-51ef8a67dfa3
glebarg/gameoflife
GameOfLife/GameOfLife.cpp
// GameOfLife.cpp : Defines the entry point for the application. // #include "framework.h" #include "GameOfLife.h" #include <vector> #include <exception> #define MAX_LOADSTRING 100 class State { bool _isAlive; public: State(bool isAlive) { _isAlive = isAlive; } bool IsAlive() { ...
ALGO
0.974713
6.041265
9c32a246-96e1-4b90-95a7-ce9d36a76725
Sukanya-namburi/singly-linked-list
4)addingNodeAtBeginningOf_LL.cpp
//adding a NewNode at beginning of a linked list #include<bits/stdc++.h> using namespace std; struct Node{ int data; Node *next; }; int main(){ Node *head=NULL; Node *first=NULL; Node *second=NULL; head=new Node(); first=new Node(); second=new Node(); head->data=1; first->data=2;...
ALGO
0.999621
3.509229
cf3af36f-e072-4f95-8a08-d63e172d5fcd
kraftpunk97/leetcode
853.car-fleet.cpp
/* * @lc app=leetcode id=853 lang=cpp * * [853] Car Fleet */ #include <bits/stdc++.h> using namespace std; // @lc code=start class Solution { public: struct Car { int pos; int vel; Car(int pos, int vel) : pos(pos), vel(vel) {} Car() { Car(0, 0); } }; int carFleet(int t...
ALGO
0.999725
6.33714
4daa72ed-4bdc-4e02-9007-00ba461ed9a4
shantanu1414/LeetCodes
3226-minimum-number-game/minimum-number-game.cpp
class Solution { public: vector<int> numberGame(vector<int>& nums) { sort(nums.begin(),nums.end()); for(int x=0;x<nums.size()-1;x+=2) {swap(nums[x],nums[x+1]); } return nums; } };
ALGO
0.999997
5.101921
7bca3a5e-f8fb-4da3-a358-35f850efcf69
Rtk100/DIAS-Summer-Internship
C++/D2-Branes/eigen/unsupported/doc/examples/MatrixPower_optimal.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { Matrix4cd A = Matrix4cd::Random(); MatrixPower<Matrix4cd> Apow(A); std::cout << "The matrix A is:\n" << A << "\n\n" "A^3.1 is:\n" << Apow(3.1) << "\n\n" "A^3.3 is:\n" << Apow(3.3) << "\n\n" ...
ALGO
0.995025
3.396939
e5d1992c-4da0-4fd2-a314-06c2e24c2590
makio93/competitive-atcoder
abc106/abc106_b/0/main3.cpp
// #include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i=0; i<(int)(n); ++(i)) #define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i)) #define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i)) #define rep3r(i, m, n) for (int i=(int)(n)-1; (i)>=(int)(m); --(i)) #define al...
ALGO
0.999752
4.252019
029fd531-b0ec-4da7-877e-274be846db2e
himel5113/Problem_solving-
1927B. Following the String.cpp
#include <bits/stdc++.h> #define ll long long #define ld long double #define endl '\n' #define HA cout<<"YES"<<endl #define Ha cout<<"Yes"<<endl #define ha cout<<"yes"<<endl #define NA cout<<"NO"<<endl #define Na cout<<"No"<<endl #define na cout<<"no"<<endl #define allV(V) (V).begin(), (V).end() #define allA(arr, size)...
ALGO
0.999868
4.621822
9e31ca52-41cc-4e82-9c36-4a52b6ded258
ashishnagpal2498/CPP_Concepts_and_Codes
Hash Table Lec-20/hashin_implementation.cpp
//Hash Table - Data Structure //Insertion deletion and searching O(1) - // Key Val pair - used to search elements in table //Factors - hash function - , size of table , Collisions //Collisions are basically values - which give same index - how to handle that //We will be making a linked list for collision handling ...
ALGO
0.999192
5.034856
2c11a4a8-3fde-4f19-94ca-5374c99604cd
Kushagra-Kapoor25/DSA
MatrixSearchSortedES.cpp
#include<bits/stdc++.h> using namespace std; void searchMatrix(int *arr[], int r, int c, int s) { int i = 0, j = c - 1; if (s < arr[0][0]) { cout << "Not found"; return; } if (s > arr[r - 1][c - 1]) { cout << "Not found"; return; } while (i < r && j >= 0) { if (arr[i][j] == s) { cout << "Found a...
ALGO
0.998465
3.184398
795a9fe1-af8f-4cbc-919b-375d9ea34b05
ThiliniSenarathne/CPP-Codes
Cpp61.cpp
/*Ask the user to enter a number and value for power and find the factorial for the number 2^3=2*2*2=8; 3^4=3*3*3*3=81; */ #include<iostream> using namespace std; int main() { int no,power,result=1; cout<<"Enter the number for power : ";; cin>>no; cout<<"Enter the power : "; cin...
ALGO
0.999361
4.806991
a9f003d2-7f16-4d09-a4a6-1ce20c50ac98
puba5/Algorithm_Study
wooyoo/Programmers/2019_카카오_개발자_겨울_인턴십/PR_징검다리_건너기.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> #include <map> using namespace std; // 2019_카카오_개발자_겨울_인턴십_징검다리_건너기 // 시간을 위해 이분 탐색 사용 using namespace std; int solution(vector<int> stones, int k) { int answer = 200000000; int str = 0; int end = 200000000; while (str <= ...
ALGO
0.999945
4.933599
f9f9b400-3529-402b-a677-e4dfa0405a95
chopralab/candock
lib/linker/segment.cpp
#include "candock/linker/segment.hpp" #include "statchem/helper/benchmark.hpp" #include "statchem/helper/help.hpp" #include "statchem/molib/molecule.hpp" using namespace std; namespace candock { namespace linker { ostream& operator<<(ostream& stream, const Segment& s) { stream << "Segment(" << s.__seed_id << ") :...
ALGO
0.997655
3.12173
83cefa54-823a-4420-863f-051b0da68228
nafiulhaqueinan/CODEFORCE
729A.cpp
#include<bits/stdc++.h> using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif int a; cin>>a; string s;cin>>s; for(int i=0;i<a;i++){ if(s[i]=='o') { if(i+2 and s.substr(i,3)=="ogo") { while(i+2<a and s.substr(i,3)=="og...
ALGO
0.999966
3.873355
1db9c30f-ffee-477e-bc5d-ec1c22f1b6e8
Sandigupta/Problem_Sets_DSA_Fundamentals_C_plus_plus
Binary Search Probleam 3/Binary_search_an_answer_value_1.cpp
#include <bits/stdc++.h> using namespace std; bool canDistChoco(vector<int> &arr, int mid, int s) { int n = arr.size(); int studentReqd = 1; int currSum = 0; for (int i = 0; i < n; i++) { if (arr[i] > mid) { return false; } if (currSum + arr[i] > mid) ...
ALGO
0.999993
4.934681
f2bd1b5e-8dda-4b64-b021-e61af906a986
LIFECorp/external_2
eigen/unsupported/doc/examples/PolynomialUtils1.cpp
#include <unsupported/Eigen/Polynomials> #include <iostream> using namespace Eigen; using namespace std; int main() { Vector4d roots = Vector4d::Random(); cout << "Roots: " << roots.transpose() << endl; Eigen::Matrix<double,5,1> polynomial; roots_to_monicPolynomial( roots, polynomial ); cout << "Polynomial:...
ALGO
0.998259
4.015535
0e3feda5-e958-4a62-a6ea-f7f3034c61d4
iwishiwasaneagle/cubpackpp
examples/original/vb18.cpp
// Bivariate normal distribution // Note that special purpose methods exist for this type of integral. #include <cubpackpp/cubpackpp.h> #include <iostream> using namespace cubpackpp; // The integral depends on the following 3 parameters: real rho, a, b; real N; // This is used to save work real f...
ALGO
0.999905
5.24869
5a596844-fd4f-4559-a515-de39b1daab68
thnbao22/Codeforces_Solve
From_Hero_to_Zero.cpp
#include<iostream> using namespace std; //https://codeforces.com/problemset/problem/1175/A int main() { ios_base::sync_with_stdio(0); cin.tie(); cout.tie(); int test; cin >> test; while (test--) { long long n, k; cin >> n >> k; long long step = 0; while (n != 0) { if (n % k == 0) { step++; n /= k;...
ALGO
0.999876
3.924402
37572dea-6958-47a3-bd01-dcbe467d7701
navidkpr/Competitive-Programming
CodeForces/230/B[ T-primes ].cpp
#include <iostream> #include <set> #include <algorithm> #include <vector> using namespace std; const int MAXN = 100*1000 + 1000; long long int arr[MAXN]; bool mrk[MAXN * 10]; set <long long int> myset; vector <long long int> prime; void run_gharbal(int n) { fill(mrk, mrk + n + 1, 1); mrk[0] = mrk[1] = 0; for (int...
ALGO
0.999859
4.078382
eb9d44f1-030d-4850-bc12-96917b98ca63
Rayd-kim/ft_container
map/red_black_tree copy.cpp
#include <iostream> #include <stdexcept> #define RED 1 #define BLACK 2 template <typename _pair> struct Node { public: _pair value; Node *parent; Node *left; Node *right; int red_black; Node(_pair pair) : value(pair), parent(NULL), left(NULL), right(NULL), red_black(RED) //일반 insert때의 노드 생성 {} Node() : p...
ALGO
0.999194
4.800161
d6ba7a62-22d7-4c63-b2f5-73814ad22373
domejiraphon/As-Rigid-As-Possible
libigl/include/igl/normal_derivative.cpp
template < typename DerivedV, typename DerivedEle, typename Scalar> IGL_INLINE void igl::normal_derivative( const Eigen::MatrixBase<DerivedV> & V, const Eigen::MatrixBase<DerivedEle> & Ele, Eigen::SparseMatrix<Scalar>& DD) { using namespace Eigen; using namespace std; // Element simplex-size const s...
ALGO
0.999737
5.753574
b9658ff0-5ea2-4165-97aa-407ea6b04dc0
AkshatAggarwal14/cp-solutions
codeforces/1663/C.cpp
#ifdef LOCAL #include "Akshat.hpp" #else #include "bits/stdc++.h" using namespace std; #define dbg(...) #endif using ll = long long; auto sz = [](const auto &container) { return int(container.size()); }; #define all(x) begin(x), end(x) const ll INF = 1e18; const ll N = 1e5 + 5; const ll MOD = 1e9 + 7; // 998244353 v...
ALGO
0.999669
5.778478
97da463f-3124-401d-ba51-e53508f09587
Tahircode/DSA-2
questions/rotated_sorted_array.cpp
#include<iostream> using namespace std; int main(){ int nums[]={7,8,9,10,6}; int s=0; int e=nums.size(); int n=sizeof(nums)/sizeof(nums[0]); if(nums[0]<=nums[n]) return nums[0]; int last=nums[n-1]; int first=nums[0]; int ans=0; while(s<=e){ int mid=...
ALGO
0.999967
3.26805
3136e92f-9aed-4f69-85d4-f0ba898c44b7
irori-gthb/atcoder
arc1xx/arc108/arc108_b.cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { int N; string s; cin >> N >> s; string ans = ""; rep(i, N) { ans += s[i]; if (ans.size() >= 3 && ans[ans.size() - 3] == 'f' && ans[ans.size() - 2] == 'o' && ans[ans....
ALGO
0.998385
4.035045
6506a1e3-2f14-4bf2-b694-2081eb5e4fc5
Scyrc/777
leetcode/剑指offer/13_机器人的运动范围.cpp
// // Created by sc on 2023/4/25. // #include <iostream> #include <math.h> #include <vector> using std::vector; class Solution { private: int maxSide; int row; int col; int res = 0; vector<vector<int>> cache; public: int movingCount(int m, int n, int k) { row = m; col = n; ...
ALGO
0.99987
5.619745
26e1b722-e289-4869-a926-eedc2f30b18b
sqc1999-oi/Codeforces
Codeforces Round 107/Freezing with Style/main.cpp
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <algorithm> #include <climits> #include <cstring> #include <cstdarg> #include <cctype> #include <cmath> #include <cstring> #include <vector> #include <queue> using namespace std; const int N = 1e5, M = INT_MIN / 3, C = 1e9; typedef pair<int, int> pii; bool flag...
ALGO
0.999932
3.727324
b1934113-633e-45c6-bf00-7babf8e59fdd
gawain6/TIL
algorithm/boj/_4000/4948.cpp
#include <iostream> using namespace std; void getPrime(int n, int m) { int cnt = 0; bool* isPrimeArr = new bool[m+1]; for(int i=2; i<=m; i++) isPrimeArr[i] = true; for(int i=2; i<=m; i++) { if(isPrimeArr[i]) { if(i>n) cnt++; for(int j=i+i; j<=m; j+=i) isPrimeArr[j]...
ALGO
0.999868
4.501984
4cf97603-6fea-4372-b9a4-a4e45f9cb0d5
seanxwzhang/LeetCode
223 Rectangle Area/solution.cpp
// Find the total area covered by two rectilinear rectangles in a 2D plane. // Each rectangle is defined by its bottom left corner and top right corner as shown in the figure. // Assume that the total area is never beyond the maximum possible value of int. class Solution { public: int computeArea(int A, int B, i...
ALGO
0.98031
3.145379
1f7ac1d4-ede1-49e0-a0c0-69b6bac8964a
DhruvChauhan3k/Leetcode_Daily
19-remove-nth-node-from-end-of-list/remove-nth-node-from-end-of-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* removeNthFr...
ALGO
0.99996
5.704713
2f5a6c76-24c5-44d9-8f94-3a8a4fa1702d
ishandutta2007/codeforces
kshitij_sodani/normal/1305/D.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back typedef long long int llo; #define a first #define b second #define endl "\n" int n; set<int> adj[1001]; int vis[1001]; int co; int aa,bb; int ind; void dfs(int no,int lev=0){ if(lev==0){ for(auto nn:adj[no])...
ALGO
0.999962
3.558183
cd361df7-38c7-47dd-aaf3-6bbb1c0af70a
viiku/competitive-programming-problems
newtons/MutatingArray.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int test;cin>>test; while(test--){ int n,k;cin>>n>>k; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } int prefixsum[n+1]={0}; } }
ALGO
0.999714
3.622993
b0d41c35-2c1a-4ee2-9060-5f9599ef4f2f
npnkhoi/Competitive-programming
AtCoder/ABC213/F.cpp
#include <bits/stdc++.h> using namespace std; vector<int> prefix_function(string &s) { int n = (int)s.length(); vector<int> pi(n); for (int i = 1; i < n; i++) { int j = pi[i-1]; while (j > 0 && s[i] != s[j]) j = pi[j-1]; if (s[i] == s[j]) j++; pi[i] =...
ALGO
0.999893
4.338048
6ff6d57b-034c-461b-9140-892b7010da8e
henrymound/2018-Summer-Research
Golang/Tello/references/opencv-master/modules/calib3d/test/test_solvepnp_ransac.cpp
#include "test_precomp.hpp" namespace opencv_test { namespace { class CV_solvePnPRansac_Test : public cvtest::BaseTest { public: CV_solvePnPRansac_Test() { eps[SOLVEPNP_ITERATIVE] = 1.0e-2; eps[SOLVEPNP_EPNP] = 1.0e-2; eps[SOLVEPNP_P3P] = 1.0e-2; eps[SOLVEPNP_AP3P] = 1.0e-2; ...
TEST
0.864497
6.765505
bc9b6a4b-35c1-49a6-83a2-539792e0a27f
TanakaHikari-0608/Practice
演習2-3/演習2-3/演習2-3.cpp
//========================================================== // z̕ϒl //========================================================== #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> // printf() #include <stdlib.h> // srand(),rand() #include <time.h> // time() // ֐vg^Cv double AverageOfArray(int array[], int arraySiz...
TOOL
0.914772
3.288772
536a9538-d554-47fd-a357-c1d9d4374e65
WillenPeng/perception_ros
lidar_camera/src/lidar_camera_calibration/src/find_velodyne_points.cpp
#include <cstdlib> #include <cstdio> #include <math.h> #include <algorithm> #include <map> #include "opencv2/opencv.hpp" #include <ros/ros.h> #include <cv_bridge/cv_bridge.h> #include <image_transport/image_transport.h> #include <sensor_msgs/image_encodings.h> #include <sensor_msgs/PointCloud2.h> #include <sensor_msg...
TOOL
0.949937
4.739181
8d3ed77a-4324-416b-94cc-c53483b68115
adeelabdella/lab_files
lab4_nfa_to_dfa.cpp
#include <fstream> #include <iostream> #include <map> #include <ostream> #include <set> #include <string> #include <unordered_set> #include <utility> #include <vector> #include "PRINT.H" #include "STRING_UTILS.H" using namespace std; void construct_dfa_matrix(string state_init, map<string, vector<string>> &nfa, ...
ALGO
0.999306
5.262661
23b66227-a73b-450a-b5a8-e6af72b5dcd5
massout/MyCodeforces
800/Tram.cpp
#include <iostream> using namespace std; int main(){ int a, b, c, d=0, e=0; cin >> a; while(a>0){ cin >> b >> c; d += c-b; if(d>e) e=d; a--; } cout << e << endl; return 0; }
ALGO
0.99967
3.334974
64b4fdcb-dda6-4f0c-b0c0-fb5bf47bc77e
SaiTp/LeetCode-Codes
2386-find-the-k-sum-of-an-array/2386-find-the-k-sum-of-an-array.cpp
class Solution { public: long long kSum(vector<int>& nums, int k) { int n=nums.size(); vector<long long>ans; priority_queue<pair<long long,long long>>pq; long long sum=0; for(int i=0;i<n;i++) { if(nums[i]>0) { sum+=nums[i]; ...
ALGO
0.999991
5.261646
61ee21c9-99ef-4c3d-bf32-4b5be8993373
DougHamil/WIT
opcode/OPC_Picking.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////...
ALGO
0.963524
6.479314
40c7e42a-5cc0-4023-8f7f-17bcebcb369f
shine919/labs
12lab/TaskASecond.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <windows.h> using namespace std; struct Circle { double x, y, r; }; // Процедура окна для обработки сообщений LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { static vector<Circle> circles; s...
ALGO
0.896037
5.166431
e924f349-9d5f-4a97-8c1a-30554d045f5e
frozenca/DPV
6/6-4.cpp
#include <vector> #include <string> #include <unordered_map> #include <unordered_set> #include <iostream> void computeSentences(const std::string& s, std::size_t i, std::unordered_map<std::size_t, std::vector<std::string>>& memo, const std::unordered_set<std::string>& wordDict) { if (!memo.co...
ALGO
0.999593
6.461044
22aea3c7-9f71-4970-b335-2e057e11684d
cea-trust-platform/trust-documentation
doc/source/srcs/doxy/src/Kernel/Math/Parser.cpp
#include <StringTokenizer.h> #include <algorithm> #include <Parser.h> #include <queue> void debug(StringTokenizer*); /* Les identificateurs suivants doivent etre definis de maniere unique pour chaque fonction */ Parser::Parser() { init_parser(); state=0; root=nullptr; str= new std::string("0"); impuls_tn =...
TOOL
0.945306
3.409556
73dd9387-b877-4106-adf6-90b59d8c29a4
Yashraj-18/DSA-notes
169-majority-element/majority-element.cpp
//moore's voting algo class Solution { public: int majorityElement(vector<int>& nums) { int cnt = 0; int ele; for(int i = 0 ; i< nums.size() ; i++){ if(cnt == 0){ cnt =1; ele = nums[i]; } else if(nums[i] == ele){ ...
ALGO
0.999973
5.432235
4fbe2b61-5410-48cc-b2cb-feec507e74b1
gu-tig333-ht23/v2-tisdag
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
00eb4d1a-8e80-439e-ae25-9eb24c65462b
mrcchef/CP
Contest/Google/kick_start/B_2022/Palindromic_Factors.cpp
//LinkedIn:https://www.linkedin.com/in/abhijeettamrakar/ //GitHub:https://github.com/mrcchef/ #include <bits/stdc++.h> // policy based data structure #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less<int>, r...
ALGO
0.999054
5.554221
58b91059-d241-4051-a4ec-d24fee4e5359
ledinhchien3320/tindocdaicuong
20181107/20181107/Bai32.cpp
#include<iostream> using namespace std; int main() { //cau 32: cho snd n. kiem tra xem n co phai la so chinh phuong hay k //so chinh phuong la so ma can bac 2 cua no la 1 so nguyen //khai bao va nhap n int n; cout << "Nhap n: "; cin >> n; //dua ra DK neu can bac 2 cua n la 1 so nguyen thi n la so chinh phuong i...
ALGO
0.998933
3.741749
3509951f-a9be-43f6-b6da-8cdd8dd046a4
Ahnaf-41M/Codeforces_AtCoder
codeforces/1546/A.cpp
#include "bits/stdc++.h" #define ff first #define ss second #define MX 100005 #define pb push_back #define int long long #define PII pair<int,int> #define endl "\n" #define all(v) v.begin(),v.end() #define rep(i,a,b) for(int i = a; i <= ...
ALGO
0.999825
3.517503
d8f95cf2-3419-4dc4-a679-5f3219abcafe
SM-GIT-HUB/dailyCoding--from-2025_March
number of islands.cpp
// User function Template for C++ class DSUrank { public: vector<int> rank, parent; DSUrank(int n) { rank.resize(n + 1, 0); parent.resize(n + 1); for (int i = 0; i <= n; i++) { parent[i] = i; } } int findUltParent(int node) { if (parent[node] == node) { return node; } return pare...
ALGO
0.999961
6.164886
fbe85091-9607-4903-a23b-9e84c9f52f55
jiebanghan/swordtoken
src/rpc/server.cpp
#include <rpc/server.h> #include <rpc/util.h> #include <shutdown.h> #include <sync.h> #include <util/strencodings.h> #include <util/system.h> #include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/split.hpp> #include <boost/signals2/signal.hpp> #include <cassert> #include <memory> // f...
WEB
0.957653
7.780061
ebc6eea6-5f24-4373-be7a-6a5f71e93d13
withtahmid/cp
Code-Templates-master/Team/Number Theory/Factorial Prime Factorization.cpp
void factorize_factorial(int n) { // sieve size must be as large as n // prime factorization of n!, O(sqrt n) for (int i = 0; i < primes.size() && primes[i] <= n; i++) { int x = n, freq = 0; while (x / primes[i]) { freq += x / primes[i]; x /= primes[i]; } ...
ALGO
0.999388
4.617238
6f65adc2-e163-4e5c-a234-eaf79285bc37
Quangnam1423/data-structure-and-algorithm-go-with-C-
DSA_TONGQUANGNAM/DSA10005_CHU_TRINH_EULER_DO_THI_CO_HUONG.cpp
#include<iostream> #include<vector> #include<queue> #include<stack> int v , e; std::vector<std::vector<int> > Ke; std::vector<int> deg_cong , deg_tru; std::vector<bool> check; int mark_euler() { int x = 0; for(int i = 1 ; i <= v ; i++ ) { if(deg_cong[i] == deg_tru[i]) { check[i] = true; } else x++; } ...
ALGO
0.999666
4.840971
52ed8272-e7e8-4516-9dea-2f39e8ea6560
mevlt01001/Linked-Lists
Priority Queue/priority_queue.cpp
#include <iostream> class costumer { static int max_costumer_capacity; static int current_size; static int costumer_id; public: int id; int age; bool priority; costumer* next = nullptr; costumer(int _age) { costumer_id++; id = costumer_id; age = _age; priority = (_age >= 65); current_size++; std:...
ALGO
0.980505
4.908835
f656933c-7c6f-4a11-9c13-ecfc19e0bebe
ashpurple/Algorithm-Study
Class 5/BOJ_2623_음악프로그램/BOJ_2623.cpp
#include <iostream> #include <vector> #include <queue> #define MAX 1001 using namespace std; int N, M, K; vector<int> node[MAX]; int inDegree[MAX]; int result[MAX]; void topologySort(){ queue<int> q; for(int i = 1; i <= N; i++) // start node if(inDegree[i] == 0) q.push(i); for(int i = 1; i <= N...
ALGO
0.999991
4.586477
74a89c32-ab35-4c1d-86d2-9a35c0d436fb
orihehe/BOJ
DFS, BFS/15020번_Emptying the Baltic.cpp
/* BOJ 15020 - Emptying the Baltic https://www.acmicpc.net/problem/15020 원하는 지점에서부터 물을 채워나간다. */ #include <cstdio> #include <algorithm> #include <queue> #define pii pair<int,int> #define ll long long using namespace std; /* 🐣🐥 */ int arr[502][502]; int rgo[8] = { 1,1,1,0,0,-1,-1,-1 }, cgo[8] = { -1,0,1,-1,1,-1,0,1 ...
ALGO
0.999603
4.189588
862d2ff3-01ad-40c9-b9ce-9664cb541b88
Roosmax/Programming
7-1.cpp
#include <iostream> #include <chrono> using namespace std; int main() { long int n; cin >> n; long int last0, last1, next0, next1; last0 = 0; last1 = 0; next0 = 1; next1 = 1; for(int i = 0; i < n-1; i++) { last0=next0; last1=next1; next0=last0+last1; ...
ALGO
0.999986
3.397435
6238296a-0245-4994-a949-3b9cf75cc1c1
BSanandu88/Coding-questions
216-combination-sum-iii/216-combination-sum-iii.cpp
class Solution { public: vector<vector<int>> ans; void func(vector<int> &cur, int num, int k, int n){ if(n < 0 or cur.size() > k){ return; } if(n == 0 && cur.size() == k) { ans.push_back(cur); return; } for(int i=num; i<=9; ++...
ALGO
0.999979
6.644572
cf852586-6c51-40dd-859a-2df232ee704f
rhuitl/vslam
sba/test/run_spa2d.cpp
// // Running reduced pose system // #include <stdio.h> #include <iostream> #include <iomanip> #include <fstream> #include "sba/read_spa.h" #include "sba/sba.h" #include "sba/spa2d.h" #include <Eigen/Cholesky> using namespace Eigen; using namespace std; using namespace sba; #include <sys/time.h> // elapsed time in ...
ALGO
0.999099
3.535374
b6589bdb-8b5e-48ba-8024-4212fc91eb57
gincode18/DSA-Striver
stack/checkParanthesis.cpp
#include <iostream> #include <stack> #include <string> using namespace std; int longestValidParentheses(string s) { stack<int> st; st.push(-1); // Dummy element to mark the start int max_len = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == '(') { st.push(i); } el...
ALGO
0.999762
6.028509
5890897f-491d-447e-8b31-92e5226cc7f9
hendrywiranto/leetcode-solutions
easy/1480. Running Sum of 1d Array/main.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.999724
5.88349
d8b5e1ba-27f6-4197-bc5c-c3cbf9906e2a
matter-labs/compiler-llvm
libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // UNSUPPORTED: libcpp-has-no-incomplete-ranges // template<class T, class Proj = identity, // indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> // constexpr const T& ranges::max(const T& a, const T& b, Comp comp = {}, Proj ...
TEST
0.986333
7.281203
e23096a4-cc2b-43cc-a194-f477e42df390
uclasystem/Mako
Mako-Memory/src/hotspot/share/utilities/copy.cpp
#include "precompiled.hpp" #include "runtime/sharedRuntime.hpp" #include "utilities/align.hpp" #include "utilities/copy.hpp" // Copy bytes; larger units are filled atomically if everything is aligned. void Copy::conjoint_memory_atomic(const void* from, void* to, size_t size) { uintptr_t bits = (uintptr_t) from | (ui...
TOOL
0.958717
7.568431
4ee0c0f0-b226-4aca-9ec8-6cc10e83b25e
saramedernach/C
callcenter/Validator.cpp
#include "Validator.h" #include <iomanip> #include <iostream> std::string s(int i) { return std::to_string(i); } Validator::Validator(const std::vector<Employee>& employees, int verbosity) { mEmployees = employees; mVerbosity = verbosity; mTotalCalls = 0; mTotalScore = 0; mTotalTime = 0; } Validator:...
TOOL
0.946957
6.823825
e25c7e2a-94bc-4a86-b2e4-37dd2ccd8dbb
EslamFareed/modal_project
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
d0fc9247-f5eb-4a47-92b5-e0665b5aa0c0
johnboygenius/exercises
coulomb-potential/exercise-8-2.cpp
/** * @file exercise-8-2.cpp * @author John Davis * @brief Numerical Monte Carlo integration of Carbon coulomb interaction energy (sp3, O(n) vs O(n^6)) * @date 2021-12-24 */ #include <cmath> #include <random> #include <iostream> const double a = 0.529177; // Bohr radius (Ang) const double Z = 6.0; // Carbon atom...
ALGO
0.999714
6.078753
4b75c42b-2c8a-40c4-b5bb-9641304a3441
saswatiray55/GeeksforGeeks-160-Days-coding-challenge
Day10/BruteForce.cpp
#include <iostream> #include <vector> using namespace std; int maxSubarraySum(vector<int> &arr) { int n = arr.size(); int res = arr[0]; for(int i = 0; i<n; i++) { int currentSum = 0 ; for(int j = i; j < n; j++) { currentSum += arr[j]; res = max(res, cur...
ALGO
0.999156
5.576703
7ae97872-146d-47ea-9a05-55aa90face92
cycles2022/cc
extlibs/tlx/tlx/string/word_wrap.cpp
#include <tlx/string/word_wrap.hpp> #include <cctype> namespace tlx { bool is_space(char ch) { return ch == ' ' || ch == '\f' || ch == '\t' || ch == '\r' || ch == '\n' || ch == '\v'; } std::string word_wrap(const std::string& str, unsigned int wrap) { std::string out; out.resize(str.size()); ...
TOOL
0.947443
6.885592
0ff4a1e3-fec3-4c0f-a31e-2389e307893c
johanvdw/SAGA-gis-git-mirror
saga-gis/src/tools/terrain_analysis/ta_cliffmetrics/CliffMetrics_tool.cpp
//--------------------------------------------------------- #include "CliffMetrics_tool.h" #include "CliffMetrics/delineation.h" /////////////////////////////////////////////////////////// // // // // // // /////////////////////////////////////////////////////////// //------...
TOOL
0.98873
6.214089
8bb15740-51b2-4159-a087-ad26b6e057b2
astitva3377/LittleOS
kernel/memory/heap.cpp
#include "heap.h" MemorySegmentHeader* firstFreeSegment; void initHeap(uint_64 addr, uint_64 length) { firstFreeSegment = (MemorySegmentHeader*)addr; firstFreeSegment->memoryLength = length - (sizeof(MemorySegmentHeader)); firstFreeSegment->next = 0; firstFreeSegment->prev = 0; firstFreeSegment->nextFree = 0; f...
ALGO
0.931113
4.522074
6b2936e5-dda4-4745-8442-9d906eba80f5
DiegoIvanR/Bitacora-BST
MyLinkedList.cpp
// Diego Ivan Rodriguez Nunez A01644772 // Luis Andres Casillas Casillas A01645008 // Ali Lopez Sarabia A01645060 // Act 2.3 - Act 2.3 - Actividad Integral estructura de datos lineales (Evidencia Competencia) // 09/10/2024 // Programación de estructuras de datos y algoritmos fundamentales (Gpo 603) #include "MyLinkedL...
ALGO
0.999153
5.204353
db51a9db-6af3-49c2-81c6-0e3275303349
ishandutta2007/codeforces
abc864197532/normal/1090/A.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; #define lli long long int #define fop(i,m,n) for (int i=(m);i<(n);i++) #define FOP(i,m,n) for (int i=(m)-1;i>=(n);--i) #define test(x) cout << #x << ' ' << x << endl; #define printv(a) {\ for ...
ALGO
0.999894
3.536976
7b643785-f6d1-421b-9dcf-0487a42bb24b
codacy-open-source-projects-scans/mongodb
src/mongo/db/pipeline/skip_and_limit.cpp
#include <algorithm> #include <boost/move/utility_core.hpp> #include <boost/none.hpp> #include <boost/smart_ptr/intrusive_ptr.hpp> #include <cstdint> #include <iterator> #include <limits> #include <list> #include <boost/optional/optional.hpp> #include "mongo/base/exact_cast.h" #include "mongo/db/pipeline/document_sou...
ALGO
0.986764
7.890934
b3318558-5237-4b39-83ed-30e49bbdef1d
dakorot/Revision-Problems
_14_binary_manipulations.cpp
#include <cstdio> unsigned char younger_bits_negation(unsigned char v, int b, bool f) { int mask = 0b00001111; v = v & mask; if(f) v = v ^ mask; v = v ^ (1 << b); return v; } int main() { unsigned char v = 13; int b = 6; bool f = true; v = younger_bits_negation(v, b, f)...
ALGO
0.996994
3.8831
254dcf2d-fd69-4f1d-8f00-e0d23e487814
Captain-Cucumber/pprfnk1
src/merkleblock.cpp
#include "merkleblock.h" #include "hash.h" #include "consensus/consensus.h" #include "utilstrencodings.h" using namespace std; CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter) { header = block.GetBlockHeader(); vector<bool> vMatch; vector<uint256> vHashes; vMatch.reserve(block....
ALGO
0.997511
5.965203
e4c07ebf-8268-411c-aaea-52a16a6d2fff
ishandutta2007/codeforces
potato167/normal/1530/E.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define _GLIBCXX_DEBUG using namespace std; using std::cout; using std::cin; using std::endl; using ll=long long; using ld=long double; ll I=1167167167167167167; ll mod=1e9+7; #define rep(i,a) for (int i=0;i<a;i++) template<class T> using _pq = priority_queue<T, ve...
ALGO
0.999984
4.896411
3bd1baf9-d8b7-4106-87c5-bb3d5a926a5b
mkrechetov/LeetCode
cpp/53_MaxSubArray.cpp
#include <iostream> #include <vector> #include <queue> #include <unordered_map> #include <set> #include <bits/stdc++.h> using namespace std; void print(vector<int> v) { cout << "["; for (int num: v) {cout << num << ", ";} cout << "]" << endl; } int maxSubArray(vector<int>& nums) { int cur = nums[0]; int m...
ALGO
0.999733
5.007151
4043c2d8-06c3-41da-9245-1ce4e6bba598
Octshaw/Address_list
Find_Contact.cpp
#include"main.h" int Find_Contact(Contacts* arr, int length) { string name; if (length == 0) { cout << "ͨѶ¼ǿյ" << endl; } else { cout << "ϵ:" << endl; cin >> name; for (int i = 0; i < length; i++) { if (arr[i].name == name) { return i; } } cout << "ͨѶ¼в޴" << endl; } return -1; }
TOOL
0.991325
3.385984
95e3e050-9952-4a58-939e-1f422dae2538
ishandutta2007/codeforces
gepardo/normal/617/C.cpp
/*-------------------( alex256 )--------------------\ | Contest: Codeforces Round 340 (Div. 2) | | Task: C | | Date: 23. 01. 2016 | \--------------------------------------------------*/ #include <algorithm> #include <cmath> #include <cs...
ALGO
0.9999
3.498169
bb3833d8-4414-4ffb-a4d7-6d3bb20ed726
WelRaj/DSA-Codes
dom project/new project/linkedlist/insertionLL.cpp
#include<iostream> #include<vector> using namespace std; struct node { public: int data; node *next; node(int data1, node *next1 = nullptr) { data = data1; next = next1; } }; node* arrtoLL(vector<int> &arr) { if (arr.empty()) return nullptr; nod...
ALGO
0.999888
4.61854
2db8fb42-d350-4233-a6b9-7c685725472e
gtkn/atcoder
ABC_312_Ex.cpp
//title #include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define rep1(i,n) for (ll i = 1; i <= (n); ++i) #define repr(i,n) for (ll i = (n)-1; i >= 0; --i) #define rep1r(i,n) for (ll i = (n); i > 0; --i) #define bit(n,k) ((n>>k)&1...
ALGO
0.999985
4.41146
8a7cd3a4-122f-465c-a42b-857741f0fae8
glhrmfrts/Io
Source/ThirdParty/Box2D/Box2D/Collision/b2Collision.cpp
#include "Box2D/Collision/b2Collision.h" #include "Box2D/Collision/b2Distance.h" void b2WorldManifold::Initialize(const b2Manifold* manifold, const b2Transform& xfA, float32 radiusA, const b2Transform& xfB, float32 radiusB) { if (manifold->pointCount == 0) { return; } switch (manifold->type) { ...
ALGO
0.999388
7.743987
a58ee721-1733-4de3-834a-13f97e807cf8
DineshK3012/Leetcode
1028-RecoveraTreeFromPreorderTraversal/1028-RecoveraTreeFromPreorderTraversal.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.999899
5.275421
1e19187c-febf-4e42-a423-117ba3f77136
dennisdobra/LeetCode
0791-custom-sort-string/0791-custom-sort-string.cpp
class Solution { public: string customSortString(string order, string s) { unordered_map<char,int> s_chars; for (char c : s) { s_chars[c]++; } string result = ""; for (char c : order) { if (s_chars.contains(c)) { while (s_chars[c] > 0...
ALGO
0.999992
6.330188
aa1c39b3-f475-49eb-b639-b3495ddffe41
LimeMun/BaekJoon
stack/17298.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stack> using namespace std; int ansArr [1000000]; int main(){ // ios_base::sync_with_stdio(false); // cin.tie(NULL); int input; // 배열을 받는 arr vector <int> numArr; // 비교했을 때 작은 경우 넣는 stacl stack <pair<int,int>> temp; cin >> input; for(int i = ...
ALGO
0.99999
4.009322
f99fff5b-872a-45c3-ab9c-ce47193030dd
devarchith/ccc_srm_hackerrank
AMAZON_4.cpp
//Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. //The overall run time complexity should be O(log (m+n)). //Input Format //The First Line contains two integers N an M denoting the size of two arrays respectively. //The Second Line contains N integer...
ALGO
0.99999
5.79034
df4ebd33-61bc-4333-bdd3-1ad6474cff61
Corycle/OI-Codes
Bashu OnlineJudge/2489.cpp
/*====Corycle====*/ #include<algorithm> #include<iostream> #include<iomanip> #include<cstring> #include<cstdlib> #include<complex> #include<cstdio> #include<vector> #include<cmath> #include<ctime> #include<stack> #include<queue> #include<map> #include<set> #define ll long long using namespace std; const int inf=0x3f3f3...
ALGO
0.99919
3.730019
373ccadc-1dd1-4c10-ad06-9cd1352a9038
vbonnici/grafe-sim
analysis/data/p03170/s156636993.cpp
#include<bits/stdc++.h> using namespace std; int dp[100004]; int solve(vector<int> &v,int k) { for(int i=1;i<=k;i++) { int j=0; int f=1; while(v[j]<=i && j<v.size()) { if(dp[i-v[j]]==0){ dp[i]=1; f=0; break; ...
ALGO
0.999978
4.28302
d6ec65ee-9b0d-4735-b50e-64adb9a01dc6
LeKSuS-04/Competitive-Programming
Codeforces/contests/Technocup 2022 - Elimination Round 1/A.cpp
/* A - Windblume Ode */ // https://codeforces.com/contest/1583/problem/A // Date: Oct/17/2021 14:25 (00:20:24) // Runtime: 15 ms // Memory: 0 KB // Verdict: AC #include <bitset> #include <iostream> #include <vector> using namespace std; const int MAX = 20100; bitset<MAX> is_prime; void sieve() { is_prime.set(); ...
ALGO
0.999772
4.748437
6126afa1-949a-427a-97c6-19d5fe86cf06
AArtA1/LeetCode_Tasks
763_Partition_Labels/main.cpp
#include <iostream> #include <vector> #include <unordered_map> using std::vector,std::string; vector<int> partitionLabels(string s) { std::unordered_map<char,int> map; for(int i = 0; i < s.size();++i){ map[s[i]] = i; } int max = 0; int prev = -1; vector<int> res; for(int i = 0; i ...
ALGO
0.99966
5.8362
b0c33ea4-de44-46b2-925c-71350438490f
sarvex/leetcode-malbolge
solution/1200-1299/1260.Shift 2D Grid/Solution.cpp
class Solution { public: vector<vector<int>> shiftGrid(vector<vector<int>>& grid, int k) { int m = grid.size(), n = grid[0].size(); vector<vector<int>> ans(m, vector<int>(n)); for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { int t = (i * n + j + k) % (m...
ALGO
0.999988
6.577381
1b18e067-513c-4bf1-880d-e1e4b26da8f9
CGAL/cgal-dev
Triangulation_3/applications/Triangulation_3/points_to_RT3_to_off.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Regular_triangulation_3.h> #include <CGAL/Regular_triangulation_euclidean_traits_3.h> #include <CGAL/IO/Triangulation_off_ostream_3.h> #include <fstream> typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Regular_...
ALGO
0.986489
5.884585
f2426115-96cf-456a-a570-6be6003066c3
n99joon/AlgorithmProblems
CPPTester/DP/DynamicProgrammingFindMin/11779DijkstraNodeBaseDP.cpp
#include <bits/stdc++.h> #define fastio cin.tie(0)->sync_with_stdio(0) #define endl '\n' #define ll long long #define ull unsigned long long #define pii pair<int,int> using namespace std; int main() { fastio; int n,m; cin >> n >> m; ull dp[n+1]; int ans[n+1],vstd[n+1]={0}; //dp=cost so far, ans = node before fil...
ALGO
0.99999
3.963724
93e4afa4-69d8-4e4f-a27c-a15536ec70d1
jasha64/jasha64
Spring 2018/ACM/2018.7.25/H.cpp
#include <iostream> #include <cstring> #include <cstdio> #include <cctype> using namespace std; //иʱĶŻжŻ inline int Read() { int r = 0; bool isNeg = 0; char c = getchar(); while (!isdigit(c) && c != '-') c = getchar(); if (c == '-') {isNeg = 1; c = getchar();} while (isdigit(c)) {r = r*10 + c-'0'; c = getchar()...
ALGO
0.999938
3.685486
d4d45305-24be-48e0-8b38-d9b2109b4897
ehddlrdk/study-algorithm
LeetCode/Maximum Frequency Stack 210301/honghong.cpp
class FreqStack { public: map<int, int> cnt; map<int, stack<int>> fStack; int maxFreq = 0; FreqStack() { maxFreq = 0; cnt.clear(); fStack.clear(); } void push(int x) { if(cnt.find(x) == cnt.end()) { cnt[x] = 1; } ...
ALGO
0.999552
6.535502
5a965177-27cc-40cf-8735-f48bc19e997a
prijus/Problem-Solving-Part-2
alternating.cpp
//Author : PROSENJIT MONDOL #include<bits/stdc++.h> #define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower); #define upper(s) transform(s.begin(), s.end(), s.begin(), ::toupper); using namespace std; const int inf = 3e5; using ll=long long ; ll mod = 1e9 + 7; //-----------------------------------------...
ALGO
0.99981
4.532943
1b6e35e7-3deb-4aae-ba01-a9d31001a923
reliak/moonpdf
ext/sumatra/src/AppTools.cpp
#include "BaseUtil.h" #include "AppTools.h" #include "CmdLineParser.h" #include "FileUtil.h" #include "Translations.h" #include "Version.h" #include "WinUtil.h" // the only valid chars are 0-9, . and newlines. // a valid version has to match the regex /^\d+(\.\d+)*(\r?\n)?$/ // Return false if it contains anything el...
TOOL
0.971925
5.294307
2bacc9d5-7188-4eca-9a1a-0b6d42af3f1f
madhuSudan27/Preparation
DSA/interviewBit/string/preetyPrint/zigZag string.cpp
#include<iostream> #include<vector> #include<string> using namespace std; /* The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P.......A........H.......N ..A..P....L....S....I...I....G ....Y.......
ALGO
0.999967
5.93126