uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0a350fe8-744c-457c-9b6f-2840bc7384db
Konara2k01/DSA-LABS
Week 9/linkedlist.cpp
#include <iostream> using namespace std; struct Node { string user_name; string password; Node *link; }; struct LinkedList{ Node * head = nullptr; Node * tail = nullptr; int length = 0; void insert(string user_name,string password){ if (head== nullptr){ Node * temp; ...
TOOL
0.894346
3.408705
4cdc2d3b-9de9-458a-86b2-48593e39a2cc
kmjp/procon
atcoder/abc201-250/abc217/e.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999775
4.075283
ba785386-c56f-4923-9db7-a5f145ad7e6e
Surya-driod/DSA
labtwo.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Structure to represent an item with weight and profit per kg struct Item { int wt; double ppk; // profit per kg }; // Comparator function to sort items by weight bool compare(Item a, Item b) { return (a.wt < b.wt); } // Fu...
ALGO
0.999995
6.138788
26cccfa7-25a9-4d2d-8f06-fa3b49ed1f30
ttl2075-stu/COMP267
T1 - Các thành phần cơ bản/T1_tinhS1234.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main () { int a, b, c; cin >> a; cin >> b; cin >> c; cout << fixed << setprecision(3); cout << pow(a,2) - 2*b + (a*b)/(pow(c,2)+3) << endl; cout << (pow(b,2)-4*a*c)/(a*2) << endl; cout << 3*a - pow(b,3) + 2...
ALGO
0.999596
3.556309
b6cde924-c0ae-4d0b-b673-46a01e384b21
kutomei3/OTOG-Answer
Answer/876-ranking.cpp
/** * Author: kutomei3 * date: 8-4-2025 **/ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; template<class T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define int long long signed main() { ios_b...
ALGO
0.999929
4.738716
fb684567-93ca-4ba4-82fc-c7875ccbb4c6
DanyHdz79/dataStructures
hash/act5_2.cpp
//TC1031.2 //Act 5.2 - Actividad Integral sobre el uso de códigos hash (Evidencia Competencia) //Daniela Hernández y Hernández A01730397 //David Eduardo Santiago Sánchez A01733753 //Franco Minutti Simoni A01733927 //Descripción: crea una hash table a partir de los registros encontrados en //la bitácora y p...
ALGO
0.959046
4.749926
83faf6c5-9adb-43ff-84d0-64ffd188c707
shivkaraman/DSA
02_Strivers A-Z DSA sheet/14_Graphs/12_NoOfWaysToArriveAtDest.cpp
// https://leetcode.com/problems/number-of-ways-to-arrive-at-destination/ #include <iostream> #include <vector> #include <unordered_map> #include <map> #include <unordered_set> #include <set> #include <stack> #include <queue> #include <string> #include <algorithm> #include <numeric> using namespace std; class Solutio...
ALGO
0.999987
5.086605
1354bd5a-0f80-4bdf-a367-52d380d72563
pujith22/competitive_programming
codeforces/cfr_1032/p3.cpp
#include<bits/stdc++.h> #define int long long using namespace std; void pujith22() { #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); } int32_t main() { pujith22(); ...
ALGO
0.999984
4.341722
f034a555-e3ad-41fd-b955-0d1e8c5851ce
LingrajSwami/cpp-programming
Program221.cpp
#include<iostream> using namespace std; typedef struct node { int data; struct node *next; }NODE, *PNODE, **PPNODE; class SinglyLL { private: PNODE first; int Count; public: SinglyLL() { cout<<"Inside constructor\n"; first = NULL; Co...
ALGO
0.997389
4.674291
55daa546-4beb-468d-9bfc-07095158b430
Akshatkhurana/CrackYourInternship
SimplifyPath.cpp
class Solution { public: string simplifyPath(string path) { string token = ""; stringstream ss(path); stack<string> st; while(getline(ss,token,'/')) { if(token == "" || token == "." ) { continue; } if(token != "..") { ...
ALGO
0.999962
5.727534
7edfe62d-86c5-45f0-ab16-3cef0af1e654
q1137341474liu/jamegits
Parallel_Programming_works/Project/project/third_party/eigen/unsupported/doc/examples/MatrixLogarithm.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { using std::sqrt; MatrixXd A(3,3); A << 0.5*sqrt(2), -0.5*sqrt(2), 0, 0.5*sqrt(2), 0.5*sqrt(2), 0, 0, 0, 1; std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "...
ALGO
0.99721
3.595733
f5d9ab3e-4b74-48ba-b143-87cbfa262285
jash13desai/InterviewBit-Solutions
Programming/Level 6/Tree Data Structure/Consecutive Parent - Child.cpp
// Problem Name: Consecutive Parent - Child // Problem Link: https://www.interviewbit.com/problems/consecutive-parent-child/ int Solution::consecutiveNodes(TreeNode* root){ if(!root) return 0; int ans(0); queue<TreeNode*> q; q.push(root); while(q.size()){ auto curr = q.front(); q.pop(); int...
ALGO
0.999914
5.915885
7821f7e9-1311-47fc-89a1-a717126371df
ImaginationZ/code
OJ/1041.cpp
#include <iostream> #include <fstream> #include <string> #include <cstring> #include <algorithm> using namespace std; const int MAX = 100001; int tree[MAX]; int find(int x,int from,int max){ if (from>max) return -1; if (tree[from]>x) return tree[from]; int a = find(x,2*from,max); int b = find(x,2*from+1,max); ...
ALGO
0.999884
3.750434
49a17334-463d-4623-9f2c-3f39831a8eca
madalin1907/Fundamental-Algorithms
Florea_Madalin-Alexandru_1_optional/Florea_Madalin-Alexandru_1_optional_5.cpp
// Se parcurge matricea, iar pentru fiecare element nenul si nevizitat se va calcula // aria insulei din care face parte astfel: se adauga elementul in stiva, apoi cat timp // aceasta va fi nevida, pentru fiecare element se va incrementa aria si se vor adauga // vecinii acestuia (sus, jos, stanga, dreapta) pe stiva, da...
ALGO
0.99994
6.177382
4727fd93-c8e5-40e5-a653-60e3f4969ecf
suryasingh30/cpp2
rotateTheBox.cpp
#include<bits/stdc++.h> using namespace std; vector<vector<char>> rotateTheBox(vector<vector<char>>& box){ int m = box.size(); int n = box[0].size(); for(int i=0; i<m; i++) { int start; int end = 0; for(int j=n-1; j>=0; j--) { if(box[i][j] == '.') ...
ALGO
0.999861
4.527875
4e7101c3-2c1d-4b42-abb3-d63d7b239795
crashh/DM818_Matrix_Multiplication
mandatory1/sources/other/benchmark.cpp
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <float.h> #include <math.h> #include <sys/time.h> //NOTE: #include <acml.h> //assumes AMD platform extern "C" { #include <cblas.h> //uses general CBLAS interface } // // Your function must have the following signature: // extern const char* dgemm_d...
TOOL
0.980135
5.974124
a234634a-87bb-4fbd-b1de-ff13702d4e5e
No1CharlesWu/C
C++ Study/3.7coding.cpp
#include <iostream> using namespace std; void P4(); int main() { P4(); return 0; } void P4() { long temp, second, minute, hour, day; cout << "输入整数的秒数:\n"; cin >> temp; const int MINUTE = 60; const int HOUR = 60; const int DAY = 24; second = temp % MINUTE; temp = temp / MINUTE; ...
ALGO
0.938163
3.555166
0d5b2169-66a1-42cc-9755-3adb3234813a
homoglobina/ChinesePostmen
generatorDanych/generateJson.cpp
#include <iostream> #include <nlohmann/json.hpp> #include <fstream> #include <vector> #include <random> using json = nlohmann::json; using namespace std; int main(int argc, char* argv[]) { int v = 3; double saturation = 0.5; unsigned int seed = random_device{}(); if (argc > 1) { seed = stat...
ALGO
0.909536
5.867432
f711768f-6aa2-4e12-8099-060677b6c279
Nezz7/Competitive-programming
Training Marathons/String Marathon/D. Match & Catch.cpp
#include <bits/stdc++.h> #define f first #define s second #define endl '\n' #define LL long long #define LD long double #define pb push_back #define sz(a) (int)a.size() #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define debug(x) cerr << #x << " is " << x << endl; using namespace std; int const...
ALGO
0.999943
4.364109
abfd0cc1-398b-40c5-81eb-7615eb45b2c9
bayazidHossain2/Practice-Code
UVA/UVA 573.cpp
#include<iostream> using namespace std; int main(){ //freopen("001output.txt","w",stdout); double h,u,d,f; while(cin>>h>>u>>d>>f&&h!=0){ int day=1; double c_h=0.0,fact=(u*(f/100.0)); //cout<<fact<<endl; bool f=false; while(true){ //cout<<"Day : "<<day<<" ...
ALGO
0.999323
3.059314
082a97a6-ec26-48d6-9570-1f97062bf8c1
Sanskarr04/Practice
program231.cpp
//DoublyCL #include<iostream> using namespace std; typedef class node { public: int data; node *next; node *prev; node() { data = 0; next = NULL; prev = NULL; } node(int value) { data = value; ...
ALGO
0.999351
4.253885
93787f47-eed2-429a-8d73-360496ae05f1
PriyobrotoKarmakar/Spreme-3.0
SEARCHING & SHORTING/Lec3/odd_occuring_element.cpp
#include<iostream> #include<climits> #include<string> #include<vector> #include<algorithm> using namespace std; int singleNonDuplicate(vector<int>& arr) { int size = arr.size(); int s = 0; int e = size - 1; while (s <= e) { int mid = s + ((e - s)/2); cout<<"mid: ...
ALGO
0.999845
4.804591
470fedd2-f7d3-4fb7-a35e-3f1ad58160ca
pseudo-aloha/NTUEE-SoC-Verification
b07901075_hw3/src/trans/v3NtkExpand.cpp
#ifndef V3_NTK_EXPAND_C #define V3_NTK_EXPAND_C #include "v3Msg.h" #include "v3NtkUtil.h" #include "v3StrUtil.h" #include "v3NtkExpand.h" /* -------------------------------------------------- *\ * Class V3NtkExpand Implementations \* -------------------------------------------------- */ // Constructor and Destructor...
ALGO
0.948425
5.766731
f0da361e-15c9-4018-9ff4-a524c79578f5
pachauriyash/LeetCode-Solutions
0040-combination-sum-ii/0040-combination-sum-ii.cpp
class Solution { public: void recur(vector<vector<int>>&ans,vector<int>& candidates,vector<int>&temp,int target,int index){ if(target==0){ ans.push_back(temp); return; } for(int i=index;i<candidates.size();i++){ if(i>i...
ALGO
0.999995
6.302512
841aeaf8-090e-4d7e-ab38-967dcff5e1da
taivu1898/28tech
C++/Problem/loop_basic/08.cpp
#include <iostream> using namespace std; using ll = long long; const int MOD = 1e9 + 7; int main(int argc, char *argv[]) { cin.tie(nullptr)->sync_with_stdio(false); ll n; cin >> n; int max = 0; while (n >= 10) { if (n % 10 > max) { max = n % 10; } n /= 10; } n >= max ? cout << "YES...
ALGO
0.999877
5.352559
6489cb70-9eb9-4d9e-8feb-0f9c5675587b
jaci-hub/CompetitiveProgrammingSolutions
balancedsplit.cpp
//https://www.facebookrecruiting.com/portal/coding_practice_question/?problem_id=226994905008716&c=4813009892153577&ppid=5892836577408537&practice_plan=0 bool balancedSplitExists(vector<int>& arr){ sort(arr.begin(), arr.end()); int s1=arr[0], s2=arr[arr.size()-1], p1=0, p2=arr.size()-1; vector<int>a, b; a.push...
ALGO
0.999638
5.093711
9cf383cd-1a17-402c-ba68-f380a565e8ef
rashigupta01/450-DSA-Questions
Sorting and Searching/q33.cpp
// MEET IN THE MIDDLE ALGORITHM: https://www.geeksforgeeks.org/meet-in-the-middle/ // Revise the algorithm, useful // Then just use meet in the middle and binary search #include <bits/stdc++.h> using namespace std; #define lld long long int lld c = 0; void subsets (vector<lld> &v, lld pos, lld sum, vector<lld> ...
ALGO
0.999872
4.084392
795070d1-6134-452c-9031-9d95441b5830
mksteve/Clustering
EditDistance/EditDistance.cpp
// EditDistance.cpp : Defines the exported functions for the DLL application. // Public domain and based on algorithm in wikipedia // https://en.wikipedia.org/wiki/Levenshtein_distance #include "stdafx.h" extern "C" { #include <lua.h> #include <lauxlib.h> #include <lualib.h> } #include <vector> #undef min #inclu...
ALGO
0.996917
5.704339
79663644-0e9b-4d29-966b-ec85b747b6f5
runlnr/solid-octo-sniffle
Codeforces/1380C - Create The Teams.cpp
#include <bits/stdc++.h> #define ss second #define ff first #define endl "\n" #define sp ' ' #define pback push_back #define dst distance using namespace std; typedef long long ll; typedef string str; typedef unsigned long long ull; const int MOD = 1e9+7, N = 1e5+7, J = 1e3+7; void solve(int n, int x) { vector<...
ALGO
0.999859
4.365948
fd6885d7-050c-4766-ac6d-3eed3023243c
ishandutta2007/codeforces
bhaskartm/normal/1398/D.cpp
#include <bits/stdc++.h> using namespace std; #pragma optimize("-O3") #define int long long int #define f first #define s second #define pb push_back #define endl '\n' main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int r, g, b; cin>>r>>g>>b; int dp[r+1][g+1][b+1]; for(int i=0; i<=r; i++){ ...
ALGO
0.999589
4.006374
da8a3a77-1796-4a71-8ab7-69f8081b834e
George-Codr/llvm
libc/src/math/generic/fmaf.cpp
#include "src/math/fmaf.h" #include "src/__support/common.h" #include "src/__support/FPUtil/FMA.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(float, fmaf, (float x, float y, float z)) { return fputil::fma<float>(x, y, z); } } // namespace LIBC_NAMESPACE_DECL
ALGO
0.878948
6.714058
78ad1756-acdd-4e30-813e-6a2a6c0bac74
starkdg/mtree
tests/test_mtree2.cpp
#include <iostream> #include <iomanip> #include <random> #include <vector> #include <cassert> #include <cstring> #include "mtree/mtree.hpp" using namespace std; using namespace mt; static long long m_id = 1; static long long g_id = 10001; static random_device m_rd; static mt19937_64 m_gen(m_rd()); static uniform_rea...
ALGO
0.994591
5.396189
486673bb-f233-4df6-9a00-34e86cb8a6fc
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_7149_4.cpp
#include <bits/stdc++.h> using namespace std; map<char, int> m; bool judge(string str) { int count = 0; for (int i = 0; i < 3; i++) { if (str[i] == '.') break; if (str[i] == 'A' && m['A'] == 0) { m['A'] = 1; count++; } else if (str[i] == 'B' && m['B'] == 0) { m['B'] = 1; count++;...
ALGO
0.999969
4.020466
7eb59786-0035-4927-8db5-68c70b3366dd
timeoptimal/flightmare_condensed
lib/Eigen/doc/examples/tut_matrix_coefficient_accessors.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { MatrixXd m(2,2); m(0,0) = 3; m(1,0) = 2.5; m(0,1) = -1; m(1,1) = m(1,0) + m(0,1); std::cout << "Here is the matrix m:\n" << m << std::endl; VectorXd v(2); v(0) = 4; v(1) = v(0) - 1; std::cout << "Here is the vector v:\n...
ALGO
0.99813
3.687909
6044344b-25d7-436e-8bc6-eebdc8a392bd
Lenti05/Simple_GHS
source/main.cpp
#include <iostream> #include <vector> #include <string> #include <thread> #include <fstream> #include "split.hpp" #include "Node.hpp" #include "Output_edges.hpp" using std::vector; using std::string; // INPUT: File containing the adjancency matrix of the network. // OUTPUT: // 1) MST. // 2) Index of the root of MST....
ALGO
0.999273
4.044342
5f8e0c55-dae9-46aa-b504-1d14d27e4a7a
TaurusGGBOY/AlgorithmCode
src/LC297.cpp
#include "string" #include "sstream" #include "queue" #include <queue> using namespace std; // struct TreeNode { // int val; // TreeNode *left; // TreeNode *right; // TreeNode(int x) : val(x), left(NULL), right(NULL) {} // }; /** * Definition for a binary tree node. * struct TreeNode { ...
ALGO
0.999697
6.630224
3d089204-5bbb-40bb-a00c-cf8ab749d0c1
sumit-raghukant-soni/Leetcode_Solutions
151-reverse-words-in-a-string/reverse-words-in-a-string.cpp
class Solution { public: string reverseWords(string s) { string ans = "", tmp = ""; int sz = s.length(), i=0; while(i < sz){ tmp = ""; while(i < sz && s[i] != ' '){ tmp += s[i++]; } if(ans != "" && tmp != "") ans = ' ' + ans; ...
ALGO
0.999971
5.983437
fd313a41-fb34-4156-b0bd-9a7327ce6f9b
paufiol/AnotherSmallEngine
Source/Dependencies/ImGui/misc/fonts/binary_to_compressed_c.cpp
// dear imgui // (binary_to_compressed_c.cpp) // Helper tool to turn a file into a C array, if you want to embed font data in your source code. // The data is first compressed with stb_compress() to reduce source code size, // then encoded in Base85 to fit in a string so we can fit roughly 4 bytes of compressed data i...
TOOL
0.898957
6.612202
cfbc7e06-99ca-4c31-8f7b-ae85ca1fdf0d
GeoffreyRobert/grasp-mining
src/const-heuristic/restricted_selector.cpp
#include <cmath> #include "data/problem.h" #include "data/solution.h" #include "const-heuristic/const_heuristic.h" #include "const-heuristic/restricted_selector.h" using std::pair; using std::vector; RestrictedSelector::RestrictedSelector( const Problem& problem , double alpha, unsigned seed) : CandidateSele...
ALGO
0.993804
5.817937
b8a08221-c79d-4817-be94-aa47ca54d591
SMDPLAYER/SMDGRAM
TMessagesProj/jni/third_party/openh264/src/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
#include "parse_mb_syn_cavlc.h" #include "decode_slice.h" #include "error_code.h" #include "mv_pred.h" namespace WelsDec { #define MAX_LEVEL_PREFIX 15 typedef struct TagReadBitsCache { uint32_t uiCache32Bit; uint8_t uiRemainBits; uint8_t* pBuf; } SReadBitsCache; void GetNeighborAvailMbType (PWelsNeighAvail p...
ALGO
0.996142
3.685082
56245dc0-434e-43c6-8654-b8c71a3acf17
ishandutta2007/codeforces
btzy/normal/854/A.cpp
#include <iostream> using namespace std; unsigned gcd(unsigned a, unsigned b){ while(a>0){ unsigned c=b%a; b=a; a=c; } return b; } int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); unsigned n; cin>>n; for(unsigned i=(n-1)>>1;i>0;--i){ if(gcd(...
ALGO
0.999806
3.593935
5129d133-1654-4bfd-a6bb-12f86df329f8
Saurabhkumar2911/adsa_lab
code/sorting/quick_sort.cpp
#include <bits/stdc++.h> using namespace std; void swapping(int &a, int &b) { int temp; temp = a; a = b; b = temp; } int partition(int arr[], int start, int end) { int pivot = arr[start]; int count = 0; for (int i = start + 1; i <= end; i++) { if (arr[i] <= pivot) count++; } int pivotIndex = start + ...
ALGO
0.999925
5.088016
5f0a7782-88cc-45ca-b6f3-0d103b959319
Warpaudr/projects
my_leetcode/1.cpp
#include<iostream> #include<unordered_map> #include<vector> class Solution { public: std::vector<int> twoSum(std::vector<int>& nums, int target) { std::unordered_map<int,int> data; for (size_t i = 0; i < nums.size(); i++){ int tmp=nums[i]; if(data.fin...
ALGO
0.999971
5.715354
03f6223e-0a90-481c-8e2f-5be776f628e2
TuxMiester/First
InterviewBit/Max_Absolute_Diff.cpp
#include<bits/stdc++.h> using namespace std; int maxArr(vector<int> &A) { int t = A.size(); vector<int> res; int mx = INT_MIN; int mn = INT_MAX; for (int i = 0; i < t; i++) { int cal = (A[i]+i+1); mx = max(mx,cal); } for (int j = 0; j < t; j++) { int ...
ALGO
0.999884
4.043558
ed1cdc99-b878-4431-b504-edb1f3f50692
ishandutta2007/codeforces
derekfeng/normal/161/D.cpp
#include<bits/stdc++.h> using namespace std; int n,K,l[50003],id[50003],ans; vector<int>f[50003]; int cnt,nxt[100004],to[100004],head[50004]; inline void add(int f,int t){ ++cnt; to[cnt]=t,nxt[cnt]=head[f],head[f]=cnt; } int got(int i,int x){ return l[i]-x>0?f[id[i]][l[i]-1-x]:0; } void dfs(int x,int p){ int s=0; ...
ALGO
0.999921
4.119008
968d49d5-e42d-4915-b734-31b994fd4337
Randowlh/Project_ACM_2021
code/ACM模板/二分图最大匹配 (增广路算法).cpp
bool dfs(int x){ for(int i = 1; i <= n_g; i++) if(e[x][i] && !used[i]){ used[i] = 1; if(!boy[i] || dfs(boy[i])){ boy[i] = x; girl[x] = i; return true; } } return false; }
ALGO
0.999908
4.10935
63f5b0d6-2a82-4d3f-b25f-3676f4bc8e7e
SantiagoDeStefano/LeetCode
copyLnkLst_rdmPtr.cpp
#include<iostream> #include<unordered_map> using namespace std; typedef long long ll; typedef double long db; typedef string str; class Node { public: int val; Node* next; Node* random; Node(int _val) { val = _val; next = NULL; random = NULL; } }; //This take way long...
ALGO
0.997501
4.247173
d652e694-c65d-49b7-8f57-ea103e7cce4e
seunghyeonL/ProblemSolving
프로그래머스/0/120831. 짝수의 합/짝수의 합.cpp
#include <string> #include <vector> using namespace std; int solution(int n) { int result = 0; for(int i = 2 ; i <= n ; i += 2) { result += i; } return result; }
ALGO
0.998688
4.422132
c4f01963-eb0f-46e3-ae20-6861af293253
nittella/Cpp
yellow_belt/parser.cpp
#include <iostream> using namespace std; class Node{ public: int Evalute(){ return 0;}; }; Node Parse(const string& tokens, int& x){ } int main(){ cout << "Enter expresion: "; string tokens = "5+7-x*x+x"; // cin >> tokens; // cout << "Enter x: "; int x; // auto expr = Parse(tokens, x); ...
ALGO
0.998402
4.221343
9f5ae008-5b78-4eaf-bc92-8ecc9b436df2
kaorulego5x/comp
gray/multiplication.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0; i < ll(n); i++) #define repd(i, n) for(ll i = n-1; i >= 0; i--) #define ford(i, a, b) for(ll i = a; i >= ll(b); i--) #define fora(i, I) for(const auto& i:I) #define all(x) x.begin(), x.end() #define PB push_back #define ...
ALGO
0.998707
4.18527
a51e2503-2bb8-444e-b2c9-9fc720cee020
JaeHyeon-Cho/flutter-challenge
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.998841
6.783336
d6def68d-11c2-445f-b6ea-2a12ec04a1ab
dhirajpatil2346/compitative
cf 1600/phoenix_and_sistribution.cpp
#include <bits/stdc++.h> // Include every standard library using namespace std; typedef long long LL; typedef pair<int, int> pii; typedef pair<LL, LL> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<LL> vl; typedef vector<vl> vvl; double E...
ALGO
0.999991
4.273563
a4f1edc8-941d-4620-bbbe-8a2b79ed7435
Jackarain/avhttp
boost/libs/spirit/example/qi/compiler_tutorial/calc4.cpp
/////////////////////////////////////////////////////////////////////////////// // // A Calculator example demonstrating generation of AST. The AST, // once created, is traversed, 1) To print its contents and // 2) To evaluate the result. // // [ JDG April 28, 2008 ] For BoostCon 2008 // [ JDG February 18, 20...
TOOL
0.9522
7.896991
ce4c506c-3dd4-4ccd-b247-ff0ca6ac502f
shahin-shuvo/Algorithm
Algorithm/Practise Contest/A.cpp
#include <bits/stdc++.h> using namespace std; class Graph_{ int numVertices; vector<int> *adjList; int* parent; public: Graph_(int vertices){ numVertices = vertices; adjList = new vector<int>[vertices]; } void add_edge(int src, int dest){ adjList[src].push_back(dest)...
ALGO
0.999944
4.748912
9a54cadf-db9f-4ad4-a8b1-e9d830d4afaf
MrKeanu-V/Code-Everyday
CPP/2389.cpp
/* 2389. Longest Subsequence With Limited Sum [Medium - 2] */ #include <iostream> #include <vector> #include <utility> #include <string> #include <set> #include <map> #include <queue> #include <stack> #include <unordered_map> #include <unordered_set> #include <numeric> #include <algorithm> #include <functional> #includ...
ALGO
0.999987
5.740617
08a9aab8-f893-4311-a96f-bddefe4b5d95
NahulRahman/DSA-II
25_Aug_Bellman_ford/BellmanFord_template.cpp
#include<bits/stdc++.h> using namespace std; // Define structures for edge and node struct edge { char v; int w; }; struct node { char vertex; int d; node *parent; vector<edge> adj; // adjacent vertices with weight }; class Graph { public: int V; // number of vertices/nodes in graph n...
ALGO
0.999989
6.003409
a5611adf-b4df-42cf-bf19-f8e6f3c09488
akashkadam2005/Programming_C_Language
PROGRAMING.L.C/online task/task3.cpp
#include <iostream> using namespace std; int main() { int height, base; float ans; cout<<"Enter height and base : "; cin>>height>>base; ans= (0.5)*height*base; cout<<"Area of triangle is : "<<ans; }
ALGO
0.966652
4.918657
13260cb6-ff9c-4f75-9493-5149fe9022b8
sarvex/leetcode-chai
solution/0100-0199/0135.Candy/Solution.cpp
class Solution { public: int candy(vector<int>& ratings) { int n = ratings.size(); vector<int> left(n, 1); vector<int> right(n, 1); for (int i = 1; i < n; ++i) { if (ratings[i] > ratings[i - 1]) { left[i] = left[i - 1] + 1; } } ...
ALGO
0.999999
6.220126
c7b3bd03-fb84-4388-9aaf-4e09d0522588
ROBOT-RIAD/XPSC_MISSION
Week 4/Playing_with_OR.cpp
#include <bits/stdc++.h> #define fo(i, s, n) for (int i = s; i < n; i++) #define ffo(i, s, n) for (int i = s; i <= n; i++) #define ll long long int using namespace std; int countSubarrays(vector<int> v, int n, int k) { int oddCount = 0; for (int i = 0; i <= n - k; i++) { int bit = 0; for (...
ALGO
0.999711
5.179241
cefe12d1-1ab4-4596-bff6-76099d5481c8
canesche/challenge_problems
leetcode/cpp/1032/mysol.cpp
/* Runtime: 228 ms, faster than 78.96% of C++ online submissions for Stream of Characters. Memory Usage: 107.9 MB, less than 38.24% of C++ online submissions for Stream of Characters. memory requirements of Trie is O(ALPHABET_SIZE * key_length * N) where N is number of keys in Trie Time Complexity: In...
ALGO
0.999468
6.432416
ca35ebda-01f6-450f-b99b-35ff5e9453ed
al-shaimon/CP-01
Lab/Cpp_LAB_4/cpp4.cpp
#include <bits/stdc++.h> using namespace std; int add(int a, int b) { return a + b; } int main() { int (*p)(int,int); p = add; cout<<p<<endl; //return memory address of the function //shajalal shohag cp course cout<<p(4,5)<<endl; }
TOOL
0.949617
4.650631
705f32e2-7f9e-4bd4-833a-2ccc0e4dfd4d
jakewoodard/Portfolio
School/CS130/Comlink.cpp
#include <cstring> #include <fstream> #include <iostream> #include <string> using namespace std; typedef unsigned char uchar; // Hamming encoding packages data and parity bits // // Input: 0 0 0 0 d3 d2 d1 d0 // Input: 0 0 0 0 0 p2 p1 p0 // Output: 0 d3 d2 d1 p2 d0 p1 p0 uchar hamming_encode(uchar d, uc...
ALGO
0.999756
5.431679
63831d46-a23f-4502-a4b5-d70bbaf255fc
MauricioA/membrana
celula/src/EntradaSalida.cpp
#ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS #include <direct.h> #endif #include <iostream> #include <fstream> #include <sys/stat.h> #include <cassert> #include <cfloat> #include "EntradaSalida.h" #include "Celula.h" using namespace std; const double EPSILON_DIST = 1e-9; EntradaSalida::EntradaSalida(Celula& celula...
TOOL
0.899485
4.16066
cf140f32-a36f-40e9-8346-005a1891936c
Anikcb/CSES_Practice
Solutions/Fibonacci Numbers.cpp
//#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #include<bits/stdc++.h> //using namespace __gnu_pbds; using namespace std; /*** Typedef ***/ typedef long long ll; typedef unsigned long long ull; /*** STLs ***/ typedef vector <ll> vll; typedef set <ll> sll; typedef multiset <ll> m...
ALGO
0.999989
4.246781
7ce19666-92d0-45a4-9ab1-cc8782747ee0
ishandutta2007/codeforces
intothenight/normal/559/C.cpp
#include <bits/stdc++.h> using namespace std; template<typename T> struct Z_p{ using Type = typename decay<decltype(T::value)>::type; static vector<Type> MOD_INV; constexpr Z_p(): value(){ } template<typename U> Z_p(const U &x){ value = normalize(x); } template<typename U> static Type normalize(const U &x){ Typ...
ALGO
0.999987
4.600335
8ec39453-8587-499a-bc1d-78b9dc8aada9
isce-framework/isce3-ci-testing
cxx/isce3/geometry/RTC.cpp
//-*- C++ -*- //-*- coding: utf-8 -*- #include "RTC.h" #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <string> #include <isce3/core/Constants.h> #in...
ALGO
0.990873
6.085191
d749a9dd-1ae9-4d2a-a26b-50016b52383e
lalor/leetcode
chenhao/algorithms/binaryTreeUpsideDown/binaryTreeUpsideDown.cpp
// Source : https://oj.leetcode.com/problems/binary-tree-upside-down/ // Author : Hao Chen // Date : 2014-11-17 /********************************************************************************** * Given a binary tree where all the right nodes are either leaf nodes with * a sibling (a left node that shares the sam...
ALGO
0.999999
5.76043
a9c85ef1-6932-47e4-8c46-42f9c30b9641
marcosvcloures/maratona
URI/2534.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, q, i; while(cin >> n >> q) { vi valores(n); for(auto &it : valores) cin >> it; sort(valores.rbegin(), valores.rend())...
ALGO
0.999887
3.589328
d155571a-457b-43c8-b5d6-d67d84b43230
JacquesGomes/CppStudy
Lista_1/20220050099/q5/fatorial.cpp
/** * @file fatorial.cpp * @author Jacques Gomes Pinheiro Junior | Matrícula: 20220050099 * @brief Calcula o fatorial do número recebido como parâmetro * @param n Número que será usado para calcular o fatorial * @return Fatorial do número recebido */ #include "fatorial.hpp" #include <iostream> int fatorial(int ...
ALGO
0.999623
5.948072
0b71826f-36d7-4681-b81e-7ed6d7059dfc
chenfan2014/CFgit
C++Primer/DataStruct/pic/fullArray.cpp
const int N = 13; //n的最大值 int d[N]; //记录解 int v[N]; //记录某个值是否遍历过,遍历过是1,否则是0; int n; void DFS(int depth) { if(depth >= n){ //这个意思是我们遍历完了已经 for(int i = 0; i != n; i ++){ cout << d[i]; } cout << endl; return ; } for(int i = 1; i !...
ALGO
0.99996
4.019928
f2af619c-c246-48df-8cb9-76939b53fdd4
Zea2002/Numerical-Method
simpsion_one_third_method.cpp
#include <bits/stdc++.h> using namespace std; double f(double x) { return x * x; } int main() { double a, b; int n; cout << "Enter the lower limit of integration (a): "; cin >> a; cout << "Enter the upper limit of integration (b): "; cin >> b; cout << "Enter the number of subintervals ...
ALGO
0.999944
5.600218
591339e2-a5dd-4fb2-9291-e191aae0dd46
vcxx/turtlebot3_teb
src/navigation/navfn/src/navfn.cpp
// // Navigation function computation // Uses Dijkstra's method // Modified for Euclidean-distance computation // // Path calculation uses no interpolation when pot field is at max in // nearby cells // // Path calc has sanity check that it succeeded // #include <navfn/navfn.h> #include <ros/console.h> namespace n...
ALGO
0.999827
3.877908
6f5ff52b-6e38-45e1-9cc7-2cef0a7c3ce2
tomasnyberg/DIY_Redis
sset.cpp
#include "sset.h" #include "avltree.h" // #include "hashtable.h" #include "util.h" static bool hcmp(HNode *node, HNode *key) { if (node->hcode != key->hcode) { return false; } ZNode *znode = container_of(node, ZNode, hmap); HKey *hkey = container_of(key, HKey, node); if (znode->len != hkey...
ALGO
0.971223
4.839567
de5418fe-8643-4c88-9690-9c10468c8113
GKcodebase/DSA
CPP/Algorithms/Dynamic Programming/Easy/minimumNumberOfcoinForValue.cpp
#include "./../../../stdc++.h" using namespace std; /** * @brief Given a value V, if we want to make a change for V cents, * and we have an infinite supply of each of C = { C1, C2, .., Cm} valued coins, * what is the minimum number of coins to make the change? If it’s not possible to make a change, * print -1. ...
ALGO
0.999981
5.523994
45977840-c1b6-40d9-a84c-89b1930b836e
Rookie0208/Learnings
Cpp Competitive/Lc_prefixSum_wordPattern.cpp
/* Given a pattern and a string s, find if s follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in s. Example 1: Input: pattern = "abba", s = "dog cat cat dog" Output: true Example 2: Input: pattern = "abba", s = "dog cat cat fis...
ALGO
0.979393
5.091258
c6736c7d-e40b-4437-810d-3c67528af847
HPC-AI-Team/lammps-fugaku-threadpool-sc23
lib/linalg/dorm2r.cpp
#ifdef __cplusplus extern "C" { #endif #include "lmp_f2c.h" static integer c__1 = 1; int dorm2r_(char *side, char *trans, integer *m, integer *n, integer *k, doublereal *a, integer *lda, doublereal *tau, doublereal *c__, integer *ldc, doublereal *work, integer *info, ftnlen side_len, ftnlen tran...
ALGO
0.958302
5.935921
e9249f9e-97b3-4b1e-a535-108c641eafc1
mdshakibsami/Codeforces
800/team.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n][3], count = 0; for (int i = 0; i < n; i++) { int count1 = 0; for (int j = 0; j < 3; j++) { cin >> arr[i][j]; if (arr[i][j] == 1) { count...
ALGO
0.999841
4.209207
60877987-dd44-4b18-ab6a-931b1b40d9ac
AndroidOne-Experience/frameworks_native
services/inputflinger/dispatcher/trace/InputTracer.cpp
#define LOG_TAG "InputTracer" #include "InputTracer.h" #include <android-base/logging.h> #include <private/android_filesystem_config.h> namespace android::inputdispatcher::trace::impl { namespace { // Helper to std::visit with lambdas. template <typename... V> struct Visitor : V... { using V::operator()...; };...
TOOL
0.894324
7.774677
51a494fc-de2a-4045-987b-68a8865697f3
hjiang13/LLMs-in-IR
POJ-104/36/1566.cpp
#include <iostream> using namespace std; int main(void) { char str1[1000],str2[1000]; int count1[128]={ 0} ,count2[128]={ 0} ; cin >> "%s",str1); cin >> "%s",str2); int strl1=strlen(str1),strl2=strlen(str2); if(strl1!=strl2) { cout << "NO"); return 0; } for(int i=0; i<strl1; i++) count1[str1[i]]++; for(int i=0; i<strl2...
ALGO
0.999994
3.058032
035da2b5-c772-41d5-a49b-acb700947511
kevnefeg/Labosfunda
labo 6/MCD.cpp
#include <iostream> using namespace std; //Formula int mcd(int nm1, int nm2) { if (nm1 == 0) { return nm2; } return mcd (nm2 % nm1, nm1); } int main() { //entrada de texto int nm1; int nm2; cout<<endl; cout<<"Ingrese primer valor"<<endl; cin>>nm1; cout<<"Ingres...
ALGO
0.966841
3.671579
d6f6b11c-b201-4b72-a97e-4e74325e09f7
nguyenthuylinh7898/My_project
PyCharmProject/opencv-master/modules/stitching/src/matchers.cpp
#include "precomp.hpp" #include "opencv2/core/opencl/ocl_defs.hpp" using namespace cv; using namespace cv::detail; using namespace cv::cuda; #ifdef HAVE_OPENCV_CUDAIMGPROC # include "opencv2/cudaimgproc.hpp" #endif namespace { struct DistIdxPair { bool operator<(const DistIdxPair &other) const { return dist <...
ALGO
0.999246
7.137595
63282494-4f97-448e-9a7f-ed403a527074
Rowan-Essam61/AndroidParkingApp
libraries/tess-two/jni/com_googlecode_tesseract_android/src/ccutil/elst2.cpp
#include <stdlib.h> #include "host.h" #include "elst2.h" /*********************************************************************** * MEMBER FUNCTIONS OF CLASS: ELIST2 * ================================= **********************************************************************/ /**************************************...
TOOL
0.954172
5.236347
2be751c0-089a-4808-b120-67c28417ec46
AIUBCodeArchives/Data_Structure_Sem3
Tasks (Stack, Queue)/task1/reverse.cpp
#include<iostream> using namespace std; int main(){ int arr[10]; cout<<"Enter elements : "<<endl; for (int i = 0; i < 10; i++) { cin>>arr[i]; } cout<<endl; cout<<"Normal order : "<<endl; for (int i = 0; i < 10; i++) { cout<<arr[i]<<" "; } cout<<endl; ...
ALGO
0.983947
3.73696
d9954b5d-4006-43f2-8650-ebf79a6b79cb
gustavoeso/SuperComp
Aula_14/monte_carlo_paralelizado_melhorado.cpp
#include <iostream> #include <random> #include <cmath> #include <ctime> #include <omp.h> int main() { int N = 100000; // Número de pontos int pontos_no_circulo = 0; // Início da medição do tempo double start_time = omp_get_wtime(); #pragma omp parallel { // Gerador de números ale...
ALGO
0.999956
6.620148
99f72415-a0e2-4360-b566-1e1da55abdf3
exmanka/study_2020-2021_cpp
lab2/For 4.cpp
// Ким Михаил НФИбд-01-20 #include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Rus"); cout << "Введите цену 1 кг конфет (вещественное число):" << endl; float cost; cin >> cost; for (int i = 1; i < 11; i++) { cout << "Стоимость " << i << " кг конфет равна " << cost * i << endl; } return ...
TOOL
0.974369
3.593932
0c9c8351-395c-4c0b-9766-94abd20bab5d
PSukhalani-96/Programming-Practice
min_depth_of_a_tree.cpp
/* Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. Note: A leaf is a node with no children. Example: Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 return its min...
ALGO
0.999961
7.000188
e58c76cb-28ed-4572-b95f-f052d7404f87
bachingo/TF2Vintage
src/tier1/KeyValues.cpp
#if defined( _WIN32 ) && !defined( _X360 ) #include <windows.h> // for WideCharToMultiByte and MultiByteToWideChar #elif defined(POSIX) #include <wchar.h> // wcslen() #define _alloca alloca #define _wtoi(arg) wcstol(arg, NULL, 10) #define _wtoi64(arg) wcstoll(arg, NULL, 10) #endif #include <KeyValues.h> #include "fil...
TOOL
0.913301
5.558318
44b4a39d-b3e2-470d-b273-c14f7fdc3019
staroy/depends
boost_1_68_0/libs/compute/perf/perf_exclusive_scan.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/exclusive_scan.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0); }...
ALGO
0.958415
5.044064
f42b272c-1610-4c79-9cea-13b8d0f4e6c5
ishandutta2007/codeforces
saba2000/normal/1373/C.cpp
#include<bits/stdc++.h> using namespace std; main(){ int t; cin >> t; while(t--){ string s; cin >> s; int m = 0; int cnt = 0; long long ans = 0; for(int i = 0 ;i < s.size(); i++){ if(s[i] == '+') cnt++; else cnt--; if(cnt < m) a...
ALGO
0.999926
4.26605
ed57f023-2ef4-44a7-8b36-b140b89acce2
RJ-Mitra/Programming101_CPP
Island_count.cpp
#include<iostream> using std::cin; using std::cout; #define ROW 4 #define COLUMN 5 void islandCalc(int island[ROW][COLUMN], int i, int j){ if(i<0 || i>=ROW || j<0 || j>=COLUMN || island[i][j] == 0){ //Base case return; }else{ island[i][j] = 0; //recursive call islandCa...
ALGO
0.999639
5.599664
a21027d1-90f4-42ef-b674-46b63e911b3d
Kaileshwaran13/CodeChef
1400 - 1600 difficulty rating/Chef and Sign Sequences.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { string s; cin >> s; int less = 0, great = 0, max1 = 0, max2 = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == '<') { less++; great = 0; ...
ALGO
0.999775
3.618122
654961f5-3d92-4e7f-a69b-9de4a829fd66
PointCloudLibrary/pcl
surface/src/3rdparty/opennurbs/opennurbs_intersect.cpp
/* $NoKeywords: $ */ #include "pcl/surface/3rdparty/opennurbs/opennurbs.h" bool ON_IntersectLineLine( const ON_Line& lineA, const ON_Line& lineB, double* a, double* b, double tolerance, bool bIntersectSegments ) { bool rc = ON_Intersect(lineA,l...
ALGO
0.999914
5.906399
6d6bae4e-8668-42df-8abf-423cf4b5d446
frank-castillo/AI-Implementation
AI/Src/CohesionBehaviour.cpp
#include "Precompiled.h" #include "CohesionBehaviour.h" #include "Agent.h" using namespace AI; X::Math::Vector2 AI::CohesionBehaviour::Calculate(Agent& agent) { X::Math::Vector2 centerOfMass; if (agent.neighbours.empty()) return X::Math::Vector2{}; for (auto& neighbour : agent.neighbours) { centerOfMass += ne...
ALGO
0.985104
4.908877
46ce02e3-64c9-4714-8e08-a63e12e19643
lowhung/cloth_simulation
include/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Eigen::MatrixXf m(2,4); Eigen::VectorXf v(2); m << 1, 23, 6, 9, 3, 11, 7, 2; v << 2, 3; MatrixXf::Index index; // find nearest neighbour (m.colwise() - v).colwise().squaredNorm()...
ALGO
0.99997
4.152517
f878e15d-8dcc-4fa3-8e90-8bd4d020d4c8
biswajit862002/Cpp_Assignment_MySirG
Assignment_24/Q10.cpp
// Write functions using function overloading to add two numbers having different data types. #include<iostream> using namespace std; int add(int x,int y) { return(x+y); } float add(float x,float y) { return(x+y); } float add(int x,float y) { return(x+y); } int main() { int x,y; cout<<"\nEnter two numbers [in...
ALGO
0.925498
5.850648
7fa1096a-21cc-44a4-af43-91eb78cf1159
CMU-SAFARI/Mosaic
v3.x/src/intersim/pim.cpp
#include "booksim.hpp" #include <iostream> #include "pim.hpp" #include "random_utils.hpp" //#define DEBUG_PIM PIM::PIM( const Configuration &config, Module *parent, const string& name, int inputs, int outputs ) : DenseAllocator( config, parent, name, inputs, outputs ) { _PIM_iter = config.GetI...
ALGO
0.930389
4.279073
a2198512-559c-4146-9a76-42c137e5c401
hongwei7/LeetcodePractice
31.下一个排列.cpp
/* * @lc app=leetcode.cn id=31 lang=cpp * * [31] 下一个排列 */ // @lc code=start class Solution { public: void nextPermutation(vector<int>& nums) { int i, j; for(i = nums.size() -2; i >= 0 ; i--){ if (nums[i] < nums[i+1]){ break; } } if(i != -1...
ALGO
0.999995
5.931543
0f17896e-188c-42fb-9100-17bf7a182467
wangrling/CPlusPlus
ProgrammingAbstractionsInC++/01-OverviewOfC++/Average3.cpp
#include <iostream> using namespace std; int main() { int n1, n2, n3; cout << "This program averages three integers." << endl; cout << "1st integer: "; cin >> n1; cout << "2nd integer: "; cin >> n2; cout << "3rd integer: "; cin >> n3; double average = (n1 + n2 + n3) / 3.0; cout <...
TOOL
0.977055
4.125209
e9c01272-7ba3-4057-8a9e-5a9aef7c681c
MakerBux/MakerBux
src/bloom.cpp
#include "bloom.h" #include "hash.h" #include "primitives/transaction.h" #include "script/script.h" #include "script/standard.h" #include "streams.h" #include <math.h> #include <stdlib.h> #include <boost/foreach.hpp> #define LN2SQUARED 0.4804530139182014246671025263266649717305529515945455 #define LN2 0.69314718055...
ALGO
0.963235
6.899942
08f5b7d0-a728-4dca-bd35-c0a619246834
jigjnasu/discrete_mathematics_and_its_applications
chapter_3_algorithms/3.1_algorithms/algorithms/repo/algorithm_3.cpp
/* Implementation of Algorithm 3(Binary Search) Chapter 3.1 (Algorithms) Rakesh Kumar, cpp.rakesh(at)gmail.com Date: Jan 18th, 2017 */ #include "merge_sort.h" #include <cstdio> #include <vector> #include <cstdlib> #include <random> int random(int max, int min) { std::random_device rd; std::uniform_in...
ALGO
0.999957
5.778835