uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
f90afa8e-3cc8-4d07-9e9c-a7116715f3d4
VictorAJM/competitive-programming
codeforces/educational175/C.cpp
#include <bits/stdc++.h> #define ve vector #define F first #define S second using namespace std; using ll = long long; using ii = pair<int,int>; bool ok(int mid, int k, ve<int>& a, string& s) { int n = a.size(); string d; int cnt = 0; for (int i=0;i<n;i++) if (a[i]>mid) d.push_back(s[i]); for (int i=0;i<d.siz...
ALGO
0.999911
4.79845
2e57f670-6bb4-4b77-9a26-5ab92f2b4f26
santkumar/evotron
evolver/software/UC2_samd21_arduino/libraries/PID_v1/PID_v1.cpp
#if ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #include <PID_v1.h> /*Constructor (...)********************************************************* * The parameters specified here are those for for which we can't set up * reliable defaults, so we need to have the user set them. *...
TOOL
0.953446
6.050011
09cc7825-04ef-46d4-b91c-731674553f77
jstolorz/cpp20_masterclass
lessons/Section8.cpp
// // Created by jstol on 04.11.2021. // #include "Section8.h" void Section8::section8() { const int COLUMN_WIDTH {20}; unsigned short int data {0b11111110}; unsigned char value1 {0b00000011}; unsigned char value2 {0b00000101}; unsigned char sandbox_var {0b00110100}; unsigned char var {0b000...
TOOL
0.851898
4.892085
10710700-7d2e-4056-a2f7-c483a726e44d
lanzheng1113/cpp
ds/graph/Graph/src/graph.cpp
/* * graph.cpp * * Created on: 2014年12月20日 * Author: wangdq */ #include "graph.h" #include <iostream> #include <sstream> #include <iterator> #include <algorithm> #include <queue> #include <list> #include <stack> Graph::Graph(std::istream &stream):adjMatrix(stream) { vertNum = adjMatrix.getVertexNum(); ve...
ALGO
0.99825
3.206607
e9f59ff5-2bff-4304-a59e-1a67bd386d5c
AdityaTomar016/Questions
Minimum BST Sum Subtree - GFG/minimum-bst-sum-subtree.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int val) { data = val; left = NULL; right = NULL; } Node *buildTree(string s) { if (s.length() == 0 || ...
ALGO
0.999691
6.825299
91896de3-9253-4fcc-90be-734d71b99dbb
OmarHafez1/Competitive_Programming_Solutions
onlinejudge.org/11338.cpp
//============================================================================ // Author : Omar_Hafez // Created : 11 July 2023 (Tuesday) 3:42:44 PM //============================================================================ /* ________ / \ / / ...
ALGO
0.999875
3.976584
ed6c049c-fc19-48de-ae3f-27ecc58a8b90
s-h-u-b-h/DS-A-assignments
Day2/q3.cpp
/*kid_with_tofee*/ #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) cin>>arr[i]; int toffee; cin>>toffee; int maximum=*max_element(arr+0,arr+n); vector<string> v; for(int i=0;i<n;i++) { arr[i]+=toffee; ...
ALGO
0.999529
3.274866
c647dbfd-a15c-42b0-a084-449f0914cd81
Shriya-Jaiswal/DSA_POTD_Questions_solving
181_Longest_Increasing_Subsequence_Leetcode_300.cpp
#include<iostream> #include<vector> #include<cstring> #include<set> #include<map> using namespace std; // // ▶️ Approach-1 (TopDown: Recur+Memo) // // ⏲️ Time Complexity : O(n*n) // int n; // int t[2501][2501]; // int lis(vector<int>& nums, int prev_idx, int curr_idx) { // if(curr_idx == n) // return ...
ALGO
0.999968
5.979219
561593a2-15ac-47bb-82ed-c5ac2e754c58
melo-giovane/Algoritmos---1o-semestre
lista-exercicio-praticar-3/Exercicio5.cpp
#include <iostream> using namespace std; main() { int contF=0, contM=0, sexo, total; float mediaF, mediaM, notasF=0, notasM=0, notaF, notaM; cout << "Informe o total de alunos: "; cin >> total; for(int i=0; i < total; i++) { cout << "Informe 1 para masculino, 2 para feminino: "; cin >> sexo; ...
ALGO
0.995973
3.958165
864030bf-1feb-499a-afdd-b75b8040b35b
Sudip-329/GFG-POTD-Solution
SEP22_First_and_last_occurrences_of_x.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int searchpart1(int arr[],int low, int high,int x) { int ans = -1; while(low <= high) { int mid = low + (high-low)/2; if(arr[mid] == x) { ...
ALGO
0.999937
6.095623
836122d2-3cb3-48b3-98c9-5c470c8b5cd9
Adarshkkk/placementclasses
Day-6/Lucky Numbers in a Matrix.cpp
class Solution { public: vector<int> luckyNumbers (vector<vector<int>>& matrix) { int sum=0,i,j,k,max,min,t; vector<int> a; for(i=0;i<matrix.size();i++) {max=-111111; min=111111; for(j=0;j<matrix[i].size();j++) { if(min>matrix[i][j]) ...
ALGO
0.999848
5.851419
de007bd4-a1fe-4caa-83bc-5b175241d545
seansie0830/zerojudge-ACcodes
c++/e313.cpp
#include<bits/stdc++.h> using namespace std; bool cmp(string a, string b){ int strLength=min(a.length(),b.length()); for(int i=0; i<strLength; i++){ if(a[i]>b[i]) return false; else if(a[i]<b[i]) return true; } if(a.length()<b.length()) return true; else return false; } int main(){ ...
ALGO
0.999983
4.509752
4f7f878e-3d36-4884-9203-07607c35c97b
TheTharz/competitive_programming_algorithms
equationofline.cpp
#include <iostream> using namespace std; int main(){ int x1,y1,x2,y2; cout << "X1,Y1"; cin >> x1 >> y1; cout << "X2,Y2"; cin >> x2 >> y2; int a = y2-y1; int b = x1-x2; int c = x2*y1-x1*y2; cout << "Equation of line is " << a << "x + " << b << "y + " << c << " = 0" << endl; }
ALGO
0.99743
3.480858
fdb9218a-5f29-4564-8244-a8db2b4484c3
WOONBE/C__Algorithm
Tree/1967.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; vector<pair<int,int>> edges[10001]; int node,mx_cost = 0; int deep_node = 1; void dfs(int cur, int prev, int cost){ if(cost > mx_cost){ mx_cost = cost; deep_node = cur; } for(int i=0; i<edges[cur].size(); i++){...
ALGO
0.999332
3.998496
bd85fb32-dbfb-4081-8711-f9f81cd9908d
annu050/Leetcode
1762-furthest-building-you-can-reach/furthest-building-you-can-reach.cpp
class Solution { public: int furthestBuilding(vector<int>& heights, int bricks, int ladders) { int n=heights.size(),i; priority_queue<int,vector<int>,greater<int>>jumps; for( i=0;i<n-1;i++){ if(heights[i+1]<=heights[i] ){ continue; } else{ ...
ALGO
0.999936
6.292419
4876798c-ecc5-4d47-b260-fb9313e342fd
MatheusFelipeLS/kit-opt
TSP/src/OrOpt.cpp
#include "OrOpt.h" bool bestImprovementOrOpt(Solution *s, int range, Data *data) { double bestDelta = 0; int best_i, best_j; //i = nó que será reinserido for(int i = 1; i < s->sequence.size()-range; i++) { int vi_prev = s->sequence[i-1]; int vi = s->sequence[i]; int i_tOpt = i+range; int noF...
ALGO
0.999992
4.863925
1e5aece1-e051-49ba-8a8d-d6685a384396
ishandutta2007/codeforces
kotamanegi/normal/680/A.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <algorithm> #include <utility> #include <functional> #include <cstring> #include <queue> #include <stack> #include <math.h> #include <iterator> #include <vector> #include <string> #include <set> #include <math.h> #include <iostream> #include<map> #include <i...
ALGO
0.999904
3.77706
a06db0aa-cbb3-4c50-8d7c-b7311a01edd6
Paradorn-248/Problem-Solve
week1/darts.cpp
#include<iostream> #include<math.h> using namespace std; int main() { int i,N,x,y,score=0; double r; cin >> N; for(i=0;i<N;i++) { cin >> x >> y; r = sqrt(x*x+y*y); if (r>=0 && r<=2) score += 5; else if (r>2 && r<=4) score += 4; else if...
ALGO
0.999445
3.468164
98a68884-0a1b-4595-a3ce-a97af9c90afa
macrobomastercontrolteam/Infantry_WheeledBiped
eigen-3.4.0/doc/examples/Tutorial_simple_example_fixed_size.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; int main() { Matrix3f m3; m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9; Matrix4f m4 = Matrix4f::Identity(); Vector4i v4(1, 2, 3, 4); std::cout << "m3\n" << m3 << "\nm4:\n" << m4 << "\nv4:\n" << v4 << std::endl; }
ALGO
0.975659
3.129515
b608cecf-47bc-4d08-b163-6036caa2eeba
Pooja-Ramdas/Codex_Task2
Question_7.cpp
//Even numbers using loops and the continue statement #include <iostream> using namespace std; int main() { for (int i = 0; i <= 20; i++) { if(i==10) { continue; } if(i%2==0) { cout<<i<<" "; } } }
ALGO
0.995954
3.71146
e87203a3-0854-49aa-9fce-e9f5149fc977
tanmaytirpankar/conditionalDivergence
1C3V0L1O.cpp
/* * Testing control flow change * Program characteristics: * 1 floating-point conditional * Conditional has 3 variables * Conditional has 0 literals * Conditional has 1 operation * * Expectation of someone unaware of floating-point semantics: * Control flow enters the then block * * Problem: ...
TEST
0.955844
3.656867
1da826d7-cdd2-4ce6-90ad-4f377665751a
raincross7/code-similarity
codes/train_code/problem440/problem440_102.cpp
#include<bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int n; while(cin>>n,n) { string s; bool l=0,r=0,u=0; int ans=0; for (int i = 0; i < n; ++i) { cin>>s; if(s=="lu") l=1; else if(s=="ld") l=0; else if(s=="ru") r=1; else r=0; if(u&&!l&&!r) ++ans,u=0; e...
ALGO
0.999628
3.487034
829f6f7b-de51-4424-98d3-9e028bc6bc57
vincent-tr/rpi-js-os
ext/libcxx-5.0/libcxx/src/algorithm.cpp
#include "algorithm" #include "random" #include "mutex" _LIBCPP_BEGIN_NAMESPACE_STD template void __sort<__less<char>&, char*>(char*, char*, __less<char>&); template void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&); template void __sort<__less<signed char>&, signed char*>(signed char*, si...
ALGO
0.999212
5.632583
d49aa3b8-223a-493e-b94b-3354b885e659
Chapokit/Learning
Munyin/C++/constant.cpp
#include <iostream> int main() { const double PI = 3.21413; double radius = 10; double cirm = 2 * PI * radius; std::cout << cirm << "cm"; const int LS = 234567543; const int WIDTH = 31; const int HEIGHT = 43; return 0; }
ALGO
0.988779
4.446099
15ce60f5-8e5c-46e7-8e91-968b070d949e
arm/arm-toolchain
mlir/lib/Dialect/Affine/TransformOps/AffineTransformOps.cpp
#include "mlir/Dialect/Affine/TransformOps/AffineTransformOps.h" #include "mlir/Dialect/Affine/Analysis/AffineStructures.h" #include "mlir/Dialect/Affine/Analysis/Utils.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/Affine/IR/AffineValueMap.h" #include "mlir/Dialect/Affine/LoopUtils.h" #include...
TOOL
0.875595
7.886362
cbc750dd-2fc0-4d52-b450-6fc55dcc2ebc
stevenmsl/cpp_dpd_379
solution.cpp
#include "solution.h" #include "util.h" #include <unordered_set> #include <algorithm> #include <iterator> #include <unordered_map> #include <set> using namespace sol379; using namespace std; /*takeaways - you can design two data structures of which one is to hold the available numbers the other numbers in use ...
ALGO
0.99929
5.690438
52031b1a-86eb-4107-9295-4643d7b76da9
yjbong/problem-solving
boj/2205/2205.cpp
#include <stdio.h> int pair[11111]; int main(void){ int i,n,cur_n,nearpow; scanf("%d", &n); for(i=1; i<=n; i++) pair[i]=-1; cur_n=n; while(cur_n>=1){ nearpow=1; while(nearpow<=cur_n) nearpow*=2; nearpow/=2; i=nearpow; while(pair[i]<0 && i<=cur_n){ ...
ALGO
0.999936
3.42983
9e9fb2d3-1a76-4e30-8d84-377f516d7350
redoy1102/Phitron-CP-Course
3 - Basic Data Structure/Week-3/Module-10/_5_Operations/_4_reverse.cpp
#include<bits/stdc++.h> using namespace std; void print(list<int> n) { for(int i: n){ cout << i << " "; } } void solve(){ list<int> n; int s; cin>>s; while(s--){ int v; cin >> v; n.push_back(v); } n.reverse(); print(n); } int main(){ int t; ...
ALGO
0.999408
4.444397
4febaede-ad80-4a8e-8634-80955e878f21
monliee/fic4_flutter_widgets_challenges-
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
7b88d9fa-7506-4c64-85d2-2b96874facd0
Devang-soni/Leetcode
Medium/54. Spiral Matrix/Spiral-Matrix.cpp
/* Given an m x n matrix, return all elements of the matrix in spiral order. Example 1: Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Output: [1,2,3,6,9,8,7,4,5] Example 2: Input: matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]] Output: [1,2,3,4,8,12,11,10,9,5,6,7] */ class Solution { public: vector<int> spiralOrder(vec...
ALGO
0.999999
6.695342
7a51abe2-c561-463d-9640-11161547a8af
mehakkanyal16/DSA-codes
84-largest-rectangle-in-histogram/largest-rectangle-in-histogram.cpp
class Solution { private: vector<int>nextSmallerElement(vector<int>heights,int n){ stack<int>s; s.push(-1); vector<int>ans(n); for(int i=n-1;i>=0;i--){ int curr=heights[i]; while(s.top()!=-1&&heights[s.top()]>=curr){ s.pop(); } ans[i]=s.top(); ...
ALGO
0.999981
6.525723
49d2a38e-bb19-4f72-9f13-1c5c14368468
AhmedGamal2212/CP-templates
Tree Diameter.cpp
// Those who cannot remember the past are // condemned to repeat it (use DP -_-) // - George Santayana #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), ...
ALGO
0.99979
4.882144
2980fa54-4dae-4b8b-be37-ba26360c3750
Pranto2003/Codeforces
Team.cpp
#include <iostream> using namespace std; int main() { int problem; int count = 0; cin >> problem; for (int i = 0; i < problem; i++) { int p, q, r; cin >> p >> q >> r; if (p + q + r >= 2) { count++; } } cout << count << endl; return 0; ...
ALGO
0.999583
4.439544
5115014d-cb98-4422-b707-447c4acf8fb7
ishandutta2007/codeforces
rush_d_cat/normal/938/B.cpp
#include <iostream> #include <algorithm> using namespace std; const int N = 100000+10; int n, a[N]; int min(int x, int y) {return x < y ? x: y;} int main() { scanf("%d", &n); a[0] = 1, a[n+1] = 1000000; for (int i = 1; i <= n; i ++) scanf("%d", &a[i]); int ans = 1e7; for (int i = 0; i <= n; i ++) ...
ALGO
0.999754
3.479827
18a9f5f9-b8b9-48e5-a3b7-cc167898f6ee
Dawn0247/cs4128
ps5/jumping on walls/jumping_on_walls.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int, int> const int N = 200005; const ll INF = 1e18; set<int> edges[N]; bool visited[N]; int n, k; bool bfs(int s) { queue<pii> q; q.emplace(s, 0); visited[s] = true; while (!q.empty()) { auto [v, depth] = q....
ALGO
0.99999
3.630449
016bc7c3-1991-4f74-9c8f-c5d1ceccd483
MehtabAlam2006/ITP-FIRST-SEMSESTER
Lab8 31737/Q4.cpp
#include <iostream> #include <vector> using namespace std; double percent_even(vector<int> v) { if (v.empty()) { return 0.0; } int even_count = 0; for (int num : v) { if (num % 2 == 0) { even_count++; } } double percentage = (static_cast<double>(even_coun...
ALGO
0.998523
6.143596
21cadef3-e69c-4092-88d6-81ca7beef8d3
yongsyongs/BOJ-solutions
solutions/class2/11650.cpp
#include <iostream> #include <algorithm> using namespace::std; bool IsGreater(int *X, int *Y, int i, int j) { return (X[i] > X[j]) || (X[i] == X[j] && Y[i] > Y[j]); } void Swap(int *X, int *Y, int i, int j) { int tmp = X[i]; X[i] = X[j]; X[j] = tmp; tmp = Y[i]; Y[i] = Y[j]; Y[j] = tmp; } int partition(i...
ALGO
0.999992
4.781643
94657623-b52f-4fdb-bd19-14c663870be7
Lee-W/ACM
POJ/1125/1125.cpp
#include <cstdio> #include <climits> #include <numeric> #include <algorithm> #define maxStockholderNum 105 int dis[maxStockholderNum][maxStockholderNum]; void Floyd(int n) { for (int k = 1; k <= n; k++) for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) if (dis[i][k] + ...
ALGO
0.999631
3.208614
ccb8da21-c208-4028-ae85-ccdd0d464f8a
jacobgirsky/Dijkstras-algorithm
JacobGirskyAssignment09/JacobGirskyGraph.cpp
// Jacob Girsky // CSCI 3250 // Programming Assignment 9 #include <iostream> #include <string> #include "undirectedGraph.h" int main() { int numVerticies, numEdges, startingVertex, endingVertex, weight; std::string name[25]; std::cout << "Number of verticies in our matrix: "; std::cin >> numVerticies; Undire...
ALGO
0.993847
3.917033
8b9b1e9c-6357-4c2b-a3a3-75a17de2ffa0
savitansh/Contest-Programs
apac_2.cpp
#include <iostream> using namespace std; int count[501]; int start[51],end[51]; int calc(int t){ int n; cin>>n; for (int i = 0; i < n; ++i) { cin>>start[i]>>end[i]; } for(int i = 0; i<n; i++){ for(int j = start[i]; j<=end[i]; j++){ count[j]++; } } int p,city[51]; cin>>p; for(int i=0; i<p; i++){ ...
ALGO
0.999609
3.821964
2f740c94-c80f-45f7-b747-a5e9fd9d1be3
11HimanshuSharma/REDOOOO_end
LIL_DP/String_DIP/wildcard_matching.cpp
#include <bits/stdc++.h> using namespace std; // Function to check if a substring of S1 contains only '*' bool isAllStars(string &S1, int i) { for (int j = 0; j <= i; j++) { if (S1[j] != '*') return false; } return true; } // Function to check if S1 matches S2 using wildcard pattern m...
ALGO
0.99993
5.745776
f2e965b7-a395-4ceb-9feb-feb60018e407
Prashant-Kumar-321/Competative-Coding
SlidingWindow/printAllwindow.cpp
#include<iostream> using namespace std; using ll = long long; void printAllWindows(ll n, ll k){ // processing every subarrray(window) of // k size for(int i=0; (i+k)<=n; ++i){ int windowST = i; int windowEnd = i+k-1; cout<< "["<< windowST<< " "<< windowEnd<< "]"<< endl; } } // Driver function int m...
ALGO
0.976356
4.210386
d77cccd8-7d1f-410c-8f3c-2fdeb4ab3cac
fmarkulin/ASP
06-Stog/RPN.cpp
#include <iostream> #include <string.h> #include <string> using namespace std; template <class T> class Stack { private: static const int MAX = 100; T stack[MAX]; int top = -1; public: bool push(T item) { if (top >= MAX) return false; stack[++top] = item; return true; } ...
ALGO
0.999891
4.902864
5273ac48-842d-4c4f-8122-f4bbcdd2f171
technoayan7/CodeNotes
2220-find-all-possible-recipes-from-given-supplies/2220-find-all-possible-recipes-from-given-supplies.cpp
class Solution { public: vector<string> findAllRecipes(vector<string>& recipes, vector<vector<string>>& ingredients, vector<string>& supplies) { vector<bool> isDone(recipes.size(), false); unordered_map<string, int> mp; for (const string& s : supplies) { mp[s] = 1; ...
ALGO
0.999948
6.2219
c6a334b4-cc94-4c4a-a157-52f0758d572e
GuacheSuede/MSSubmission1234567890
submission/rsi/boost_1_69_0/libs/bimap/example/projection.cpp
// VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overruns or other possible security issues if misused. // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx // But the wording of the warning is misleading and unsettling, there are no // po...
TOOL
0.947014
4.704637
260effe5-14ee-4db8-988a-8b2b5e94bd8c
NowatariSoma/cpp_library
アルゴリズム/座標圧縮.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i, n) for (int i = 0; i < (n); ++i) #define frep(i, a, b) for(ll i = a; i < b; ++i) #define drep(i, a, b) for(ll i = a; i >= b; --i) #define all(c) begin(c), end(c) #define drop(s) cout << #s << endl, exit(0) #define...
ALGO
0.999995
4.828938
f7af0092-3659-4765-a502-08a46d74f7be
KarthiU/cppsuite
trees/bst/binary-search-tree.cpp
#include "binary-search-tree.h" #include <algorithm> #include <queue> #include <iostream> BinarySearchTree::Node::Node(DataType newval) { val = newval; left = nullptr; right = nullptr; } int BinarySearchTree::getNodeDepth(Node* n) const { if(n == nullptr) return -1; if (n->left == nullptr && n->ri...
ALGO
0.999219
5.059194
92970d8b-3a86-47dd-837b-fb897ff711b5
pratyush2331/DSA_Love-Babbar
02. Arrays/3. 2-D Arrays/Matrix Basics/23_4_row_colWiseSum.cpp
// Coding Ninjas : Row Wise & Col Wise Sum #include<iostream> using namespace std; // Row wise Sum void rowWiseSum(int arr[][3], int n, int m) { cout << "Row wise Sum : " << endl; for(int i = 0; i < n; i++) { int sum = 0; for(int j = 0; j < m; j++) { sum += arr[i][j]; } ...
ALGO
0.999381
4.471402
010aa238-9c1e-4492-bde6-c499a4f0014c
Jianxff/pyslam
3rd/g2o/g2o/examples/calibration_odom_laser/closed_form_calibration.cpp
#include "closed_form_calibration.h" #include "g2o/types/sclam2d/odometry_measurement.h" #include <iostream> #include <limits> #include <Eigen/SVD> #define SQR(X) ( std::pow(X,2) ) #define CUBE(X) ( std::pow(X,3) ) using namespace Eigen; namespace g2o { bool ClosedFormCalibration::calibrate(const MotionInforma...
ALGO
0.999562
6.363627
96e2103d-e2f5-4965-a44b-7c5f82703a30
ishan-marikar/firmware-mod-kit
src/others/squashfs-3.3-lzma/CPP/7zip/Compress/ByteSwap/ByteSwap.cpp
// ByteSwap.cpp #include "StdAfx.h" #include "ByteSwap.h" STDMETHODIMP CByteSwap2::Init() { return S_OK; } STDMETHODIMP_(UInt32) CByteSwap2::Filter(Byte *data, UInt32 size) { const UInt32 kStep = 2; UInt32 i; for (i = 0; i + kStep <= size; i += kStep) { Byte b = data[i]; data[i] = data[i + 1]; d...
ALGO
0.902826
5.358013
1f04b35c-81ed-4edf-b497-ff2fb30d4617
ChrisXu1006/Leecode
191.cpp
#include <iostream> #include <cstring> #include <string> #include <vector> #include <cmath> using namespace std; int hammingWeight(uint32_t n) { int counter = 0; for ( int i = 0; i < 32; i++ ){ if ( n & 1 ) counter++; n = n >> 1; } return counter; } ...
ALGO
0.99688
4.460635
204950c0-b32c-4665-a3b5-5a0815d37f50
nopslide/firovm
src/consensus/tx_verify.cpp
#include <consensus/tx_verify.h> #include <consensus/consensus.h> #include <primitives/transaction.h> #include <script/interpreter.h> #include <consensus/validation.h> #include <chainparams.h> // TODO remove the following dependencies #include <chain.h> #include <coins.h> #include <util/moneystr.h> bool IsFinalTx(co...
ALGO
0.981384
7.890059
7980dfec-b494-4eb8-b331-e42fad5248cf
SBidaibek/acm
ioi/2016/day2/messy/solutions-to-submit/messy_tourist_subtask123.cpp.dir/messy.cpp
// name = messy_tourist_subtask123.cpp, type = cpp.g++11 #include "messy.h" // n writes, n^2/2 reads worst case, n^2/4 reads average case // (ok for "n = 32, r = 320" subtask) #include <bits/stdc++.h> //#include "messy.h" using namespace std; vector<int> restore_permutation(int n, int w, int r) { string s(n, '0'...
ALGO
0.999759
3.327121
a83bd1c7-19b8-4695-99ab-5d8124ac9ee3
ishandutta2007/codeforces
ivan100sic/normal/1314/A.cpp
// Retired? #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long unsigned long ull; typedef double long ld; struct node { int c, t, id; template<class T> auto operator< (const T& b) const { return t > b.t; } }; ll n; node a[200005]; map<int, int> fr; int nadji(int x) { if (!fr.c...
ALGO
0.999773
3.447095
8b4a718e-105e-441c-84d9-6fc7ca0be51a
Swissler-Innovative-Robotics-Lab/General-Project
simple_helper_function.cpp
/*//////////////////////////////////////////////////// Name: def_pins.h Created: 3/25/2019 Author: Petras Swissler Purpose: Define simple helper functions *///////////////////////////////////////////////////// #include "simple_helper_functions.h" ////////////////////////////////////////////////////// // Boun...
TOOL
0.97001
5.610186
a9a1216e-8cb1-4831-bf40-d21da09f5485
Harshsngh07/DataStructures_and_Algorithms
leetcode/DP/ClimbingStairs.cpp
class Solution { public: int helper(int n) { int dp[n + 1]; //base case dp[0] = 1; dp[1] = 1; for (int i = 2; i <= n; i++) dp[i] = dp[i - 1] + dp[i - 2]; return dp[n]; } int climbStairs(int n) { return helper(n); } };
ALGO
0.999989
6.336562
2253a732-1058-4ea4-b82e-6db229f7e36e
zluo-luck/ccLBLA
model.cpp
/* * Based on the LDA Gibbs Sampler by Xuan-Hieu Phan, and ccLDA by Michael Paul * http://gibbslda.sourceforge.net/ */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <iostream> #include <sstream> #include <cmath> #include <cassert> #include "constants.h" #include "strtokenizer.h" #include "utils.h...
DATA
0.992795
6.124731
997695ab-46e0-4a7c-8f7e-b38e87a4bc61
Hiyabye/Baekjoon
12xxx/12871.cpp
#include <iostream> #include <string> using namespace std; int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } int lcm(int a, int b) { return a * b / gcd(a, b); } void solve(void) { string s; cin >> s; string t; cin >> t; int n = lcm(s.length(), t.length()); string ss = "", tt = ""; for (int i=0; ...
ALGO
0.999942
4.889533
f68cd485-ff00-41cc-9daa-4fb32531e664
Aaronhdez/Grado-Ingenieria-Informatica
Segundo Ingenieria Informatica (Plan 40)/Metodos Numericos para la Computacion/Ejercicios Alumno/Prueba 3/InterpolacionLineal_hacer_alumno/mn_interpolacion.cpp
/*======================================================================== FUNCIONES PARA LA INTERPOLACION DE FUNCIONES ======================================================================== */ // INCLUSION DE LA LIBRERIA PARA GESTIONAR LA ARITMETICA #include "mn_aritmeticas.h" #include "mn_interpolacion.h" ///...
ALGO
0.999912
4.393469
6cb2d9e5-eb0f-4165-b43e-dd72cced9de1
darkshuige/codecode
c code/1023 Have Fun with Numbers.cpp
#include<bits/stdc++.h> #define jiasu ios::sync_with_stdio(false),cin.tie(0),cout.tie(0) #define int long long #define endl "\n" #define inf 0x3f3f3f3f3f3f3f3f using namespace std; const int maxn=200005; int b[maxn]; multiset<int>st,st2; signed main() { string s; cin>>s; int ct=0; for(int i=s.size()-1;i>=0;i--) { ...
ALGO
0.999993
4.168535
adc4da94-24dc-4187-9141-27a11bd41589
EazyReal/CompetitveProgramming
before2024/20220425-GCJ-R1B/C.cpp
#include <bits/stdc++.h> #define LOCAL using namespace std; #define X first #define Y second #define pb push_back #define mp make_pair #define all(a) a.begin(), a.end() #define rep(i, st, n) for (int i = (st); i < (n); ++i) #define repinv(i, st, n) for (int i = ((n)-1); i >= (st); --i) #define MEM(a, b) memset(a, b, s...
ALGO
0.998064
3.336323
44242a80-00cc-44cd-a422-6123143b85ca
linmx0130/OJCode
RQNOJ/662/main.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #define MAXN 200002 int N,R,Q; struct Ath { int s,w,id; }d[MAXN],win[MAXN],lost[MAXN]; bool cmp(Ath a,Ath b) { return (a.s!=b.s)?a.s>b.s:a.id<b.id; } int main() { scanf("%d%d%d",&N,&R,&Q); int n=N; N+=N; for (int i=1;i<=N;++i) { scan...
ALGO
0.999699
3.373389
36b26108-bb10-40ed-bffd-248f099e4a22
Superdrug-innovation/NotesApp
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
04eaf277-1fdd-41a3-b168-d3380f7383cc
A-Lokanush/IPMP_2k24
week3/day2/Array_01.cpp
class Solution { public: void set(vector<int> &v){ unordered_set<int> s(v.begin(), v.end()); v.assign(s.begin(), s.end()); } vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { vector<int> a; set(nums1);set(nums2); int n1 = nums1.size()-1; int n...
ALGO
0.999982
5.715264
d13756a9-8433-4f8e-94f4-ff315bf91eda
laflaretapee/CourseworkOnLanguageC
ConsoleApplicationForKyrsach/student.cpp
#include "student.h" #include <iostream> #include <iomanip> #include <fstream> #include <algorithm> #include <sstream> using namespace std; // Функция для добавления нового студента в конец массива void AddStudent(Student x[], int& n) { if (n < MAX_STUDENTS) { cout << "Введите ФИО абитуриента: "; ...
TOOL
0.971298
4.855117
6f79d9cc-f04f-45c0-9f78-edd40651c624
Elisey-e/IT_seminars
Class_11/app_10.cpp
#include "functions.hpp" #include <syscall.h> #include <unistd.h> void putdig(int n); int getdig(); int main(){ int n = getdig(); putdig(n); } int getdig(){ char buffer[32]; int n = 0; int len = (int) read(2, buffer, 32); int exp = 1; for (int i = 0; i < len - 1; i++){ n += (buff...
ALGO
0.99388
3.984505
34d78245-4dfc-461d-b523-f5ea9fd99f83
denizdsh/SU-FMI
UP-Introduction-to-programming/Pract/03/06/06.cpp
#include <iostream> #include <cmath> int main() { double x, y, r; std::cin >> x >> y >> r; double z = sqrt(x * x + y * y); if (z == r) { std::cout << "On the circle"; } else if (z < r) { std::cout << "Inside the circle"; } else { std::cout << "Outside the circle"; } }
ALGO
0.998852
4.73473
bb103797-0933-440f-8c0d-2624aff0c14e
bliscosque/CPPProblemsVSCode
CourseUdemy_DS_Alg/15-Graphs/7-board_game.cpp
//given a list words //given MxN board where every cell has one character //find all possible words that are part of the list and can be formed by a seq of adj char from the board. //Can move 8 positions but cannot reuse the cell //8-way DFS search for every cell //trie will guide & control the search #include <iostr...
ALGO
0.999881
6.056193
0d60941c-3111-43a5-80eb-4a6d531a8df4
MahmoudNofaal/Datastructures_And_Algorithms_CPP
C++/Array/Array_Impelement/main.cpp
/* Author: Nofaal main: lookk likke Spider>>> */ // ==|libraries|== #include <algorithm> #include <array> #include <cassert> #include <cmath> #include <iostream> #include <limits.h> #include <math.h> #include <stack> #include <string> #include <vector> using namespace std; #define ll long long #define endl '\n' #d...
ALGO
0.995525
4.223238
6b2e2d52-59c3-4206-80ea-d82af63a21ec
actium/codeforces
1400/60/1462e2.cpp
#include <algorithm> #include <iostream> #include <vector> constexpr unsigned MOD = 1000000007; template <typename T> std::istream& operator >>(std::istream& input, std::vector<T>& v) { for (T& a : v) input >> a; return input; } void answer(unsigned v) { std::cout << v << '\n'; } using integer ...
ALGO
0.999962
5.216387
8202aea5-6ced-49d6-9f14-631f9e46d9c6
Fezaan/CodingWithCPP
optimal.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,i,j,k; cout<<"Enter number of frames\n"; cin>>n; cout<<"Enter number of processes\n"; cin>>m; vector<int> p(m); cout<<"Enter processes\n"; for(i=0;i<m;i++){ cin>>p[i]; } vector<vector<int>> a(n,vector<int>(m...
ALGO
0.999952
3.640519
174eae86-7c5a-4507-baff-608957f28874
UVE-R/OpenCV-CPP-
Live Document Scanner.cpp
#include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <iostream> using namespace cv; using namespace std; Mat img, imgDil, imgGray, imgCanny, imgBlur, imgThre, imgWarp, imgCrop; vector<Point>initialPoints, docPoints; float w = 420, h = 596; //Width and height of pap...
ALGO
0.975584
4.030798
58823dfd-8fed-4d5e-b823-4867121e92a5
randombit/botan
src/lib/hash/comb4p/comb4p.cpp
#include <botan/internal/comb4p.h> #include <botan/exceptn.h> #include <botan/mem_ops.h> #include <botan/internal/fmt.h> #include <botan/internal/stl_util.h> namespace Botan { namespace { void comb4p_round(secure_vector<uint8_t>& out, const secure_vector<uint8_t>& in, uint8_t rou...
ALGO
0.975016
7.655503
e1ed6a47-14af-4059-aa76-cd446587c402
intel/external-mesa
src/compiler/glsl/lower_vector_derefs.cpp
#include "ir.h" #include "ir_builder.h" #include "ir_rvalue_visitor.h" #include "ir_optimization.h" #include "main/mtypes.h" using namespace ir_builder; namespace { class vector_deref_visitor : public ir_rvalue_enter_visitor { public: vector_deref_visitor(void *mem_ctx, gl_shader_stage shader_stage) : progr...
TOOL
0.873289
6.867824
94e4c8c0-6e5b-4493-8790-01ac3069dec7
FeyzaNurGenc/213311023_f_kod
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
45036758-2fd1-45e1-894c-fcb7d0663ca6
Nagisa12321/CPP-Primer
exercises/ch10/ex10_32.cpp
// io #include <iostream> #include <cstdlib> #include <cstdio> // containers #include <unordered_map> #include <unordered_set> #include <list> #include <vector> #include <forward_list> // algorithm #include <algorithm> #include <numeric> #include <iterator> #include "Sales_item.h" using namespace std; bool compare...
ALGO
0.999368
5.099759
9556b308-4484-4da6-82f9-177e46cef328
akbtech17/dsa
Patterns/pattern-numbers-and-stars-2.cpp
// pattern - numbers - and - stars - 2.cpp #include <iostream> using namespace std; int main() { int n; cin >> n; for (int row = 1; row <= n; ++row) { //numbers for (int num = 1; num <= row; num++) cout << num ; //stars for (int stars = 1; stars <= (n - row); stars++) cout << "*"; cout << endl; } retur...
ALGO
0.999944
4.035721
4e0624f2-34be-4229-83ac-5a04ceadec7e
bulletghost1/ccode
pointers3.cpp
// jb pointers3.cpp #include <iostream> using namespace std; int main(){ int integers[10]; int * pointer; pointer = integers; //print array cout<<"print intergers[] array"<<"\n\n"; for (int n = 0; n < 10; n++){ //integers[n] = 0; cout << integers[n]<<"\n"; } //increment *pointer then assign a value *pointer...
ALGO
0.981191
3.011249
461bc654-223f-40d6-9ad5-ecb2a0a966fc
yash-prakash-sharma/codes
Supplements/Striver's BinarySearch/10_MinDivisor.cpp
#include<bits/stdc++.h> using namespace std; // Leetcode 1283 int findSumAfterDiv(int arr[],int &n,int &div){ int sum=0; for(int i=0;i<n;i++){ sum += (arr[i]/div); // for geting ceil as stated in Q if(arr[i]%div != 0){ sum += 1; } } return sum; } int findMi...
ALGO
0.999961
5.520235
3afd08a1-6ef8-49b7-8c0f-1ed032d55892
tesion99/LeetCode
cpp/1450_busyStudent.cpp
/* 给你两个整数数组 startTime(开始时间)和 endTime(结束时间),并指定一个整数 queryTime 作为查询时间。 已知,第 i 名学生在 startTime[i] 时开始写作业并于 endTime[i] 时完成作业。 请返回在查询时间 queryTime 时正在做作业的学生人数。形式上,返回能够使 queryTime 处于区间 [startTime[i], endTime[i]](含)的学生人数。 示例 1: 输入:startTime = [1,2,3], endTime = [3,2,7], queryTime = 4 输出:1 解释:一共有 3 名学生。 第一名学生在时间 1 开始写作业,并于时间...
ALGO
0.999855
6.125041
561717aa-58da-4bf3-a4eb-3f19b883e522
lebertbill/VAMPIRE-defects
src/spintransport/data.cpp
// C++ standard library headers // Vampire headers #include "spintransport.hpp" // spintransport module headers #include "internal.hpp" namespace spin_transport{ //------------------------------------------------------------------------------ // Externally visible variables //------------------------------...
TOOL
0.980434
5.234671
4ad10b45-91f6-42ae-a795-17b7b4cb024b
Mahmud256/cpp-oop-lab
swapp.cpp
//Swapping number with friend function #include<iostream> using namespace std; class Swapping { private: int a, b, temp; public: void set_data(); friend void display(Swapping t); //declare friend function }; void Swapping::set_data() { cout<<"Input two number: "; cin>>a>>b; cout << "Before s...
ALGO
0.994983
4.891264
f526bd50-4529-4628-bc19-88502dbf461d
ishandutta2007/codeforces
timmyfeng/normal/1396/D.cpp
#include <bits/stdc++.h> using namespace std; const int M = 1000000007; void add(int &a, int b) { a += b; if (a >= M) { a -= M; } } void sub(int &a, int b) { a -= b; if (a < 0) { a += M; } } int mul(int a, int b) { return (long long) a * b % M; } const int N = 2000; map<int, int> mono; int s...
ALGO
0.999914
4.14819
b4dd2a64-6e55-4ff9-b026-3ef2fa8aa70e
romainmottier/Diskpp
apps/diffusion/diffusion_alg.cpp
#include <iostream> #include <iomanip> #include <regex> #include <unistd.h> #include "bases/bases.hpp" #include "quadratures/quadratures.hpp" #include "methods/hho" #include "core/loaders/loader.hpp" #include "solvers/solver.hpp" #include "output/silo.hpp" template<typename Mesh> class augmented_lagrangian_diffus...
ALGO
0.996727
4.462461
ebe2efc7-85dc-4c5a-8b97-421f183dc00c
Somprakash04/LeetCode
560-subarray-sum-equals-k/subarray-sum-equals-k.cpp
class Solution { public: int subarraySum(vector<int>& nums, int k) { int n=nums.size(); int count=0; for(int i=0; i<n; i++ ){ int currsum = 0; for(int j=i; j<n; j++){ currsum+=nums[j]; if(currsum==k){ count++; } }...
ALGO
0.999936
6.177474
c476fb6f-8ddf-48b1-851f-72708fe6e53b
rbv3/silver
src/utils.cpp
#include <format> #include <fstream> #include <string> #include <string_view> #include <vector> #include <glm/gtc/epsilon.hpp> #include <glm/vec3.hpp> #include <tl/expected.hpp> #include "silver/camera_3d.h" #include "silver/nurbs.h" #include "silver/triangle.h" #include "silver/utils.h" namespace silver { tl::expec...
TOOL
0.855773
6.935862
c2d21d36-2b7f-4cc4-8c93-c2f329d58581
Shivani2501/Software-System-IIIT-B
Hnds on list 1/Q25.cpp
/* ============================================================================ Name : 25.c Author : Shivani Sanjiv Shukla Description :Write a program to create three child processes. The parent should wait for a particular child (use waitpid system call). Date: 31st Aug, 2024. ========================================...
TOOL
0.996597
4.826735
255c62a7-5dc3-49eb-93ca-6358ab117925
itsoulos/OPTIMUS
src/islandMultistart/islandmultistart.cpp
#include "islandmultistart.h" islandMultistart::islandMultistart(Problem *p) : Optimizer(p) { prin = std::chrono::system_clock::now(); addParameter("islandmultistart_samples", "100", "Number of multistart samples"); addParameter("islandmultistart_maxiterations", "100", "Number of maximum iterations"); ...
ALGO
0.999022
4.115611
092215f8-2b1f-4025-a58a-f79382a18a3a
xinfeng1i/AlgorithmSolution
leetcode/RemoveNthNodeFromEndofList.cpp
#include <iostream> #include <string> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x): val(x), next(NULL){} }; ListNode* removeNthFromEnd(ListNode* head, int n) { if (head == NULL) return NULL; ListNode* ref = head; // ref point to the nth node from head in...
ALGO
0.999953
5.526015
ea8eb88b-c539-45eb-ad3e-3d0dc076ff6e
AarthikhaR/DataStructures
c++/Arrays/max_min_array.cpp
#include<iostream> using namespace std; int max_array(int arr[],int n) { int max = arr[0]; for(int i=0;i<n;i++) { if(arr[i] > max) max = arr[i]; } return max; } int min_array(int arr[],int n) { int min = arr[0]; for(int i=0;i<n;i++) { if(arr[i]<min) min=arr[i]; } return min; } int main() { int n...
ALGO
0.997877
3.994749
9cb0c63e-c843-4ad9-ae34-15683cbcb5cb
sidharthsharma96/CODING
FCP/vector.cpp
#include<iostream> #include <math.h> using namespace std; bool isPrime (int num) { if (num <=1) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; else { bool prime = true; int divisor = 3; double num_d = static_cast<dou...
ALGO
0.998988
3.865966
4dc0b201-5c68-4abe-a39e-23545b60a84f
purveshjambhulkar/Strivers-DSA-Sheet
12.Binary Trees/02.Medium Problems/10.Bottom View of Binary Tree.cpp
// problem link - https://www.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1 // Function to return a list containing the bottom view of the given tree. class Solution { public: vector<int> bottomView(Node *root) { // Your Code Here if(!root){ return {}; } map...
ALGO
0.999979
6.033782
934a0068-3869-41a1-a32a-7dc80a42011f
Koltharius/UGR_Fundamentos_Programacion
Practica_04/II_Ejercicio08.cpp
/* Autor: David Sanchez Jimenez Ejercicio 8 Relacion 2 Descripcion: Programa que convierte de mayuscula a minuscula y viceversa un caracter Necesita: Un caracter Devuelve: El caracter convertido a minuscula si se ha introducido en mayuscula o viceversa. */ #include <iostream...
ALGO
0.856486
5.250669
ad9295ea-5cad-4d44-bc55-f69d971d2c32
rivaldipratama67/tugas
tugas.cpp
#include <iostream> using namespace std; int main() { int nilai; cout <<"masukan nilai "; cin>>nilai; if (nilai>90) { cout<<" MAKA NILAI ANDA A"<<endl; } else if (nilai>80 ){ cout<<"maka nilai anda B"<<endl; } }
TOOL
0.985612
3.319448
75168ad5-5188-446f-a8a1-82e8b66e2c66
GabrielCFormiga/URI-Beecrowd
Codigo/2 - Ad-Hoc/src/1030.cpp
#include <bits/stdc++.h> #define _ ios_base::sync_with_stdio(0);cin.tie(0); //#define endl '\n' #define pb push_back #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() using namespace std; typedef long long ll; typedef unsigned long long llu; int main(){ _ int tt; cin >> tt; for(int t =...
ALGO
0.999808
3.891596
afff9ce2-a18e-4335-85fd-df15a62038fd
ashrafulislampro/Basic_Algorithms
Module_2.5/path_printing.cpp
#include <bits/stdc++.h> using namespace std; vector<int> adj_list[100005]; bool vis[100005]; int level[100005]; int parent[100005]; void bfs(int src) { queue<int> q; q.push(src); vis[src] = true; level[src] = 0; while (!q.empty()) { int par = q.front(); q.pop(); for (i...
ALGO
0.999987
4.638301
55d73f05-f541-475f-9ec8-bc378ebf2e7f
JulioMelo-Classes/lista-1-oscarkemuel
negativos5/src/main.cpp
#include <iostream> using std::cin; using std::cout; const int SIZE = 5; // input size. /* ok */ int main(void){ // TODO: Adicione aqui seu código. int num = 0; int cont = 0; for (int i = 0; i < SIZE; i++){ std::cin >> num; if(num < 0) cont++; } std::cout << cont; return...
ALGO
0.999359
4.486073
fd573308-141a-4efc-8d0d-4c926c62ac9d
sankar-coder/hackk2022
permutation-with-spaces.cpp
#include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: void permute(string S, int start, int end, string current, vector<string>& result){ if(start>end){ result.push_back(current); return; } current.push_back(S[start]); p...
ALGO
0.999108
6.056413
a5c149cd-3e43-476d-b7a6-c56c2874014e
MashfiqulHoque1/flutter_weatherApp_api_mashfi
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
3974116b-9b32-4d70-ae56-9563a6d8c523
kmjp/procon
2017-2021/2021/tenkei/034.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #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 FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999875
4.391764