uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
00f741ce-0fef-4b2c-8caf-bb2f81705d66
MRSD-Team-RoboSAR/robosar_SLAM_toolbox
slam_toolbox/solvers/deprecated/GTSAM_solver.cpp
/* Authors: Saurav Agarwal */ /* Modified: Steve Macenski */ #include <limits> #include <karto_sdk/Karto.h> #include <ros/console.h> #include "GTSAM_solver.hpp" #include <pluginlib/class_list_macros.h> PLUGINLIB_EXPORT_CLASS(solver_plugins::GTSAMSolver, karto::ScanSolver) namespace solver_plugins { /***************...
ALGO
0.996522
4.798882
3986e708-fe46-4728-a157-241b3daaf12a
Raza181261/DSA_problems
202-happy-number/happy-number.cpp
class Solution { public: bool isHappy(int n) { int slow = n; int fast = n; while (true) { slow = solve(slow); fast = solve(solve(fast)); if (fast == 1) { return true; } if (slow == fast) ...
ALGO
0.999986
6.74669
3ff74690-1b6b-4d2c-8304-61b1d5e15d4d
ShashankJaipurkar123/Leetcode-solution
0008-string-to-integer-atoi/0008-string-to-integer-atoi.cpp
class Solution { public: int myAtoi(string s) { int i = 0, n = s.size(); while(s[i] == ' '){ // skipping space characters at the beginning i++; } int positive = 0, negative = 0; if(s[i] == '+'){ positive++; // number of positive signs at the start ...
ALGO
0.99979
5.261519
29e90bee-534f-406e-aa64-400a38c96a99
dsifford/CSC_1100
Projects/Project_02/Problem_02.cpp
// Project 2 - Problem 2 // Derek P Sifford #include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; void readData(string[10], double[10][3]); void determinePay(double[10][3]); double getAverage(double[10][3]); void outputRowData(string[10], double[10][3]); void outputWorkaholic...
TOOL
0.986106
4.357298
5cad1d88-cd7c-4e79-a43d-7dc3092abd37
omarmmali/SolvedProblems
codeblocks/main.cpp
#include <bits/stdc++.h> using namespace std; //TYPEDEFS typedef long long ll; //MACROS #define set(a, b) memset(a, b, sizeof(a)) /* */ int main() { int n; while(cin >> n) { int a_x = 0; int e_x = 0; int o_x = 0; for(int i = 1; i <= n; i++) { int x = 0; ...
ALGO
0.999619
3.461448
c1165213-c8e5-414b-bf1f-88b6e033db5a
apaarkamal/LPU_10Jan
paint_the_digits.cpp
#include<bits/stdc++.h> #define int long long int using namespace std; #define db(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char* name, Arg1&& arg1) { cout << name << " : " << arg1 << '\n'; } template <typename Arg1, typename... Args> void __f(const char* names, Arg1&& arg1, Args&&....
ALGO
0.999582
4.478976
f418b3c6-7c26-4263-8f79-d12ff70c5ae6
JJungs-lee/problem-solving
BOJ/15686_치킨 배달.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; int n, m; int res = 0; int board[52][52]; vector<pair<int, int>> house; vector<pair<int, int>> chicken; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> m; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { ...
ALGO
0.999821
4.125947
6c9a1051-2341-4f8f-b105-e50c7a291591
adam-lafontaine/OpenCV
Tutorial/src/imgproc/32_deblur_filter.cpp
#include <iostream> #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include <opencv2/highgui.hpp> constexpr auto IMAGE_PATH = "D:/repos/OpenCV/Tutorial/in_files/corvette.jpg"; namespace deblur_filter32 { void calcPSF(cv::Mat& outputImg, cv::Size filterSize, int R); void fftshift(const cv::Ma...
ALGO
0.987055
4.345266
520e803e-211a-4de4-9f72-76c9d127609d
doocs/leetcode
solution/1400-1499/1493.Longest Subarray of 1's After Deleting One Element/Solution2.cpp
class Solution { public: int longestSubarray(vector<int>& nums) { int ans = 0, n = nums.size(); for (int i = 0, j = 0, cnt = 0; i < n; ++i) { cnt += nums[i] ^ 1; while (cnt > 1) { cnt -= nums[j++] ^ 1; } ans = max(ans, i - j); }...
ALGO
0.999989
5.872467
18801736-cc26-4313-8d3e-a295694fd00b
aydindemircioglu/SharkSVM
src/Algorithms/KMedoids.cpp
//=========================================================================== //=========================================================================== #include <shark/Models/Clustering/HardClusteringModel.h> #include <shark/Data/DataView.h> #include <boost/range/algorithm/equal.hpp> #include <limits> #include ...
ALGO
0.999943
6.203319
3ec65b80-f490-4f0f-88f4-d032216f1383
khoivux/CodePTIT
CodePTIT_DSA/DSA01002. TẬP CON KẾ TIẾP.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int n, k; int x[10000]; void init() { for(int i = 1; i <= k; i++) { cin >> x[i]; } } bool isFinal() { for(int i = 1; i <= k; i++) { if(x[i] != n - k + i) return false; } return true; } void display() { for(int i = 1; i <= k; i++) { c...
ALGO
0.999933
3.993204
5041ee00-c55b-491f-88c7-b923df7d74b8
TengFeiyang01/Algorithm
bishi/5-12阿里云/d.cpp
#include <bits/stdc++.h> using ll = long long; const int N = 1E3 + 5 , M = 2E4 + 5; const ll INF = 1E18; ll dis[N][M][2]; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,m; std::cin >> n >> m; std::vector<int> edge(m + 1); std::vector<std::vector<std::array<int,3>> > g(n); f...
ALGO
0.999975
4.09117
3eb73464-8ab2-4e26-9cb5-ffd1885bb6b7
RoPro99/DS-ALGO-CB
Arrays/Problem/chewbacca_and_number.cpp
#include<bits/stdc++.h> using namespace std; int main() { string x; cin >> x; bool flag = false; for (int i = 0; i < x.length(); i++) { if (i == 0 && ((x[i] - '0') == 9) ) { flag = true; continue; } if ( (x[i] - '0' ) >= 5 ) { x[i] = (9 - (x[i] - '0')) + '0'; } } cout << x << endl; return 0; }
ALGO
0.999857
4.344283
ddf85cfa-5982-48e0-b3f4-8ffc09cf309f
f-zyj/ACM
按 OJ 分类/51Nod/f-51Nod-1050-循环数组最大子段和/f-51Nod-1050-循环数组最大子段和/main.cpp
#include <iostream> #include <cstdio> using namespace std; typedef long long ll; const int MAXN = 5e4 + 10; ll A[MAXN]; ll All[MAXN], Start[MAXN]; ll MaxSubStringOne(ll *A, int n) { int i; Start[n - 1] = A[n - 1]; All[n - 1] = A[n - 1]; for(i = n - 2; i >= 0; i--) // 根据题意,从后向前遍历,反之亦可。 ...
ALGO
0.99999
3.770786
58fa8e24-eb82-49b5-8de2-678d5e0d6912
AbidurRahman24/Algorithms_new
Practice/practices 3.5/marge_sort.cpp
/* https://www.codingninjas.com/studio/problems/merge-sort_920442?leftPanelTab=0 void merge(vector<int> &arr, int left, int mid, int right) { int n1 = mid - left + 1; int n2 = right - mid; // Create temporary arrays to store the two subarrays vector<int> L(n1), R(n2); // Copy data to the temporar...
ALGO
0.999889
5.477504
09f1f24a-b3b2-4d5f-be85-93e56571d5dc
divysoni03/full_cpp
fileHandling/task/task4.cpp
// 4. Implement a program that reads a file containing a list of names and sorts them alphabetically. #include<iostream> #include<string> #include<fstream> using namespace std; class fileHandler{ private: string str; public: string filename; string Names[10]; int count=0; void writeNames(){ ...
TOOL
0.9967
5.274038
0d5f3bee-135b-4656-a825-a99096a7755b
leonardonm15/competitive_programing
codeforces/round_957/c.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long void solve () { int n, m, k; cin >> n >> m >> k; // k é o priemiro; vector<int> resp; // caras >= k // caras <= m if (k > m) { // for (int i = k; i <= n; i++) resp.push_back(i); for (int i = ...
ALGO
0.999812
3.540198
17464d86-035e-47ea-a7ca-ca148a1c46bd
JamesQAQ/Coding-Practices
LeetCode/Medium/0235. Lowest Common Ancestor of a Binary Search Tree/2018-07-06_Accepted.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* q) { vector<TreeN...
ALGO
0.999995
6.267976
4b0d0b9e-8921-47f7-b9fa-de346fb2fcae
StrawHatWess/Competitive-Programming-Solutions
Yandex/ISIJ/R3/E.cpp
//Never stop trying #pragma GCC optimize("O3") #include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using ordered_set=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; //s.o...
ALGO
0.99971
3.937602
b2104f33-5021-4962-9b58-36d573072607
gim-largerepo/including-investment-59GB
source/people.cpp
Argue become maybe them cold degree serious hope. Measure set air fund radio glass. Fear strategy truth then. Bag bar position more us. Up loss nation why ago relate store manage. Another follow TV soldier take.
TOOL
0.918581
4.548499
6eb90d42-ed6b-483d-8b8b-6eb03fa13e77
ISTE-SS-24-DSA/SakshiS_230962006
WEEK3/Assignment3.cpp
// DSA Assignment Question- Week 3- Q(3) class Solution { public: // Function to find elements in the array that are equal to their index. vector<int> valueEqualToIndex(vector<int>& arr) { vector <int> index; vector <int> output; int n=arr.size(); int one_index=1; for ...
ALGO
0.999496
4.265712
078229e5-ceb9-4fd0-9850-1d084d7745a0
kalpitborkar/LeetCode
partition-labels/Accepted/12-15-2021, 12_00_50 PM/Solution.cpp
// https://leetcode.com/problems/partition-labels class Solution { public: vector<int> partitionLabels(string s) { std::vector<int> result, position(26,0); for(int i = 0 ; i < s.size() ; i++) { position[s[i] - 'a'] = i; } int index = INT_MIN, la...
ALGO
0.99969
6.367082
d55be275-f8d5-47ef-a273-16e15771d6cf
ishandutta2007/codeforces
igorfardoc/normal/1547/C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifdef _FILE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t; cin >> t; while(t--) { int k, n, m; cin >> k >...
ALGO
0.999945
3.178855
e59d7a50-3414-4143-abcd-a113c8252ebb
SourabSingh100/Daa_practical
Week9/1.cpp
#include<bits/stdc++.h> using namespace std; const int N=150; const int INF=1e9; int dist[N][N]; int main() { for(int i=0;i<N;i++) { for(int j=0;j<N;j++) { if(i==j) dist[i][j]=0; else dist[i][j]=INF; } } int n,m; cin>>n>>m; ...
ALGO
0.99996
3.538944
172ccd9f-fb0f-4c10-8375-db08630ede0a
Tucci-Tiziano/Laboratorio2022
Estructuras/Estructuras_2.cpp
#include <iostream> #include <fstream> #include <vector> using namespace std; struct Punto{ int x; int y; }; vector<Punto> cargar_punto(){ Punto p1; bool seguir=true; string continuar; int x, y, cont=1; vector<Punto> vector; while(seguir==true){ cout<<"ingresar x del vector "<...
ALGO
0.871338
3.901517
17ec2637-621b-42b2-812f-e0247ff6e2f3
PatipatJum/cache
source/nWaySetAssociative.cpp
#include "../headers/nWaySetAssociative.h" #include "../headers/addressStructs.h" #include "../headers/utilityFunctions.h" #include "iostream" #include <cmath> #include <iostream> #include <iomanip> using namespace std; NWaySetAssociative::NWaySetAssociative(int cacheSize, int blockSize, int addressSize, int nWay) { ...
TOOL
0.977238
5.128278
0c221d3f-067f-4b17-b612-2c3f5f5f122f
abhishekrsingh/GFGProblems
Easy/Number that are not divisible/number-that-are-not-divisible.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: long long noOfNumbers(long long N) { //Important to note that only 2,3,5,7 are the key no here and rest are multiple of them. long long a=N/7-N/14-N/21-N/35+N/42-N/210+N/70+N/105;...
ALGO
0.999935
5.425688
05f7d782-50c2-4f2e-becf-7c2a217a7f86
uditamujumdar/GeeksForGeeks
Medium/Implementing Dijkstra Algorithm/implementing-dijkstra-algorithm.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find the shortest distance of all the vertices //from the source vertex S. vector <int> dijkstra(int V, vector<vector<int>> adj[], int S) { priority_queue<pair<int, int...
ALGO
0.99995
5.204876
e15d60f4-cca6-41d8-80ac-30830223b155
trannguyenducan/TH_CTDL
TH_Buoi2/Bubble_Sort_Bai2.cpp
#include <iostream> #include <vector> using namespace std; // Hàm Bubble Sort void BubbleSort(vector<int> &arr) { int n = arr.size(); for (int i = 0; i < n - 1; i++) { bool swapped = false; for (int j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { ...
ALGO
0.999989
5.362633
1784e3ff-88e7-42dc-bbf7-c5416f79fc2d
SameerJain/CSC-Courses-CSI-
CS126/Labs/Lab 13/Q3.cpp
#include <iostream> using namespace std; int main() { int x[5]{1, 2, 3, 4, 5}; int y[5]; for (int i = 0; i < 5; i++) { y[i] = x[i]; } for (int i = 0; i < 5; i++) { cout << y[i]; } return 0; }
ALGO
0.9982
3.274632
2b29d898-e727-40dd-a104-f98ee065739b
ishandutta2007/codeforces
alex_2oo8/normal/1305/C.cpp
#include <bits/stdc++.h> using namespace std; const int MX = 200000; int a[MX]; int main() { int n, m; ignore = scanf("%d %d", &n, &m); if (n > m) { printf("%d\n", 0); return 0; } for (int i = 0; i < n; i++) ignore = scanf("%d", a + i); int ans = 1; for (int i = 0; i < n; i++) for (int j = i + 1;...
ALGO
0.999984
4.015331
168f5b5d-5591-42c7-bc3e-1e9803e8f0d1
ishandutta2007/codeforces
matthew99/normal/1059/C.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i, a, b) for (int i = (a), i##_end_ = (b); i < i##_end_; ++i) #define debug(...) fprintf(stderr, __VA_ARGS__) #define mp make_pair #define x first #define y second #define pb push_back #define SZ(x) (int((x).size())) #define ALL(x) (x).begin(), (x).end() temp...
ALGO
0.999992
3.680324
4c6fc23d-2bb5-4d44-87dd-0d8072b98e90
Piyush13-ambure/DSA
Longest Path in a matrix.cpp
/*Given a matrix, find the maximum length path (starting from any cell) such that all cells along the path are in strictly increasing order. We can move in 4 directions from a given cell (i, j), i.e., we can move to (i+1, j) or (i, j+1) or (i-1, j) or (i, j-1). */ #include <iostream> #include <vector> #include <algor...
ALGO
0.999999
6.762567
9f6e8843-e951-4326-8cc4-b34e7048666a
behitek/acm-epu
SPOJ/GLJIVE.cpp
#include <bits/stdc++.h> #define _for(i,a,b) for (int i=(a),_b_=(b);i<_b_;i++) #define _fod(i,a,b) for (int i=(a),_b_=(b);i>_b_;i--) #define _it(i,v) for (typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i) #define _all(v) v.begin(), v.end() #define __(v) memset(v,0,sizeof(v)) using namespace std; typedef long ...
ALGO
0.999509
3.422131
cd302950-7e1d-4f63-a12a-2f57b5c34c0a
iceiony/4ConstraintsTheory
ComputationalModel/alglib/src/specialfunctions.cpp
#include "stdafx.h" #include "specialfunctions.h" // disable some irrelevant warnings #if (AE_COMPILER==AE_MSVC) #pragma warning(disable:4100) #pragma warning(disable:4127) #pragma warning(disable:4702) #pragma warning(disable:4996) #endif using namespace std; /////////////////////////////////////////////////////////...
ALGO
0.995222
6.782925
ff896f79-9648-490f-ba96-ac32588ab290
RameshtaVishwakarma/Data-Structures-and-Algorithms
Linked List/Linear_Search_in_Linked _List.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int data; Node* next; //Constructor Node(int d) { data = d; next = NULL; } }; int linearSearch(Node *head, int x) { int pos = 1; Node *curr = head; while(curr != NULL) { if(curr->data == x) ...
ALGO
0.999763
3.89693
3cc510d0-0702-41fa-954c-81f4093814cb
makio93/competitive-othersites
LeetCode/Problems/DCC/2022/Jul/W3/D15/main1-2.cpp
// 解説AC2 #include <bits/stdc++.h> using namespace std; class Solution { const array<int, 4> dy = { -1, 0, 1, 0 }, dx = { 0, 1, 0, -1 }; public: int maxAreaOfIsland(vector<vector<int>>& grid) { int m = grid.size(), n = grid.front().size(); int res = 0; vector<vector<bool>> visited(m, ve...
ALGO
0.999879
5.564072
aaa2634a-199f-4131-b1df-aef430185993
monman53/online_judge
GCJ/2019/1c/c.cpp
// header {{{ #include <bits/stdc++.h> using namespace std; // {U}{INT,LONG,LLONG}_{MAX,MIN} #define INF INT_MAX/3 #define LLINF LLONG_MAX/3 #define MOD (1000000007LL) #define MODA(a, b) a=((a)+(b))%MOD #define MODP(a, b) a=((a)*(b))%MOD #define inc(i, l, r) for(int i=(l);i<(r);i++) #define d...
ALGO
0.999921
3.800856
09e00557-59c3-41aa-a323-fd5c0c5ca814
sanketdisale871/DSA
3404-minimum-number-of-operations-to-satisfy-conditions/minimum-number-of-operations-to-satisfy-conditions.cpp
class Solution { private: vector<vector<int>>dp; int solve(int col,int keep,vector<vector<int>>&grid){ if(col>=grid[0].size()){ return 0; } if(dp[col][keep]!=-1){ return dp[col][keep]; } int cnt = 0; for(int r=0;r<grid.size();...
ALGO
0.999953
6.997642
8eedcf62-22b9-4be3-b1ae-78fed8995c57
raincross7/code-similarity
codes/train_code/problem095/problem095_425.cpp
#include <bits/stdc++.h> using namespace std; int main() { string S[3]; for (int i=0; i<3; i++) cin >> S[i]; for (int i=0; i<3; i++) printf("%c", S[i][0]-'a'+'A'); cout << endl; return 0; }
ALGO
0.999635
3.165197
2869dc48-e25e-46c0-9309-3bf824716333
ishandutta2007/codeforces
fop_zzz/normal/1252/C.cpp
#include<bits/stdc++.h> #define For(i,j,k) for(int i=j;i<=k;++i) #define Dow(i,j,k) for(int i=k;i>=j;--i) #define ll long long #define pb push_back #define fir first #define sec second #define pb push_back #define pa pair<int,int> #define mk make_pair using namespace std; inline ll read() { ll t=0,dp=1;char c...
ALGO
0.999976
4.208548
123c8e3e-2842-4a94-be34-65d2cbe2892a
JeffMcClintock/SE2JUCE
SE_DSP_CORE/modules/BPMClock3/BpmClock3.cpp
#include <algorithm> #include "math.h" #include "./BpmClock3.h" #include "../shared/xp_simd.h" SE_DECLARE_INIT_STATIC_FILE(BpmClock3) REGISTER_PLUGIN( BpmClock3, L"SE BPM Clock3" ); // #define DEBUG_BPMCLOCK BpmClock3::BpmClock3( IMpUnknown* host ) : MpBase( host ) ,pulseOutVal( 0.0f ) ,static_count( 1000000 ) ,accu...
TOOL
0.978394
6.220004
9a30302f-e85d-4dc9-b965-3540da547738
ksanu1998/static_analysis_codegen_llms
feedback_pipeline/generations/cpp/files/question-217-pass-1.cpp
#include <bits/stdc++.h> using namespace std ; #define ll long long int ll minSum ( int arr [ ] , int n , int x ) { // Find the minimum element in the array int minElement = arr[0]; for (int i = 1; i < n; i++) minElement = min(minElement, arr[i]); // Find the maximum element in the array int maxElement = arr...
ALGO
0.999965
5.714292
70e49086-61f6-4aeb-9ab7-75b3d508b451
parksandrecs/cvfd
opencv/samples/cpp/convexhull.cpp
#include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include <iostream> using namespace cv; using namespace std; static void help() { cout << "\nThis sample program demonstrates the use of the convexHull() function\n" << "Call:\n" << "./convexhull\n" << endl; } int main( int argc, cha...
ALGO
0.995658
5.987783
84420179-d51e-4260-aa29-7451c5c4949d
chonyy/leetcode-solutions
0692-top-k-frequent-words/0692-top-k-frequent-words.cpp
class Solution { public: vector<string> topKFrequent(vector<string>& words, int k) { unordered_map<string,int> frequency; for(string& word : words) { frequency[word] ++; } auto cmp = [](auto& p1, auto& p2) { if(p1.first == p2.first) { ...
ALGO
0.999993
6.492916
f1b74e64-e81c-4097-bcab-a59264504289
SakibulMowla/leetcode-solutions
solutions/0312. Burst Balloons.cpp
class Solution { private: int solve(int left, int right, vector<int>& nums, vector<vector<int>>& dp) { if (left > right) return 0; int ret = dp[left][right]; if (ret != -1) return ret; ret = 0; for (int k = left; k <= right; k++) { ...
ALGO
0.99999
5.839403
d56a9072-1f2e-4598-8cea-c384966aa8b4
ishandutta2007/codeforces
arthur.nascimento/normal/191/C.cpp
#include <iostream> #include <algorithm> #include <utility> #include <cstdio> #include <queue> #include <map> #define pii pair<int,int> #ifdef ONLINE_JUDGE #define debug #else #define debug printf #endif using namespace std; pii aresta[100100]; vector<int> L [100100]; int grau[100100]; int pai[100100][20]; int prof...
ALGO
0.99997
3.961693
bcd788fa-c4fd-4d9a-b452-9276c532a875
damiankawerski/PodstawyProgramowania
Do1Kolokwium/Lab_5_Funkcje/zadanie8.cpp
#include <iostream> using namespace std; bool triangle_possible(float a, float b, float c) { if(a + b > c && b + c > a && c + a > b) return true; else return false; } int main() { int a, b, c; cin >> a >> b >> c; cout << triangle_possible(a, b, c) << endl; return 0; }
ALGO
0.999145
4.733227
84b0310f-4904-4cfe-839d-8b4325a19975
kmjp/procon
codeforce/581-620/590/e3.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.99996
3.723528
00f70fd9-37f4-4bd4-8a42-f92a3ce3c9d0
gudkovst/Contests
dec 2023/3.cpp
#include <iostream> #include <vector> #include <set> #include <algorithm> #define canBuy(i) prices[i] < min_skip && cost + prices[i] <= m #define abs(a) a < 0? -a : a int n, m; std::vector<int> prices; std::set<unsigned long long> costs; void compute(int ind, unsigned long long cost, int min_skip){ if (ind == n - 1...
ALGO
0.999888
3.747641
fd82a831-aa87-4761-83fd-6ff8da425887
Dhaval-KP/mappingAssignment
firstunq.cpp
#include <iostream> #include <unordered_map> using namespace std; class Solution { public: int firstUniqChar(string s) { unordered_map<char, int> freq; for (char c : s) { freq[c]++; } for (int i = 0; i < s.length(); i++) { if (freq[s[i]] == 1) { ...
ALGO
0.999253
5.87938
4cbab2d1-108a-4c59-a990-361a6c6ac584
TacianasdOliveira/ExerciciosCPlusPlus
Pacote-Download/lista3/lista3_ex4_taciana_oliveira.cpp
#include <iostream> #include <cmath> #include <Windows.h>// usei para imprimir os acentos using namespace std; #define EQUACAO_Y ((0.4*(pow(x,2)))-(12*x)-3.5) int main(){ SetConsoleOutputCP(CP_UTF8); float x; cout<<" digite o valor do número x da equação y= 0.4x^2 – 12x – 3.5 "<<endl; cin>>x; cout<<"O val...
TOOL
0.991717
3.331214
0d700a65-485d-493e-b491-27c9d47c6c6d
foolxyy/sv-sampler
abc/src/sat/cadical/cadical_deduplicate.cpp
#include "global.h" #include "internal.hpp" ABC_NAMESPACE_IMPL_START namespace CaDiCaL { // Equivalent literal substitution in 'decompose' and shrinking in 'subsume' // or 'vivify' might produce duplicated binary clauses. They can not be // found in 'subsume' nor 'vivify' since we explicitly do not consider // bin...
ALGO
0.99909
7.122644
93807692-6322-4fd4-8238-fef13f822219
mkp0/CP
GeekForGeek/Add two numbers represented by linked lists.cpp
#include <bits/stdc++.h> class Solution { public: //Function to add two numbers represented by linked list. struct Node *addTwoLists(struct Node *first, struct Node *second) { string num1; string num2; while (first) { num1 += to_string(first->data); ...
ALGO
0.999815
5.559783
310eff51-f115-4ca4-87cf-9ba3a1c61fe6
kotabrog/mycode_competition
AtCoder_Problems/ABC/real_time/155/C_Poll/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N; map<string, int> strings; priority_queue<string, vector<string>, greater<string>> pq; string s; int max_n = 0; cin >> N; for (int i = 0; i < N; i++) { cin >> s; if (strings.count(s)) strings[s]++; else strings[s]...
ALGO
0.999849
4.423541
3b15e787-e6ff-460d-a8d1-7e384e931de5
sandeshkhadase/Leetcode-Solutions
Leetcode Solutions/solution/1100-1199/1187.Make Array Strictly Increasing/Solution.cpp
class Solution { public: int makeArrayIncreasing(vector<int>& arr1, vector<int>& arr2) { sort(arr2.begin(), arr2.end()); arr2.erase(unique(arr2.begin(), arr2.end()), arr2.end()); const int inf = 1 << 30; arr1.insert(arr1.begin(), -inf); arr1.push_back(inf); int n = ar...
ALGO
0.999982
5.11843
fd74e6ce-40a2-4050-881e-edf7327a0f33
GiangPiano/CSES
Sorting_and_Searching/Collecting_Numbers_II.cpp
#include<bits/stdc++.h> using namespace std; void solve() { int n, m; cin >> n >> m; vector<int> a(n + 1); vector<int> id(n + 1); id[0] = 0; id[n + 1] = n + 1; for (int i = 1; i <= n; i++) { cin >> a[i]; id[a[i]] = i; } int cnt = 1; for (int i = 0; i <= n; i++) { ...
ALGO
0.999986
4.874811
faff1ab9-5bc5-48c7-b985-27e3b44f1190
Danvil/Darwin
Candy/src/Candy/Cubes/Impl/DirectLighting.cpp
#include "DirectLighting.h" #include "LightingHelpers.hpp" #include "../Appearance.h" #include "../Cubes.h" #include "ExecuteInThreads.hpp" #include <cassert> namespace Hexa { namespace Lighting { float ComputeAmbientLight(Cubes* cubes, const CoordI& cw, int sideIndex) { return 0.35f; // FIXME estimate ambient i...
ALGO
0.995709
6.017951
cb88d67b-9fc2-496f-9939-6bdcfc6bd7af
CSI-SRM-NCR-Chapter/100-Days-of-Code
Vershit-Chaudhary/Day30-Q2.cpp
class Solution { public: vector<int> rearrangeArray(vector<int>& nums) { int i; vector<int> neg_arr; vector<int> pos_arr; for(i=0 ; i<nums.size() ; i++) { if(nums[i]<0) { neg_arr.push_back(nums[i]); } else ...
ALGO
0.99997
5.523775
ca9532f0-5b3c-4513-9a54-a91dcde452dd
ogdf/ogdf
src/ogdf/graphalg/ShortestPathWithBFM.cpp
// Purpose: // implementation of shortest path computation // via Bellman-Ford-Moore // // implementation follows Cormen/Leiserson/Rivest #include <ogdf/basic/Graph.h> #include <ogdf/basic/GraphList.h> #include <ogdf/graphalg/ShortestPathWithBFM.h> #include <limits> namespace ogdf { bool ShortestPathWithBFM::c...
ALGO
0.999907
5.304017
8ba13a79-4a5d-4627-aba3-469f2b61feee
longhai-mine/competitive-programming
bailam/bailam1/dalat.cpp
#include <bits/stdc++.h> using namespace std; int n, ans; main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin >> n; int i = 1; while(true) { if(i * (i + 1) * (2 * i + 1) / 6 <= n) ans = i; else break; ++i; } cout << ans; }
ALGO
0.999923
4.676712
a37900b6-64aa-4dc2-bbc8-a5f5b6f70890
rbtre/rbtre.github.io
assets/code/P5728.cpp
#include <iostream> using namespace std; int a[1010][5], sum[1010]; int main() { int cnt = 0, n; cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i][1] >> a[i][2] >> a[i][3]; sum[i] = a[i][1] + a[i][2] + a[i][3]; } for (int i = 1; i <= n; i++) for (int j = i + 1; j <= n; j++) if (abs(a[i...
ALGO
0.999749
3.951992
a692e27a-9aea-4611-a9a2-af3bebfcf477
Muhammadh1994/C-Training
Basics/sumOfN/sumOfN/sumOfN/main.cpp
// // sumofN.cpp // multiplicationTable // // Created by Abdullah Juhaif on 6/17/23. // #include <iostream> using namespace std; int main(int argc, const char * argv[]) { // insert code here... int n; int sum=0; std::cout << "Enter the number for which the sum neeeds to be found"; std::cin >> n...
ALGO
0.999826
4.315781
0c0eeabf-7275-4ce8-b55a-c3f57db143ac
caxi9064/CS-coursework
CSCI1300/practicum/practicum1/question1.cpp
#include <iostream> #include <iomanip> #include <cmath> #include <string> using namespace std; int main() { double distance, averageSpeed, gasPrice, tripCost; cout << "Enter the distance travelled: " << endl; cin >> distance ; cout << "Enter the average speed: " << endl; cin >> averageSpeed; co...
TOOL
0.858843
4.538875
0ed45682-1148-4f0e-a381-ae825541d249
liaohuangg/RfCgraTrans
llvm/llvm/lib/CodeGen/PHIElimination.cpp
#include "PHIEliminationUtils.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/CodeGen/LiveInterval.h" #include "llvm/CodeGen/LiveIntervals.h" #include "llvm/CodeGen/LiveVariables.h" #include "llvm/CodeGen/MachineBasic...
ALGO
0.999296
7.806349
c7cc5075-d191-4271-8d69-2055519f6c09
KIT-CSD-WS14-15/LectureCode
Debugging/Example06.cpp
#include <iostream> unsigned long arth_sum(unsigned long value) { unsigned long result = 0; for (unsigned int i=0; i<=value; ++i) { result+=i; } return result; } unsigned long gaussian_sum(unsigned long value) { return value * (value+1) /2; } unsigned long alt_gaussian_sum(unsig...
ALGO
0.998603
4.118851
20114f53-27e7-403e-971d-82b6a28fed59
NYU-ZYJCS/Leetcode
0719-find-k-th-smallest-pair-distance/0719-find-k-th-smallest-pair-distance.cpp
class Solution { public: int smallestDistancePair(vector<int>& nums, int k) { ranges::sort(nums); auto check = [&] (int target) -> bool { int n = nums.size(), ans = 0; for (int i = 0, j = 1; i < n; i++) { while (j < n && nums[j] - nums[i] <= target) j...
ALGO
0.999988
5.97067
4433b1e0-afa1-4dec-a693-b085a86de14e
samuel21119/Cpp
UVa/Code/00787 - Maximum Sub-sequence Product.cpp
/************************************************************************* > File Name: 00787 - Maximum Sub-sequence Product.cpp > Author: Samuel > Mail: <EMAIL> > Created Time: Fri Feb 1 11:51:06 2019 *************************************************************************/ #include <bits/stdc++.h> using na...
ALGO
0.999906
3.580226
35bc1a8d-0aff-4ed5-9324-1277b81f7fd9
aarindey/Leetcode-Solution-By-aarindey
2262-total-appeal-of-a-string/2262-total-appeal-of-a-string.cpp
#define ll long long class Solution { public: long long appealSum(string s) { ll ans=0; int n=s.length(); vector<ll> dp(n+1,0); map<char,ll> mp; for(ll i=0;i<n;i++) { char ch=s[i]; if(mp.find(ch)!=mp.end()) dp[i+1]=dp[i]+i-mp[ch]; ...
ALGO
0.999976
5.396003
b16a60ac-942e-44dd-a1ef-c24903c5e0ad
Shubhamm1211/GFG-
Difficulty: Easy/Non Repeating Character/non-repeating-character.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to find the first non-repeating character in a string. char nonRepeatingChar(string &s) { // Your code here int n = s.size(); unordered_map<char,int> mp; ...
ALGO
0.999621
5.331108
77bb11c2-cd2d-42c5-b194-b83c2e6541a0
phuhuynhh/pkam
VINS-Mono/pose_graph/src/pose_graph.cpp
#include "pose_graph.h" PoseGraph::PoseGraph() { posegraph_visualization = new CameraPoseVisualization(1.0, 0.0, 1.0, 1.0); posegraph_visualization->setScale(0.1); posegraph_visualization->setLineWidth(0.01); t_optimization = std::thread(&PoseGraph::optimize4DoF, this); earliest_loop_index = -1; t...
ALGO
0.913186
3.895264
1f59e875-c4eb-4f50-839a-968cb6c79858
libpag/pathkit
src/pathops/SkDCubicToQuads.cpp
/* http://stackoverflow.com/questions/2009160/how-do-i-convert-the-2-control-points-of-a-cubic-curve-to-the-single-control-poi */ /* Let's call the control points of the cubic Q0..Q3 and the control points of the quadratic P0..P2. Then for degree elevation, the equations are: Q0 = P0 Q1 = 1/3 P0 + 2/3 P1 Q2 = 2/3 P1 ...
ALGO
0.954543
3.861894
c1754544-1efe-4492-b30d-24faee1083f3
Kenvyra/android_frameworks_native
cmds/servicemanager/ServiceManager.cpp
#include "ServiceManager.h" #include <android-base/logging.h> #include <android-base/properties.h> #include <binder/BpBinder.h> #include <binder/IPCThreadState.h> #include <binder/ProcessState.h> #include <binder/Stability.h> #include <cutils/android_filesystem_config.h> #include <cutils/multiuser.h> #include <thread>...
TOOL
0.92023
7.349759
cf2c9b4c-7083-446f-ae29-106e774045b0
johnnysuns/leetcode_relax
solutions/0017_Letter_Combinations_of_a_Phone_Number/0017_Letter_Combinations_of_a_Phone_Number.cpp
// Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. // // A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. // // // // Example: // // // Input: "23" // Output: ["ad", "...
ALGO
0.999762
6.911043
e2721709-5d84-4049-8a43-1f25a57683af
TheCaptainCook/InterviewSolutions
CipherSchools/week1-DSA-CipherSchools/Lecture 4 - MatrixRotationProblem.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: void rotate(vector<vector<int>>& matrix) { int n = matrix.size(); for (int i = 0; i < n; i++) { for (int j = 0; j <= i; j++) { swap(matrix[i][j], matrix[j][i]); ...
ALGO
0.99998
6.24304
e2fa2b33-3071-4336-b2d8-e063175fee4a
debsaikia03/LeetCode-Solved-Problems
0957-minimum-add-to-make-parentheses-valid/0957-minimum-add-to-make-parentheses-valid.cpp
class Solution { public: int minAddToMakeValid(string s) { /*stack<int> stk; for(char ch : s){ if(ch == '('){ stk.push(ch); } else { if(!stk.empty() && stk.top() == '('){ stk.pop(); } else { ...
ALGO
0.999574
6.186314
b720ba4b-fb9b-47c6-9c32-18c5fe56e407
serien224/EASY
206.反转链表.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* reverseLis...
ALGO
0.99987
5.859373
ed1c2efe-f3e9-47d5-8fbd-75480b6fa0d9
ishandutta2007/codeforces
zscoder/normal/1263/B.cpp
#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 fi first #define se second #define mp make_pair #define pb push_back #define fbo find_by_order #define ook order_of_key typedef long long ll; typedef pair...
ALGO
0.999955
4.962728
f3a796c3-aa7d-46ba-ba9b-6329f04fe548
khs960616/Algorithm
boj2467.cpp
#include <bits/stdc++.h> using namespace std; /* https://www.acmicpc.net/problem/2467 용액 투포인터 --- */ int answer[2]; int main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector<int> v(n); for(int i=0; i<n; ++i) cin >> v[i]; sort(v.begin(), v.end()); int left = 0, righ...
ALGO
0.999992
4.357319
8efea6d4-c619-436b-8426-89bfc989ac32
kimsubin-26/c_language_learn
2018/Project10/Project10/소스.cpp
#include<iostream> using namespace std; void cal_bmi(double tall, double weight) { int bmi = 0; bmi = weight / (tall / 100 * tall / 100); } int check_bmi(double bmi, int age) { if (age < 20) cout << " ϴ."; else if (19 < age < 29) { if (bmi < 18) cout << " üԴϴ" << endl; else if (18 < bmi < 23) co...
ALGO
0.991936
3.589248
243eff7e-56eb-426a-b870-e5e39066906e
maloveforme/Cpp
Luxury_Cpp/example/ex6_2.cpp
#include <iostream> using namespace std; int sum(int a) { int result = 0; for (int i = 1; i <= a; i++) { result += i; } return result; } int sum(int a, int b) { int result = 0; for (int i = a; i <= b; i++) { result += i; } return result; } int main() { cout << "3에서 5까지의 합: " << sum(3, 5) << endl; ...
ALGO
0.990927
4.670979
bffd7d7a-fdd9-4303-b5cb-f96abeee01b0
ayushsharma-crypto/CSES
sort&search/subarraysum2.cpp
#include <iostream> #include <map> using namespace std; #define ll long long int int main() { ll n,x,arr[200005],current_sum=0,count=0; cin >> n >>x; for(ll i=0;i<n;i++) cin >> arr[i]; map<ll,ll> hash; hash.insert({0,1}); for(int i=0;i<n;i++) { current_sum+=arr[i]; auto itr ...
ALGO
0.999928
4.170981
79a0d021-44f9-4cd3-9aa2-1a36e5334532
its-satyam/Leetcode-Solutions
112-path-sum/112-path-sum.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.999921
6.183572
7dc8e949-ebd2-4221-b79a-4be67c27517f
oldlick/CompetitiveProgramming
atcoder/3 ABC/135/D2.cpp
/*ver 5*/ #include <cstdio> #include <cstdlib> #include <cmath> #include <iostream> #include <iomanip> #include <vector> #include <string> #include <utility> #include <algorithm> #include <queue> #include <tuple> #include <map> #include <list> #include <set> using namespace std; void init() {cin.tie(0);ios::sync_with_s...
ALGO
0.999958
3.525077
d00fb5dc-a19d-4d42-950a-75827ba0aff6
Ismail-Upal/CP-Trash
Solved Problem/B_Nene_and_the_Card_Game.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define dl double #define endl "\n" #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int main() { optimize(); ll t; cin>>t; while(t--){ ll n; cin>>n; vector<ll>cnt(n+12); for(ll i=0;i<n;i...
ALGO
0.99938
4.347774
cd608ba8-d711-404f-8ba4-d799cd2d6e66
Aashu1303/leetcode
3399-find-the-integer-added-to-array-ii/find-the-integer-added-to-array-ii.cpp
class Solution { bool check(vector<int> &a , vector<int>&b , int x){ int i = 0 , j = 0 , f = 0; while(i < a.size() && j < b.size()){ if(a[i]+x != b[j]) f++; else j++; i++; } if(f > 2) return false; return true; } public: int minimu...
ALGO
0.999971
5.44184
6948cdeb-d8e0-4650-8bd7-87a69b5b18e3
SpinnerX/portfolios
spamfilter/spamfilter.orig/NeuralSrc/NNTrainer.cpp
//NeuralNet Trainer by Bob Boyer & William Kerney //Nov 8, 2000 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <iostream> #include <iomanip> #include <string.h> #include <ctype.h> #include <math.h> #include "CmdLineArgs.hpp" #include "CMGroup.hpp" #include "NeuralNet.hpp" #include "NNTrainer.hpp" ...
DATA
0.943102
3.941938
632e595e-550d-484d-8bd4-ddf436f3188d
amandaprawita/Fundamental_Algoritma
Looping/Looping/main.cpp
// // main.cpp // Looping // // Created by Amanda Prawita Ningrum on 19/01/24. // #include <iostream> using namespace std; int main() { // insert code here... // Repetition / Looping // for, while, do while // break, continue // for(int i = 1; i < 10; i+=2){ // if(i==5) // ...
ALGO
0.999423
4.133768
f968357b-0f25-4a50-ab10-a788ac2904cf
NCTU-Math-Software/final_project-YourName0729
tester_repetend_one.cpp
#include <bits/stdc++.h> #define For(i, n) for (int i = 0; i < n; ++i) #define For1(i, n) for(int i = 1; i <= n; i++) #define Forcase int __t = 0; cin >> __t; while (__t--) #define pb push_back #define ll long long #define ull unsigned long long #define ar array using namespace std; const int MOD = 1e9 + 7; const...
TEST
0.972333
3.599157
73dce8b5-ece7-4771-84ee-0cd0c799d546
safwankdb/Leetcoding-Challenges-Cpp
June/Max Consecutive Ones III.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: // Is there a contiguous subarray of size m with <= k zeros? bool check(vector<int> &lSum, int k, int m) { int n = lSum.size(), i, zeros; for (i = 0; i < n - m; i++) { zeros = m - (lSum[i + m] - lSum[i]); ...
ALGO
0.999952
5.542836
cffb5483-8abc-4b75-9f87-8d76aadea5d5
akshatrksingh/Data-Structures-and-Algorithms-Basic-Implementations
Array/QuickSort(RandomElementPivot).cpp
#include <bits/stdc++.h> using namespace std; void quicksort(int[], int, int); int partition_r(int[], int, int); int partition(int[], int, int); int main() { int n; cout<<"Enter no. of elements in the array: "; cin>>n; int arr[n]; cout<<"Enter the array elements: "; for(int i = 0; i < n; i++) { cin>...
ALGO
0.999735
4.854937
68c671e6-bbe5-4499-b344-aa5760ccb58b
openPupil/PyPupilEXT
3rdparty/spii/thirdparty/Eigen/doc/examples/class_Block.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived> topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) { return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); } template<typename Derived> const Eigen::Block<const Derive...
TOOL
0.951703
5.865374
030f0126-0e79-48ee-b392-8a61afe481c3
SonarSystems/Cocos2d-x-Multi-Device-2.0
Full Scene Examples/MultiResJS/frameworks/cocos2d-x/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeJsImpl.cpp
// // RuntimeJsImpl.cpp // Simulator // // #include "RuntimeJsImpl.h" #include "cocos2d.h" // 2dx engine #if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) #include "runtime/ConfigParser.h" // config #include "runtime/Runtime.h" #include "runtime/FileServer.h" // js #include "js_module_register....
TOOL
0.905336
5.836727
3b1fd188-e663-4205-9584-54eb3fbe4251
watertree34/ImageProcessing
opencv-master/opencv-master/samples/cpp/tutorial_code/ImgProc/out_of_focus_deblur_filter/out_of_focus_deblur_filter.cpp
/** * @brief You will learn how to recover an out-of-focus image by Wiener filter * @author Karpushin Vladislav, <EMAIL>, https://github.com/VladKarpushin */ #include <iostream> #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" using namespace cv; using namespace std; void help(); void calcPSF(Mat& outp...
ALGO
0.999479
4.96471
4fce7bd1-692a-4c23-be78-cd87c26d1f99
kmjp/procon
leetcode/201-250/230/1774.cpp
typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) me...
ALGO
0.999823
4.813097
ad4ea6b5-3128-4313-8f29-8415b28c60d0
ishandutta2007/codeforces
user202729_/normal/1334/G.cpp
// just randomize it. // (partially copied from some submission, but I should be able to figure out this solution myself) #ifndef LOCAL #define NDEBUG 1 #endif #include<bits/stdc++.h> #define MODULAR_LESS_EFFICIENT_BUT_EASIER_TO_CODE 0 int const MOD=998244353; struct modular { int val; explicit constexpr operator i...
ALGO
0.999971
5.704043
fb54953b-1277-4357-9550-6da8b4246b46
aCortes13/AlgorithmDesign
PostfixMult/main.cpp
#include<iostream> #include<stack> #include<string> #include "PostFix.cpp" int main(){ PostFix myPostFix; std::string expression { "50 1 2 + 4 * + 3 -"}; int answer = myPostFix.evaluatePostFix(expression); std::cout <<answer; }
ALGO
0.99901
5.35398
eca3e735-6fef-4d0b-a970-5268677ba426
AnkitaK65/DataStructuresUsingC
C5_LAB/doubly_linked_list.cpp
/* Question 4: Implement Doubly Linked List using templates. Include functions for insertion, deletion and search of a number, and reverse the list. */ #include <iostream> using namespace std; // Node definition for Doubly Linked List template <typename T> struct Node { T data; Node* next; N...
ALGO
0.999915
6.269227
6f39e20e-cfc6-4a76-93e2-62a95fc12509
xxmen/ACMTraining
2014-08-27~29/poj1379(模拟退火).cpp
#include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <algorithm> #include <ctime> using namespace std; const double eps = 1e-3; const double pi = acos(-1.0); struct point{ double x, y; }; int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int n, X, Y; point a[1010], p[20]; double d[20];...
ALGO
0.999944
3.995872
3d91703b-5a61-497f-b5f7-3638f925c150
wolinam/BeakJoon
14681_if문_수학사분면파악.cpp
#include <stdio.h> #include <iostream> using namespace std; int main(void) { int a, b,c; cin >> a >> b; if (a > 0 && b > 0) c = 1; else if (a > 0 && b < 0) c = 4; else if (a < 0 && b>0) c = 2; else c = 3; cout << c; }
ALGO
0.99998
3.473355