uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
732487ad-2c4b-4c81-bb20-a8d227bcaecc
handshow888/NEUQ_RICVC_src
navigation2/nav2_smac_planner/src/node_hybrid.cpp
#include <math.h> #include <chrono> #include <vector> #include <memory> #include <algorithm> #include <queue> #include <limits> #include <utility> #include "ompl/base/ScopedState.h" #include "ompl/base/spaces/DubinsStateSpace.h" #include "ompl/base/spaces/ReedsSheppStateSpace.h" #include "nav2_smac_planner/node_hybri...
ALGO
0.999658
4.58745
621ec506-6f12-4e2f-b5d2-c2b0c823f7fb
sslab-gatech/unisan
llvm-3.7.1/llvm/projects/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp
// <list> // template <class BinaryPred> void unique(BinaryPred pred); #include <list> #include <cassert> #include "min_allocator.h" bool g(int x, int y) { return x == y; } int main() { { int a1[] = {2, 1, 1, 4, 4, 4, 4, 3, 3}; int a2[] = {2, 1, 4, 3}; std::list<int> c(a1, a1+sizeof(a1)/sizeof(...
TEST
0.87966
5.455482
fe8ea0ff-bf85-4795-9c35-cfdad4c72c5d
nowek7/competitive-programming-solutions
LeetCode/easy/404_sum_of_left_leaves.cpp
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), left(left), right(right) { ...
ALGO
0.999912
6.662712
b371823e-ac57-4edf-a3b4-011a9ca027b6
Rajesh-Gundu/GeeksForGeeks-DSA
Difficulty: Hard/Histogram Max Rectangular Area/histogram-max-rectangular-area.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int getMaxArea(vector<int> &arr) { int n = arr.size(); vector<int> right(n,n); stack<int> st; for(int i=n-1;i>=0;i--) { whi...
ALGO
0.998902
6.228631
fc595b84-407a-49d9-96b9-031d9c2430a2
xavierbeast68/Leetcode-DCC
2. February (2023)/day_20-search-insert-position.cpp
//* https://leetcode.com/problems/search-insert-position/description/ //* https://www.youtube.com/watch?v=K-RYzDZkzCI&ab_channel=NeetCode class Solution { public: int searchInsert(vector<int>& nums, int target) { int ind=lower_bound(nums.begin(),nums.end(),target)-nums.begin(); return ind; } };
ALGO
0.999936
6.408872
34e0cbe0-8301-4ff6-b279-2ff14635af43
Mitali-Potdar/LeetCode
0218-the-skyline-problem/0218-the-skyline-problem.cpp
class Solution { public: //https://leetcode.com/problems/the-skyline-problem/solutions/2094329/c-easiest-explanation-ever-guaranteed-beginner-friendly-detailed-o-nlogn/?envType=list&envId=pxi2crhg vector<vector<int>> getSkyline(vector<vector<int>>& buildings) { vector<vector<int>> ans; multiset<int>...
ALGO
0.999985
6.554986
9f40c0ef-0b7e-4758-b57a-8f22dcfe9221
ylbi/leetcode
C++/273.IntegertoEnglishWords-H/IntegertoEnglishWords.cpp
//corner case: 0->Zero //Important: space (xxx?" ":"") class Solution { public: string lessThan20[20] = {"", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nin...
ALGO
0.996908
6.201867
79fbae64-10b7-4e3c-b047-47ad89c8f485
sarvex/leetcode-swift
solution/0900-0999/0978.Longest Turbulent Subarray/Solution.cpp
class Solution { public: int maxTurbulenceSize(vector<int>& arr) { int ans = 1, f = 1, g = 1; for (int i = 1; i < arr.size(); ++i) { int ff = arr[i - 1] < arr[i] ? g + 1 : 1; int gg = arr[i - 1] > arr[i] ? f + 1 : 1; f = ff; g = gg; ans = m...
ALGO
0.999945
5.973201
12857a56-76c4-43d7-899b-73e68c3da5bb
giuliano-97/fracture_sim
libigl/python/py_igl/py_covariance_scatter_matrix.cpp
m.def("covariance_scatter_matrix", [] ( const Eigen::MatrixXd& V, const Eigen::MatrixXi& F, const igl::ARAPEnergyType energy, Eigen::SparseMatrix<double>& CSM ) { return igl::covariance_scatter_matrix(V,F,energy,CSM); }, __doc_igl_covariance_scatter_matrix, py::arg("V"), py::arg("F"), py::arg("energy"), py::a...
ALGO
0.989523
3.778343
dd26645b-328d-4d52-873e-6611f050e072
sarvex/leetcode-fish
solution/0700-0799/0724.Find Pivot Index/Solution.cpp
class Solution { public: int pivotIndex(vector<int>& nums) { int left = 0, right = accumulate(nums.begin(), nums.end(), 0); for (int i = 0; i < nums.size(); ++i) { right -= nums[i]; if (left == right) { return i; } left += nums[i]; ...
ALGO
0.999958
6.323939
6c998f29-9246-41ff-a40b-e151c848d26e
Orbital-Software-Project/Orbital
Editor/Tracking/PatternTracker.cpp
//cv::VideoCapture("C:/Users/rphil/Desktop/Orbital/Content/bata-park/video.mp4"); #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <iostream> #include <vector> #include <string> struct Track { std::vector<cv::Rect> PointByFrame; }; void print(std::string te...
ALGO
0.989957
4.42966
c1a6f658-8f0c-4519-9672-47f8240b868d
Narayan-A-R/LeetCode
200NoOfIslands.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: void dfs(vector<vector<char>>& grid,int row, int column){ if(row>=grid.size() || row<0) return; if(column >= grid[0].size() || column <0) return; if(grid[row][column] != '1') return; grid[row][column]='2'; ...
ALGO
0.99994
6.012325
c57e2846-0394-42dc-a4f7-3d83d76f04fd
raincross7/code-similarity
codes/train_code/problem500/problem500_205.cpp
#include <bits/stdc++.h> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; using ll = long long; using P = pair<ll,ll>; using Graph= vector<vector<ll>>; struct edge{ll to ; ll cost ;} ; using graph =vector<vector<edge>> ; #define rep(i,n) for (ll i=0; i < (n); ++i) #define rep2(i,n,m) for(ll...
ALGO
0.999385
3.840339
48f6a701-9adf-43d9-aa09-dbc90f12fbaa
Rishabh-kr37/Daily-DSA-RISHABH
Arrays/rotate-right.cpp
// For Rotating Elements to right // tc=o(n) // sc=(1) not using any extra space or temp variable #include <iostream> using namespace std; void reverse(int arr[], int start, int end) { while (start <= end) { int temp = arr[start]; arr[start] = arr[end]; ...
ALGO
0.999987
5.552433
c84cfd13-0696-4e70-8200-b93978ec2043
gomumu/Algorithm
sort/sort.cpp
#include <iostream> #include <vector> #include "sort.h" namespace my { namespace sort { void Sort::selectionSort(std::vector<int>& arr, int last) { for (int i = last; i >= 0; --i) { int max_idx = largest(arr, i); int temp = arr.at(i); arr.at(i) = arr.at(max_idx); arr.at(max_idx) = temp; } } void Sort::bub...
ALGO
0.999571
4.025818
bf9a1f29-2164-4920-bedd-459ebeb2156e
RickyL-2000/cpp-learning
Algorithm/PTA/advanced_level/1108_findingAverage.cpp
#include <iostream> #include <vector> #include <cstdio> using namespace std; int main() { int n, cnt = 0; cin >> n; vector<double> nums; vector<string> errors; string temp; double num; for (int i = 0; i < n; i++) { cin >> temp; if (sscanf(temp.c_str(), "%lf", &num) == 1 && ...
ALGO
0.99645
4.16387
8ba14d22-6c71-44a8-85f2-5c08ed974844
WenShihKen/uva
UVA/357.cpp
#include<stdio.h> #include<iostream> using namespace std; long long int dp[30005] = { 1 }; int main() { int i, j; int temp[5] = { 1,5,10,25,50 }; for (i = 0; i < 5; i++) { for (j = temp[i]; j <= 30000; j++) { dp[j] += dp[j - temp[i]]; } } int in1; while (cin >> in1) { if (dp[in1] == 1) { printf("Ther...
ALGO
0.999343
4.05184
eaacea20-60c0-4b9f-8cee-e69755c06f3c
TitikshaBansal/LeetCode
Easy/SubTreeOfAnotherTree.cpp
class Solution { private: void preOrder(TreeNode* root, vector<int>& v){ if (root == nullptr) { v.push_back(INT_MIN); return; } v.push_back(root->val); preOrder(root->left, v); preOrder(root->right, v); } public: bool isSubtree(TreeNode* root, ...
ALGO
0.999977
6.306742
174b845d-cb03-412d-a150-8e87652fd982
sanyagoyal2000/leetcode
solutions/743. Network Delay Time.cpp
#define pii pair<int, int> class Solution { public: int networkDelayTime(vector<vector<int>>& times, int n, int k) { vector<vector<pair<int, int>>> adj(n+1); // (node, time) for(int i = 0; i<times.size(); i++){ adj[times[i][0]].push_back({times[i][1], times[i][2]}); } vec...
ALGO
0.999972
5.75745
884c33b3-304e-4a57-b3e7-de50aaa1718b
pkoi5088/ProblemSolve
baekjoon/cpp/2138.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <queue> #include <set> #include <map> #include <stack> #include <string> #define INF 100001 #define endl '\n' using namespace std; string goal; int N; void getCnt(string& s, int& cnt) { for (int i = 0; i < N - 1; ++i) { if (s[i]...
ALGO
0.999873
3.5849
024e0abd-084a-454d-b422-a7f07540eadd
seclab-ucr/IncreLux
llvm/llvm-9.0.0.src/lib/Transforms/IPO/IPConstantPropagation.cpp
#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/CallSite.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Module.h" #include "llvm/Pass.h" #include "llvm/Transforms/IPO.h" using namespace llvm; #define DEB...
TOOL
0.965561
7.832839
accc64ce-1c62-46c3-b756-a87195b598f3
Sneha1203/75DaysCodingChallenge
DAY-20/2.Middle_Of_Linked_List.cpp
ListNode* middleNode(ListNode* head) { if(head == NULL) { return NULL; } ListNode *fastptr = head; ListNode *slowptr = head; while(fastptr && fastptr -> next) { slowptr = slowptr -> next; fastptr = fastptr -> next -> next; ...
ALGO
0.999824
5.353802
adcde1c3-aa90-4ef2-9177-0a6be119b313
shamiul94/Problem-Solving-Online-Judges
LeetCode/1151. Minimum Swaps to Group All 1's Together.cpp
class Solution { public: int countOnes(vector<int> &data) { int countOne = 0; for (int i = 0; i < data.size(); i++) { if (data[i] == 1) { countOne++; } } return countOne; } int minSwaps(vector<int> &data) ...
ALGO
0.999987
6.017796
00c5b667-343f-4643-8eb0-fd521b842d96
Longman14/bmi_calculator
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
c67b3536-0465-44e6-af13-ec3ae06cfd11
billycheung/HackerRank
30-days-of-code/day10-binary-numbers.cpp
#include <iostream> using namespace std; /* Given a base-10 integer, n, convert it to binary (base-2). Then find and print the base-10 integer denoting the maximum number of consecutive 1's in n's binary representation. Sample Input 1 5 Sample OUtput 1 1 Sample Input 2 13 Sample Output 2 2 Sample Case 1: The binary...
ALGO
0.999946
4.978256
d741bd80-83c3-4056-b73f-08f7173ed186
OpenHUTB/engine_bak
Engine/Source/ThirdParty/PhysX3/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include "foundation/PxMemory.h" #include "EdgeList.h" #include "GuTriangle32.h" #include "GuConvexMesh.h" #include "Px...
ALGO
0.968947
7.181409
4959f20f-7214-4f7b-929f-2f0db745f50e
maityamit/Cpp-DSA-Notes-and-Programs
006 - Stack/Minimum Brackets Redundance.cpp
#include<stack> int countBracketReversals(string s) { // Write your code here if(s.length()%2!=0){ return -1; } stack<char> st; for(int i=0;i<s.length();i++){ if(s[i]=='}'&&st.size()!=0&&st.top()=='{'){ st.pop(); }else{ st.push(s[i]); } } char c1,c2; int count=0; while(st.size()!=0){ c1=s...
ALGO
0.999033
5.299877
3e6f8ec6-2845-4081-b877-25be5fe8860d
SakshamSahgal/Competitive-Programming
Codeforces + Codechef/C. Alphabetic Removals.cpp
#include<iostream> #include<string> #include<vector> #include<set> #include<map> #include<algorithm> #include<cmath> #include<climits> #define usi unsigned short int #define ui unsigned int #define ulli unsigned long long int #define lli long long int using namespace std; void pair_printer(vector<pair<char,int>> v) { ...
ALGO
0.999987
3.601245
9dfae545-2a1d-4f42-8134-5d001830c8a3
EoinDavey/Competitive
Templates/A_Star.cpp
struct path { int u, wght; bool operator<(const path& rhs) const { return wght > rhs.wght; } }; int h(int x) { // heuristic function // Don't overestimate, should be 0 at sink return 0; // 0 for djikstras } for(int i =0; i < N; ++i) dist[i] = INF; dis[S] = 0; priority_queue<path> pq; pq....
ALGO
0.999954
4.27155
5ee35832-d466-4c22-8221-a6b1a6704eec
Lemon-XQ/PAT-Advanced
PAT-Advanced-1146.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <queue> using namespace std; const int MAXV=1001; int inDegree[MAXV]={0},outDegree[MAXV]={0}; vector<int> Adj[MAXV]; int N,M,K; vector<int> path; int cnt[MAXV]={0}; int index=0; void topoOrder(){ queue<int> q; for(int i=1;i<=N;i++){...
ALGO
0.999973
4.002808
96127a2e-f003-46b3-88b7-20ea7b39eda0
connieya/cpp_algorithm
jungle/week4/2253.cpp
#include "bits/stdc++.h" #define INF 21470000 using namespace std; bool visited[10001]; int dp[10001][250]; int n,m; int dfs(int num ,int cnt){ if (num == n){ return 0; } int &res = dp[num][cnt]; if (res != -1) return res; res = INF; for (int i =-1; i <= 1; ++i) { int jump = ...
ALGO
0.999989
3.837671
3696a186-ae06-4290-ac72-54d7b56eee98
filipeherculano/UVA_trash
10018.cpp
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0; i < n; i++) typedef unsigned long long llu; typedef long long ll; typedef long double Lf; using namespace std; int main(){ int n; scanf("%d%*c", &n); while(n--){ string line; cin >> line; ll count = 0; bool ok = false; while(!ok){ int i = 0, j...
ALGO
0.999786
3.468711
f90717ff-d5d2-4f57-bd77-70b60dae381f
clixnerd/deps
boost_1_59_0/libs/graph_parallel/example/dijkstra_shortest_paths.cpp
// Authors: Douglas Gregor // Andrew Lumsdaine // Example usage of dijkstra_shortest_paths algorithm // Enable PBGL interfaces to BGL algorithms #include <boost/graph/use_mpi.hpp> // Communication via MPI #include <boost/graph/distributed/mpi_process_group.hpp> // Dijkstra's single-source shortest paths ...
ALGO
0.999777
5.291888
33fcd38d-1df2-45ed-9681-1f9d8c6601bd
JoeyD54/realtime-software-dev-I
jdomino_HW_RTSD1_PA2/keenan2022spring_gam475/student/jdomino/PA2/PA2/Trig.cpp
#include <math.h> // <--- ONLY location for <math.h> allowed #include "Trig.h" namespace Azul { // Do your magic here float Trig::sqrtf(float val) { float result = 0; if (val == 0 || val == 1) { return val; } else { float temp = 0; float number = val; float sqrt = number / 2; whi...
ALGO
0.931952
5.020535
9a2b87f3-f5c9-40e5-a047-21f09be501e3
LeeYunSung/Algorithm
BOJ/1561_놀이공원.cpp
#include <iostream> #include <vector> using namespace std; typedef long long ll; const ll MAX_TIME = 60000000001; bool check(ll mid, ll childrenNum, vector<int> rideTimes); int main() { ll childrenNum, rideNum; vector<int> rideTimes; // input cin >> childrenNum >> rideNum; int time; for (int i = 0; i < rideN...
ALGO
0.999994
4.259088
e832bd25-1d68-492e-b37c-2da09a48cae7
ningmaple/leetcode
validate_stack_sequences/Validate_Stack_Sequences.cpp
class Validate_Stack_Sequences { public: bool validateStackSequences(vector<int>& pushed, vector<int>& popped) { if (pushed.empty() && popped.empty()) { return true; } if (pushed.size() != popped.size()) { return false; } int push_ptr = 0; int...
ALGO
0.986832
6.385118
bd0616f8-93f4-4d17-86e1-b4270bb6b12e
aquaman48/Cpp
Basics/ValidId.cpp
//is your id valid? #include<iostream> using namespace std; int main() { int idNum; const int LOW_NUM = 111; const int HIGH_NUM = 999; cout << "Enter an ID number between " << LOW_NUM << " and " << HIGH_NUM << " inclusive "; cin >> idNum; while (idNum < LOW_NUM || idNum > HIGH_NUM) { cout << "Invalid ID numb...
TOOL
0.966492
3.582977
7389ddbc-63bf-481a-b27a-50c144afb9f5
sif69/codeforces-solution-by-sif_69
codeforces/1843/B.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define lg long long #define fi(i,L,R) for (ll i = L ; i <= R ; i++) #define fd(i,R,L) for (ll i = R ; i >= L ; i--) #define s1 string #define p_b push_back #define st(n) sort(a,a+n) #define rev reverse(a,a+n) #define revs(j) rev...
ALGO
0.999662
3.716486
0756bd15-141a-47ed-93bf-6c07a36f9f23
raiyan6c/XPSC
week1/Day5/A_Problem2.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int a[n],b[m]; for(int i=0;i<n;i++) cin>>a[i]; int j=0; for(int i=0;i<m;i++) { cin>>b[i]; while(b[i]>a[j] && j<n) j++; cout<<j<<" "; } }
ALGO
0.99999
3.68672
3b6aabb1-cb18-47a3-8be8-a22569d7d4cb
yuvraj-31/Assignment-24
main (3).cpp
/****************************************************************************** 3. Define a function to calculate x raised to the power y. *******************************************************************************/ #include <iostream> using namespace std; int power(int x, int y); int main() { int x,y; ...
ALGO
0.99957
5.025193
a9f603a8-6199-48aa-b43b-e1b385afed8b
HMES22/CodingTestStudy
0x0D/jaeeunKim/BOJ_15686.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define X first #define Y second /* BOJ 15686 치킨 배달 https://www.acmicpc.net/problem/15686 */ int ans[14][101]; // 치킨집 x 집 int n, m; int arr[51][51]; vector<pair<int, int>> h; vector<pair<int, int>> c; int tmp[14]; int result = 40000; bo...
ALGO
0.999279
4.30552
7b9f30bb-a9f3-4468-8baa-15a9690fb0b7
ohinhyuk/PSS_Group05_2022
미해결/A010_오인혁_20220105.cpp
#include <iostream> #include <string> #include <vector> using namespace std; int solution(string s) { int answer = 0; vector<string> v; string substr; int temp = 0; for(int i = 1; i<= s.size() ; i++){ while(s.size()-temp>=i){ substr = s.substr(temp,i); if(v.empty(...
ALGO
0.999459
4.090232
e084c825-6cf5-40e5-9730-4075bc7db0d0
ShivamDhamija/leetcodeQuestions
2661-first-completely-painted-row-or-column/2661-first-completely-painted-row-or-column.cpp
class Solution { public: int firstCompleteIndex(vector<int>& a, vector<vector<int>>& m) { vector<int>c(m[0].size(),m.size()); vector<int>r(m.size(),m[0].size()); unordered_map<int,vector<int>>map; for(int i=0;i<m.size();i++) for(int j=0;j<m[0].size();j++) { ...
ALGO
0.999953
5.596479
83b8614d-d8e6-48eb-9f56-ee73029d0c6b
llyang/Computing
examples/ex08/rational/test_rational.cpp
#include <algorithm> #include <iostream> #include <vector> #include "Rational.h" using std::cerr; using std::cin; using std::cout; using std::vector; void test1() { cout << "Please input two rational numbers: "; Calc::Rational r1; Calc::Rational r2; cin >> r1 >> r2; if (!cin) { cerr << "wrong inputs\n...
TOOL
0.879253
4.512658
b00127e9-52dc-49b7-9cbb-eb1b59741c07
nabobery/PROJECT-MADS
CSES/Graph Algorithms/Building Teams/Building Teams.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; #pragma GCC optimize("Ofast") // check if graph is bipartite void solve() { int n, m, a, b; cin >> n >> m; vector<vector<int>> adj(n); for(int i = 0; i < m;i++){ cin >> a >> b; adj[a-1].push_back(b-1); ...
ALGO
0.999992
4.590744
c89d1d18-a4dd-48be-8f51-d84b7e4c34d1
tayu0110/atcoder
agc/agc20b.cpp
#include<iostream> #include<iomanip> #include<string> #include<vector> #include<algorithm> #include<utility> #include<tuple> #include<map> #include<queue> #include<deque> #include<set> #include<stack> #include<numeric> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> using namespace std; struct Ed...
ALGO
0.999826
3.520214
cc31de01-6fe3-40fb-9676-5be8875b6c72
cecyours/nikol.lectures
c-language-19/TC/CLASSLIB/SOURCE/BTREEINN.CPP
/*------------------------------------------------------------------------*/ /* */ /* BTREEINN.CPP */ /* */ /* ...
ALGO
0.999314
5.737622
c1c560c8-d9c3-43c8-9ca2-338009ebb3d1
talentlei/leetcode
Cpp/121-130/Word Ladder II.cpp
class Solution { public: //not accept now vector<vector<string> > res; void createResult(unordered_map<string,int> myMap,unordered_map<string,vector<string> >& record,string beginWord,string endWord,vector<string> & one,string next){ one.push_back(next); if(one.size()==myMap[end]){ ...
ALGO
0.999921
5.506929
a5c0fba6-b4be-4d3e-8cbb-743fccbdaf13
arthur-collette/cse201
TD7/ex1.cpp
#include <iostream> #include <string> using namespace std; class A { private: int i; public: A(int a) : i(a) { } int getI() { return i; } bool operator>=(A& a) { return i >= a.i; } }; template <typename T> T max(T a, T b, T c) { if (a >= b) { if (a >= c) { return a; ...
ALGO
0.987064
4.614913
54651160-74cc-48a5-9630-d3a5d141b1fb
SelfishOlex/GridMateLab
dev/Code/CryEngine/CryPhysics/obbtree.cpp
#include "StdAfx.h" #include "utils.h" #include "primitives.h" #include "bvtree.h" #include "geometry.h" #include "obbtree.h" #include "trimesh.h" void COBBTree::SetParams(int nMinTrisPerNode, int nMaxTrisPerNode, float skipdim) { m_nMinTrisPerNode = nMinTrisPerNode; m_nMaxTrisPerNode = nMaxTrisPerNode; m...
ALGO
0.999402
6.818648
e0d0b3d0-7d6c-415f-8096-e85ce502bacc
Ricardoqueiroz17/Cpp_algos
20220912_MultFun_Class_fibo/Main.cpp
#include "Header.h" #include <iostream> using namespace std; int main() { int res; int n = 5; Fibo f; int i; for (i = 0; i < 10; i++) F[i] = -1; cout << F[9] << endl; printf("\nMemoization Fibo: %d\n\n", f.mFib(n)); printf("\nClass function: recursive Fibonacci\n"); res = f.recursFibo(n); printf("%d\n"...
ALGO
0.999118
5.20439
d6e21f9d-7bb7-4bb9-ad45-cb76129398a5
5metrov/Pair_conspects
21.05.2024.bite_operation.cpp
#include <iostream> #include <bitset> #define PRINT(x) std::cout << x << std::endl; //если видишь запись 0b перед числом - это бинарное число int main(){ setlocale(0, "ru"); unsigned a = 0b00000011; unsigned b = 0b00000010; unsigned d = 0b11111111'11111111'111111'11111100; /* a & d = 2; ...
TOOL
0.938592
3.200843
9dd0ffd1-f692-498a-bff8-ddbc549efb23
ishandutta2007/codeforces
derekfeng/normal/54/B.cpp
#include <cstdlib> #include <cstring> #include <cmath> #include <queue> #include <sstream> #include <stack> #include <time.h> #include <vector> #include <complex> #include <map> #include <set> #include <iomanip> #include <math.h> #include <stdlib.h> #include <list> #include <utility> #include <memory> #include <cstring...
ALGO
0.999934
3.555111
b9bbf1cd-c81b-4706-ada3-4616362ed200
Manish-cloud/Object-Oriented-Programming-Concepts
Complex.cpp
/* * File: Q3.cpp * Author: Manish * * Created on 24 August, 2018, 6:33 AM */ //#include <cstdlib> //#include<iostream> //using namespace std; // //class complex //{ //private: // int r; // int i; //public: // friend istream & operator>>(istream &in ,complex &c) // { // cout<<"PLEASE ENTER R...
ALGO
0.885785
4.19185
8f97decb-f9f1-4fc2-a00c-a05e7b92c2e1
anishmanchanda/CPP-DSA
array/checking-lower-upper-bound.cpp
#include <iostream> #include <vector> #include <algorithm> // for lower_bound using namespace std; int main(){ vector<int> v = {10, 20, 30, 40, 50}; auto LB = lower_bound(v.begin(), v.end(), 20); auto UB=upper_bound(v.begin(),v.end(),20); cout << "Lower bound at position: " << (LB - v.begin()) << end...
ALGO
0.999356
4.235975
2c95d09b-f241-4d2c-a5a8-a6f626d3fd54
ezterry/GB-framework_base
media/libstagefright/codecs/aacdec/inv_long_complex_rot.cpp
/* Pathname: .inv_long_complex_rot.c Funtions: inv_long_complex_rot ------------------------------------------------------------------------------ REVISION HISTORY Description: Change the input argument, no shifts information from long fft_rx4 , do not have to check for shifts. Date: 10/18/200...
ALGO
0.999815
3.32823
bd6c641a-0731-451e-ac3c-a9523d2a2fe4
nuggetbram/mirrortest
src/script.cpp
using namespace std; using namespace boost; #include "script.h" #include "keystore.h" #include "bignum.h" #include "key.h" #include "main.h" #include "sync.h" #include "util.h" bool CheckSig(vector<unsigned char> vchSig, vector<unsigned char> vchPubKey, CScript scriptCode, const CTransaction& txTo, unsigned int nIn, ...
ALGO
0.880925
6.918912
b673d7fa-2356-49c8-873a-7fb458854e4b
Pan-HD/Pro_Graph_kLab_Main
Backup_Files/Files_0721_2025/Pro_0721_2025_Pan_v1.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <cmath> #include <iostream> #include <vector> #include <memory> #include <random> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; #define sysRunTimes 5 #define numSets 8 // the num of sets(pairs) #define idSet 1 // for mark the...
ALGO
0.999515
3.972642
64bc4b0a-1c73-432b-8a8a-e5a253f04fb9
lovethiscode/boost
libs/numeric/ublas/doc/samples/banded_adaptor.cpp
#include <boost/numeric/ublas/banded.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; matrix<double> m (3, 3); banded_adaptor<matrix<double> > ba (m, 1, 1); for (signed i = 0; i < signed (ba.size1 ()); ++ i) for (signed j = (std::max) (i - 1, 0); j...
ALGO
0.985523
3.642051
5ff606b0-cc05-4557-9500-8733aa80d354
ishandutta2007/codeforces
krk/normal/1070/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int Maxn = 200005; int n, k; int a[Maxn]; ll res; int main() { scanf("%d %d", &n, &k); for (int i = 0; i < n; i++) scanf("%d", &a[i]); for (int i = 0; i < n; i++) { if (i > 0 && a[i - 1] > 0) { int nd =...
ALGO
0.999931
3.517493
68c959d2-eee8-421b-bdf1-a2771e6b838d
Mr-Poseidon/CFile
C网/1547理财计划.cpp
#include<iostream> #include<cstdio> using namespace std; int k,n; double p,ans=0; int main() { cin>>k>>n>>p; double mon=0; for(int i=1;i<=n;i++) { mon+=k; mon+=mon*p; } printf("%.2lf",mon-k*n-0.005); return 0; }
ALGO
0.999808
3.079673
c298b604-d8e6-41fe-aa51-a2faa9763605
iut-ibk/DynaMind-Gui
src/3dparty/alglib/src/cblas.cpp
#include <stdafx.h> #include "cblas.h" void complexmatrixvectormultiply(const ap::complex_2d_array& a, int i1, int i2, int j1, int j2, bool transa, bool conja, const ap::complex_1d_array& x, int ix1, int ix2, ap::complex alpha, ap::complex_1d_array& y, int iy...
ALGO
0.997766
4.442311
2cc42c12-8faa-4f9d-9be0-02aea9b70a28
MuhammadHassan05/OOP-C-
l233102q4.cpp
//#include <iostream> //#include <cstring> //using namespace std; // //int main() { // const char* sentence = "abandon discontinue vacate # absent missing unavailable # cable wire # calculate compute determine measure # safety security refuge #"; // // int wordCount = 1; // for (const char* temp = sentence; *t...
TOOL
0.99572
4.03008
a281153e-0a7b-47bb-afa0-5907333ea496
facebookarchive/clangir
libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp
// <algorithm> // template<BidirectionalIterator InIter, OutputIterator<auto, InIter::reference> OutIter> // constexpr OutIter // constexpr after C++17 // reverse_copy(InIter first, InIter last, OutIter result); #include <algorithm> #include <cassert> #include "test_macros.h" #include "test_iterators.h"...
TEST
0.90003
6.881852
b7680d17-646e-482d-b00e-96ba36caba16
Muliphein/InfoNorm
third_party/raytracing/eigen-3.4.0/doc/special_examples/Tutorial_sparse_example_details.cpp
#include <Eigen/Sparse> #include <vector> #include <QImage> typedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double typedef Eigen::Triplet<double> T; void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs, Eigen::VectorXd& b, con...
ALGO
0.997528
5.391142
185fe652-e7ca-44c2-bed8-95a16e993ae3
ISSUIUC/TelemegaDecode
telemega/src/ao.cpp
#include"ao.h" #define NUM_STATE 8 #define AO_FEC_CRC_INIT 0xffff using bits_t = uint32_t; #define V_0 0xff #define V_1 0x00 #define NUM_HIST 24 const uint8_t ao_fec_whiten_table[] = { /* 1 */ 0xff, /* 2 */ 0xe1, /* 3 */ 0x1d, /* 4 */ 0x9a, /* 5 */ 0xed, /* 6 */ 0x85, /* 7 */ 0x33, /* 8 */...
ALGO
0.999054
5.146857
3c233ee4-04e4-4c03-ad71-7a3bc0137274
alflinusjonsson/Codility-Lessons
CyclicRotation/main.cpp
#include <algorithm> // you can write to stdout for debugging purposes, e.g. // cout << "this is a debug message" << endl; vector<int> solution(vector<int> &A, int K) { // write your code in C++14 (g++ 6.2.0) if(A.size() > 0){ for(int i = 0; i < K; i++){ rotate(A.rbegin(), A.rbegin() + 1, A.re...
ALGO
0.999868
4.943048
4f1dcfcf-2e49-4dd1-8722-fc3eeac679c0
Saurabh2244/DSA-Problem-Solving
Array 1D/Count number of subarrays with given XOR K.cpp
// Brute Force==> Use 2 loops and check for each subarray #include<bits/stdc++.h> int subarraysWithSumK(vector < int > a, int b) { // Write your code here int n=a.size(); int cnt=0; for(int i=0;i<n;i++){ int XOR=0; for(int j=i;j<n;j++){ XOR=XOR^a[j]; if(XOR==b)...
ALGO
0.999963
5.649177
393b3c84-ffa1-4936-844b-7ccb5d99e146
Ericsysu/Leetcode
Leetcode122BestTimetoBuyandSellStockII.cpp
#include <iostream> #include <cstdio> #include <stdio.h> #include <string> #include <vector> #include <map> #include <algorithm> #include <cstdlib> #include <cstring> #include <cmath> #include <tr1/unordered_map> #include <stack> using namespace std; using namespace tr1; int maxProfit2(vector<int>& prices){//leetcode...
ALGO
0.99356
4.536426
c0c16dec-fd16-4580-8ec8-48e9a759ebc4
bzy-080408/C-
真题/scholar.cpp
#include <bits/stdc++.h> #include <algorithm> using namespace std; struct student{ int CH; int Ma; int EN; int num; int all; }; bool cmp1(student a,student b){ return a.num > b.num; } bool cmp2(student a,student b){ return a.CH > b.CH; } bool cmp3(student a,student b){ return a.all ...
ALGO
0.999827
3.497577
6a3dd10f-a625-4d19-9cbd-e2644d13ef72
k2font/atcoder
virtualcontest/20200506_灰diff/B.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define all(x) (x).begin(),(x).end() using ll = long long; string char_to_string(char val) { return string(1, val); } int char_to_int(char val) { return val - '0'; } template<class T> inline bool chmin(T& a, T ...
ALGO
0.99998
4.403722
8d829707-513f-4347-8962-2acfd2caf66d
RRZE-HPC/DisCostiC-Sim
staticanalysis/multifiles_HPCG/ComputeMG_ref.cpp
//@HEADER // *************************************************** // // HPCG: High Performance Conjugate Gradient Benchmark // // Contact: // Michael A. Heroux ( <EMAIL>) // Jack Dongarra (<EMAIL>) // Piotr Luszczek (<EMAIL>) // // *************************************************** //@HEADER /*! @file Compute...
ALGO
0.999806
6.029987
f9a3fbcc-017a-4dc4-b314-f14157787c57
ldehaudt/N_Puzzle_solver
Solver.cpp
#include "Solver.hpp" Solver::Solver(PTR start, int s, char flg, char h, bool visual) : size(s), st(start), end(findEnd()), flag(flg), heur(h){ end = findEnd(); Board::setHeur(heur); st->dEnd = st->heuristic(*st, *end); if (isSolvable(st) != isSolvable(end)){ std::cout << RED << "The puzzle is not solvable =(\n"...
ALGO
0.998911
4.416787
e432206e-1667-4eac-9e0e-4d459ade40b5
salllman84/AllCodes
C++/function/friendFun.cpp
#include <iostream> using namespace std; class product2; class product { int prd1[3]; public: void Prd1Total(int a[3]) { for (int i = 0; i < 3; i++) { prd1[i] = a[i]; } } friend int TotalSum(product, product2); }; class product2 { int prd2[4]; public: void Prd2Tota...
ALGO
0.998416
5.103536
04492cb5-10f8-463a-81fe-e21fc93642bb
SkydevilK/codetree-TILs
240411/코드트리 빵/codetree-mon-bread.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <cstring> using namespace std; int N, M; // 0 빈칸 1 베이스캠프 2 이동 불가 3 선점 베이스캠프 int map[16][16]; int dx[] = { -1,0,0,1 }; int dy[] = { 0,-1,1,0 }; bool isVisit[16][16] = {}; struct Customer { int x, y; bool isMove = false; }; struct P...
ALGO
0.999786
4.17784
22021af0-0705-4ada-bd94-2154fbebfda5
RilesMadden/CCSF
C++ 110/sorts_and_searches/binary_search.cpp
#include <iostream> #include <string> bool binarySearch(const string array[], int length, string value) { int first = 0, // first array element last = length - 1, // last array element middle, // midpoint of search position = -1; // position of search value bool found = false; whil...
ALGO
0.999129
5.082981
5caef752-474d-4c85-9a1f-efff5668fd49
mdmohidulislammi/Learning
Python_course/Exam 1/pyramid.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for (int i=0;i<=n;i++) { for(int j=0;j<i;j++) { cout<<"#"; } cout<<endl; } return 0; }
ALGO
0.99993
3.235197
a30c2535-7fb1-455b-88b0-1c71714f5d59
Aziz-Ru/Probelm-Solving
CF/climeStairs.cpp
#include <bits/stdc++.h> using namespace std; #define Fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define int long long int #define nl '\n' #define all(x) (x).begin(),(x).end() #define pb push_back #define ff first #define ss second #define bits(x) __builtin_popcount(x) #define bit_trail_zero(x...
ALGO
0.999878
4.827271
09701361-f0ea-4a47-882a-c380c22fab8a
cmmw/heuristic-optimization-techniques
ex1/src/Solution.cpp
/* * Solution.cpp * * Created on: Nov 24, 2014 * Author: christian */ #include <iostream> #include "Solution.h" #include "Algorithm.h" #include "Logger.h" namespace tcbvrp { Solution::Solution(const std::vector<std::vector<int> >& costs) : costs(costs) { } Solution::~Solution() { } void Solution::addT...
ALGO
0.991175
5.274498
578f4a7b-003e-4b7a-91ef-54e1869d7b8b
Hiyabye/Baekjoon
29xxx/29198.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; void solve(void) { int n, m, k; cin >> n >> m >> k; vector<string> s(n); for (int i=0; i<n; i++) { cin >> s[i]; sort(s[i].begin(), s[i].end()); } sort(s.begin(), s.end()); string t = ""; for (int ...
ALGO
0.999881
4.97553
0425dd64-9976-4c1a-ab6c-fc8f4df501c4
ShahreerIrfan/Code-Forces-Problems-800
Translation.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string s,t; cin>>s; cin>>t; reverse(t.begin(),t.end()); if(t==s){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }
ALGO
0.999982
3.881322
70b064ec-008c-4ee0-9121-0118b6c891cd
satyaswarup129/Data-Structure-And-Algorithms
Day-8/potd/Construct Binary Tree from Preorder and Postorder Traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999957
5.927855
e141dbbd-9f15-494b-afcb-205a7a91a615
milton839/problem-solving-cpp
butterflyPatten2.cpp
#include<iostream> using namespace std; int main(){ int n = 5; int spaces = 2*n -2; for (int i = 1; i <= 2*n-1; i++) { //star int stars = i; if(i > n) stars = 2*n - i; for (int j = 1; j <= stars; j++) { cout<<"*"; } //space ...
ALGO
0.999841
3.571238
587634f4-8245-43a0-a1f3-1f9993515ed1
campa-ttv/chrion-bltouch-marlin
buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.cpp
#include "pins_arduino.h" #ifdef __cplusplus extern "C" { #endif // Pin number const PinName digitalPin[] = { PA_0, //D0 //A7 PA_1, //D1 //A8 PA_2, //D2 //A9 PA_3, //D3 //A0 PA_4, //D4 //A1 PA_5, //D5 //A10 PA_6, //D6 //A11 PA_7, //D7 //A12 PA_8, //D8 PA_9, //D9 PA_10, ...
CONFIG
0.902652
3.647584
d8401b44-bcb7-41a9-8576-bbb1d423cce0
curry0622/Leetcode-Practice
Medium/763. Partition Labels/sol1.cpp
class Solution { public: vector<int> partitionLabels(string s) { vector<vector<int>> idx(26, {-1, -1}); for (int i = 0; i < s.size(); i++) { if (idx[s[i] - 'a'][0] == -1) { idx[s[i] - 'a'][0] = i; } idx[s[i] - 'a'][1] = i; } sort(id...
ALGO
0.999964
5.463108
0afb49e8-1cf6-44ea-98bf-c121b6ae90bd
yusmnn/StrukturData-3
Linked List/queueLinkedList.cpp
#include <iostream> using namespace std; struct Node{ int data; Node *link; }; Node *top=NULL, *n=NULL, *x=NULL; void push(int i){ n = new Node; n->data = i; n->link = top; top = n; } void pop(int &p){ if(top == NULL) return; p = top->data; x = top; top = top->link; delete(x); x=NULL; } void tampil()...
ALGO
0.995913
4.384295
30bf3905-c572-46f7-818c-40500833aed1
Meeperbunny/CompetitiveProgramming
archive/EDU82/_D.cpp
#include <bits/stdc++.h> using namespace std; #define HEADER ios::sync_with_stdio(0);cin.tie(0);if (fopen("file.in", "r")) {freopen("file.in", "r+", stdin);}; using ll = long long; void dbg_out() { cerr << endl; } template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T......
ALGO
0.999067
4.00884
7177db3c-7859-4157-9480-bc747bde660d
omkaranu04/CP_DSA
CSES/Dynamic Programming/coin_combinations_2_recur.cpp
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; int n, x; vector<int> c; vector<vector<int>> dp; int rec(int index, int rem_amt) { if (rem_amt == 0) return 1; if (index == 0 || rem_amt < 0) return 0; if (dp[index][rem_amt] != -1) return dp[index][rem_amt]; ...
ALGO
0.999987
4.30217
e63f5007-3b29-4bae-ad92-aae1d4a09dbe
gauravtewari24/cp
graphs/codechef-chefKnightMove.cpp
#include<bits/stdc++.h> typedef long long ll; #define f(i,a,b) for (ll i=a ; i<b ; i++) #define fr(i,a,b) for (ll i=a ; i>=b ; i--) #define faster ios::sync_with_stdio(0);cin.tie(0); using namespace std; char ar[31][31]; bool vis[31][31]; int dist[31][31]; int dx[] = {-2 , -1 , 1 , 2,2,1,-1,-2}; int dy[] = {1 , 2, 2...
ALGO
0.999802
4.244921
8d0af795-d40c-4767-b8f3-b5f88ef1a57f
cou929/topcoder
AlgridTwo.cpp
// BEGIN CUT HERE // END CUT HERE #include <sstream> #include <string> #include <vector> #include <map> #include <algorithm> #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <utility> #include <set> #include <cctype> #include <queue> #include <stack> #include <numeric> // BEGIN CUT HER...
ALGO
0.99995
4.151496
d7ebd65b-2695-421d-8ac3-9e166e2bc03a
gobirds08/Leetcode-Solutions
LongestCommonPrefix.cpp
#include <string> #include <vector> class Solution { public: std::string longestCommonPrefix(std::vector<std::string>& strs) { const std::size_t LEN_STRING_ARR = strs.size(); if (LEN_STRING_ARR == 0) { return ""; } std::string longest_prefix ...
ALGO
0.999556
5.956491
e693a473-dd02-469e-b312-7c2897365682
wookim0719/codingTest-practices
baekjoon_2309.cpp
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> a(9); int total = 0; int value = 0; int search; for(int i=0; i<9; i++){ cin>> a[i]; total = total + a[i]; } sort(a.begin(),a.end()); value = total -100; for(int i=0; i<9; i++){ search = value - a[i]; for(int j=i+1; j<9; j++...
ALGO
0.999499
3.074105
8f55820d-17e7-4250-a873-01fb07425e91
DhruvPandey1509/Vscode-Program-Folders
C++ DataStructures/B Tree/Solve.cpp
#include"bits/stdc++.h" using namespace std; class Node { public: Node* next; int data; Node(int value) { data = value; next = NULL; } }; void insertAtHead(Node* &head, int val) { Node* n = new Node(val); n->next = head; head = n; return; } void insertAtTail(Node* &head, int val) { Node* n = new Node...
ALGO
0.999777
3.46363
45c8c905-1d11-470f-9704-f095d02fd881
Jamesweng/leetcode
0076-minimum-window-substring.cpp
class Solution { public: string minWindow(string s, string t) { if (t.empty() || s.empty()) return ""; int t_counter[255], s_counter[255]; memset(t_counter, 0, sizeof(t_counter)); memset(s_counter, 0, sizeof(s_counter)); int char_count = 0; for (int i...
ALGO
0.999982
6.751623
ecef44f6-9888-4c0e-850a-5a4af6c2d586
nhatminh199989/laptrinhc
Range Query 11.cpp
#include<bits/stdc++.h> using namespace std; void nhap(int a[1000000],int n){ for(int i=0;i<n;++i){ cin>>a[i]; } } int tim(int a[1000000],int n){ int min=a[1]-a[0]; for(int i=1;i<n-1;++i){ if((a[i+1]-a[i])<min){ min=a[i+1]-a[i]; } } return min; } int main(){ short t; cin>>t; while(t>0){ int n; in...
ALGO
0.998556
3.158327
aa58f378-bcd4-4c3a-a486-d9991eda7a92
ERA-IITK/RoboCup2025
era_localization/src/src/localization/src/DownhillSolver.cpp
#include <iostream> #include <cmath> #include <vector> #include <opencv2/opencv.hpp> #include "localization/point.hpp" #include "localization/linepoints.hpp" #include "localization/linepoint.hpp" #include "localization/realmap_location.hpp" using namespace std; int numIterations = 20; int c = 250; Point pp; double squ...
ALGO
0.999844
3.814636
f7c7461e-2a6e-4f21-9bd6-9eab624d054b
haoel/leetcode
algorithms/cpp/pascalTriangle/pascalTriangle.cpp
// Source : https://oj.leetcode.com/problems/pascals-triangle/ // Author : Hao Chen // Date : 2014-06-18 /********************************************************************************** * * Given numRows, generate the first numRows of Pascal's triangle. * * For example, given numRows = 5, * Return * * [ * ...
ALGO
0.999828
6.343071
89a05248-7111-43d3-b689-a5d578320666
ishandutta2007/codeforces
xellos/normal/329/B.cpp
// iostream is too mainstream #include <cstdio> // bitch please #include <iostream> #include <vector> #include <set> #include <tr1/unordered_map> #include <string> #include <queue> #include <stack> #include <algorithm> #include <cmath> #define dibs reserve #define OVER9000 234567890 #define tisic 47 #define soclose 10e...
ALGO
0.99973
3.183855
77087869-5423-41cc-8ebb-c3c4aa6eafd7
EddieMC-Dev/Estudos-CPP
arrays/exercises/7_33.cpp
/////////////////////////////// // Exercise 7.33: 7_33.cpp // // Pesquisa Linear recursiva // // Autor: Edgard Mac Fadden // // Data: 20/06/2023 // /////////////////////////////// #include <iostream> using std::cout; using std::cin; using std::endl; int linearSearch(const int [], int, int); int main() ...
ALGO
0.999837
5.526057
21e4bba1-4703-428f-9f9c-8e76b40f5c85
thepluck/CP-Training
APIO/APIO2021/Real/roads/materials/public/cpp/grader.cpp
#include "roads.h" #include <cassert> #include <cstdio> #include <vector> int main() { int N; assert(1 == scanf("%d", &N)); std::vector<int> U(N - 1), V(N - 1), W(N - 1); for (int i = 0; i < N - 1; ++i) { assert(3 == scanf("%d %d %d", &U[i], &V[i], &W[i])); } std::vector<long long> closure_costs = ...
ALGO
0.999575
4.121784