uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c76dc76d-44bd-4a6f-ab3f-e72f49cfef4d
satyamshahi31/VIPS_DSA
VIPS/Day18/dfs.cpp
#include <bits/stdc++.h> using namespace std; // DFS function void dfs(int node, vector<int> adj[], vector<int> &visited) { visited[node] = 1; cout << node << " "; for (auto it : adj[node]) { if (!visited[it]) { dfs(it, adj, visited); } } } int main() ...
ALGO
0.999971
6.202475
8b5a2ec9-6706-44a3-bcc8-4562854f6647
YttriumWillow/OI
Problems/P3263.cpp
// Problem: P3263 [JLOI2015]有意义的字符串 // Contest: Luogu // URL: https://www.luogu.com.cn/problem/P3263 // Memory Limit: 125 MB // Time Limit: 1000 ms // Created Time: 2023-03-05 16:00:10 #include <iostream> #include <cstring> #include <cmath> #define i64 long long #define i128 __int128 #define reg...
ALGO
0.999936
5.09718
9d5dfe18-4ea4-4d3f-9b4f-3c358572029c
Suchark/lab20
lab20_1.cpp
#include<iostream> #include<cmath> using namespace std; struct Rect{ double x,y,w,h; }; double overlap(Rect r1, Rect r2){ double w = 0,h = 0; if(r1.w + r1.x > r2.x){ if(r1.x + r1.w < r2.x + r2.w) w = r1.w - abs(r2.x - r1.x); else w = r2.w; if(r1.y + r1.h...
ALGO
0.993645
3.734281
844dbb70-d27b-4c23-bd93-7176f666aae4
terabit-hq/terabit
src/timedata.cpp
#include "timedata.h" #include "netbase.h" #include "sync.h" #include "ui_interface.h" #include "util.h" #include <boost/foreach.hpp> using namespace std; static CCriticalSection cs_nTimeOffset; static int64_t nTimeOffset = 0; // // "Never go to sea with two chronometers; take one or three." // Our three time sour...
TOOL
0.874325
6.321342
09d1f65a-6643-41a7-af61-7bf55d3a44c0
Hopsan/hopsan
HopsanCore/src/ComponentUtilities/ludcmp.cpp
//! //! @file ludcmp.cpp //! @author <??> //! @date 2010-11-29 //! //! @brief Contains a functions to solve eq.systems //! //! //! Finds solution to set of linear equations A x = b by LU decomposition. //! //! Chapter 2, Programs 3-5, Fig. 2.8-2.10 //! Gerald/Wheatley, APPLIED NUMERICAL ANALYSIS (fourth edition) //...
ALGO
0.999873
3.873687
d28d0751-1aa1-472f-97de-4461b587b265
RahulDadhich26/GeeksforGeeks-160Days-DSA-Challenge
Difficulty: Medium/Activity Selection/activity-selection.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int activitySelection(vector<int> &start, vector<int> &finish) { // code here vector<vector<int>>vec; for(int i=0;i<start.size();i++){ vec.push_back({finish[i]...
ALGO
0.99914
5.900709
817bdd9a-94bf-4856-8a50-5688975a4b0c
ishandutta2007/codeforces
andrei1998/normal/417/C.cpp
#include <iostream> using namespace std; int main() { int n,k,i,j; cin>>n>>k; if(k>=((n+1)/2)) cout<<"-1\n"; else { cout<<n*k<<'\n'; for(i=1;i<=n;i++) for(j=1;j<=k;j++) cout<<i<<' '<<((i+j-1)%n+1)<<'\n'; } return 0; }
ALGO
0.999826
3.610856
dbd2d693-52c5-4c27-aaaf-4453c469f180
llamazing/leetCode
lc_238.cpp
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { vector<int> result; int i = 0; int res = 1; int res1 = 1; int index1, index2, num =0; if( nums.at(0) == 0) { index1 = 0; ++num; } else res = nums.at(0); for( i = nums.size()-1; i > 0; --i ) { res1 *= nums....
ALGO
0.999976
4.826057
3b6e060c-5e7f-4d4a-80a3-5e7201e57f95
chenchen-cs/oj
pta-L1-013计算阶乘和.cpp
#include<iostream> using namespace std; int func(int i) { int sum=1; for(int j=i;j>=1;j--) sum*=j; return sum; } int main() { int n,sum=0; cin>>n; for(int i=1;i<=n;i++) sum+=func(i); cout<<sum<<endl; return 0; }
ALGO
0.999961
4.708479
db668bf5-af7d-4533-a1e2-b43e535cc9be
federico-zen/Anet-A8-Plus-SKR-1.4-TURBO
Marlin-2.1.1/Marlin/src/feature/backlash.cpp
#include "../inc/MarlinConfigPre.h" #if ENABLED(BACKLASH_COMPENSATION) #include "backlash.h" #include "../module/motion.h" #include "../module/planner.h" axis_bits_t Backlash::last_direction_bits; xyz_long_t Backlash::residual_error{0}; #ifdef BACKLASH_DISTANCE_MM #if ENABLED(BACKLASH_GCODE) xyz_float_t Back...
TOOL
0.939106
6.724175
c39b3934-d6d7-4f13-b911-964c76ba25b3
tupiznak/made22-c
hw2/matrix_calc_lib/matrix_dot.cpp
#include "matrix.h" auto Matrix::IsCanDot(const Matrix &b) const -> bool { return matrix_columns == b.matrix_rows; } void Matrix::ComputeElementInDot(const Matrix &a, const Matrix &b, unsigned processed_row, unsigned processed_col) { if (!IsInBounds(processed_row, processed_col)) { throw std::out_of_r...
ALGO
0.995413
6.475159
8a6418fb-47ed-4806-9ae7-8ef56e982580
parasguglani1/competitive_coding
Codeforces/942 div2/C_Permutation_Counting.cpp
#include <bits/stdc++.h> using namespace std; using namespace chrono; #define ff first #define ss second #define int long long using ll = long long; #define setbits(x) __builtin_popcountll(x) #define zrobits(x) __builtin_ctzll(x) #define mod 1000000007 #define inf 1e18 #define PI 3.1415926535897932384626 #define ps(x,...
ALGO
0.999959
4.00074
46cd7bd9-7d50-4720-b25d-704690d3d695
Rakib69A/M17_0_1_Knapsack
Subset_Sum.cpp
#include <bits/stdc++.h> using namespace std; bool subsetSum(int n, int a[], int s) { if(n==0){ if(s==0) return true; else return false; } if (a[n - 1] <= s) { bool op1 = subsetSum(n - 1, a, s - a[n - 1]); bool op2 = subsetSum(n - 1, a, s); ...
ALGO
0.999983
3.931921
80170401-68f3-4e5d-9ca0-dbeee3d9a865
sachinaggarwal18/DSA
leetcode/recursion_backtracking/kthGrammar.cpp
#include <iostream> using namespace std; class Solution { public: int kthGrammar(int n, int k) { if (n == 1 && k == 1) { return 0; } int length = 1 << (n - 1); int mid = length / 2; if (k <= mid) { return kthGrammar(n - 1, k); ...
ALGO
0.999954
5.800371
a8c65c1f-6d3d-4a2d-83b7-f1ac94477cf0
jeff19sab/Bachelor-Thesis
bullet3-master/bullet3-master/examples/SharedMemory/plugins/stablePDPlugin/RBDModel.cpp
#include "RBDModel.h" #include "RBDUtil.h" #include "KinTree.h" #include "LinearMath/btQuickprof.h" cRBDModel::cRBDModel() { } cRBDModel::~cRBDModel() { } void cRBDModel::Init(const Eigen::MatrixXd& joint_mat, const Eigen::MatrixXd& body_defs, const tVector& gravity) { assert(joint_mat.rows() == body_defs.rows()); ...
ALGO
0.853731
5.740255
db0187b4-332b-497a-b822-bc40d84a4453
kangosgay/frameworks_base
media/jni/android_media_MediaProfiles.cpp
//#define LOG_NDEBUG 0 #define LOG_TAG "MediaProfilesJNI" #include <utils/Log.h> #include <stdio.h> #include <utils/threads.h> #include "jni.h" #include <nativehelper/JNIHelp.h> #include "android_runtime/AndroidRuntime.h" #include <media/MediaProfiles.h> using namespace android; static Mutex sLock; MediaProfiles *s...
TOOL
0.876003
5.144619
edb4f6fa-e00b-49f0-9a78-669dc91e6597
durgeshsonii/PracticeCodes
Geeks/Roman Number to Integer.cpp
#include<bits/stdc++.h> using namespace std; #define LL long long #define pb push_back #define mp make_pair #define sz(_) (int(_.size())) #define len(_) (int(_.length())) const int MX = 100005; map<char, int> val; int main(){ int t; cin>>t; string s; val['I'] = 1; val['V'] = 5; val[...
ALGO
0.999944
4.926302
c3cb971b-0a01-44dd-8dc1-630ff0c94fda
123shanawaz/leetcode-solution-with-shanawaz
2148-count-elements-with-strictly-smaller-and-greater-elements/2148-count-elements-with-strictly-smaller-and-greater-elements.cpp
class Solution { public: int countElements(vector<int>& nums) { sort(nums.begin(),nums.end()); int min=nums[0]; int max=nums[nums.size()-1]; int count=0; for(auto it:nums){ if(it>min&&it<max) count++; } return count; } ...
ALGO
0.999902
5.466567
18bc224a-fdaa-413e-afef-b14f1907942c
Devansh-Agarwal/Mitigating-Spectre-Meltdown
lib/Support/Process.cpp
#include "llvm/Support/Process.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Config/llvm-config.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" using namespace llvm; using namespace sys; //===------------------------------...
TOOL
0.955213
7.680797
bf330f7c-3da2-4500-9886-497bcbd1fa1e
hannespetur/free.simd
test/doc/arithmetic/fnma.cpp
//================================================================================================== //================================================================================================== //! [fnma] #include <boost/simd/arithmetic.hpp> #include <boost/simd/pack.hpp> #include <boost/simd/function/enumerat...
ALGO
0.98434
5.094171
7d4438be-f2f8-4404-a3e7-7e0a620b9bd4
2019331099-Rabbi/Online-Judges-Problems-Solution
Codeforces/B_Party.cpp
#include <bits/stdc++.h> #define endl '\n' #define PI acos(-1) #define sz 100010 #define inf 1000000009 #define mod 100000000 #define RUN_FAST ios::sync_with_stdio(false); using namespace std; void solve() { int n, m; cin >> n >> m; int arr[n + 1]; for (int i = 1; i <= n; i++) cin >...
ALGO
0.99996
5.170908
fb7bc73e-d2f1-43b5-b3d5-5e9f5f2b5ac6
KoreaFriedChips/Competitive-Programming
COCI/'06 Contest 1/Bond.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #include <string> #include <iomanip> #include <queue> using namespace std; #define ll long long #define pb push_back #define ull unsigned long long #define pii pair<int, int> #define mp make_pair #define vi vector<int> #define endl '\n' #defin...
ALGO
0.999895
4.44861
a4aa0425-420e-4fb4-afe2-7c12289ae3ec
vaios84/Exercises
UVa/599-connectedANDaloneVertices.cpp
#include <stdio.h> #include <bitset> using namespace std; const int MAX = 26; char get_token(){ char c; while(scanf("%c",&c)){ if((c >= 'A' && c <= 'Z') || c == '*') return c; } return 0; } int main(){ int tc; scanf("%d",&tc); while(tc--){ char a; int num_edge = 0; bitset<MAX> c...
ALGO
0.999268
3.171741
496c1542-d1ec-4c14-b47b-250d2e0a91e1
Rohit7798C/CPPCrash
week4/c_doubt_class_on_array/c_reverse_an_array/reverse_an_array.cpp
//Q. Rotate an Array using reverse method. #include<iostream> #include<vector> #include<algorithm> using namespace std; void rotateArray(vector<int>&arr,int k){ //1.reversing all the elements reverse(arr.begin(),arr.end()); // [start_address, end_address + 1], where (end_address+1) is not included. ...
ALGO
0.999869
5.062059
f9866beb-6652-4725-a0f0-7561d04f24b1
nampluskr/coding_test
solved_old/221119_조별경기/solution_manual.cpp
#if 1 // Manual 471 ms // 1.Array + 2.Linked List #define NUM_PLAYERS 100001 void swap(int& a, int& b) { int temp = a; a = b; b = temp; } template<typename Type> struct LinkedList { struct Node { Type data; Node* next; }; Node* head; Node* tail; int size; void clear() { head =...
ALGO
0.999816
4.156677
1b4c0b76-969b-4e42-9581-389dfb62d1c4
Oriburger/problem_solving_1w3solve
BOJ/6064_카잉달력.cpp
#include <iostream> #include <algorithm> using namespace std; int GCD(int a, int b) { if(b==0) return a; return GCD(b, a%b); } int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin>>t; while(t--) { int m, n, x, y, ans=0; cin>>m>>n>>x>>y; if(m>n) { swap(x, y); ...
ALGO
0.999939
3.552468
6c159ddd-46ae-4b3b-9f94-359bc6231813
ckj119940887/ann_gem5
src/systemc/tests/systemc/misc/v1.0/dash3/speed.cpp
/***************************************************************************** speed.cpp -- Definition of the speedometer. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /*************************************************************...
ALGO
0.883235
6.065718
f9439af2-5a25-4b27-a46e-953b133bb35c
Sakshirajale/-Design-and-Analysis-of-Algorithms-
Shops.cpp
#include <iostream> using namespace std; struct Shop { int start, end; }; // Bubble sort to sort shops based on their ending time void bubbleSort(Shop shops[], int N) { for (int i = 0; i < N - 1; ++i) { for (int j = 0; j < N - i - 1; ++j) { if (shops[j].end > sh...
ALGO
0.999975
5.695483
e3013c29-71d7-47ab-892c-404fcc90b57a
daoporo102/Magic-8-ball
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
3d4d5da1-8c0c-4760-bcb2-631725103f6d
MR-MaoJiu/beauty_cam
example/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.998905
6.785645
c7e2ceb1-23ba-4736-8aa6-698a76b6a847
jason-fxz/ACM-template
SCL_others/Other/SJTU_ACM_Platelet/Template/Source-25/Geometry/basic_geometry.cpp
point intersect(const line &a,const line &b){ number s1 = det(a.b-a.a,b.a-a.a); number s2 = det(a.b-a.a,b.b-a.a); return (b.a*s2-b.b*s1)/(s2-s1); } point projection(const point &p,const line &l){ return l.a+(l.b-l.a)*dot(p-l.a,l.b-l.a)/ (l.b-l.a).len2(); } number dis(const point &p,const line &l){ ...
ALGO
0.999636
4.702477
4cb99e4d-0a40-4995-8c61-9e63904e8f3c
alerdenisov/eos-schnorr-verification
contracts/musig/bigint/BigIntegerAlgorithms.cpp
/** * This source adapted from https://mattmccutchen.net/bigint/ by Mithrilcoin.io for EOS.IO smart contract. */ #include "BigIntegerAlgorithms.hpp" #include <eosiolib/system.h> BigUnsigned gcd(BigUnsigned a, BigUnsigned b) { BigUnsigned trash; // Neat in-place alternating technique. for (;;) { if (b.isZero()...
ALGO
0.995961
6.766144
2082df75-3458-4096-ab56-621d267fcb5f
khantaimoor/Programs-Of-C-
BinaryTreeWithNode.cpp
#include<iostream> #include<queue> using namespace std; class Node { public: int data ; Node *left, *right; Node (int value ) { data = value ; left=right=NULL; } }; int main () { int x; cout<<"Enter the root element : "; cin>>x; int first,second; Node *root = new Node (x); queue<Node*> ...
ALGO
0.999787
4.06887
1b909ab9-8324-427c-994f-d9278f329802
NikitaNikson/xray_stalker_sdk_04_fixed
xrODE/ode/src/collision_util.cpp
/* some useful collision utility stuff. this includes some API utility functions that are defined in the public header files. */ #include <ode/common.h> #include <ode/collision.h> #include <ode/odemath.h> #include "collision_util.h" //**************************************************************************** int...
ALGO
0.999661
3.749851
dd267d10-ee7e-4fa6-8402-3ea02c56043a
rdfiske17/languagelogger-app
LatinIME/native/jni/src/dictionary/utils/forgetting_curve_utils.cpp
#include "dictionary/utils/forgetting_curve_utils.h" #include <algorithm> #include <cmath> #include <stdlib.h> #include "dictionary/header/header_policy.h" #include "dictionary/utils/probability_utils.h" #include "utils/time_keeper.h" namespace latinime { const int ForgettingCurveUtils::MULTIPLIER_TWO_IN_PROBABILIT...
ALGO
0.992436
7.820374
a96dd497-3636-425e-8b1d-bc676bab252b
SarthakSarans/Leet-Code
LeetCode75/DeleteMiddleNodeOfLinkedList.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* deleteMiddl...
ALGO
0.999834
5.88514
b9125af4-2947-4678-9dab-a0fecbca5c09
Junaid7200/University-Labs
Data Structures/Trees/.history/AVL_20240508212033.cpp
// avl means Adelson, Velsky and Landis since these dudes came up with AVL trees // each node has a balance factor, which is the difference between its left and right subtree, a node is balanced if this factor is -1 or 0 or 1 // so whenever the factor is other then -1 0 and 1, that node is unbalanced, so we must balanc...
ALGO
0.999921
5.719257
a874336c-331e-481e-bb0f-a0d599947dd2
kbc19b13/PECO
GameTemplate/Game/bulletPhysics/src/BulletCollision/Gimpact/gim_tri_collision.cpp
/*! \file gim_tri_collision.h \author Francisco Leon Najera */ #include "gim_tri_collision.h" #define TRI_LOCAL_EPSILON 0.000001f #define MIN_EDGE_EDGE_DIS 0.00001f class GIM_TRIANGLE_CALCULATION_CACHE { public: GREAL margin; btVector3 tu_vertices[3]; btVector3 tv_vertices[3]; btVector4 tu_plane; btVector4 tv_...
ALGO
0.999691
5.737035
72771c8f-260c-477b-9da2-0c24e97e8020
syohex/advent_of_code
2020/day08/main.cpp
#include <cassert> #include <iostream> #include <string> #include <vector> #include <cstdio> namespace { enum class InstructionType { kAcc, kJmp, kNop, }; struct Instruction { InstructionType type; int value; bool operator==(const Instruction &other) const { return type == other.type...
ALGO
0.996601
5.755486
78b476c4-6853-410e-a0ec-d85df04f24d0
FangStars/z3_network_guided
src/tactic/goal_shared_occs.cpp
#include "tactic/goal_shared_occs.h" void goal_shared_occs::operator()(goal const & g) { m_occs.reset(); shared_occs_mark visited; unsigned sz = g.size(); for (unsigned i = 0; i < sz; i++) { expr * t = g.form(i); m_occs(t, visited); } }
ALGO
0.91711
3.986045
5d736a77-47f9-4a72-92f7-cc97ab457579
jobstdavid/boostCopula
src/matrix_operations.cpp
#include <RcppEigen.h> // [[Rcpp::depends(RcppEigen)]] // [[Rcpp::export]] SEXP matvecmult_eigen(const Eigen::Map<Eigen::MatrixXd> A, const Eigen::Map<Eigen::VectorXd> b, int n_cores){ Eigen::setNbThreads(n_cores); Eigen::VectorXd C = A * b; return Rcpp::wrap(C); } ...
ALGO
0.994848
5.484141
43ce2b3d-8274-4187-9910-fa99ea28367b
samuelrivas/monorepo
src/c++/algos-n-fun/src/src/p-maxim.cpp
#include <random> #include <iostream> #include <cassert> #include <chrono> #include <thread> #include <future> #include <vector> #include <mutex> #include <queue> #include <condition_variable> #include <limits> #include <algorithm> #include <rnd.hpp> #include <asyncq.hpp> using std::default_random_engine; using sam::...
TOOL
0.958031
5.065373
352424ce-0691-4d09-86c5-41c4b18a52d1
Bebeto03/Logica_de_Programacao
C++/Lista_03(Estrutura_Repetitiva)/Soma_Impares.cpp
#include <iostream> using namespace std; int main(){ int x, y, soma=0; cout << "Digite dois numeros:" << endl; cin >> x; cin >> y; if (x>y){ for(int i=y+1;i<x;i++){ if(i%2!=0){ soma += i; } } } else{ for(int i=x+1;i<y;i++){...
ALGO
0.999753
4.138529
22a7707f-e54d-4f98-b540-e20affeefa1b
KeyboardDanni/godot-for-sidescrollers
scene/3d/skeleton_ik_3d.cpp
/**************************************************************************/ /* skeleton_ik_3d.cpp */ /**************************************************************************/ /* This file is part of: */ /* ...
TOOL
0.985191
6.883367
1bf54872-79fe-414d-a490-dd5e6ab79608
mithrandirgreyhame/arda
isengard/cpp_training/hackerrank_cpp/Map-STL/main.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <set> #include <map> #include <algorithm> #include <string> using namespace std; int main() { map<string, int> m; int x; int n; cin>>n; char s[1001]; int p; for(int i=0;i<n;i++){ cin>>x; ...
ALGO
0.994384
3.582917
87b5d2ea-0126-45b1-b871-55fa6fec1778
timhealey3/Turn-Based-RPG
RPGPrototype1/map.cpp
#include <iostream> #include <cstdlib> #include <random> #include "map.h" // TODO implement Binary Space Partioning // BSP tree carves space into sets of succesive half space // BSP is built by making Binary Tree where each node has a plane // start with rectangular dungeon // choose random direction and split into ...
ALGO
0.998187
4.326998
a9883838-0258-409c-95b0-bb1a21b04e88
munh-orgil/leetcode
2024/10. oct/(03) 1590. Make Sum Divisible by P.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: Solution() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } int minSubarray(vector<int>& a, int p) { int n = a.size(); vector<int> pre(n + 1, 0); int sum = 0; f...
ALGO
0.999892
4.287838
a8ed522a-a5f3-4e6b-8d92-6887b6254b74
rosekc/cpp
book/chapter2/homework/2-30.cpp
#include <iostream> using namespace std; int main() { double kg, cm; double bmi; string result; cout << "pkease type your weight(kg) and height(m):"; cin >> kg; cin >> cm; bmi = kg / (cm * cm); if ( bmi < 18.5 ) { result = "Unde...
TOOL
0.971702
4.635936
c99b96ea-ceed-4d3a-9dc2-283ccdd55e66
raincross7/code-similarity
codes/train_code/problem428/problem428_495.cpp
#include <iostream> #include <utility> #include <map> #include <vector> #include <algorithm> #include <queue> #include <math.h> #include <stack> #include <set> #include <deque> #include <cmath> using namespace std; typedef long long ll; ll mod = 1e9+7; //ll mod = 998244353; #define rep(i,n) for(int i = 0; i < (n); ++i...
ALGO
0.999905
4.260529
4f13441e-8202-4fbd-9ee6-f315b99545c4
mickeyouyou/NVIDIA_CUDA-10_Samples
4_Finance/quasirandomGenerator/quasirandomGenerator_gold.cpp
#include <stdio.h> #include <math.h> #include "quasirandomGenerator_common.h" //////////////////////////////////////////////////////////////////////////////// // Table generation functions //////////////////////////////////////////////////////////////////////////////// // Internal 64(63)-bit table static INT64 cjn[63...
ALGO
0.998936
4.457221
49bbb8a1-6c87-4f16-93e1-7d78b79dcf2b
NeKroFR/AdventOfCode
2024/day02/part1.cpp
#include <vector> #include <string> #include <sstream> using namespace std; int part1(const std::vector<std::string> &input) { int safe = 0; for (const auto &line : input) { istringstream iss(line); vector<int> numbers; int number; while (iss >> number) { numb...
ALGO
0.999228
5.646948
fc445509-3c0d-4f45-bc0d-0af39815f611
tiendong96/C-Practice
C++/iterators.cpp
#include <iostream> #include <vector> using namespace std; int main(){ vector<int> ar = {1,2,3,4,5}; //declaring iterator to a vector vector<int>::iterator ptr; //Displaying vector elements using begin() and end() cout << "The vector elements are: "; for (ptr = ar.begin(); ptr < ar.end(); pt...
ALGO
0.987697
3.807792
f2025bfd-6cec-4edf-b4ea-747771e3d51f
proydakov/codeforces
Codeforces_Round_#575/A/solution.cpp
#include <array> #include <cstdint> #include <iostream> #include <algorithm> int main() { std::ios::sync_with_stdio(false); int q = 0; std::cin >> q; for(int i = 0; i < q; i++) { std::int64_t a = 0; std::int64_t b = 0; std::int64_t c = 0; std::cin >> a; st...
ALGO
0.999966
4.699806
8873725c-7b16-48a4-aefe-78f0c4eb5155
harsh-narayan-nishad/DSA-2.0-Codes
Dynamic Programming/dp class 6 codes/dp class 6 codes/minCost.cpp
class Solution { public: int solveUsingRecursion(vector<int>& arr, map< pair<int,int>, int >& maxi, int s, int e) { //base case if(s > e) { return 0; } if(s == e) { return 0; } int ans = INT_MAX; for(int i=s; i<e; i++) { /...
ALGO
0.999985
5.585565
7fa6ccf3-1ac1-4e2c-9ca0-16e69fb6038a
xaviernara/ECE-152
lab 10/Richardson _lab10_p3.cpp
#include <iostream> //#include<time.h> using namespace std; struct date { int month; int day; int year; }; void older(date *, int &); void older(date * input, int &dif) { //int greater; //int start_dif = 0; int dif1 = 0; int dif2 = 0; date tempdate; tempdate.month = 1; tempdate.day = 1; tempdate.year = 1; ...
ALGO
0.996535
3.255955
01fdffa4-c528-40ea-9a2f-cf0e27f36857
bismuth1102/hawkeye
app/src/main/cpp/SORT.cpp
// // Created by 56291 on 2021/1/10. // #include <iomanip> // to format image names using setw() and setfill() #include <set> #include "android/log.h" #include "SORT.h" #include "Hungarian.h" #include "KalmanTracker.h" #include "opencv2/video/tracking.hpp" #include "opencv2/highgui/highgui.hpp" using namespace std; ...
ALGO
0.997328
6.023784
47c7c049-d383-41af-a790-ce66c9d4b42f
k3nsuk3/master-thesis
thesis/Code/dA-noise.cpp
vector<vector<double>> gaussian_noise(const vector<vector<double>> &input, const double mean, const double stddev, const float rate) { vector<vector<double>> result(input); random_device rnd; mt19937 mt; mt.seed(rnd()); uniform_real_distribution<double> real_rnd(0.0, 1.0); std::normal_distribution<double> d...
ALGO
0.99727
5.786255
7e957b68-6068-4ebf-b9d7-c46ac84206dc
rbnor/Algoritmiske-metoder
EKSEMPEL/eks_07.cpp
// Fil: FRODEH \ ALG_MET \ EKSEMPEL \ EKS_07.CPP // Eksemplet viser koden fra sidene 95 og 109 i lreboka. // NB: Har lagt inn ' ' (blank) i element nr.0. // Fire sm endringer gjr at kan utprves for exercise 6 s.114 i lreboka. #ifdef _MSC_VER // For slippe warnings/errors ifm. strcpy: #define _CRT_SECURE_NO...
ALGO
0.999444
3.444824
cae3669c-474f-43cd-b228-11089730ffb7
AndyHendrickson/DicomViewer
src/core/alg/CDecimator.cpp
//////////////////////////////////////////////////////////// // Includes #include <alg/CDecimator.h> #include <OpenMesh/Tools/Decimater/ModQuadricT.hh> #include <OpenMesh/Tools/Decimater/ModAspectRatioT.hh> #include <OpenMesh/Tools/Decimater/ModHausdorffT.hh> #include <OpenMesh/Tools/Decimater/ModNormalFlippingT.hh> ...
ALGO
0.981858
6.115994
d3c4a174-4b43-4f93-9679-afce20a22627
Vaheshan/Labs
Lab 8/heap.cpp
#include <iostream> using namespace std; // function to heapify the tree void heapify(int arr[], int n, int root) { // build heapify int left=2*root+1; int right=2*root+2; int largest=root; if (left<n && arr[left]>arr[largest]){ largest=left; } if (right<n && arr[right]>arr[largest]){ ...
ALGO
0.999867
4.616958
4bd680ff-72b1-44e1-a0cf-c32503963395
QWERTYistoobasic/LeetCode
368-largest-divisible-subset/368-largest-divisible-subset.cpp
class Solution { public: vector<int> largestDivisibleSubset(vector<int>& nums) { sort(nums.begin(),nums.end()); int n=nums.size(); vector<int>dp(n,1); for(int i=0;i<n;i++) { for(int j=0;j<i;j++) { if(nums[i]%nums[j]==0) ...
ALGO
0.999993
5.346614
79e5f6c5-35b8-4ef3-ad66-1105b4a4999a
nsjinie/solved
class_3/S2_11724_dfs/s2_11724_dfs.cpp
// 문제 : 11724 연결 요소의 개수 // https://www.acmicpc.net/problem/11724 // 시간 복잡도 : O() // 알고리즘 : DFS // 풀이 방향 : // DFS로 방문한 node를 check하고 // main 문에서 방문하지 않은 node가 없는지 확인한다 #include <iostream> #include <vector> using namespace std; int N, M, u, v; vector<int> map[1001]; int check[1001]; voi...
ALGO
0.999832
5.516704
a36e8627-bff8-4ab4-b67b-070f162f27e1
Chrysophyt/Tutor_PRG8
Pertemuan 4/code_example/Jawab/no5.cpp
#include<iostream> #include<cmath> int n = 15; int data[15] = {13,17,25,28,30,41,45,56,58,64,73,76,87,91,98}; int L=0; int R=n-1; int buffer=0; int main (){ int findx; std::cin >> findx; while (L<=R) { int M = floor((L+R)/2); buffer = buffer + data[M]; if (data[M]==findx){ ...
ALGO
0.99979
3.576234
9f98fdee-35ae-43e1-a6a6-fa4a70889d56
ishandutta2007/codeforces
lul____sepled1305/normal/1430/E.cpp
#include<bits/stdc++.h> using namespace std; int n,i,j,k; long long ans; string s; vector<int> val; int main() { cin>>n>>s; for(i=0;i<n;i++) { int cur = s[i]-'a'; val.push_back(cur); } for(i=0;i<26;i++) { for(j=0;j<i;j++) { vector<int> sus; ...
ALGO
0.999962
3.644084
1a39eed5-e3b2-42c7-bbd4-233398fcf4bd
MaxwellOliveira01/Competitive-programming
ED/dsu.cpp
#include <bits/stdc++.h> #define debug(x) cout << "[" << #x << " = " << x << "] " #define ff first #define ss second using namespace std; using ll = long long; using ld = long double; using pii = pair<int,int>; using vi = vector<int>; const int INF = 1e9; // INF to INT //const ll INF = 1e18; //INF to LL /*wa? coloca...
ALGO
0.998499
3.020226
b4555166-be7c-449f-8d71-f4e92b103196
namnguyen16082008/VJUDGE
CodeForces-282A.cpp
#include <bits/stdc++.h> #define ll long long int using namespace std; ll t,ans=0; string x; void Solve(){ cin>>x; (x[0]=='+' || x[2]=='+') ? ans++ : ans--; } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cin>>t; while (t--) Solve(); cout<<ans; }
ALGO
0.999653
4.20748
e686f31d-e561-4564-9103-9ab8f2eca755
strncat/algorithms-and-data-structures
graphs/minimum-spanning-trees/kruskal.cpp
// // Kruskal // // Description and Proof // https://strncat.github.io/jekyll/update/2019/04/03/kruskal.html // // Algorithm: // - initialize V sets where the leader of each set is just the vertex itself. // - initialize a set to hold the minimum spanning tree. // - sort all edges in the graph // - and we go th...
ALGO
0.999977
5.872264
043b8dcc-e7b8-44cd-acc9-8856566728d0
risabhsinha8/CompetitiveCoding
Topics/DP/atcoderdp_2.cpp
//https://atcoder.jp/contests/dp/tasks/dp_b #include<bits/stdc++.h> using namespace std; int main() { int n,k; cin>>n>>k; long long int A[n],DP[n]; for(int i=0;i<n;i++) { cin>>A[i]; } DP[0]= 0; DP[1]= abs(A[0]-A[1]); for(int i=2;i<n;i++) { long long int temp = LONG_MAX; int pos=0; for(int j=max(0...
ALGO
0.999961
4.015369
52e16dc4-84b5-4067-866b-0a62a7631ab0
toniortiz/rgbd-slam
Features/SVOextractor.cpp
#include "SVOextractor.h" #include <fast/fast.h> #include <iostream> #include <opencv2/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace std; SVOextractor::SVOextractor(int nLevels, int cellSize, double tresh) : mnLevels(nLevels) , mnCellSize(cellSize) , mThresh(tresh) { } void halfSamp...
ALGO
0.98938
5.849514
cee35974-ec97-4d38-85bc-0b057c5ab101
Tinnerson/CompetitiveProgramming
Codeforces/0158A.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, k; cin>>n>>k; int a[n]; int c=0; int z=0; for(int i=0; i<n; i++){ cin>>a[i]; if(a[i]==0){ z++; } } sort(a, a+n, greater<int>()); ...
ALGO
0.999944
3.815261
dd9bdfdb-b0a5-41a8-8789-75a2a45fdcfc
raincross7/code-similarity
codes/train_code/problem038/problem038_103.cpp
#include <iostream> #include <string> #include <vector> #include <set> #include <stack> #include <queue> #include <map> #include <algorithm> #include <iomanip> #include <math.h> #include <string.h> #include <cstdio> using namespace std; using ll = long long; using pll = pair<ll, ll>; using vl = vector<ll>; using vll = ...
ALGO
0.999916
3.592955
4e62ba27-f096-4438-8745-98bc1a8635f5
HelenRabbit/Data_Structures_and_Algorithms_PTIT
Queue/DSA08017 - SỐ LỘC PHÁT 1.cpp
// Created by Nguyễn Mạnh Quân #include<bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for(int i = a; i <= b; i++) #define FORD(i, a, b) for(int i = a; i >= b; i--) #define F(i, a, b) for(int...
ALGO
0.999645
3.953595
7bbb6ad4-8785-4ffb-a95b-3976bda8ec41
Haricharan1212/CP
oldcode/1772D.cpp
// Haricharan #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; #define fio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); typedef long long ll; // For ordered Tree #incl...
ALGO
0.999376
5.056489
12658287-2f60-416c-829f-a04bc6cf6250
alexandraback/datacollection
solutions_2463486_1/C++/Hobo/C2.cpp
#include <cstdio> #include <set> #include <cmath> using namespace std; set <long long> p; bool check(long long n) { long long a[20], len = 0; while(n) { a[len ++] = n % 10; n /= 10; } for(int i = 0; i < (len >> 1); i ++) if(a[i] != a[len - i - 1]) return false; return true; } void init() { for(int i = 1; i...
ALGO
0.999459
4.362311
8cfb241c-2c3c-4166-a43f-9beae4c307fe
3eveeX/CSC196
Source/ThirdParty/fmod/core/examples/plugins/fmod_distance_filter.cpp
#ifdef WIN32 #define _CRT_SECURE_NO_WARNINGS #endif #include <math.h> #include <stdio.h> #include <string.h> #include "fmod.hpp" extern "C" { F_EXPORT FMOD_DSP_DESCRIPTION* F_CALL FMODGetDSPDescription(); } const float FMOD_DISTANCE_FILTER_PARAM_MAX_DISTANCE_MIN = 0.0f; const float FMOD_DISTANCE_FILTER...
TOOL
0.984971
6.17952
285aade5-902f-4eb8-9f0a-bd82c3de6730
ishandutta2007/codeforces
cldp/normal/740/A.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <cmath> #include <set> #include <vector> #include <algorithm> using namespace std; const int INF = 1000000007; const int MAXN = 1010; int main() { ios_base::sync_with_stdio(false); long long N, A, B, C; cin >> N >> A >> B ...
ALGO
0.999828
3.828964
57cc9731-6d68-4504-8722-502df75c462c
polarr/competitive-programming
Codeforces/Misc/920/920B.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--){ int n; cin >> n; vector <vector <int>> students(n); vector <int> gonetime(n); vector <int> queue; for (int i = 0; i < n; i++){ int a; int b; ...
ALGO
0.999985
4.081921
6e2752fc-d50a-404f-9acb-ab39462baf0a
hunmin-hub/Backjoon-judge
Solved2021/2258.cpp
#include<iostream> #include<vector> #include<algorithm> #define INF 2147483647 #define MINI(A,B) A>B ? B : A using namespace std; vector<pair<int, int> > meat; bool compare(pair<int, int>& A, pair<int, int>& B) { if (A.first == B.first) { return A.second > B.second; } return A.first < B.first; } int main() { int ...
ALGO
0.999987
3.822419
76a6d45e-469a-44a1-bcf6-e5708be22b66
GautamKeshari/DSA_Code
LoveBabbar C++/13a_2.cpp
// #include <bits/stdc++.h> // pair<int, int> firstAndLastPosition(vector<int>& arr, int n, int k) // { // bool flag=false; // int s=0,e=n-1; // while(s<=e){ // if(arr[s]<k && arr[e]>k){ // s++;e--; // }else if(arr[s]<k){ // s++; // }else if(arr[e]>k){ // ...
ALGO
0.999871
5.168229
537311a6-3244-4b67-a3ae-cb8168a7863a
umerfayyaz2/C-PlusPlus-Laboratory
Computer_Speed_Programming_2024/Programming_Fundamental_Problems/prime_num.cpp
#include <iostream> #include <cmath> // For sqrt function using namespace std; void check_prime_num(int number) { // Check if the number is less than 2 if (number < 2) { cout << number << " is not a prime number." << endl; return; } // Check for factors from 2 to the square root of...
ALGO
0.995768
5.28818
9db735d8-ac73-46b2-bbfa-83c0b03b79af
cristiancrazy/Useful-tools
Educational Exercises/Miscellaneous/subContains.cpp
/********************************************************************************* * Author: Cristian Capraro * Lang: C++ * School: I.T.I.S. G. Fauser - Novara Class: 4CIN * Esercizio N°4: * Scrivere un programma che riceva in ingresso due parole inserite da tastiera * Si consideri che ciascuna parola può co...
ALGO
0.998067
5.018049
3ddabca9-0849-41ee-94ed-939c65bf20aa
kol060k/Yandex_Algorithm_Training_2021
HW5/D.cpp
#include <vector> #include <iostream> using namespace std; long long calc_variants(vector<int> monuments, int n, int min_dist) { int L, R = 0; long long variants = 0; for (L = 0; L < n; L++) { // Интересное замечание по условию ниже! Если R == n, то R < n == false и всё, что стоит после && не вычисляется, // т...
ALGO
0.999785
3.937341
0eaaa2e0-6d84-412d-84b2-b087bbe4ac96
PratyushJaiswal999/Mission-DSA
LEETCODE/215-kth-largest-element-in-an-array.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { priority_queue<int, vector<int>, greater<int>> minHeap; for (int num : nums) { minHeap.push(num); if (minHeap.size() > k) minHeap.pop(); } return minHeap....
ALGO
0.999946
5.724785
b83bad62-4bae-45fd-ae90-d101b62814ed
pratiksaha/practice
geometric/classifyTriangle.cpp
//to classify a given triangle #include<bits/stdc++.h> using namespace std; class Point { public: int x, y; Point() {} Point(int x, int y) : x(x), y(y) {} }; inline int square(int x) { return x * x; } inline int euclidDistSquare(Point p1, Point p2) { return square(p1.x - p2.x) + square(p1....
ALGO
0.99979
5.035917
9277ee63-957b-4ca8-bebf-5904cf1937f7
physics/usaco
cses/increasingArray.cpp
#include <bits/stdc++.h> using namespace std; #define int long long typedef long double ld; typedef pair<int, int> pii; typedef pair<ld,ld> pdd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<pii> vpii; typedef vector<pdd> vpdd; #define FOR(x,y) for(int x=0;x<y;x++) #define FOR1(x,y) for(int x=1;x...
ALGO
0.999951
3.836938
11359512-dc37-4b27-a996-e6dbf172291c
Twix19/c_university
Samostoyatelnaya_rabota_2_1/Boolean13/ConsoleApplication1/ConsoleApplication1.cpp
#include <iostream> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; bool res = (A > 0 || B > 0 || C > 0); res == 1 ? cout << "True" : cout << "False"; return 0; }
ALGO
0.999109
4.291086
2ff27c27-8a7e-4613-8611-fd48011ccf1e
VIXELCoin/WalletVixel
src/crypto/siphash.cpp
#include <crypto/siphash.h> #define ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) #define SIPROUND do { \ v0 += v1; v1 = ROTL(v1, 13); v1 ^= v0; \ v0 = ROTL(v0, 32); \ v2 += v3; v3 = ROTL(v3, 16); v3 ^= v2; \ v0 += v3; v3 = ROTL(v3, 21); v3 ^= v0; \ v2 += v1; v1 = ROTL(v1, 17); v1 ^= v...
ALGO
0.999722
6.860593
52661cc3-163b-48c5-9941-b9391a347eb4
virtbsd/virtbsd
contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
#define DEBUG_TYPE "ipconstprop" #include "llvm/Transforms/IPO.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/Support/CallSite.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/SmallVector.h" using...
TOOL
0.9822
7.767429
a6c80f8f-d64c-40e7-9e4b-69c7626f58e1
sanjiv0286/Leetcode-Problem-Submissions
3555-final-array-state-after-k-multiplication-operations-i/3555-final-array-state-after-k-multiplication-operations-i.cpp
class Solution { public: vector<int> getFinalState(vector<int>& nums, int k, int multiplier) { int n = nums.size(); for(int i=0;i<k;i++){ int mini = * min_element(nums.begin(),nums.end()); for(int j=0;j<n;j++){ if(nums[j]==mini){ nums[j] *...
ALGO
0.999992
5.187515
930b594b-177f-4dbd-bd57-c0ebbafb3cc4
hamdeyelattar/navBar
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
825a59b0-f29e-46cf-8295-f85324389a05
Dev-RubinJo/AlgorithmCpp
AlgorithmC++/Algorithm/ProblemSolving/LeetCode/GroupAnagrams.cpp
#include <stdio.h> #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { vector<vector<string>> ans; vector<string> check; string str; for(int i = 0; i ...
ALGO
0.999988
5.844438
e4827d3a-9c55-4987-9d76-52efc1cd3e80
harshit-jain52/CP_DSA
CSES/1618.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' typedef long long ll; int main() { ll n, num = 5; cin >> n; int ct = 0; while (num <= n) { ct += n / num; num *= 5; } cout << ct; }
ALGO
0.999815
3.966993
dd5ee275-9bc7-4e52-b89b-2ff68f8d3d9a
MehradShm/AlgorithmCodes
codeforces/279/b.cpp
#include <iostream> #include <queue> using namespace std; const int maxn=200050; pair<int,int> a[maxn]; int t[maxn]; pair<int,int> f; queue<pair<int,int > > q; bool mark[maxn]; int main() { int n; cin >> n; for(int i=0;i<n;i++) { cin >> a[i].first >> a[i].second; f[a[i].first].first=i; f[a[i].second].second...
ALGO
0.999963
3.591599
8429eedc-d5c1-4c87-a6a6-6cebe3a38800
KeckCAVES/CollaborationInfrastructure
Collaboration/CollaborationServer.cpp
#include <Collaboration/CollaborationServer.h> #include <iostream> #include <algorithm> #include <Misc/ThrowStdErr.h> #include <Misc/StandardValueCoders.h> #include <Misc/CompoundValueCoders.h> #include <Comm/TCPPipe.h> namespace Collaboration { /*************************************************** Methods of class C...
WEB
0.956417
4.312405
d34303c0-1d92-412d-b750-e724f3e5ccda
maheshjainckd/Hacktoberfest2022-for-everyone
CPP/kickstart.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } int ans=2; int d = a[1]-a[0]; int j= 2; int curr = 2; while (j<n) { if(a[j]-a[j-1] == d ){ curr++; } else{ d=a[j]-a[j-1]; curr=2; } ans = max (a...
ALGO
0.999779
4.048414
1dbbdb6d-8de7-44dd-9304-98b36a5b7b24
Dewansh32/My-DSA-codes
deletion.cpp
#include<iostream> using namespace std; int main() { int arr[50] = {5,7,9,15,10,6}; int sz = 6; int pos,item; cout<<"Enter pos you want to make free: "; cin>>pos; if(pos<=0 || pos>sz) cout<<"Invalid pos"<<endl; else { item = arr[pos-1]; for(int i=pos-1;i<sz;i++) ...
ALGO
0.999884
3.501291
e68945fa-15ef-4882-9c50-b064bc350bf1
starrykss/ProblemSolving
Baekjoon Online Judge (BOJ)/Codes/BOJ2981.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int N, num; vector<int> nums, factors; int gcd(int x, int y) { if (x == 0) return y; else return gcd(y % x, x); } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin...
ALGO
0.999985
4.676261
1eb10b38-d622-4f36-86af-4822e22b3fba
IbrahimaDiallo32/C_Plus_Plus
ValidRectangle.cpp
#include <iostream> #include <string> using namespace std; float area(float a, float b){ float area; area = a*b; return area; } float permimeter(float a, float b){ float perimeter = 2*(a+b); return perimeter; } static bool is_Valid_Sum(float a, float b){ bool is_Valid_Sum = false; float sum =a+b; i...
ALGO
0.88984
3.881639
8e1d28b7-1bfb-4b2d-8bc9-7eab14b749a3
eric7237cire/CodeJam
2011/1B/RPI/a.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <list> using namespace std; #define PB push_back #define MP make_...
ALGO
0.999036
3.912483
903158bf-b090-4ff4-94ac-ba9dec6073ba
xenron/sandbox-algorithm-LintCode
C++/construct-binary-tree-from-preorder-and-inorder-traversal.cpp
// Time: O(n) // Space: O(h) /** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right = NULL; * } * } */ class Solution { /** *@param preorder : A list of int...
ALGO
0.999989
6.535424