uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
7fcbe537-f3a8-492c-bd4a-4b90b0699f3a
himel5113/Problem_solving-
500A. New Year Transportation.cpp
#include <bits/stdc++.h> #define ll long long #define ld long double #define endl '\n' #define allV(V) (V).begin(), (V).end() #define allA(arr, size) arr, arr+size #define sortV(V) sort(allV(V)) #define revV(V) reverse(allV(V)) #define sortA(arr, size) sort(allA(arr, size)) #define revA(arr, size) reverse(allA(arr, siz...
ALGO
0.999988
4.408743
abc68f8d-b094-4c10-bd38-78bb012ccddf
yehudisimon/ttbar
tt_MG/HSImplement/src/pdfN.cpp
#include <stdlib.h> #include <stdio.h> #include <cmath> #include <iostream> #include <complex> #include "process.h" #include "gsl/gsl_blas.h" #include "gsl/gsl_math.h" #include "gsl/gsl_vector.h" #include "gsl/gsl_matrix.h" #include "gsl/gsl_integration.h" #include "gsl/gsl_monte_vegas.h" #include "gsl/gsl_multifit_nl...
ALGO
0.999326
4.195519
75124a23-c39b-447f-af07-1c308afd7915
rifatahmed787/singly_linked_list_cpp
Search.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next = NULL; Node(int val) { this->val = val; this->next = NULL; }; }; void insert_at_tail(Node *&head, Node *&tail, int v) { Node *newNode = new Node(v); if (head == NULL) { head...
ALGO
0.999894
4.270046
84cc4a5b-30ee-4429-9833-38c1913af47d
ekeshfsociety/Codechef-Contests
CodechefLong (August 2020)/SKMP.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { string s, p; cin >> s >> p; vector<char> string1{}; vector<char> string2{}; for (auto num1 : s) { string1.push_back(num1); } for (au...
ALGO
0.999973
4.380025
897f5808-c09e-48c1-987c-20637cd2d48b
hasibul1670/matrix_with_cpp
basicFunction.cpp
#include <bits/stdc++.h> using namespace std; void add(int a, int b) { cout << a + b << endl; } int main() { int a, b; cin >> a >> b; add(a, b); return 0; }
ALGO
0.941979
4.283082
3bb61395-5e2d-427b-ac63-22e587e3d6b5
Haribala-09/hyprdots
User/History/40ef6bc3/dakk.cpp
#include <bits/stdc++.h> using namespace std; // expression = "&(|(f))" // Input: expression = "|(f,f,f,t)" class Solution { public: bool parseBoolExpr(string& exp) { int n=exp.size(); stack<char> st; for(int i=0;i<n;i++) { if(exp[i]==')') { ...
ALGO
0.99923
5.169371
6877bc49-8321-4396-bdc9-5e3ee6187be5
skywalker08/codeforces-solutions
solutions/1500_a_tale_of_two_lands.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n+3]; int x; for (int i=1;i<=n;i++) { cin >> x; if (x<0) {x = x * (-1);} arr[i]=x; } sort(arr+1, arr+n+1); long long ans=0; int i=n,j=n-1; while (j>0) { while( (a...
ALGO
0.999837
4.023363
c0f93ccc-9693-47bd-9952-8b30f2cd1adf
sssukh/daily-coding
problemW12-A_practice/source.cpp
#include <iostream> #include <vector> using namespace std; int main() { int T; cin >> T; while (T--) { int N; cin >> N; int input1,answer; cin >> input1; vector<vector<int>> triangle(1, { input1 }); for (int i = 1; i < N; i++) { vector<int> tmp; for (int j = 0; j <= i; j++) { int...
ALGO
0.999931
4.174822
1195ffc9-9e35-4907-8279-bb1493c1cc4f
Bhashkarjya/django-deployment-example
learning_templates/test.cpp
#include<iostream> #include<stack> #include<queue> #include<vector> #include<set> #include<map> #include<utility> #include<algorithm> #include<numeric> #include<math.h> using namespace std; #define mp make_pair #define pb push_back #define loop(i,n) for(int i=0;i<n;i++) #define longloop(i,n) for(long long int i=0;i<n;i...
ALGO
0.999886
3.023947
92e51d10-7e0e-4a32-94d0-0f58bccfddb6
ishandutta2007/codeforces
ivan100sic/normal/1088/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cerr.tie(nullptr); int n, k; cin >> n >> k; vector<int> a(n); for (int i=0; i<n; i++) cin >> a[i]; ...
ALGO
0.999975
3.677427
717c28af-0763-4b20-ae4a-23b4d09ff77d
krishna-gavas/Competitive-Coding
Codechef/longMay20/trplsrt.cpp
// Triple Sort #include <iostream> #include <algorithm> #include <string> using namespace std; int main() { int T; cin>>T; while(T--){ int N,K; cin>>N>>K; int P[N]; for(int i=0;i<N;i++) cin>>P[i]; } return 0; }
ALGO
0.999935
3.717567
c111b0c0-87cb-444c-b157-9a640f08c927
jevinskie/llvm-project-embedded-library-in-process
libc/src/stdbit/stdc_first_trailing_one_us.cpp
#include "src/stdbit/stdc_first_trailing_one_us.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/math_extras.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(unsigned, stdc_first_trailing_one_us, (unsigned short value)) { return static_ca...
ALGO
0.977183
6.520309
55503402-3caa-4f33-8e09-e1dbc525f1a4
jaypatil22/Leet-Code-Solutions
2133. Check if Every Row and Column Contains All Numbers.cpp
class Solution { public: bool checkValid(vector<vector<int>>& matrix) { int n = matrix.size(); vector<unordered_set<int>> col(n),row(n); for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { col[j].insert(matrix[i][j]); row[i].insert(matrix[i][j]); ...
ALGO
0.999694
6.55184
5c308065-6c75-4181-a535-14a20838510e
jeffyehtw/E-Turtor
中文題庫/Comprehensive 001 - 050/[C_CH10-中] The 3n + 1 problem.cpp
#include<iostream> #include<cmath> using namespace std; int f(int n) { int count = 1; while (n != 1) { if (n % 2 == 1) n = 3 * n + 1; else n /= 2; count++; } return count; } int main() { int x, y; while (cin >> x >> y) { i...
ALGO
0.999871
3.959905
0bdb9c53-5111-4c30-b5d7-586cb27d29ce
gurneeshs/DSA
BINARY SEARCH TREE/DSA 70/checkBST.cpp
/* Problem statement Given a binary tree with N number of nodes, check if that input tree is Partial BST (Binary Search Tree) or not. If yes, return true, return false otherwise. A binary search tree (BST) is said to be a Partial BST if it follows the following properties. • The left subtree of a node contains only n...
ALGO
0.999988
6.889955
a01e84fa-4f67-4b64-8fb4-c207819151b7
lelouvincx/CTDL-GT-_-Do-an-tuan-3-5
Code/insertion_sort.cpp
#include <iostream> using namespace std; #define MAX 100001 void insertion_sort(int a[], int n) { int k = 1; while (k < n) { int x = a[k]; int vt = k - 1; while (a[vt] > x && vt >= 0) { a[vt + 1] = a[vt]; vt--; } a[vt + 1] = x; k++; } } int main() { int n; cin >> n; int...
ALGO
0.999966
4.52836
aa96c3ae-982b-49e1-8b29-98a090c60770
Zeirdo/Topmg
toppic-suite-master/src/stat/local/local_util.cpp
#include <algorithm> #include <utility> #include <string> #include <vector> #include <numeric> #include "common/base/amino_acid_base.hpp" #include "common/base/activation_base.hpp" #include "common/base/mod_util.hpp" #include "common/base/residue_base.hpp" #include "common/base/residue_util.hpp" #include "seq/proteofo...
ALGO
0.938795
5.352754
433d0d15-fff1-4c68-9cd8-1daed402eceb
sujneet/MKPITS_Sujneet_Meshram_Mar_2022
c program/wap palindrom number or not.cpp
#include<stdio.h> int main() { int num,a,b,c,d,rev; printf("enter 3 digit"); scanf("%d",&d); num=d; a=num%10; num=num/10; b=num%10; num=num/10; c=num%10; num=num/10; rev=a*100+b*10+c*1; if(d==rev) { printf("it is palindrom number"); } else { printf("it is not palindrom number"); } }
ALGO
0.999915
3.42885
b44bec2c-6151-4c75-937f-8e7446729e79
XessX/Angry_Bird_Alike
boost/libs/intrusive/example/doc_sg_set.cpp
using namespace boost::intrusive; class MyClass : public bs_set_base_hook<> { int int_; public: //This is a member hook bs_set_member_hook<> member_hook_; MyClass(int i) : int_(i) {} friend bool operator< (const MyClass &a, const MyClass &b) { return a.int_ < b.int_; } frien...
TEST
0.958329
5.980816
45d9adb2-02b7-4bd8-82a4-a97b708e4d21
sa-y-an/leetAction
solutions/problems/word_subsets/solution.cpp
class Solution { public: vector<string> wordSubsets(vector<string>& words1, vector<string>& words2) { vector <int> charMap(26,0); for( auto &word : words2 ){ vector <int> currMap(26,0); for( char ch : word ) currMap[ch-'a']++; for( in...
ALGO
0.999803
5.756242
2536866b-de46-4bf4-8162-306cee4d5d06
abhishek-bisht-21/DSA_PRACTICE
Arrays/12.ContainsDuplicate.cpp
// https://leetcode.com/problems/contains-duplicate/description/ class Solution { public: bool containsDuplicate(vector<int>& nums) { unordered_map<int,int> mp; int n = nums.size(); for(int i=0;i<n;i++){ mp[nums[i]]++; } ...
ALGO
0.999702
6.099313
f2aef0dd-fd67-4f68-94bb-db770b12be53
mathnantes/uri-solutions-cpp
1064.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { double x, qnt=0, media=0; for(int i=0; i<=5; i++) { cin >> x; if(x > 0) { media += x; qnt++; } } media = media/qnt; cout << qnt << " valores positivos" << endl; ...
ALGO
0.999289
3.626834
60ed192b-ca80-413f-bb4d-19dc01d6c650
kangbeoms/classVscode
subway_api_app/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998465
6.76073
2684ad19-a397-4d7f-b6c8-61d2e166da4d
CaseyJames669/Cplusplus_Brekke
Chapter_2/Ch2_Make_Change.cpp
// *********************************************************** // Program Make Change: Given any amount of change expressed // in cents, this program computes the number of half-dollars, // quarters, dimes, nickels, and pennies to be returned, // returning as many half-dollars as possible, then quarters, // dimes, nick...
ALGO
0.9954
3.841022
5ac9b0bf-3b90-4917-bc45-65c276ed1be7
subratamondalnsec/Pw-cpp-code
09sorting/02Advanced sorting/07doubt session/04find-target-indices-after-sorting-array_Leetcode-2089.cpp
#include <bits/stdc++.h> using namespace std; // class Solution {//m1 // public: // vector<int> targetIndices(vector<int>& arr,int target){ // sort(arr.begin(),arr.end()); // int n=arr.size(); // vector<int>ans; // for(int i=0;i<n;i++){ // if(arr[i]==target) ans.push_back...
ALGO
0.999971
6.828259
7adb221b-fdc9-413b-a379-d5268f02d10c
sarafanshul/Codes
OJs/edu/Suffix-array/Suffix_Array _1.cpp
// https://codeforces.com/edu/course/2/lesson/2/1 #include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s += "$"; int n = s.size(); vector<int> p(n) ,c(n); { // k = 0 vector<pair<char ,int>> a(n); // save characters and positions then sort for (int i = 0; i < n ; i++) a[i] = {s[...
ALGO
0.999579
3.503975
9370a965-c8ba-4f52-9575-1a6e2bf676b4
Pradyumn-Garg/LeetCode-solutions
Find the number of islands - GFG/find-the-number-of-islands.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to find the number of islands. int numIslands(vector<vector<char>>& grid) { int n=grid.size(),m=grid[0].size(); int ans=0; for(int i=0;i<n;i++){ ...
ALGO
0.999944
7.065598
9681dcd8-8487-4baa-92eb-055f0b2c86c0
warehouse-picking-automation-challenges/nimbro_picking
nimbro_robotcontrol/util/rc_utils/src/kalmanfilter.cpp
// Simple Kalman Filter implementation for one-dimensional processes // Author: Marcell Missura <<EMAIL>> // Modified for Eigen by Max Schwarz <<EMAIL>> #include <rc_utils/kalmanfilter.h> #include <Eigen/LU> namespace rc_utils { const double KalmanFilter::DefaultTimeStep = 0.010; // Default value used for the time ...
ALGO
0.998878
6.361602
6e663754-f745-4ab1-bb92-378f050bb9b5
D-E-F-E-A-T/video-game-pc-phase-2
adventures-of-orchi/NarrowCollisionStrategy.cpp
#include "pch.h" #include "NarrowCollisionStrategy.h" #include "Model\Player.h" #include "MathUtils.h" #include <iostream> #include <Windows.h> #include "..\Sprites\SpriteUtils.h" #include "Utils.h" // @see http://www.gamedev.net/page/resources/_/technical/directx-and-xna/pixel-perfect-collision-detection-in-directx-r...
ALGO
0.996128
6.951254
c881c088-0985-4641-979c-c464199691be
DrKend/Week-1-Introduction
Program34_ReplacingCommasWithSpaces/Program34_ReplacingCommasWithSpaces/Program34_ReplacingCommasWithSpaces.cpp
#include <iostream> using namespace std; void comma2blank(char* textToChange) { for (int i = 0; i < 30; i++) { if (textToChange[i] == ',') { textToChange[i] = ' '; } } } int main() { char userText[30]; cout << "Please enter some text however replace the spaces w...
TOOL
0.940194
3.970373
56d3ef05-6b3a-43b8-b61a-67060d0c20a2
ishandutta2007/codeforces
karuna/normal/1088/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n, k; scanf("%lld %lld", &n, &k); ll arr[100005] = {0}; for (ll i=0;i<n;i++){ scanf("%lld", &arr[i]); } sort(arr, arr+n); ll temp = 0; ll cnt = 0; ll i = 0; while (cnt < k && i<n) { ...
ALGO
0.999992
3.274368
0ea8c672-d808-42eb-af32-81f7959c4abb
wjwhhhhhh/ACM_
杂项/H.cpp
#include <bits/stdc++.h> #define int long long #define dug(x) cerr << "死了吧小丑" << x << endl using namespace std; using i64 = long long; template <class T> void chkmax(T &a, T b) { a > b ? (a = a) : (a = b); } template <class T> void chkmin(T &a, T b) { a > b ? (a = b) : (a = a); } struct DSU { std::vector<in...
ALGO
0.99983
4.737593
4eb8e31a-4e47-4837-ac5d-a643c672b490
Z7zuqer/ACM-ICPC
BZOJ代码库/1085.cpp
#include<bits/stdc++.h> using namespace std; int k,flg; int ans[5][5]={{1,1,1,1,1},{0,1,1,1,1},{0,0,2,1,1},{0,0,0,0,1},{0,0,0,0,0}},sta[5][5]; int dx[8]={1,1,-1,-1,2,2,-2,-2}; int dy[8]={2,-2,2,-2,1,-1,1,-1}; int judge(int a[5][5],int x,int y){ if(x!=2||y!=2)return 0; for(int i=0;i<5;i++) for(int j=0;j<5;j++){ i...
ALGO
0.999856
3.480655
e3e27dba-113d-4ad6-80e7-cdc1784de400
Hakonsor/GrafikkOgVisualisering
lib/lodepng/lodepng_benchmark.cpp
//g++ lodepng.cpp lodepng_benchmark.cpp -Wall -Wextra -pedantic -ansi -lSDL -O3 //g++ lodepng.cpp lodepng_benchmark.cpp -Wall -Wextra -pedantic -ansi -lSDL -O3 && ./a.out #include "lodepng.h" #include <cmath> #include <string> #include <vector> #include <iostream> #include <sstream> #include <stdio.h> #include <stdl...
TOOL
0.949299
5.517367
47e99dc2-72b4-4671-9c25-21fe14ba48f8
EZZATW12/ECPCTemplet
DataStructure/Persistent Segment Tree.cpp
const int N = 1e5 + 9; struct PST { #define lc t[cur].l #define rc t[cur].r struct node { int l = 0, r = 0, val = 0; } t[20 * N]; int T = 0; int build(int b, int e) { int cur = ++T; if (b == e) return cur; int mid = b + e >> 1; lc = build(b, mid); ...
ALGO
0.999906
3.943601
9f052d02-94ba-40bb-9d8d-ef2abe023a90
JomonJohnson9567/Student-Management-App_-provider
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
25f55217-2c21-468e-81ce-a6a35ce9ffe1
neelotpal-d/VectorField_Multiaxis
ThirdPartyDependence/libigl/include/igl/bijective_composite_harmonic_mapping.cpp
#include "slice.h" #include "doublearea.h" #include "harmonic.h" //#include "matlab/MatlabWorkspace.h" #include <iostream> template < typename DerivedV, typename DerivedF, typename Derivedb, typename Derivedbc, typename DerivedU> IGL_INLINE bool igl::bijective_composite_harmonic_mapping( const Eigen::Matri...
ALGO
0.985243
6.807374
4474b6de-8d1e-4f58-b8d7-ace364ae38c4
GopalSharma52/DSA-C-
Pattern2.0/Ulta_triangle.cpp
#include <iostream> using namespace std; int main (){ int n; cout<<("Enter the value of n: "); cin>>n; for(int i=1;i<=n;i++){ for(int j = 1;j<=i-1;j++){ cout<<" "; } for(int k = 1;k<(n-i+1);k++){ cout<<i; } co...
ALGO
0.999933
3.715641
3c0b7f92-b3e7-416c-9c36-199b26487b40
mehedi432/program_cpp
program-233-cpp/Loop And Decision Control/multiplicationTableN-range-44.cpp
/* Task-> Display multiplication table up to a given range. 1.Start 2.Take input from user howMany terms(range) and (number). 3.while(i <= range): ->make i =1; ->number * i; 4.cout << number * i; 5.End. */ #include <iostream> using namespace std; int main() { int number, ran...
ALGO
0.998592
4.274073
0ffc1b75-31ac-44b9-bdd6-9316b21fa590
lightfel/AtCoder
ABC/075/b.cpp
#include <bits/stdc++.h> using namespace std; int main() { int h, w; cin >> h >> w; vector<string> board(h); vector<int> dx = {-1, -1, -1, 0, 0, 1, 1, 1}; vector<int> dy = {-1, 0, 1, -1, 1, -1, 0, 1}; for (int i = 0; i < h; i++) cin >> board.at(i); for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++...
ALGO
0.999972
3.899671
36a38ff4-99fe-4575-9d29-a9252db30f0b
jyotirmoy1997/Data-Structures-Files
String/MaximumScoreAfterSplittingAStringOptimal.cpp
#include<bits/stdc++.h> using namespace std; int maxScore(string s){ int n = s.size(); int c0 = 0, c1 = 0; int maxi = -1; unordered_map<int, pair<int, int>> mpp; for(int i=0; i<n; i++){ if(s[i] == '0') c0++; else if(s[i] == '1') c1++; ...
ALGO
0.999974
4.901904
4a26f4f9-90e6-48de-9791-70ba72bf6f46
FLK-199/ProgComp
cses_1622.cpp
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define srt(x) sort(all(x)) #define f0r(x) for(int i = 0; i < x; i++) #define f1r(x) for(int i = 1; i < x; i++) #define vi vector<int> #define vll vector<ll> typedef long long ll; int n, cont = 0; string permutation; vector<bool> chosen;...
ALGO
0.999963
4.976277
5f3575d6-6bc1-43c9-951c-2bbc36de57e2
Dineshjat1106/cpp-full-course
queues-33/reverse-k-element-9.cpp
#include<iostream> #include<queue> #include<stack> using namespace std; void display(queue<int>& q){ int n=q.size(); for(int i=1;i<=n;i++){ int x=q.front(); cout<<x<<" "; q.pop(); q.push(x); } cout<<endl; } void reversek(int k, queue<int>& q){ stack<int> st; for(i...
ALGO
0.999765
4.218294
abe4b092-28ac-463a-bf59-d3e2114e4a39
dhruvvk2326/DSA-QUESTIONS
5-recursion/print_digits_nummber.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void digits(int n, int &ans) { // base case if (n <= 0) { return; } int digit = n % 10; n = n / 10; ans = ans * 10 + digit; digits(n, ans); cout << digit << " "; } int main() { int ans = 0; ...
ALGO
0.999891
4.398738
5a7e1a79-3c8b-4042-a9e0-df156b9d9639
JorgeMello/windows-desktop-flutter-webview
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
a384d088-a087-4f06-8e5c-b6c544f5180c
chanhk-im/Algorithm
BaekJoon/15652.cpp
#include <bits/stdc++.h> using namespace std; int n, m; int c[10]; bool check_conflict(int l, int n) { if (l == 0 || c[l - 1] <= n) return true; else return false; } void combination(int l) { if (l >= m) { for (int i = 0; i < m; i++) cout << c[i] << ' '; c...
ALGO
0.999967
4.182406
490eb849-30c0-4ed9-ae3f-305bc4f10436
XiaoxiaoZ/prl
prl-demo/Eigen/lapack/lu.cpp
#include "common.h" #include <Eigen/LU> // computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges EIGEN_LAPACK_FUNC(getrf,(int *m, int *n, RealScalar *pa, int *lda, int *ipiv, int *info)) { *info = 0; if(*m<0) *info = -1; else if(*n<0) ...
ALGO
0.996686
5.816968
100863c1-bea4-4376-ba9c-dd275568413e
ishandutta2007/codeforces
ytkn/normal/1552/B.cpp
#include <iostream> #include <algorithm> #include <iomanip> #include <vector> #include <queue> #include <deque> #include <set> #include <map> #include <tuple> #include <cmath> #include <numeric> #include <functional> #include <cassert> #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x...
ALGO
0.999815
4.471367
783c8aeb-bf33-4c06-8272-456665a2667a
Nahin-CDR/CodeForces
Rating : 1000/B. Maria Breaks the Self-isolation.cpp
//Solver : Nahin the coder //Date : 02-10-2021 #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int test; cin>>test; while(test--){ vector<int>vc; int n; cin>>n; for(int i=0; i<n; i++) { int k...
ALGO
0.999734
4.779193
6fd1b9db-fc59-45bf-aeed-40a68397c8f4
Harsh-Sisodia857/Love-Babbar-DSA-Sheet
Linked List/reverseKNodes.cpp
struct node *reverse(struct node *head, int k){ struct node *prev = NULL; struct node *curr = head; struct node *nextPtr; int count = 0; while (curr != NULL && count < k) { nextPtr = curr->next; curr->next = prev; prev = curr; curr = nextPtr; count++; ...
ALGO
0.999938
3.763276
00339f3c-7929-4be0-a106-28ac5fe82e05
aKiii017/SolSearch
implementation/z3/src/math/grobner/grobner.cpp
#include "math/grobner/grobner.h" #include "ast/ast_pp.h" #include "ast/ast_ll_pp.h" #include "util/ref_util.h" // #define PROFILE_GB grobner::grobner(ast_manager & m, v_dependency_manager & d): m_manager(m), m_dep_manager(d), m_util(m), m_var_lt(m_var2weight), m_monomial_lt(m_var_lt), m_chang...
ALGO
0.996799
4.473738
6ce6dc28-9267-4433-932c-1e007c7713ec
ui0ppk/yuzu-emu-feb-29-2024
src/common/fs/fs_android.cpp
#include "common/android/android_common.h" #include "common/android/id_cache.h" #include "common/assert.h" #include "common/fs/fs_android.h" #include "common/string_util.h" namespace Common::FS::Android { void RegisterCallbacks(JNIEnv* env, jclass clazz) { env->GetJavaVM(&g_jvm); native_library = clazz; ...
TOOL
0.906779
6.638678
c60cb697-58f5-4f24-9d39-7229b4a91ccd
JooHui-void/algorithm
KAKAO 메뉴리뉴얼.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> #include <map> #include <set> using namespace std; string tmp; set<string> ss; map<string,int> m[11]; bool cmp(const pair<string,int>& a, const pair<string,int>& b) { if (a.second == b.second) return a.first < b.first; return a.second > b.se...
ALGO
0.999927
5.232623
df024c2b-33fc-49f2-9845-e081d19cb388
imagineStudios/Imagine-Legacy
tools/fRegionGrowingAuto_mex.cpp
#include "mex.h" #include <queue> #include <cmath> #define NQUEUES 100 // number of FIFO queues using namespace std; long lNZ, lNX, lNY; // The image dimensions; double dMaxDif, dRegMean; double *pdImg; // pointer to the image queue<long> *aqQueue; // ...
ALGO
0.999807
5.328749
f131a633-7988-46f5-96fb-048744ccb590
sagarjha07/FAANG-QUESTIONS
Binary_search/square_root.cpp
int Solution::sqrt(int A) { if(A==0 || A==1) return A; int s=0; int e=A; int ans=-1; while(s<=e){ int mid=s+(e-s)/2; if(mid==A/mid) return mid; else if(mid<A/mid){ ans=mid; s=mid+1; } else e=mid-1; } return ans; }
ALGO
0.999962
4.676438
25a18231-5f39-4d23-8481-377db2b82e09
Alain248/Practica1_AlvarezAlainJonathan
my-venv/Lib/site-packages/sklearn/svm/src/liblinear/tron.cpp
#include <math.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include "tron.h" #ifndef min template <class T> static inline T min(T x,T y) { return (x<y)?x:y; } #endif #ifndef max template <class T> static inline T max(T x,T y) { return (x>y)?x:y; } #endif static void default_print(const char *buf) {...
ALGO
0.999539
5.847107
6c3a00cb-e8a8-4bf8-8ded-3c526bfdb6c8
Geopaul94/Netflix_clone
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.998756
6.772262
0737bf07-a1af-419b-bd66-51a297f70a7c
SonyaKorotun/-Ex1-
задание8/LWF/LWF/LWF.cpp
#include <iostream> #include "WF.h" #include "WFOpt.h" int main() { WF wf; //8. Инициализация и вывод матрицы try { wf.Init("no", "ono"); std::cout << "Матрица WF:\n"; for (int i = 0; i < wf.Rows(); ++i) { for (int j = 0; j < wf.Columns(); ++j) { std::c...
ALGO
0.990999
5.407285
11e7f6ef-5c0c-488c-a88a-01e827dadb45
roudramondal/CPS-__Module1
Right_triangle.cpp
#include<bits/stdc++.h> using namespace std; int main () { int n; cin >> n; for (int i=1;i<=n;i++) { for (int j = 1; j<=i;j++) { cout << "*" ; } cout << endl; } return 0; }
ALGO
0.999916
3.673877
4742bf12-40e5-458e-a006-f516d95364b4
imvskalhans/DSA-Codes
0789-kth-largest-element-in-a-stream/0789-kth-largest-element-in-a-stream.cpp
class KthLargest { private: int k; std::priority_queue<int, std::vector<int>, std::greater<int>> minHeap; public: KthLargest(int k, vector<int>& nums) { this->k = k; for (int num : nums) { add(num); } } int add(int val) { minHeap.push(val); ...
ALGO
0.999944
6.324651
e11086e1-8e1b-481a-b611-570db4810530
noopurrkalawatia/leetcode
movAvg.cpp
class MovingAverage { public: /** Initialize your data structure here. */ MovingAverage(int size) { qsize = size; sum = 0.0; } double next(int val) { double average = 0.0; if(myQueue.size() >= qsize) { sum -= myQueue.front(); ...
ALGO
0.999089
6.621818
f0f0568f-cfac-469d-8fff-5b85ca8213a2
krishna4040/DSA
gfg_practice/maths/exctly_3_divisors.cpp
# include "bits/stdc++.h" using namespace std; bool isprime(int n) { if (n == 1) return 0; if (n == 2 || n == 3) return 1; if (n % 2 == 0 || n % 3 == 0) return 0; for (int i = 5; i*i <= n; i+=6) { if (n % i == 0 || n % (i+2) == 0) return 0; } retu...
ALGO
0.99928
4.602446
1a76585a-61e8-40b2-a8f7-bc13d49cbadf
ishandutta2007/codeforces
qiuzx/normal/720/F.cpp
//ANMHLIJKTJIY! #pragma GCC optimize(2) #pragma GCC optimize(3) #pragma GCC target("avx") #pragma GCC optimize ("O2") #pragma GCC optimize ("O3") #pragma GCC optimize ("O1") #pragma GCC optimize ("O0") #pragma GCC optimize ("Ofast") #pragma GCC optimize("-fdelete-null-pointer-checks,inline-functions-called-once,-funsaf...
ALGO
0.999963
3.679554
0223c629-36da-43ee-8d70-376165bfe707
ishandutta2007/codeforces
zh0ukangyang/normal/1474/A.cpp
#include<bits/stdc++.h> #define L(i, j, k) for(int i = j, i##E = k; i <= i##E; i++) #define R(i, j, k) for(int i = j, i##E = k; i >= i##E; i--) #define ll long long #define ull unsigned long long #define db double #define pii pair<int, int> #define mkp make_pair using namespace std; const int N = 1e6 + 7; int n, m; cha...
ALGO
0.9997
3.858525
29d411f3-056f-486d-8844-d81cffb7a5c9
Wilchelm/Informatyka
DSNE/model_asocjacji.cpp
#include <iostream> #include <stdio.h> #include <vector> using namespace std; vector<double> getClearVector(double val) { vector<double> tmp; for (int i = 0; i<25; i++) { tmp.push_back(val); } return tmp; } vector<double> createZvector(vector<int> input) { vector<double> output; int inputLength; output ...
ALGO
0.989301
3.47512
b87266df-aac5-4549-b7e3-1ddab4c69f35
freddi4312/CalcLabs
Lab2/Langrange.cpp
#include <vector> #include "Header.h" double Langrange(TABLE const &Table, int N, double x) { double Value = 0; for (int k = 0; k <= N; k++) { double Lkn = 1; for (int i = 0; i <= N; i++) if (i != k) Lkn = Lkn * (x - Table[i].first) / (Table[k].first - Table[i].first); Value += Lkn...
ALGO
0.999753
3.86246
b79ad8ed-fa47-4a8a-8865-f225de043bad
Arjun-Angirishi/Daily-DS-Algo-With-Me
Binary Search/FindNthRoot.cpp
// https://practice.geeksforgeeks.org/problems/find-nth-root-of-m5843/1 class Solution{ public: int func(int x,int m,int n){ long long prod=1; for(int i=0;i<n;i++){ prod*=x; if(prod>m){ return 2; } } if(prod==m){ return 1; } else return...
ALGO
0.999962
5.384981
7ff302b9-78ef-4bfe-a6c6-aa37c04bba4a
ITIS-Kien/Data-structure-and-algorithm-2025
DSA06049.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define mod 1000000007 #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) int main() { fast; int t = 1; cin >> t; int n, a[100005], k; while(t--) { cin >> n >> k; for(int i = 0; ...
ALGO
0.999925
4.155804
18b2eb6d-c93d-4401-a05b-41dee5562c5f
omarkhalil117/OOP_Using_CPP
Lab [2]/Stack.cpp
#include <iostream> using namespace std; class Stack{ int *arr ; int t ; int S ; public: Stack(int s) { this -> t = -1 ; this -> S = s ; this-> arr = new int(this->S) ; } ~Stack() { cout<<"Queue Terminated"<<endl ; } void push(int x) { if (t =...
ALGO
0.993017
4.034667
5b5b8048-48a7-4b92-9494-c885b23749c4
HekpoMaH/Olimpiads
grupa C/olimpiada/oblasten/2011/raboti/Varna/E/RKC/kapri.cpp
#include<iostream> using namespace std; int main(){ unsigned long long int k=0,m,i,j,a[100],f=0,p; int l,t=1,br=0,r,x,n,br1=0,y; scanf("%u",&n); for(i=1;i<=n;i++) { scanf("%u",&a[i]); } for(i=1;i<=n;i++) { m=a[i]*a[i]; for(j=1;j<=m;j*=10) { l++; } while(br<=l) { r=m%10; m=m/10; br++; k=k+r*t; t=t*10; } t...
ALGO
0.99971
3.163905
3e9f8f19-ce3e-4f38-9c08-766b72f28a66
hyunstory/CodingTestPractice
Baekjoon/CPP/2193.cpp
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; long long d[91] = { 0 }; d[1] = 1; d[2] = 1; for (int i = 3; i <= n; i++) { d[i] = d[i - 1] + d[i - 2]; } cout << d[n]<<'\n'; return 0; }
ALGO
0.999982
4.071717
4339608c-f3ea-4a70-9e1a-8b0cfb86c424
xmg2024/Leetcode-Solutions
0501-1000/0745-Prefix-and-Suffix-Search/cpp-0745/main.cpp
/// Source : https://leetcode.com/problems/prefix-and-suffix-search/ /// Author : liuyubobobo /// Time : 2022-07-14 #include <iostream> #include <vector> #include <algorithm> #include <map> using namespace std; /// Suffix + Prefix /// Time Complexity: init: O(sum_of_characters) /// query: O(|prefi...
ALGO
0.998655
6.044804
002cec03-844b-4eb5-acb6-bc00e69795d0
304314/Code-Size-Global-Optimization
clang/lib/Sema/SemaConcept.cpp
#include "clang/Sema/SemaConcept.h" #include "TreeTransform.h" #include "clang/AST/ASTLambda.h" #include "clang/AST/ExprConcepts.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/OperatorPrecedence.h" #include "clang/Sema/EnterExpressionEvaluationContext.h" #include "clang/Sema/Initialization.h" #incl...
ALGO
0.991504
7.87843
3ed7cfd7-95c7-4aef-8772-ac8d25d77b6a
Nimish-Dureja-10/DSA
LinkedList/Stack/StackSTL.cpp
#include <iostream> #include <stack> using namespace std; int main() { stack<int> st; st.push(1); st.push(2); st.push(8); cout<<st.top()<<endl; cout<<st.size()<<endl; st.pop(); cout<<st.top()<<endl; cout<<st.size()<<endl; return 0; }
ALGO
0.929837
3.81823
27e17ffb-98cd-497e-a6b3-d3eaae18fffc
zhongfei2016/leetcode-cpp
dfs/WordExistSolution.cpp
// // leetcode-cpp // #include "WordExistSolution.h" bool backtrack(int i, int j, int idx, vector<vector<char>> &board, string &word) { // 索引越界返回false if (i < 0 || j < 0 || i >= board.size() || j >= board[0].size() || idx >= word.size()) { return false; } // 当前元素与预期不符,返回false if (word[idx]...
ALGO
0.999588
5.875908
43063b04-1a71-4bab-b129-87c28fb750ef
jombaek/Leetcode
C++/55._Jump_Game.cpp
class Solution { public: bool canJump(vector<int>& nums) { int n = nums.size(); vector<int> dp(n); dp[0] = nums[0]; for (int i = 1; i < n; ++i) { if (dp[i - 1] < i) return false; dp[i] = max(dp[i - 1], i + nums[i]); ...
ALGO
0.999981
6.384385
ff58b8b8-746b-4a7e-946b-fd57eea55c4a
ishandutta2007/codeforces
abc864197532/normal/1742/D.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mp make_pair #define pb push_back #define eb emplace_back #define pii pair <int, int> #define X first #define Y second #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() void abc() {cout << endl;} template <typename T, ty...
ALGO
0.99993
4.886905
5f50c944-52ee-48f3-9dfc-c80c3fde962f
zaeraal/SDF
SDF/src/VCGlib/eigenlib/unsupported/doc/examples/PolynomialSolver1.cpp
#include <unsupported/Eigen/Polynomials> #include <vector> #include <iostream> using namespace Eigen; using namespace std; int main() { typedef Matrix<double,5,1> Vector5d; Vector5d roots = Vector5d::Random(); cout << "Roots: " << roots.transpose() << endl; Eigen::Matrix<double,6,1> polynomial; roots_to_mo...
TEST
0.99716
4.814054
b1b30f42-6546-4c97-af8b-a4bca99f417c
Winterleaf/DNT-Torque3D-V1.0
Engine/source/ts/arch/tsMeshIntrinsics.sse.cpp
#if defined(TORQUE_CPU_X86) #include "ts/tsMeshIntrinsics.h" #include <xmmintrin.h> void zero_vert_normal_bulk_SSE(const dsize_t count, U8 * __restrict const outPtr, const dsize_t outStride) { // A U8 * version of the in/out pointer register char *outData = reinterpret_cast<char *>(outPtr); register __m12...
ALGO
0.97872
5.072723
181620b3-99c0-4f59-a5a5-a9c5bf9aff53
misals/SdeSheetChallenge
Day_3/pow(x,n).cpp
class Solution { public: double myPow(double x, int n) { double ans = 1.0; long long nn = n; if(nn < 0) { nn *= -1; } while(nn) { if(nn % 2 == 1) { ans *= x; nn--; } else { x *= x; ...
ALGO
0.999828
6.050141
7682fbd9-cb70-4499-a10b-56188f282a46
khadija1114/Online-Judge-Solutions
Codeforces/1733A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; scanf("%d", &t); while (t--) { int n, k; scanf("%d %d", &n, &k); vector <int> v(n); for (auto &it: v) scanf("%d", &it); long long sum = 0; for (int i = 0; i < k; i++) { int mx = 0...
ALGO
0.999904
3.884469
e5ce4bf6-9913-496c-b9f1-6f9230e041e5
ritikbanger/Hacktoberfest2022-DSA
15. Binary Search Tree/distance_between_2nodes.cpp
#include <iostream> using namespace std; struct Node { struct Node *left, *right; int key; }; Node* newNode(int key) { Node *temp = new Node; temp->key = key; temp->left = temp->right = NULL; return temp; } int findlevel(Node *root, int k, int level) { if (root == NULL) return -1; if (root->key == k) ret...
ALGO
0.999995
5.355095
24cf99cd-bf8d-44bb-ac25-c18663320cf6
gulmini/olinfo
ois/ois_words/file.cpp
#include <bits/stdc++.h> using namespace std; typedef int_fast64_t ll; typedef int_fast16_t sint; typedef pair<sint, sint> pi; typedef vector<ll> vi; const ll INF = INT64_MAX/4; const string quack = "quack"; ll n, l, k; vector<string> t; vector<vector<sint>> adj; unordered_map<int, ll> memo; vi path; ll dp(sint i, si...
ALGO
0.999993
3.361655
51388318-84f4-43c6-a28b-8d09dd537902
max777xam/MyCodes
C++/复习/1.3编程基础之算术表达式与顺序执行/反向输出一个三位数.cpp
#include <bits/stdc++.h> using namespace std; int main() { int num, reversedNum = 0; cin >> num; while (num > 0) { reversedNum = reversedNum * 10 + num % 10; num /= 10; } cout << setw(3) << setfill('0') << reversedNum << endl; return 0; }
ALGO
0.999923
5.217828
4dad6b16-b6e6-4327-990c-7d52128af331
foojanbabaeeian/C-
algorithm and flowchart foojanbabaeeian C++/mesal 20.cpp
#include <iostream> using namespace std; int main(){ cout << "Start" <<endl; int N; int sum =0; int count=0; cout << "What is N : "; cin >> N; for (int I=1;I<=N;I++){ if(N%I==0){ cout << "I is :" << I <<endl; count ++; sum=sum+I; } } ...
ALGO
0.999641
3.726134
a61af2f4-b899-4b27-8a1c-09f93a3033ab
KathoreAmol8600/Cpp
Program11.cpp
///////////////////////////////////////////////// // DispleyFactoers // ex 10 // 1,2,,5,10 it is factor if 10 //Step 01 /////////////////////////////////////////////// #include<iostream> using namespace std; class Displey { public: void DispleyX(int ino) { for(int icnt=1;icnt <=ino;icnt++) ...
TOOL
0.965768
3.891065
00830fa3-e7fa-46c4-9036-fee42ae861f9
greenfox-zerda-sparta/Fruzsi555
week-03/day-3/vector.cpp
#include <iostream> #include <vector> #include <string> using namespace std; //Vector //Implement an array like data structure called DoubleVector, that behaves like and array //but it has some predefined operations in functions. //It should store doubles. It should have an inner array of doubles that stores the valu...
ALGO
0.875379
4.65913
6c90758e-37bd-4dae-9f6a-e54419a6dda4
inf0craw1/algorithm
baekjoon/2753.cpp
#include <bits/stdc++.h> #define debug if constexpr (local) std::cout #define endl '\n' #define fi first #define se second #define all(x) x.begin(),x.end() #ifdef LOCAL constexpr bool local = true; #else constexpr bool local = false; #endif typedef long long ll; typedef unsigned long long ull; using namespace std; ...
ALGO
0.999982
4.922055
fc046486-34bb-4a84-ab1b-2d84e7bfc929
pietervans/pear-storage-gas-simulation
C++/boundary_test.cpp
#include "triangulation.hpp" #include <iostream> #include "newton_iteration.hpp" #include "fixed_terms.hpp" #include "manufactured_solutions.hpp" #include "io_operations.hpp" int main(int argc, char *argv[]) { struct Constants consts; // Parse command-line arguments // Optional argument 1 specifies the co...
ALGO
0.957467
6.203053
89002d4d-ef91-4b82-8354-abdc48ab5e56
snowflake1201/LeetCode
26. Remove Duplicates from Sorted Array/answer.cpp
class Solution { public: int removeDuplicates(vector<int>& nums) { int k = 1; for(int i = 1; i < nums.size(); i++) { if(nums[i] != nums[i-1]) { nums[k++] = nums[i]; } } return k; } };
ALGO
0.999959
6.209995
55351b93-9aab-466b-8122-8c6ec5297c37
liuq901/code
ACM/ac_6178.cpp
#include <cstdio> #include <cstring> const int N=100,n=3; int l,r,Sx,Sy,Sz,Tx,Ty,Tz,a[10][10],pre[N][N][N],f[N][N][N],q[1000000][3]; char way[N][N][N]; void print(int x,int y,int z) { if (x==Sx && y==Sy && z==Sz) return; int t=pre[x][y][z]; print(q[t][0],q[t][1],q[t][2]); printf("%c",way[x][y][z...
ALGO
0.999947
4.116041
0c6c89cd-0826-4179-8bcc-b9d5f84d45be
TheBoolean-Boy/DSA
2160-minimum-operations-to-make-a-uni-value-grid/minimum-operations-to-make-a-uni-value-grid.cpp
class Solution { public: int minOperations(vector<vector<int>>& grid, int x) { vector<int> values; for (const auto& row : grid) { for (int val : row) { values.push_back(val); } } sort(values.begin(), values.end()); for (int val : valu...
ALGO
0.999973
6.037055
15f6fa3a-0a82-4a14-9596-286c4c26cdac
prashantchauhan1602/Leetcode-questions
Rat in a Maze Problem - I - GFG/rat-in-a-maze-problem-i.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution{ public: int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; char direction[4] = {'D', 'R', 'U', 'L'}; bool isSaf...
ALGO
0.999873
6.436329
a9c27adf-80bf-453f-b349-0371a0ac65bc
lordjunn/Starting-Out-With-Cpp
CHAPTER 4 Making Decisions/Programming Challenges/7. Time Calculator.cpp
/* Write a program that asks the user to enter a number of seconds. • There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds. • There are 3,600 seconds in an hour. If the number of seconds enter...
ALGO
0.943233
3.952316
f0676b70-6b2a-4672-adbf-c9a4a936adfc
ANOOP222004/DSA
Matrixes/tridiagonal_matrix.cpp
#include <iostream> using namespace std; class Tridiagonal { private: int n; int *a; public: // Constructor to initialize matrix size and allocate memory for tridiagonal elements Tridiagonal(int n) { this->n = n; a = new int[3 * n - 2]; // Memory for main diagonal, upper diagonal,...
ALGO
0.999696
5.714594
fb3aba4d-f345-4d8f-bfa0-b1cd19ccc44d
kundan181/Leetcode-Problems
415-add-strings/415-add-strings.cpp
/* class Solution { public: string addStrings(string num1, string num2) { string ans = ""; int i1 = num1.size() - 1, i2 = num2.size() - 1, carry = 0; while (i1 >= 0 || i2 >= 0 || carry > 0) { if (i1 >= 0) { carry += num1[i1] - '0'; i1 -= 1; ...
ALGO
0.999908
6.58965
39f9a653-3ef1-40b1-a581-44df2f7e17e6
kashish281/GfG-Daily-Practice
Easy/Padovan Sequence/padovan-sequence.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int padovanSequence(int n) { // code here. vector<int>dp(n+1); if(n<=2)return 1; dp[0]=dp[1]=dp[2]=1; for(int i=3;i<=n;i++){ dp[i]=(dp[i-2]+dp[i-3]...
ALGO
0.999955
6.003093
dd26b20b-31f0-4a66-836c-51c752478690
w-mj/DataStructureExperiment
vs工程/实验三程序代码/split.cpp
#include <sstream> #include <cctype> /** * ļڷַָʵݾļе */ #include "split.h" using namespace std; vector<double> splitd(string s) { vector<double> result; double n; stringstream ss; string::iterator numBegin = s.begin(); string::iterator iter = s.begin(); while (iter != s.end() && !isdigit(*iter)) iter++; numBe...
TOOL
0.964736
3.686669
01136971-8f20-47ae-a50c-6434ad1c4128
JackyLu0520/cpp
ssy/CF438D.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int n,m; long long a[N]; struct node{ int l,r; long long sum,Max; }t[4*N]; void pushup(int p){ t[p].sum=t[2*p].sum+t[2*p+1].sum; t[p].Max=max(t[2*p].Max,t[2*p+1].Max); } void build(int p,int l,int r){ t[p].l=l;t[p].r=r; if(l==r){t[...
ALGO
0.999834
4.342031
0bca6e90-c951-4b5a-aed6-cc4acd9fee3f
marutaro/leetcode
merge_strings_alternately.cpp
class Solution { public: string mergeAlternately(string word1, string word2) { std::string merged; int maxLength = std::max(word1.length(), word2.length()); for (int i = 0; i < maxLength; i++) { if (i < word1.length()) { merged += word1[i]; } ...
ALGO
0.999887
6.049753