uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d38b3591-0f55-423e-8152-de753cd92593
Atik203/C_and_CPP
C++/ICPC_E.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int, int> #define pll pair<long long, long long> #define vi vector<int> #define vll vector<long long> #define mii map<int, int> #define si set<int> #define sc set<char> #define endl '\n' #define f(i, s, n) for (long long int i = s; i < ...
ALGO
0.999755
4.450912
9fb02240-4367-46aa-9072-535dda49f1e7
markwinds/pat
A1058.cpp
/* 数字 x1 x2 x3 x4 进制 a b c d sum=x4+x3*d+x2*c*d+x1*b*c*d 转化为各位的数字 个位 sum%d 十位 sum/d%c 百位 sum/c/d%b 千位 sum/a */ // #include <cstdio> // #include <iostream> // #include <vector> // #include <cstring> // #include <algorithm> // #include <map> // #include <stack> // #include <set> // #include <q...
ALGO
0.995982
3.060654
2cdcc5ed-1422-44c8-9b1b-e0414a4fa42a
ishandutta2007/codeforces
peterr/normal/785/D.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 2E5; const int MOD = 1E9 + 7; int fac[MAXN + 1]; int invFac[MAXN + 1]; int modpow(int b, int e) { int ans = 1; while (e) { if (e & 1) ans = (int) ((long long) ans * b % MOD); e >>= 1; b = (int) ((long long)...
ALGO
0.999964
4.38191
c7eedfff-b116-479f-9ad1-aee57f1b2a50
ketpadilla/cpe104l
courseCodes/02/Example 6-12.cpp
//Example 6-12: Program illustrating how a value parameter works. #include <iostream> //Line 1 using namespace std; //Line 2 void funcValueParam(int num); //Line 3 int main() //Line 4 { ...
TOOL
0.993496
6.490245
47a4b5d5-826c-49aa-88c7-e53f26416397
ansansaram/boj
Bronze IV/5532_방학숙제.cpp
#include <iostream> using namespace std; int main() { int l, a, b, c, d,ans1,ans2; cin >> l >> a >> b >> c >> d; ans1 = a / c; a %= c; if (a > 0)ans1++; ans2 = b / d; b %= d; if (b > 0)ans2++; printf("%d\n", ans1 < ans2 ? l - ans2 : l - ans1); }
ALGO
0.999859
3.480191
812bb510-b7e3-4294-b15a-22c030dc9874
Itisingh3/DSA-sheet-by-Siddharth-Singh-
26_K-LCM2.CPP
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n,k; cin>>n>>k; int onecount=k-3; for(int i=0;i<onecount;i++){ cout<<1<<" "; } n=n-onecount; if(n%2==0){ if(n%4==0){ cout<<n/2...
ALGO
0.999931
3.622902
2c138494-933f-4b8d-8df4-7622943e1474
mrstrozy/C-plusplus-
cse250/SeqClient.cpp
/** File "SeqClient.cpp", by KWR for CSE250, Fall 2009. Extra driver file going with Assignment 2 answer key. Compile: g++ -Wall -o seqClient SeqClient.cpp, OR with a make file, make -f SeqClient.make Usage: seqClient file [n] Reads n strings from file (default n = 10000), and retu...
ALGO
0.97576
5.472525
b2a1fbe0-2484-43b5-9e42-a4d3fb3e05ff
kesharihimanshu/Leetcode_contest
Weekly Contest 272/2109.cpp
class Solution { public: string addSpaces(string s, vector<int>& spaces) { string ans=""; int x=0; for(auto &i:spaces) { ans+=s.substr(x,i-x); ans.push_back(' '); x=i; } ans+=s.substr(x); return ans; } };
ALGO
0.999847
5.887923
0b4ff50a-388b-4887-b1c6-915d09b39431
Team-PyRated/PyRated
Final/dataset3/Arithmetic/student7.cpp
/* ## Program by the other guy ## ## Determine if a given series of numbers can be added or subtracted to give a target number */ #include <iostream> using namespace std; bool isAchievable(int target, int* arr, int n) { for (unsigned long long int k = 0; (k >> n) < 1; k++) { int sum = 0; for(int i = 0; ...
ALGO
0.999572
4.664878
82cc791a-c76e-4cb4-86fd-20ffb6511949
Jeffrin2005/Graph-Theory-
Dijkstra's Algorithm Find the City With the Smallest Number of Neighbors at a Threshold Distance.cpp
class Solution { public: int findTheCity(int n, vector<vector<int>>& edges, int distanceThreshold) { vector<pair<int,int>>adj[n]; for(auto edge: edges){ adj[edge[0]].push_back({edge[1],edge[2]}); adj[edge[1]].push_back({edge[0],edge[2]}); } int c...
ALGO
0.99999
6.2785
436d5fed-9571-4b54-ba83-a866aabaec88
Dreamtowards/Ethertia
lib/_misc/bullet3/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
#include "btGjkConvexCast.h" #include "BulletCollision/CollisionShapes/btSphereShape.h" #include "btGjkPairDetector.h" #include "btPointCollector.h" #include "LinearMath/btTransformUtil.h" #ifdef BT_USE_DOUBLE_PRECISION #define MAX_ITERATIONS 64 #else #define MAX_ITERATIONS 32 #endif btGjkConvexCast::btGjkConvexCast(...
ALGO
0.99315
6.784241
bd5785c1-3cb7-4595-949d-091298de6e6a
BrunoReX/palemoon
gfx/skia/src/effects/gradients/SkTwoPointConicalGradient.cpp
#include "SkTwoPointConicalGradient.h" static int valid_divide(float numer, float denom, float* ratio) { SkASSERT(ratio); if (0 == denom) { return 0; } *ratio = numer / denom; return 1; } // Return the number of distinct real roots, and write them into roots[] in // ascending order static ...
TOOL
0.965604
5.556424
f2ddf20f-a30d-4739-9129-21d5cba675ea
Simon123123/MSMVF_VVC_TIP2023
source/Lib/CommonLib/AffineGradientSearch.cpp
/** * \file * \brief Implementation of AffineGradientSearch class */ // ==================================================================================================================== // Includes // ================================================================================================================...
ALGO
0.998067
6.58379
77ee03f8-2bf9-4831-a7f5-3eb92a3b089e
BuddhadebKoner/Overpowered-CPP
Introduction/arrys_pointers/array1.cpp
#include <iostream> using namespace std; int main() { int intarray[5] = {31, 54, 77, 52, 93}; cout << intarray << endl; // prints the address of the first element *intarray = 95; // same as intarray[0] = 95; printf("value of ap: %d\n", intarray[0]); int *ap = intarray; // ap points to the first ...
TOOL
0.978683
3.027077
1ecefa31-6ee1-4545-864a-8f1573b2deec
acidtib/genesis-dev
src/eccryptoverify.cpp
#include "eccryptoverify.h" namespace { int CompareBigEndian(const unsigned char* c1, size_t c1len, const unsigned char* c2, size_t c2len) { while (c1len > c2len) { if (*c1) return 1; c1++; c1len--; } while (c2len > c1len) { if (*c2) return -1; ...
ALGO
0.934527
6.139459
da53265f-c0ee-4d3f-921c-2dc7a22193e7
westpoint-robotics/suas_px4sim
src/lib/landing_slope/Landingslope.cpp
/* * @file landingslope.cpp * * @author Thomas Gubler <<EMAIL>> */ #include "Landingslope.hpp" #include <mathlib/mathlib.h> void Landingslope::update(float landing_slope_angle_rad_new, float flare_relative_alt_new, float motor_lim_relative_alt_new, float H1_virt_new) { _landing_slope_angle_...
TOOL
0.990441
5.995012
9f33e164-0782-4b83-9c3d-69ba9065e062
ashraf452b/Competitive-programming
Learning Phase/Data structure/Week 4/m14.5 stack queue problem/Practice3.cpp
#include<bits/stdc++.h> using namespace std; int main() { stack<int> st; int n; cin>>n; for(int i=0;i<n;i++) { int x; cin>>x; st.push(x); } stack<int>st2; while(!st.empty()) { st2.push(st.top()); st.pop(); } while(!st2.empty()) ...
ALGO
0.99993
4.79803
fd312af9-a793-4020-b2c9-e5b763967cc6
sarvex/leetcode-small-basic
solution/0900-0999/0916.Word Subsets/Solution.cpp
class Solution { public: vector<string> wordSubsets(vector<string>& words1, vector<string>& words2) { int cnt[26] = {0}; int t[26]; for (auto& b : words2) { memset(t, 0, sizeof t); for (auto& c : b) { t[c - 'a']++; } for (int i ...
ALGO
0.999944
5.913916
ea14b3fb-f929-4f0f-a3a4-b656c59798a9
BusteanHAN/SEExercises
assignment1b/main.cpp
#include <iostream> #include <vector> using namespace std; vector<int> v1 = {0, 1, 2, 3, 4, 5}; vector<int> v2 = {5, 4, 3, 2, 1, 0}; int main() { cout << "Initial declarations: " << endl << "V1: "; for(auto i : v1) { cout << v1[i] << ' '; } cout << endl << "V2: "; for(auto i : v2) { ...
TOOL
0.91046
4.526674
6e2c5b54-485b-42f1-a61c-b463a52b5c9d
KonLew/lab20
lab20_1.cpp
#include<iostream> using namespace std; struct Rect{ double x,y,w,h; }; double overlap(Rect R1, Rect R2){ double dotx = max(R1.x,R2.x); double doty = min(R1.y,R2.y); double maxy = max((R1.y-R1.h),(R2.y-R2.h)); double maxx = min((R1.x+R1.w),(R2.x+R2.w)); double z = (maxx-dotx)*(doty-max...
ALGO
0.988611
3.297111
20b9398c-0aa5-4aa7-b822-276970b65041
ishandutta2007/codeforces
alexandr_ts/normal/1366/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int INF = 2e9; const ll MOD = 1e9 + 7; const int N = 1e6 + 10; void solve() { int a, b; cin >> a >> b; int ans = (a + b) / 3; ans = min(ans, a); ans = min(ans, b); cout << ans << "\n"; } int main() { ios_base::...
ALGO
0.999821
5.195618
c5f71559-b573-4a79-a4b2-3dbc5b599d0d
colinyoyo26/mlir-standalone-toy
llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
#include "Opts.inc" #include "llvm/ADT/StringRef.h" #include "llvm/Config/config.h" #include "llvm/DebugInfo/Symbolize/DIPrinter.h" #include "llvm/DebugInfo/Symbolize/Symbolize.h" #include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" #include "llvm/Support/COM.h" #include "llvm/S...
TOOL
0.959036
3.060107
9efd11b9-1236-41b3-a4e8-7acd8d99249b
Cristopher2874/PracticeProblems
C++/leetcode/easy/sqrtX.cpp
/* Given a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned integer should be non-negative as well. You must not use any built-in exponent function or operator. For example, do not use pow(x, 0.5) in c++ or x ** 0.5 in python. Input: x = 4 Output: 2 Explanation: ...
ALGO
0.999932
5.913383
69a7826e-7446-4dc2-a092-cc40ecae26f2
flexsloth/LeetCode_solutions
0238-product-of-array-except-self/0238-product-of-array-except-self.cpp
class Solution { public: vector<int> productExceptSelf(vector<int> nums) { int n = nums.size(); vector<int>pref(n,1),suff(n,1); for(int i = 1 ; i < n ; i++) pref[i] = nums[i-1]*pref[i-1]; for(int i = n-2 ; i >= 0 ; i--) suff[i] = nums[i+1]*suff[i+1]; for(int i = 0 ; i < n ; i...
ALGO
0.99997
6.320188
e18d5422-cddf-4e95-ade5-66fa672bc2a0
godsonsphilip/Practise
Knapsack01.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Function to solve 0/1 Knapsack problem using dynamic programming int knapsack(int W, vector<int>& wt, vector<int>& val, int n) { // dp[i][w] will store the maximum value that can be attained with // a knapsack capacity of w and ...
ALGO
0.999994
6.140709
6060cddb-ddcd-459d-84cb-05e086ef3229
acc-cosc-1337-spring-2021/acc-cosc-1337-spring-2021-KevinTrungHa
src/examples/04_module/07_vectors_for_ranged/vec_for_ranged.cpp
#include "for_ranged.h" #include<iostream> #include<vector> using std::vector; /* Function loop_vector_w_for_ranged The function creates an int vector with values 9, 10, 99, 5, 67 and displays the numbers to screen using a for ranged loop with auto as follows: 9 10 99 5 67 @param none */ /* Function loop_vector_w_...
ALGO
0.950299
3.95046
594fd296-62cf-4c7c-842e-29d77f8aefb0
JinMiaode/PAT-Basic-Level
1011.cpp
#include<iostream> bool fun(long int A,long int B,long int C);//ݾȣAB֮󳬹intΧ using namespace std; int main() { int n; cin >> n; long int A[n],B[n],C[n]; for(int i=0; i<n; i++) { cin >> A[i] >> B[i] >> C[i]; } for(int i=0; i<n; i++) { bool flag = fun(A[i],B[i],C[i]); if(flag) { cout << "Case" << ...
ALGO
0.999169
4.10509
7c6306be-653d-4494-9372-132d2e3145a7
UzairTajdar/Assignment
03_recursive_and_iterative/01_iterative_addorial.cpp
#include<iostream> using namespace std; int Addorial(int n){ int x = n; for (int i = n-1; i >= 0; i--) { x = i + x; } return x; } int main(){ cout<<Addorial(20); return 0; }
ALGO
0.999891
4.58103
187e2243-db12-4085-82d1-3758fe013bd0
trivedikrunal/Apna-College-DSA-Series
Lecture 7/02homework.cpp
// Figure out how to find if a number is power of 2 without any loop. #include <iostream> using namespace std; bool isPowerOfTwo(unsigned int n) { return (n > 0) && ((n & (n - 1)) == 0); } int main() { unsigned int number; cout << "Enter a number: "; cin >> number; if (isPowerOfTwo(numbe...
ALGO
0.999502
6.532414
b3b30921-c2ee-464d-8dad-49324ebf40b8
ishandutta2007/codeforces
gary/normal/1173/A.cpp
/*###################################################################### ! dfs or bfs c[i] long long dp :AABAB >=0 double> printf("%lf")6%.16lf dpg n8 find if(l>=b||r<=a) return 0x3f3f3f3f; if(r<=b&&l>=a) return tree[k]; priority_queue<> q; priority_queue<,vector<>, less<> > pq1; //...
ALGO
0.999994
3.55188
5b9b60ba-53d2-4fc8-ab4a-08057b33211a
ishandutta2007/codeforces
mateusz/normal/484/B.cpp
#include <cstdio> #include <algorithm> using namespace std; const int N = 2000005; int n, tab[N], zlicz[N], pref[N]; int main() { scanf("%d", &n); int mx = 0; for (int i = 1; i <= n; i++) { scanf("%d", &tab[i]); mx = max(mx, tab[i]); zlicz[tab[i]] = 1; } for (int i = 1; i <=...
ALGO
0.999985
3.675443
85d862e9-14b1-4090-90df-5ee846e791a8
YanHuang1994/algorithm
Verkada_interview_question/Camera/src/Camera.cpp
#include "../include/Camera.h" #include <algorithm> #include <stdexcept> #include <future> #include <thread> #include <iostream> // Constructor to initialize camera data Camera::Camera(const std::vector<Item>& data) : data(data) {} Camera::Camera(const Camera& other) : data(other.data) {} Camera& Camera::operator=(c...
ALGO
0.997902
7.474511
b77e5b11-e34b-4d21-96fa-9db22b1f0472
dylan007/Coding
Codeforces/1150/a/a.cpp
/*======================= Author : Shounak Dey ======================= */ #include<bits/stdc++.h> using namespace std; using ll = long long int; using ull = unsigned long long int; #define PB push_back #define MK make_pair #define SZ(a) (int)(sizeof(a)) #define F first #define S second #define FOR(i,a,b) for(int...
ALGO
0.999958
3.561204
cad77c9f-18b9-4848-a47b-a3f07f2d748e
GeddadaRohith/C-plus-plus
C++/Array.cpp
#include <iostream> using namespace std; int main(){ int number[5] = {10,20,30,40,50}; for (int i=0 ; i < 5;i++){ cout<<"Index" <<i<<" : "<<number[i]<<endl; } return 0 ; }
ALGO
0.874641
3.050815
33139753-6296-46f6-a79b-36ed5b0deafa
siddharth25pandey/Leetcode-Solution
Medium/Binary Tree Lowest Common Ancestor.cpp
#include <bits/stdc++.h> using namespace std; /** * 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, Tre...
ALGO
0.999987
5.713513
e2e833fd-9064-4fca-8b30-8cccd24bf83e
Ferchosos-Programmers/CINEFLIX_APP
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
123b8da1-e582-4bf2-9696-473927f619ad
qiaozishun4/CSP2024_BJ
BJ-Junior/answers/BJ-J00466/explore/explore.cpp
#include <iostream> #include <cstdio> using namespace std; int dx[5] = {0,1,0,-1}; int dy[5] = {1,0,-1,0}; int T,n,m,k; char c[1005][1005]; int vis[1005][1005]; int cnt; int main() { freopen("explore.in","r",stdin); freopen("explore.out","w",stdout); scanf("%d",&T); while(T--) { int x,y,d...
ALGO
0.999731
3.587922
bafb8e17-999a-4627-af8a-1172f62ab92d
bchenSyr/Software-Repository
GraphWalkDemo/GraphWalkDemo/Graph.cpp
///////////////////////////////////////////////////////////////// // Graph.cpp - Demonstrate how to do Graph walks // // // // Jim Fawcett, CSE687 - Object Oriented Design, Spring 2014 // ////////////////////////////////////////////////////////...
ALGO
0.979265
5.623222
76a69399-de9c-4b3b-997e-5db720da6571
SaiVinay007/Competitive-Programming
Competitve Coding_iitb/References/reykjavik University/codes/aflv_10_network_flow/internet_bandwidth.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <strin...
ALGO
0.998029
3.974502
b9674ff3-221d-4e6f-a2e0-f9fb12c12ccb
thanhnhutrong/Baitap
BT03/Sinhvien.cpp
#include <bits/stdc++.h> using namespace std; template<class T> void swapNumber(T & x, T & y){ T temp = x; x = y; y = temp; } struct SV{ int id; double toan; double ly; double anh; double tb(){ return (toan+ly+anh)/3; } }; int main(){ int n; cin >> n; SV a[n];...
ALGO
0.999917
4.013718
257ca445-7974-434a-af20-aa5a3f659d5d
kowshik24/Codeforces
1249C1.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int main() { int q; cin >> q; for(int i=0; i<q; i++) { ll n; cin >> n; while (true) { bool ok = true; int cur = n; while (cur > 0) { if...
ALGO
0.99992
3.729138
59d659e1-61a3-476e-bfa5-972dd9491f2c
amsraman/Competitive_Programming
USACO/Contests/Platinum/2015-2016/Contest 4/platinum16open2.cpp
#include <bits/stdc++.h> using namespace std; template <int base, int... prime_list> struct KarpRabin { static constexpr int num_hashes = sizeof...(prime_list); static constexpr array<int, num_hashes> primes = array<int, num_hashes>{forward<int>(prime_list)...}; static inline vector<array<int, num_hashes>...
ALGO
0.999823
4.375368
0f4fd016-a681-4313-a610-c687b17f0dd7
wltn716/algorithm_practice
study/211017/17135.cpp
// 문제: https://www.acmicpc.net/problem/17135 #include <iostream> #include <algorithm> #include <vector> #include <set> #include <queue> #define x first #define y second using namespace std; typedef pair<int, int> pi; int dx[] = {0, -1, 0}; int dy[] = {-1, 0, 1}; int n, m, d; vector<vector<int>> board; vector<vector<...
ALGO
0.99995
5.043741
4d08b95f-ccd7-4c08-9226-09a982cc200a
koooex/roboshell
src/third_party/icu4c-57.1/source/common/unisetspan.cpp
#include "unicode/utypes.h" #include "unicode/uniset.h" #include "unicode/ustring.h" #include "unicode/utf8.h" #include "unicode/utf16.h" #include "cmemory.h" #include "uvector.h" #include "unisetspan.h" U_NAMESPACE_BEGIN /* * List of offsets from the current position from where to try matching * a code point or a ...
TOOL
0.923797
7.102013
dc6e7658-4894-4aea-b3cb-76a95cec3fa2
abzalmyrzash/PP1-2022-Spring
week 7/task3.cpp
#include <iostream> using namespace std; int main(){ // task: print string in reverse string str; getline(cin, str); string str2=str; int j=0; for(int i=str.size()-1; i>=0; i--){ cout << str[i]; str2[j] = str[i]; j++; } cout << endl; cout << str2 << endl; return 0; }
ALGO
0.998883
4.359882
bfd6826b-24f3-48b6-88aa-3a656c774cc6
ishandutta2007/codeforces
12tqian/normal/1463/A.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <iostream> #include <iomanip> #incl...
ALGO
0.999718
5.469326
45892dd8-28eb-430e-866a-cb3673b2e57e
allenbenny419/Placement-Practice
Basics/Patterns/star_pattern.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n,i,j; cin>>n; for(i=1;i<=n;i++){ for(j=1;j<=n-i;j++){ cout<<" "; } for(j=1;j<=i;j++){ cout<<"* "; } cout<<endl; } return 0; }
ALGO
0.999978
3.639536
a3b9f089-8e7d-4304-aef7-9e46969dd105
ishandutta2007/codeforces
heno239/normal/1155/F.cpp
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #include<utility> usi...
ALGO
0.999952
3.244967
9c8d4e9e-752e-4093-b38b-f50bb1b5ff3b
ngthanhtrung23/ProjectEuler
P1XX/175.cpp
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; i++) #define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; i--) #define REP(i,a) for(int i=0,_a=(a); i<_a; i++) #define EACH(it,a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); ++it) #define DEBUG(x) { cout << #x << " = "; cout << (x) << end...
ALGO
0.999209
3.718895
942a48de-c28f-43d0-aaaf-da8d0d8b43ab
ishaankalsi/All_algos_ds_needed
code/dynamic_programming/egg_dropping_puzzle/egg_dropping_puzzle.cpp
/* Part os Cosmos by OpenGenus Foundation */ #include <iostream> #define MAX_EGGS 100 #define MAX_FLOORS 100 #define INF 1000000000 using namespace std; int memo[MAX_EGGS][MAX_FLOORS]; /* * Returns the minimum number of attempts * needed in the worst case for n eggs * and k floors. * Time complexity: O(n*k...
ALGO
0.999862
5.551737
9a8d76a4-e385-47cd-9eb3-babca9635325
Kai-Heng/Coding-Challenges
delete_tree_Node/main.cpp
#include <iostream> #include <string> #include <vector> #include <map> #include <fstream> #include <functional> #include <algorithm> #include <unordered_set> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeN...
ALGO
0.999154
5.451854
7d84e4a8-fe00-463a-8880-bb05f8989be4
manvendra247/6Companies30Days
5-Google/904. Fruit Into Baskets.cpp
class Solution { public: int totalFruit(vector<int>& fruits) { int i = 0,j=0; int n= fruits.size(); map<int,int>mp; int distinct = 0; int maximum=0; while(j<n){ if(distinct<=2){ if(mp.find(fruits[j])==mp.end())distinct++; mp...
ALGO
0.999955
6.314622
d1fbb114-5784-4499-9cac-8e7b89a41c71
morrazzzz/ESM-Engine
trunk/3rd party/ode/ode/src/lcp.cpp
/* THE ALGORITHM ------------- solve A*x = b+w, with x and w subject to certain LCP conditions. each x(i),w(i) must lie on one of the three line segments in the following diagram. each line segment corresponds to one index set : w(i) /|\ | : | | : | |i in N ...
ALGO
0.999978
3.519439
ab2d2ff2-0e9c-4691-b7d6-198df1a96f3a
ImmanuelBaskaran/HTsim_Starlink
sim/Starlink/eigen3/bench/sparse_lu.cpp
// g++ -I.. sparse_lu.cpp -O3 -g0 -I /usr/include/superlu/ -lsuperlu -lgfortran -DSIZE=1000 -DDENSITY=.05 && ./a.out #define EIGEN_SUPERLU_SUPPORT #define EIGEN_UMFPACK_SUPPORT #include <Eigen/Sparse> #define NOGMM #define NOMTL #ifndef SIZE #define SIZE 10 #endif #ifndef DENSITY #define DENSITY 0.01 #endif #ifnd...
ALGO
0.99902
4.187482
b716b9db-f58a-480a-bb1b-865eda77a601
WilliamRal/Viterbi_Algorithm
fsm.cpp
#include <cstdio> #include <string> #include <iostream> #include <fstream> #include <stdexcept> #include <cmath> #include <stdlib.h> #include "base.h" #include "fsm.h" namespace gr { namespace trellis { fsm::fsm() { d_I=0; d_S=0; d_O=0; d_NS....
ALGO
0.98904
4.550884
daacbd8f-e5b7-4496-be3a-a7e6e1c9d3af
ljsoler/Fischer-Vectors-BiometricPAD
Fingerprint/SIFTEncodings/PDA-SDK/PDA_sdk/src/kmeans.cpp
#include "kmeans.h" #include "common.h" #ifdef WIN32 #include <process.h> #endif #define NUM_TREES 3 #define NUM_REPITATIONS 1 using namespace std; namespace clustering_and_indexing{ namespace kmeans{ VlKMeans* train_kmeans_model(float* desc, int total_data, int dimension, int numclusters, int max_iterkmean) ...
ALGO
0.999401
5.846358
0b867434-fbc8-4d66-a240-4c3703be38e3
MedlarTea/MPF_GRR_SLT
mono_tracking/debug/personInit/.history/main_20211002222122.cpp
// TOPIC: Introduction to thread in c++ (c++11) // QUESTIONS // 1. What do you understand by thread and give one example in C++? // ANSWER // 0. In every application there is a default thread which is main(), in side this we create other threads. // 1. A thread is also known as lightweight process. Idea is achieve pa...
ALGO
0.978536
5.580315
368cc35e-a87e-438b-ae6a-1bf57214fb53
DevleenaBanerjee/Stock_Prediction_ds
venv/Lib/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/libs/units/example/performance.cpp
/** \file \brief performance.cpp \details Test runtime performance. Output: @verbatim multiplying ublas::matrix<double>(1000, 1000) : 25.03 seconds multiplying ublas::matrix<quantity>(1000, 1000) : 24.49 seconds tiled_matrix_multiply<double>(1000, 1000) : 1.12 seconds tiled_matrix_multiply<quantity>(1000, 1000...
TEST
0.97262
6.071358
0fc7c739-3985-4ee6-a3f0-01da7d8f443f
haoel/leetcode
algorithms/cpp/mirrorReflection/MirrorReflection.cpp
// Source : https://leetcode.com/problems/mirror-reflection/description/ // Author : Hao Chen // Date : 2018-06-27 /*************************************************************************************** * * There is a special square room with mirrors on each of the four walls. Except for * the southwest corne...
ALGO
0.999943
4.89567
1efd6fb2-5b88-4c61-8caf-7c961530e552
larrylart/Unimap
lib/agg/src/agg_vpgen_clip_polyline.cpp
#include "agg_vpgen_clip_polyline.h" #include "agg_clip_liang_barsky.h" namespace agg { //---------------------------------------------------------------------------- void vpgen_clip_polyline::reset() { m_vertex = 0; m_num_vertices = 0; m_move_to = false; } //--------------...
ALGO
0.933187
6.169125
c9006fee-ba70-4f07-adb0-28f60ff62b6f
ishandutta2007/codeforces-nonalphabetic
300iq/normal/158/B.cpp
#include <stdio.h> using namespace std; int main() { int n, s, count[5]= {0}; scanf("%d", &n); while (n--) { scanf("%d", &s); count[s] += 1; } int total = count[4] + count[3] + count[2] / 2; count[1] -= count[3]; if (count[2] % 2 == 1) { total += 1; ...
ALGO
0.999971
3.475439
c8993ece-1f9e-4655-b44d-dece7abc0bd2
Anton247/LeetCode
14. Longest Common Prefix/Longest_Common_Prefix.cpp
class Solution { public: string longestCommonPrefix(vector<string>& strs) { pair<size_t, size_t> minLength = { 0, strs[0].length() }; for (int i = 1; i < strs.size(); ++i) { if (strs[i].length() < minLength.second) minLength = { i, strs[i].length() }; } st...
ALGO
0.999914
5.793459
b52d181c-aaf2-464c-8261-a4a12949e300
PtCu/practice
OJ/luogu/P1536.cpp
#include <bits/stdc++.h> using namespace std; int f[1010]; int find(int x) { if (x == f[x]) return x; return f[x] = find(f[x]); } void Union(int a, int b) { //a的祖先的祖先置为b f[find(a)] = find(b); } int main() { int n, m, ans; for (;;) { ans = 0; cin >> n; if (!n)...
ALGO
0.999841
4.376963
78c5d6e7-3831-43bd-8b17-866aa590b6ec
yerdna-lisovyk/VGUIT
Graf/Going_deep.cpp
#include <iostream> using namespace std; const int n=5; int i, j; bool *visited=new bool[n]; //матрица смежности графа int graph[n][n] = { {0, 0, 1, 1, 0}, {0, 0, 1, 0, 0}, {1, 1, 0, 1, 1}, {1, 0, 1, 0, 0}, {0, 0, 1, 0, 0} }; //поиск в глубину void DFS(int st) { int r; cout<<st+1<<" "; visited[st]=true; for (r=...
ALGO
0.999967
3.796605
abd396d6-a641-4c9d-bc08-25b220fda140
tkhalidd/MustangMobility
backend/src/main.cpp
/** * main.cpp * Entry point for the Mustang Mobility accessible path finding system * Handles graph initialization, data loading, and path computation */ #include <iostream> #include "Graph.h" #include "Dijkstra.h" /** * Main program entry point * @param argc Number of command line arguments * @param argv Arr...
ALGO
0.992289
6.044864
28a2d5db-b16f-4c03-b1c1-cd295c4fd07f
Shaurav-Bhandari/Semester-III
CG/BresenhamLDA.cpp
#include <iostream> #include <vector> #include <cmath> #include <glad/glad.h> #include <GLFW/glfw3.h> const unsigned int SCR_WIDTH = 800; const unsigned int SCR_HEIGHT = 600; const char* vertexShaderSource = R"( #version 330 core layout (location = 0) in vec3 aPos; void main() { gl_Position = vec4(aPos.x, aPos.y...
ALGO
0.984794
6.459261
32ec5dd5-5ff5-4a18-90e7-1ea3b03d5efd
mzoroufchian/smartcamera
HLS/Haar_src/haar.cpp
#include "haar.h" #include "sqrt.h" /****************************************************************************************/ /* DECLARATION OF FUNCTIONS ****************************************************************************************/ void integralImages_1( unsigned char Data[WINDOW_SIZE][WINDOW_SIZE], int...
ALGO
0.998278
3.249357
a02ff705-9a60-4092-a87e-7dc7caff73c0
schen510/Hacker-Rank-Solutions
Missing Numbers/main.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int num = 0, index; int lowest = 200000, maximum = 1; int arr1[200000] = {0}, arr2[200000]={0}; ci...
ALGO
0.999721
3.434079
b7f6aaf4-c262-465c-bfb5-fdf25e945071
Forrest-Z/vel_trans
src/dt/core/sensing/preprocessor/pointcloud/pointcloud_preprocessor/src/compare_map_filter/voxel_based_approximate_compare_map_filter_nodelet.cpp
#include <vector> // *INDENT-OFF* #include "pointcloud_preprocessor/compare_map_filter/voxel_based_approximate_compare_map_filter_nodelet.hpp" // *INDENT-ON* #include <pcl/kdtree/kdtree_flann.h> #include <pcl/search/kdtree.h> #include <pcl/segmentation/segment_differences.h> namespace pointcloud_preprocessor { Voxel...
TOOL
0.884287
6.759082
136ecb36-68a5-434f-abb0-a6a77f883538
uvazke/AtCoder
Others/M-solutions2/E.cpp
#include <iostream> #include <vector> #include <numeric> #include <cstdlib> #include <cmath> #include <algorithm> #include <string> #include <cstring> #include <queue> #define myfor(i,N) for(i=0;i<N;i++) #define myforFL(i,f,l) for(i=f;i<l;i++) #define myforInv(i,N) for(i=N;i>=0;i--) #define myforFLInv(i,f,l) for(i=f;i>...
ALGO
0.998326
3.652276
9e337f51-f895-4c59-94f5-e95aaca67fad
caizejun/leetcode
src/search/floodFill_733.cpp
class Solution { public: vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int newColor) { int dx[]={-1,0,1,0},dy[]={0,1,0,-1}; int oldColor=image[sr][sc]; if(oldColor==newColor)return image;//当前颜色=新颜色 image[sr][sc]=newColor; for(int i=0;i<4;i++){//...
ALGO
0.985558
6.301336
3ad4693e-1596-47b9-92f0-0fd6d8fdfab7
Alenaps/DDP-MI-23
02 Masukan dan Keluaran/Putri_soal_4.cpp
#include <iostream> using namespace std; int main () { float c, d; cin >> c >> d; float penjumlahan = c + d; float pengurangan = c - d; float perkalian = c * d; float pembagian = c / d; cout << "Hasil dari Penjumlahan " << c << " dengan " << d << " adalah " << penjumlahan << endl; c...
ALGO
0.984715
3.887501
b6e5a9a5-3e63-43b3-a87f-f433623d726f
lakshaykapoor7198/Interview
stack_using_stl.cpp
#include <bits/stdc++.h> using namespace std; void show(stack <int> s){ stack <int> s1 = s; while(!s1.empty()){ cout<<s1.top()<<" "; s1.pop(); } cout<<"\n"; } int main(int argc, char const *argv[]) { stack <int> s; s.push(1); s.push(2); s.push(3); s.pop(); cout<<s.size()<<endl; cout<<s.empty()<<endl; ...
ALGO
0.877336
4.445138
7b779b65-1d6b-4152-8ad3-0a16783a1b63
ToprakArslann/ascii-video
libs/opencv/sources/samples/cpp/dbt_face_detection.cpp
#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID) || (defined(_MSC_VER) && _MSC_VER>=1800) #include <opencv2/imgproc.hpp> // Gaussian Blur #include <opencv2/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar) #include <opencv2/videoio.hpp> #include <opencv2/highgui.hpp> // ...
TOOL
0.868609
6.824202
14401ee9-c801-4583-b0f4-56a9483d1afe
souravmondaldev/Leetcode
1643-number-of-nodes-in-the-sub-tree-with-the-same-label/number-of-nodes-in-the-sub-tree-with-the-same-label.cpp
class Solution { public: vector<int> countSubTrees(int n, vector<vector<int>>& edges, string labels) { unordered_map<int, unordered_set<int>> graph; for(auto edge : edges){ int u = edge[0], v = edge[1]; graph[u].insert(v); graph[v].insert(u); } vec...
ALGO
0.999939
6.397721
22471677-5eca-4503-954d-7f56f12a7ef3
Hemantgithubpro/leetcode
Codeforces/Contests/Educational_180/A/main.cpp
#include <iostream> #include <cmath> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ios::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int a, x, y; cin >> a...
ALGO
0.999914
4.716219
0f3095a7-f980-4159-b061-469e6edadec1
rakibulhasan-swe/mastering-DSA
Sorting/insertion_sort.cpp
#include <bits/stdc++.h> using namespace std; void insertionSort(vector<int> v, int n) { int key, j; for (int i=1; i<n; i++) { key = v[i]; j = i - 1; while (j>=0 && v[j]>key) { v[j+1] = v[j]; j = j-1; } v[j+1] = key; } } int main() { vec...
ALGO
0.999974
5.5742
dc950f12-28c1-4447-b8e2-8da965b091e3
ishandutta2007/codeforces
leaf1415/normal/1705/B.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <ctime> #include <cstdlib> #include <cassert> #include <vector> #include <list> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <string> #include <algorithm> #include <utility> ...
ALGO
0.999886
4.323391
5f158d16-c3e3-43a9-aabe-431eea0a1c01
simonpcook/or1k-llvm-project
llvm/tools/llvm-mc/llvm-mc.cpp
#include "Disassembler.h" #include "llvm/MC/MCAsmBackend.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCCodeEmitter.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCInstPrinter.h" #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCObjectFileInfo.h" #include "llvm/MC/MCParser/AsmLexer.h" #include "llvm/MC/...
TOOL
0.857714
7.791292
0efb6fc7-ff97-4b5d-93bd-cf9529a6a77b
qwaker00/Olymp
Trains/10112013/A/hax.cpp
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #inc...
ALGO
0.999957
4.175465
f8b1f49f-5204-49cc-aa5b-f4d156e56f6a
linouk23/informatics-mccme-ru
Graph Theory Problems/172.cpp
#include "bits/stdc++.h" using namespace std; class Solution { private: int n; vector<vector<int> > dist; const int INF = (int)1e9; public: void read() { cin >> n; dist.resize(n, vector<int> (n, 0)); for (int row = 0; row < n; ++row) { for (int column = 0; ...
ALGO
0.99994
3.995768
0fa1615d-93a8-435c-9ee8-aea9fe615161
bhutamanav11/LeetCode
contains-duplicate.cpp
class Solution { public: bool containsDuplicate(vector<int>& nums) { int n = nums.size(); sort(nums.begin(), nums.end()); for(int i = 0; i < n - 1; i++){ if(nums[i] == nums[i + 1]){ return true; } } return false; } };
ALGO
0.99996
5.852344
612bcf46-1861-4fad-b620-e01e2ac700d0
briantruong777/quic-inverse-multiplex
src/third_party/icu/source/common/ustring.cpp
#include "unicode/utypes.h" #include "unicode/putil.h" #include "unicode/ustring.h" #include "unicode/utf16.h" #include "cstring.h" #include "cwchar.h" #include "cmemory.h" #include "ustr_imp.h" /* ANSI string.h - style functions ------------------------------------------ */ /* U+ffff is the highest BMP code point, t...
TOOL
0.992762
6.223773
68ce7e94-3cee-46e0-9d8b-1a4812e6f0d0
revyos-rocm/rocm-hipcub
examples/device/example_device_reduce.cpp
/****************************************************************************** * Simple example of DeviceReduce::Sum(). * * Sums an array of int keys. * * To compile using the command line: * nvcc -arch=sm_XX example_device_reduce.cu -I../.. -lcudart -O3 * ****************************************************...
ALGO
0.999337
5.666323
1ce90fc1-573d-4fcf-9d01-4c8613849e71
hzio/HotSpotResearch
src/share/vm/opto/regmask.cpp
#include "precompiled.hpp" #include "opto/compile.hpp" #include "opto/regmask.hpp" #ifdef TARGET_ARCH_MODEL_x86_32 # include "adfiles/ad_x86_32.hpp" #endif #ifdef TARGET_ARCH_MODEL_x86_64 # include "adfiles/ad_x86_64.hpp" #endif #ifdef TARGET_ARCH_MODEL_sparc # include "adfiles/ad_sparc.hpp" #endif #ifdef TARGET_ARCH_M...
TOOL
0.88171
6.6005
3fd756f4-c570-44b9-adcc-d6900664c0f7
its-coder5128/leetcode
my-folder/problems/partition_equal_subset_sum/solution.cpp
class Solution { public: bool canPartition(vector<int>& nums) { int sum = accumulate(nums.begin(),nums.end(),0); if(sum & 1) return false; sum /= 2; int n = nums.size(); vector<vector<bool>> dp(n,vector<bool>(sum+1,0)); vector<int> prev(sum+1,0); ...
ALGO
0.99985
5.946185
886447e9-3561-48bd-8137-8e2ee26ca42e
coder-black-mamba/c_-_-
STL/stl_assignment_solution.cpp
#include <iostream> using namespace std; #include <vector> #include <algorithm> int main() { // ***************==========Vector Starts===============*************** vector<int> arr({1, 2, 3, 4, 5}); // we can also do this // vector<int> arr={1,2,3,4,5}; // can also do this // vector<int> arr{1,...
ALGO
0.974211
4.210061
5b436d09-a2f3-4ce6-b3ed-8980f10c51fb
MIpaltan007/Codeforces-800-
Ultra_Fast_Mathematician.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string a,b; long long int i; cin>>a>>b; for(i=0;i<a.length();i++){ if(a[i]!=b[i]){ cout<<"1"; } else{ cout<<"0"; } } return 0; }
ALGO
0.999993
3.430774
29bf2571-ccb6-45b5-ad6c-e8a619ab11a2
raincross7/code-similarity
codes/train_code/problem241/problem241_355.cpp
#include <bits/stdc++.h> using namespace std; using ll =long long; typedef pair<int,int> P; #define SORT(a) sort((a).begin(),(a).end()) #define rSORT(a) reverse((a).begin(),(a).end()) #define For(i, a, b) for(int i = (a) ; i < (b) ; ++i) #define rep(i, n) For(i, 0, n) #define debug(x) cerr << #x << " = " << ...
ALGO
0.999985
3.891812
ad367cdb-12da-490b-9831-d4ed885441f2
gregatjhu/bootcamp24
gem5-resources/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/facesim/src/Public_Library/Read_Write/FILE_UTILITIES.cpp
namespace PhysBAM { namespace FILE_UTILITIES { //################################################################### // Win32 Specific Function Definitions //################################################################### #if defined(WIN32) bool Directory_Exists (const std::string& dirname) { DWORD attr = GetFil...
TOOL
0.891538
5.896868
ac7b4a72-cd76-4bdd-ae9e-9f43d8ea6f70
BoleynSu/CompetitiveProgramming
archives/problemset/acm.timus.ru/1082.cpp
/* PROGRAM: $PROGRAM AUTHOR: Su Jiao DATE: 2010-4-10 DESCRIPTION: $DESCRIPTION */ #include <iostream> using std::cin; using std::cout; #include <fstream> using std::ifstream; using std::ofstream; #include <sstream> using std::stringstream; using std::endl; #include <vector> using std::vector; #include <string> using st...
ALGO
0.992072
3.58115
aeb68ee6-935c-40fd-b578-95e916f4b0c1
ishandutta2007/codeforces
aryanc403/normal/231/A.cpp
//for(auto a: x); #include<iostream> #include<bits/stdc++.h> using namespace std; #include<stdio.h> #define fo(i,n) for(i=0;i<(n);++i) #define LLI long long int #define pb push_back #define mp make_pair #define X first #define Y second #define MAX 100002 #define MOD 1000000007 LLI T,n,in,i,m,j,cnt,a,b,c; vector <L...
ALGO
0.999603
4.536633
79da31c4-9245-4811-9588-b62b0703f9a7
Wise-Wizard/DSA-Problems
Arrays/118.pascals-triangle.cpp
/* * @lc app=leetcode id=118 lang=cpp * * [118] Pascal's Triangle */ // @lc code=start class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> result; for (int i = 0; i < numRows; i++) { vector<int> row(i + 1, 1); for (int j = 1; j < i; j...
ALGO
0.999832
6.958461
3ab9e782-1f3c-4fde-9607-4e3cc3a0fe26
tum-phoenix/drive_ros_trajectory_tracking_control
IPOPT/source/Ipopt/Ipopt/src/Algorithm/IpUserScaling.cpp
#include "IpUserScaling.hpp" namespace Ipopt { void UserScaling::DetermineScalingParametersImpl( const SmartPtr<const VectorSpace> x_space, const SmartPtr<const VectorSpace> c_space, const SmartPtr<const VectorSpace> d_space, const SmartPtr<const MatrixSpace> jac_c_space, const SmartPtr<const Ma...
TOOL
0.976432
6.506362
af76ba29-b8c7-429a-a780-de2640e1e147
youssef4140/problemSolving
3-practice/candies.cpp
#include <iostream> using namespace std; int main() { int testCases; cin >> testCases; for (int t = 0; t < testCases; t++) { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } int min = a[0]; for (int i ...
ALGO
0.999652
4.173335
635007c3-b543-410c-82f3-0080445dcf7c
blueboxofdream/Anti-Spoofing-Attendance-Taker
dlib-19.24.4/examples/dnn_metric_learning_ex.cpp
/* This is an example illustrating the use of the deep learning tools from the dlib C++ Library. In it, we will show how to use the loss_metric layer to do metric learning. The main reason you might want to use this kind of algorithm is because you would like to use a k-nearest neighbor classifi...
DATA
0.954455
7.500546
b204d70e-135a-430e-8346-b60c668cbc92
venkys-media/Venky_on_Datastructures
sorting/Bubble-Sort/cpp/sort.cpp
// C++ program for implementing Bubble Sort // This program demonstrates sorting array using bubble sort algorithm // Space complexity: O(1) // Time complexity: //|Operation | Best Case | Average Case | Worst Case | //|-------------|-----------|--------------|------------| //|Bubble Sort | O(n) | O(n^2) ...
ALGO
0.99998
6.361231
61d5d8d2-e585-4266-a14c-a09c4d89ed56
brkdnmz/inzvaland
Algorithm Program/21-22/4. Spring DP/strange-series/sol.cpp
#include <bits/stdc++.h> using namespace std; #define SORT(v) sort((v).begin(), (v).end()) #define RSORT(v) sort((v).rbegin(), (v).rend()) #define REVERSE(v) reverse((v).begin(), (v).end()) #define MAX(v) (*max_element((v).begin(), (v).end())) #define MIN(v) (*min_element((v).begin(), (v).end())) #define pb push_back ...
ALGO
0.999991
3.594818
1503cb3d-bbdd-47fa-bb7e-b4f92af6ee99
zhangwj0101/codestudy
algorithm/HDU-ACM/HDU_ACM_C++/Lucifer/1716.cpp
////////////////////System Comment//////////////////// ////Welcome to Hangzhou Dianzi University Online Judge ////http://acm.hdu.edu.cn ////////////////////////////////////////////////////// ////Username: devil_momo ////Nickname: Lucifer ////Run ID: ////Submit time: 2008-07-23 21:06:33 ////Compiler: Visual C++ ///////...
ALGO
0.999342
3.570394
51d397a8-4f06-4e51-8d72-dbf5f5e103a4
Cyber-SiKu/nowcoder
26/26-1.cpp
/** * 算法思想: * 秋街到某个边时,上一个边已经求解完成部分仅考虑新于加入的点i冲突的点即可 * i边比i-1边相比: * 匹配的重新考虑 * 46.67% * 超时 */ #include <iostream> #include <iterator> #include <vector> using namespace std; using viri = vector<int>::reverse_iterator; class Solution { private: /* data */ vector<long> edges; public: Solution(con...
ALGO
0.99998
3.884702