uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
3ae432aa-d56d-4e89-9d08-229fbfb92875
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5076_4.cpp
#include <bits/stdc++.h> using namespace std; long long n, k, a[1123], d, res; vector<long long> ans; int main() { ios_base::sync_with_stdio(false); cin >> n >> k; for (int i = 0; i < n; ++i) { cin >> a[i]; if (!d && i) { ans.push_back(a[i] - a[i - 1]); } if (a[i] & 1) { ++d; } els...
ALGO
0.999976
4.146668
aa8942f3-6691-4256-a547-67ecd7fb0eb4
rajeev0521/Leetcode-Submissions
0342-power-of-four/0342-power-of-four.cpp
class Solution { public: bool isPowerOfFour(int n) { if(n <= 0) return false; while(n > 1){ if(n % 4 != 0) return false; n /= 4; } return true; } };
ALGO
0.999349
5.922624
e6382612-e456-4a8a-8fb7-1a5d15621437
NK-codeman0001/Leetcode-Submissions
1046-last-stone-weight/1046. Last Stone Weight.cpp
class Solution { public: int lastStoneWeight(vector<int>& stones) { int n=stones.size(); if(n==1) return stones[0]; for(int i=1;i<n;i++){ sort(stones.begin(),stones.end()); stones[n-1]=abs(stones[n-1]-stones[n-2]); stones[n-2]=0; } return stones[n-1]; ...
ALGO
0.999935
5.433002
c065cb04-0617-4f2e-8a59-bf8e55b3cb78
Archit-15/15-Day-coding-Challenge
q21_subotpimal.cpp
// 19. Remove Nth Node From End of List #include<iostream> #include<bits/stdc++.h> using namespace std; struct node{ int data; struct node *next; }; void traversal(struct node *ptr){ while(ptr!=NULL){ cout<<ptr->data<<" "; ptr = ptr->next; } } struct node * deletefromend(struct node *...
ALGO
0.999973
4.990093
95c4b364-e33e-4f8e-af77-2b903eaa9f4b
chandrikadeb7/Hacktoberfest_2021
Task 1/Yet another shortest path/Solution.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define int ll typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi; typedef vector<vii> vvii; #define INF INT_MAX #define MOD 1000000007 #define al...
ALGO
0.999912
3.830614
9b17a62b-27dc-49a8-a1aa-9bc2fc42f464
automenta/old-crittergod
src/physics/BulletCollision/CollisionShapes/btOptimizedBvh.cpp
#include "btOptimizedBvh.h" #include "btStridingMeshInterface.h" #include "LinearMath/btAabbUtil2.h" #include "LinearMath/btIDebugDraw.h" btOptimizedBvh::btOptimizedBvh() { } btOptimizedBvh::~btOptimizedBvh() { } void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantizedAabbCompression, const ...
ALGO
0.977051
6.541234
cda2b14b-eb92-4ad1-9bb2-fc089f354105
AuroraFish/STM32-Printer
TestProject/PrinterProject - 副本/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/gru/arm_nnexamples_gru.cpp
/** * @ingroup groupExamples */ /** * @defgroup GRUExample Gated Recurrent Unit Example * * \par Description: * \par * Demonstrates a gated recurrent unit (GRU) example with the use of fully-connected, * Tanh/Sigmoid activation functions. * * \par Model definition: * \par * GRU is a type of recurrent neura...
ALGO
0.856246
7.464193
25cc2d25-6abc-4ba3-9885-efe1a81b443b
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3384_10.cpp
#include <bits/stdc++.h> using namespace std; const int N = 5e5 + 5; int a[N]; int start[N]; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) cin >> a[i]; bool c = 0; int lg = 1, cur = 1; start[0] = 0; for (int i = 1; i < n; ++i) { if (a[i] != a[i - 1]) { start[i] = start[i - 1]; } ...
ALGO
0.999999
3.415813
356fb6fc-c1bf-4638-868f-6f81a1b0231f
eemoreira/biblioteca-de-problemas
cf/875/a.cpp
#include <bits/stdc++.h> using namespace std; using i3 = tuple<int,int,int>; using i64 = long long; using ii = pair<int,int>; #ifdef LOCAL_DEBUG #include "debug.h" #else #define dbg(x...) #endif /* stop freaking out pls */ void solve() { int n; cin >> n; for (int i = 0; i < n; i++) { int x; cin >> x; ...
ALGO
0.999578
3.846287
f005c433-1149-4ca2-b3a2-1d2251ea9d6f
Abhi0pal/Striver-DSA-Sheet-Practice
0049-group-anagrams/0049-group-anagrams.cpp
class Solution { public: bool anagram(string str1,string str2){ sort(str1.begin(),str1.end()); sort(str2.begin(),str2.end()); return str1==str2; } vector<vector<string>> groupAnagrams(vector<string>& strs) { unordered_map<string,vector<string>>mpp; vector<vector<strin...
ALGO
0.999992
6.314384
e16c030e-d05e-4ac6-addb-9f557e70c498
DeepthiSai2905/LeetCoding
0404-sum-of-left-leaves/0404-sum-of-left-leaves.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99994
6.671947
f9c5f868-4774-4d85-a839-54dd2d675b78
akshatMaurya5/AK-COMDER
Graphs/KosarajuAlgo_StronglyConnectedComponents.cpp
#include <bits/stdc++.h> using namespace std; void dfs(int node, stack<int> &st, vector<int> &vis, vector<int> adj[]) { vis[node] = 1; for (auto &it : adj[node]) { if (!vis[it]) { dfs(it, st, vis, adj); } } st.push(node); } void revDfs(int node, vector<int> &vis, vector<int> transpose[]) { cout << node <<...
ALGO
0.999745
5.384624
ad4321a7-bc5f-4845-b308-d10ed102d2a9
Kyungmin-Lim/LeetCode
0347-top-k-frequent-elements/0347-top-k-frequent-elements.cpp
class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { int n = nums.size(); // store freq. of each num. // key: element // value: freq. unordered_map<int, int> mp; // store counts of each element vector<vector<int>> arry(n+1); ...
ALGO
0.999993
6.144884
1bb4d37e-545d-4e28-aa73-8ed9b36f7bfb
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/CodeLlama/top0-100/process-tasks-using-servers-Solution.assignTasks/177767_DoS.cpp
static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; struct asn1_data *data = asn1_init(mem_ctx); struct dsdb_openldap_dereference_result_control *control; struct dsdb_openldap_dereference_result **r = NULL; int i = 0; if (!data) return false; control = ...
TOOL
0.976071
4.802948
8f61ae5f-5d47-46f4-b805-1733841cc919
abhishek18124/PPCPPOct2023
Lecture 28/004RatChasesItsCheese2.cpp
#include<iostream> using namespace std; void printPath(char path[][10], int m, int n) { for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { cout << path[i][j] << " "; } cout << endl; } cout << endl; } void f(char maze[][10], char path[][10], int m, int n, int i, int j) { // base case if (i ==...
ALGO
0.999946
4.217498
cfa0585f-9923-43e3-ae91-4dec2e7cf814
vinci-grape/Rectifier
output/ChatGPT/codenet/Python/C++/s986062252.cpp
#include <iostream> #include <string> using namespace std; int gcd(int a, int b) { if (a < b) return gcd(b, a); if (b == 0) return a; return gcd(b, a%b); } int lcm(int a, int b) { return a * b / gcd(a, b); } int main() { int n, m; cin >> n >> m; string s, t; cin >> s >> t; int aa...
ALGO
0.999967
3.839974
7a1b1917-1231-43bb-be4c-330665610aed
rqy2002/OI-Problem-Codes
BZOJ/BZOJ4942_0.cpp
/************************************************************** * Problem: NOI2017-Integer * Author: Rqy * Date: 2018 Mar 05 * Algorithm: 线段树 **************************************************************/ #include <algorithm> #include <cctype> #include <cstdio> const int L = 10000000; char buf[L], *p = buf, *end =...
ALGO
0.999979
4.055596
7d74200c-a204-4eef-84f3-622fa064f261
Imraan002/My-c-programs
kmp.cpp
#include <bits/stdc++.h> using namespace std; vector<int> lps(string nstr) { vector<int> temp(nstr.size(),0); for(int i=1;i<nstr.size();i++) { int j=temp[i-1]; while(j>0 && nstr[i]!=nstr[j]) { j=temp[j-1]; } if(nstr[i]==nstr[j]) { j++; temp[i]=j; } } return temp; } int main() { #ifndef ONL...
ALGO
0.99994
4.419223
3063629d-545a-40ee-a7d5-2f2069217766
shthakur/mmu
algorithms/NRUAlgo.cpp
#include "NRUAlgo.h" #include "../modules/FrameTable.h" #include "../modules/FileReader.h" #include "../modules/Entry.h" #include <iostream> NRUAlgo::NRUAlgo(FileReader &reader) { count = 0; fileReader = &reader; } int NRUAlgo::getFrame(int index, Entry* page_table[], FrameTable* frame_table) { int frame = fram...
ALGO
0.999066
3.796679
43d2831d-0c65-450e-b981-850f19a073c7
zhou-jk/code
QOJ/1522 The 2023 ICPC Asia East Continent Final Contest/J/J.cpp
#include<bits/stdc++.h> using namespace std; const int N=2505; int n; vector<int>G[N]; int deg[N]; void tour(int u) { if((int)G[u].size()==deg[u]) return; int i=G[u].size(); cout<<"> "<<i+1<<endl; int v,d; cin>>v>>d; G[u].emplace_back(v); deg[v]=d; tour(v); return; } bool vis[N]; voi...
ALGO
0.99727
3.813028
67108e7e-eb9a-4879-9a5f-417b8f5753fa
kgajwan1/CTCI_practice
Chapter2_linkedLists/linkedList.cpp
//A simple singly linked list //printing content of linked list after making one #include<bits/stdc++.h> class Node{ public: Node *next = nullptr; int data = 0; }; void printList(Node *n) { while (n != nullptr) { std::cout << n->data << " "; n = n->next; } } i...
ALGO
0.994609
4.14376
8c373ef1-ce82-4470-a65c-4f5473d6e546
Stiimo/cppcourse
week2/task3/vector_to_multiarray_raw.cpp
#include <algorithm> #include <array> #include <iomanip> #include <iostream> #include <vector> #include <boost/multi_array.hpp> template<auto N, typename Container, typename Forward_Iterator> void fill_shape(const Container &container, Forward_Iterator shape) { *shape = std::size(container); if constexpr (N ...
TOOL
0.936478
6.171896
dc9c5c0c-fa03-46b1-ade7-30c39db41c59
ishandutta2007/codeforces
yeputons/normal/200/B.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cassert> #include <algorithm> #include <string> #include <vector> #include <deque> #include <queue> #include <map> #include <set> using namespace std; #define eprintf(...) fprintf(stderr, __VA_ARGS__) #define pb push_back #define mp ma...
ALGO
0.991769
3.941511
eae29e0c-f693-48d9-952a-2540687d52ab
Jashank2003/DSA
binarytree.cpp
#include<bits/stdc++.h> using namespace std; class node { public: int data; node* left; node* right; node(int d){ this ->data = d; this ->left = NULL; this ->right = NULL; } }; node* buildTree(node*root){ cout<<"Enter the node data: "; int data; cin>>data; root = ne...
ALGO
0.999822
4.399091
e2561f9d-56eb-4ac0-a5f6-176e299b88ad
ishandutta2007/codeforces
sro/normal/1090/B.cpp
/*----------------by syr----------------*/ /* ----- ----- ----- | | |---| _/ | | | \_ / ----- | \ ----- |---\ \ / |\ /| | | \_/ | \/ | | | / \ | | |---/ / \ | | */ #include<algorithm> #include<bitset> #include<cctype> #include<cstring> #include<cstdlib> #inc...
TOOL
0.938996
3.55366
0056eb89-e27d-4c35-8dae-933d9ae971cb
sainanda59/CP-CF
02_Codeforces_CP/B_New_Year_s_Number.cpp
#include <bits/stdc++.h> using namespace std; #define pi (3.141592653589) #define MAX 2147483648 #define MIN -2147483647 #define mod 1000000007 #define ff first #define ss second #define min3(a, b, c) min(c, min(a, b)) #define min4(a, b, c, d) min(d, min(c, min(a, b))) #define max3(a,b,c) max(c, max(a,b)) #define max4(...
ALGO
0.999892
4.743695
127e00c0-1bd7-498e-878c-03b11b6fb1af
P41NT/Competitive-Programming
Codeforces/1646C_FactorialsAndPowersOfTwo/C. Factorials and Powers of Two.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define int long long int vector<int> factorials; vector<pair<int, int>> sums; void preprocess() { factorials.push_back(6); for (int i = 4; i <= 16; i++) factorials.push_back(factorials.back() * i); int num = 1 << (factorials.size() - 1); ...
ALGO
0.999582
5.217093
5b9909ac-36b7-4ba8-a7b1-d4e2983f5fe3
vmmc2/Competitive-Programming
Codeforces/Div 3 Rounds/677/D.cpp
#include <bits/stdc++.h> #include <sstream> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; class dsu{ private: vector<int> p; vector<int> size; public: dsu(int n){ p.resize(n); size.resize(n, 1); ...
ALGO
0.999961
4.147067
9239b401-cb01-43bf-959c-a03969e42d17
akazad13/competitive-programming
Online Judges/UVA/621-Secret Research.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int test; char str[1000]; char c; cin>>test; c==getchar(); while(test--) { gets(str); int l=strlen(str); if((l==1&&str[0]=='1')||(l==1&&str[0]=='4')||(l==2&&str[0]=='7'&&str[1]=='8')) ...
ALGO
0.999881
3.586881
2f86b477-420e-487d-9d15-5f045098aded
oe-alliance/webkit.org
Source/WebCore/editing/VisiblePosition.cpp
#include "config.h" #include "VisiblePosition.h" #include "Document.h" #include "FloatQuad.h" #include "HTMLElement.h" #include "HTMLNames.h" #include "InlineTextBox.h" #include "Logging.h" #include "Range.h" #include "RenderBlock.h" #include "RootInlineBox.h" #include "Text.h" #include "htmlediting.h" #include "visib...
TOOL
0.97144
7.918478
08dce0cb-41b2-43fb-86ec-a25581aa87b8
Akshay9045/450_DSA_QUESTIONS
11_heap/13_check_if_binary_trees_is_heap_or_not.cpp
/* link: https://practice.geeksforgeeks.org/problems/is-binary-tree-heap/1 sol: https://www.geeksforgeeks.org/check-if-a-given-binary-tree-is-heap/ Given a binary tree, we need to check it has heap property or not, Binary tree need to fulfill the following two conditions for being a heap – 1. It s...
ALGO
0.999201
6.342367
77bb652c-6e4f-4190-ac53-f1b92ce07085
just-om/Topic_Wise_DSA
Linked_List/Detect Loop in linked list.cpp
// The task is to complete the function detectloop() which contains reference to the head as only argument. // This function should return true if linked list contains loop, else return false. // Expected Time Complexity: O(N) // Expected Auxiliary Space: O(1) // Constraints: // 1 ≤ N ≤ 104 // 1 ≤ Data on Node ≤ 103...
ALGO
0.999994
4.942615
d67a4339-b1b2-4996-a682-a601bad8437a
rohan-goyal-1/CP
CodeForces/Problems/ChocolateBunny.cpp
#include "bits/stdc++.h" using namespace std; #ifdef DBG #include "dbg.h" #else #define dbg(...) #define dbgm(...) #endif int main () { ios_base::sync_with_stdio(false); #ifndef LOCAL cin.tie(nullptr); #endif int n; cin >> n; vector<int> p(n); int j = 0; for (int i = 1; i < n; i++) { ...
ALGO
0.999906
3.415534
38694720-e099-4835-a43f-d1099b93642c
ansh04196/DSA-Daily
Count Good Nu.mbers.cpp
class Solution { public: static constexpr int MOD = 1000000007; int mul(int x, long long y){ int res = 1, mul = x; while (y > 0) { if (y % 2 == 1) res = (long long)res * mul % MOD; mul = (long long)mul * mul % MOD; y /= 2; } return res; } ...
ALGO
0.999916
6.074574
928122af-6b78-4ca6-be19-83ef2e15c49a
iGufrankhan/DSA_CODE
Cpp Languge/arrayandstring/sumofdigitsinonedigit.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; while(n>9){ int rem,ans=0; while(n!=0){ rem=n%10; n/=10; ans=ans+rem; } n=ans; } cout<<n; }
ALGO
0.999857
4.328792
908c6577-997c-4f72-aaf1-26ce980f761e
Zohaib234/-90DaysChallenge_DSA
Zohaib Ahmed 21SW031/Stack Using Arrays/Stack_Arrays.cpp
#include <iostream> using namespace std; #define n 100 class stack { int top; int *arr; public: stack() { top = -1; arr = new int[n]; } void push(int x) { if (top == n - 1) { cout << "Stack OverFlow"; } top++; arr[top] = ...
ALGO
0.996275
4.140541
2ecc1e0a-6ad6-480a-9468-477d73edfe17
OriginHubAI/MyScaleDB
src/Functions/array/arrayAUC.cpp
#include <DataTypes/DataTypesNumber.h> #include <DataTypes/DataTypeArray.h> #include <Columns/ColumnVector.h> #include <Columns/ColumnArray.h> #include <Functions/FunctionHelpers.h> #include <Functions/FunctionFactory.h> namespace DB { namespace ErrorCodes { extern const int ILLEGAL_TYPE_OF_ARGUMENT; extern c...
DATA
0.959463
7.657113
28010c4d-4113-4780-860a-71e256d6ebd8
johnny6464/UVA
UVA100-9999/UVA275.cpp
#include<iostream> #include<vector> using namespace std; int find(vector<pair<int, int>>& v, int target) { for (size_t i = 0; i < v.size(); i++) { if (v[i].first == target) { return i; } } return -1; } int main() { int numerator, denominator; while (cin >> numerator >> denominator && numerator && denomina...
ALGO
0.999475
4.923406
525b28f5-92d1-477c-a96f-2e18b0882132
n01e0/IDULLVM
libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp
// <algorithm> // template<InputIterator Iter, Predicate<auto, Iter::value_type> Pred> // requires CopyConstructible<Pred> // constexpr Iter // constexpr after C++17 // find_if(Iter first, Iter last, Pred pred); #include <algorithm> #include <functional> #include <cassert> #include "test_macros.h" #include "...
TEST
0.989297
6.739796
91c4852c-4578-4580-9c77-72e43e6fb5fd
abhinavahladh/Data-Structures
Data structures/lab-6/Stacklinkedlab6.cpp
#include<stdio.h> #include<iostream> using namespace std; class Stack{ private: struct node{ char data; struct node *next; }; node *top; public: Stack(){ top = NULL; } void push(char element); char pop(); char peek(); }; int main(){ Stack s; int choice; char element,result; d...
ALGO
0.996619
4.207407
a16082df-685e-415e-929d-c49a432b0009
rishab-7701/Leetcode_questions
1903.Largest_odd_number_in_string/largest_odd_number_in_string.cpp
class Solution { public: string largestOddNumber(string num) { int i = num.size()-1; while(i>=0){ if(num[i]%2==1){ return num.substr(0,i+1); // as soon as we get an odd digit in the string num we will return the string from the start till then the next iteration of i as ...
ALGO
0.999911
6.137578
7a5122f4-990d-4e4e-9c40-0e2ecff6dd66
liuhuoer/AlgorithmNotes
PAT/1904/6/B1002.cpp
#include <cstdio> #include <cstring> const char n[10][5] = {"ling", "yi", "er", "san", "si", "wu", "liu", "qi", "ba", "jiu"}; int main() { char input[100]; //input gets(input); //sum int sum = 0; for(int i = 0; i < strlen(input); ++i) sum += input[i] - '0'; //every place int num = 0; int res[10]; do{ re...
ALGO
0.999814
4.076136
3a36b435-7984-47bb-8f4d-90aca67cbd85
pdpdds/scummvm4yuza
scummvm/engines/access/asurface.cpp
#include "common/algorithm.h" #include "common/endian.h" #include "common/memstream.h" #include "access/access.h" #include "access/asurface.h" namespace Access { const int TRANSPARENCY = 0; SpriteResource::SpriteResource(AccessEngine *vm, Resource *res) { Common::Array<uint32> offsets; int count = res->_stream->re...
TOOL
0.898473
5.289028
aff88675-99d4-4866-a65a-840748ddb9db
Leorasaharia/LeetCode-Solutions
0504-base-7/0504-base-7.cpp
class Solution{ public: string convertToBase7(int n){ if(n==0){ return "0"; } bool neg=false; if(n<0){ neg=true; n=-n; } string a,b; while(n){ a.push_back(char('0'+n%7)); n/=7; } f...
ALGO
0.999856
5.362277
39a0dfd3-d77a-48f2-b1dc-57338fbd2029
aswinkumarpm/Driver-Drowsiness-Detector
dlib-master/examples/rvm_ex.cpp
/* This is an example illustrating the use of the relevance vector machine utilities from the dlib C++ Library. This example creates a simple set of data to train on and then shows you how to use the cross validation and rvm training functions to find a good decision function that can classify e...
DATA
0.933961
7.776188
eb6379ac-8af0-4dcf-8f18-691064bec7bc
0aps/Legacy-Code
C . C++/C++ (variado)/C++ Codes/Old Stuff/C++ praticas/Caracteres leidos desde el teclado.cpp
// Cuenta letras #include <iostream> #include <cstdio> #include <cctype> using namespace std; int main() { int consonantes = 0; int vocales = 0; int digitos = 0; int mayusculas = 0; int minusculas = 0; int espacios = 0; int puntuacion = 0; char c; // caracteres ledos desde el teclad...
ALGO
0.967516
3.186779
dbc81634-1082-42c9-880a-8b5ffc84cc45
npnkhoi/Competitive-programming
SPOJ/ROBOCON.cpp
using namespace std; #include <stdio.h> #include <algorithm> const int N = 500 + 5; const int oo = 1e9 + 7; int n, k; int f[N][N], g[N][N], res = oo; int main() { scanf("%d%d", &n, &k); while (k--) { int u, v; scanf("%d%d", &u, &v); f[u][v] = oo; g[u][v] = oo; } f[1][1] =...
ALGO
0.999764
3.52444
a1596bba-1c1a-4545-89e5-172bb25fb76d
wensespl/AED
BST.cpp
#include<iostream> using namespace std; class Nodo{ public: int dato; Nodo *izq, *der; Nodo(){ dato = NULL; izq = der = NULL; } }; class BST{ public: Nodo* raiz; BST(){raiz = NULL;} bool vacio(){return raiz == NULL;} //Insertar simple void insertar(int x){ i...
ALGO
0.999565
4.612463
6f45d494-b1a8-4184-9620-29aa2115b344
ImranMir32/Data_Structures_and_Algorithms
Binary Search/Binary Search.cpp
#include <bits/stdc++.h> using namespace std; int binarySearch(vector<int>& arr, int target) { int left = 0; int right = arr.size() - 1; while (left <= right) { // int mid = left + (right - left) / 2; int mid = (left + right) / 2; // Both approaches are correct and should...
ALGO
0.999876
6.673245
1db6ffc0-563f-402b-a62d-e60bcbc9cf01
HiroakiAbe-app/overlay_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.998859
6.785645
1fe83f89-de44-4517-b323-c48a82746c0a
PacktPublishing/CPP-Game-Development-By-Example
Chapter07/7.OpenGLProject/OpenGLProject/Dependencies/bullet/include/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp
#include "btQuantizedBvh.h" #include "LinearMath/btAabbUtil2.h" #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btSerializer.h" #define RAYAABB2 btQuantizedBvh::btQuantizedBvh() : m_bulletVersion(BT_BULLET_VERSION), m_useQuantization(false), //m_traversalMode(TRAVERSAL_STACKLESS_CACHE_FRIE...
ALGO
0.996957
6.978654
b9e02633-4d07-4cae-be04-cb61e6ea7793
ishandutta2007/codeforces
mateocv/normal/1538/B.cpp
#include <bits/stdc++.h> #define pb push_back #define fst first #define snd second #define fore(i,a,b) for(int i=a,ggdem=b;i<ggdem;++i) #define SZ(x) ((int)x.size()) #define ALL(x) x.begin(),x.end() #define mset(a,v) memset((a),(v),sizeof(a)) #define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) using namespace st...
ALGO
0.999858
3.793129
2141650a-f9e6-419b-970f-cddcd1713951
Login008/threadsAndProcesses
threadsAndProcesses.cpp
#include <windows.h> #include <iostream> #include <vector> using namespace std; HANDLE sem; DWORD WINAPI work(LPVOID f) { const char* filename = (char*)f; HANDLE h = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (h == INVALID_HANDLE_VALUE) { ...
TOOL
0.986755
4.652562
cb757be2-b7c6-47e5-b3a8-ca9be6f3edf0
rainwl/GeometryKit
include/igl/winding_number.cpp
#include <cmath> template < typename DerivedV, typename DerivedF, typename DerivedO, typename DerivedW> IGL_INLINE void igl::winding_number( const Eigen::MatrixBase<DerivedV> & V, const Eigen::MatrixBase<DerivedF> & F, const Eigen::MatrixBase<DerivedO> & O, Eigen::PlainObjectBase<DerivedW> & W) { usi...
ALGO
0.99957
6.180105
8c718e40-6d5d-4ab6-aea3-bb3094d86631
AdityaMalu/LeetCode
1586-longest-subarray-of-1s-after-deleting-one-element/1586-longest-subarray-of-1s-after-deleting-one-element.cpp
class Solution { public: int longestSubarray(vector<int>& nums) { int start = 0,ans = 0,count = 0; for(int i = 0 ; i < nums.size() ; i++){ if(nums[i] == 0){ count++; } while(count > 1){ if(nums[start] == 0){ coun...
ALGO
0.999937
6.021852
3a2b5690-f2df-40a6-998b-fae5cfcfb504
y-aut/AtCoder
src/abc/332/e.cpp
#pragma region "Template" #ifdef DEBUG #include "template.hpp" #else #define TEMPLATE_H #include <atcoder/all> #include <bits/stdc++.h> #include <gmpxx.h> using namespace std; using namespace atcoder; // clang-format off #ifndef DEBUG #ifdef __x86_64__ #pragma GCC target("avx") #endif #pragma GCC optimize("O3") #pra...
ALGO
0.997212
3.794117
6d02a76c-47b4-4289-981b-4ae9c036dbd9
sarthakgoel075/Leetcode_Problems
114-flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999941
6.051744
71a285ba-aee0-4609-a02a-b5a88e2a18dd
sanjaikrp/DSA
Max Flow/maxflow_topcoder.cpp
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define INF 0x3f3f3f3f #define MAXN 310 using namespace std; class MaxFlow { public: vector<vector<int> > initial_g, g; // initial_g: stores initial capacities which should not be changed. vector<int> vis, from; int n, s, t; // no. of vertices, src...
ALGO
0.999967
4.369577
c71e9c30-395e-4af7-aa72-1fd435b27454
ranjeet7287/DSA-cpp
PrepSeason2/06Dp/ques20.cpp
// Minimum number of insertion in a string to make it a palindrome // no.of insertion == no.of deletion #include<bits/stdc++.h> using namespace std; int LCS(string X,string Y,int n,int m){ int t[n+1][m+1]; for(int i=0;i<n+1;i++){ for(int j=0;j<m+1;j++){ if(i==0 || j==0){ t[...
ALGO
0.999961
4.533442
3cc94fe1-5bf3-4e4c-95ce-8a3b38e7dcfb
ppzzyy11/cpp_algorithm_datastructure_practice
PatternSearchingUsingATrieofAllSuffixes.cpp
/* * Pattern Searching Using a Trie of Suffixes * * Different to KMP, Robin Karp, Finite Automate,Boyor Moore * we preprocess txt * We build a Trie of all Suffixes of txt,then we search pattern in the Trie * * We add an vector<int> int the Node to record the index in the Str when we insert the str * * When txt...
ALGO
0.999121
5.135905
d118d6c7-5f57-4274-bae4-32d202ddaeb4
Robbbert/messui
docs/release/src/frontend/mame/ui/inifile.cpp
/*************************************************************************** ui/inifile.cpp UI INIs file manager. ***************************************************************************/ #include "emu.h" #include "ui/inifile.h" #include "ui/moptions.h" #include "language.h" #include "drivenum.h" #inc...
TOOL
0.850623
7.018942
93efee2a-aed8-43a5-84e3-274da5c52965
VanDien2006/DSA
Practice/058/Bai058.cpp
/*###Begin banned keyword - each of the following line if appear in code will raise error. regex supported ###End banned keyword*/ #include <iostream> #include <iomanip> #include <string.h> using namespace std; struct SinhVien { char MASV[10]; char HoTen[100]; char NgaySinh[12]; char GioiTinh; fl...
TOOL
0.986894
3.812484
3ffcd44d-3d9f-467c-afd5-9175a9d988ee
Metrological/cobalt
src/third_party/skia/samplecode/SampleImageFilterDAG.cpp
#include "samplecode/Sample.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" #include "include/core/SkColorFilter.h" #include "include/core/SkFont.h" #include "include/core/SkImage.h" #include "include/core/SkImageFilter.h" #include "include/core/SkImageInfo.h" #include "include/core/SkPaint.h" ...
TOOL
0.975847
7.636345
39aebd0d-f896-4fa0-800f-e42beab89c35
reverg/PS
boj/15486.cpp
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int N; cin >> N; int dp[N + 1] = {0}; for (int i = 0; i < N; i++) { int time, pay; cin >> time >> pay; if (i + time <= N) dp[i + time] = max(dp[i + time], dp[i]...
ALGO
0.999789
4.51361
fd107ed8-27c6-492e-ac1c-08b04a2b492b
bentoper/Competitive
Contests/20SAMARA/k.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ff first #define ss second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define pv(x, n) fr(iii, n) printf("%d%c", x[iii], " \n"[iii==n-1]) #define pvv(x, n) frr(iii, n) printf("%d%c",...
ALGO
0.999992
3.607805
9078738e-a477-48f3-8183-41999c09f64d
Robinhood75t/LeetCode-
march_25/8_mar.cpp
// this is todays code class Solution { public: int minimumRecolors(string blocks, int k) { int n = blocks.size(); int st = 0 ,end = 0; int rec = INT_MAX; int w = 0; while(end < n){ if(blocks[end] == 'W'){ w++; } if(end-st+...
ALGO
0.999867
5.627324
88335b46-760a-4dbe-b232-1366e23302e8
rathoresrikant/interviewbit
Hashing/find_rectangle_in_a_binary_matrix.cpp
/* Find Rectangle in binary matrix Given a binary matrix of integers A of size N x M consisting of only 0 or 1. you need to check whether there exists a square or rectangle in a square whose all four corners are 1. All four corners need to be distinct. If there exists such rectangle or square return 1, else return 0. I...
ALGO
0.999984
4.672294
6992359b-6029-4e22-891c-4c7b639cb228
mayankbali/android_device_lenovo
gps/utils/LocHeap.cpp
#include <LocHeap.h> class LocHeapNode { friend class LocHeap; // size of of the subtree, excluding self, 1 if no subtree int mSize; LocHeapNode* mLeft; LocHeapNode* mRight; LocRankable* mData; public: inline LocHeapNode(LocRankable& data) : mSize(1), mLeft(NULL), mRight(NULL), mDa...
ALGO
0.997679
6.439088
35223185-72b1-4b41-a456-cf9cce93f4c7
EGyeom/ProblemSolving
baekjoon/15650/15650.cpp
#include <bits/stdc++.h> using namespace std; char ret[16]; int n,m; bool isvisited[9]; void dfs(int num,int t) { if(num == m) { printf("%s\n",ret); return; } for(int i =t; i < n; i++) { if(isvisited[i]) continue; isvisited[i] = true; ret[num] = i + '1'; ...
ALGO
0.999995
3.878082
6a6483eb-e218-4fdb-bcd7-e73033d378cf
jaintle/leetcode-sync
problems/minimize_the_total_price_of_the_trips/solution.cpp
class Solution { private: void makeContri(int node,vector<int>& curr,vector<int>& contri,int end,vector<vector<int>>& g,int p){ curr.push_back(node); //this node is present in the traversal if(end==node){ //we reached the required end node! for(auto& i:curr) contri[...
ALGO
0.999801
5.665266
8d7266ab-272d-4373-baeb-c6f78f1fa9b9
Michael-Ma/Coding-Practice
TAOP/C1/StringContain.cpp
#include <stdio.h> #include <iostream> #include <map> using namespace std; /* * check if a has all the char inside b. */ bool stringContain(string& a, string& b) { map<char, int> dic; for(int i=0; i<a.size(); i++) { dic[a[i]] = 1; } for(int i=0; i<b.size(); i++) { if(dic[b[i]] != 1) { return false; ...
ALGO
0.997004
4.156598
17593d99-90af-442e-a725-c751c557f5ca
aligungr/UERANSIM
src/utils/options.cpp
#include "options.hpp" #include <algorithm> #include <chrono> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <sstream> #include <wordexp.h> static constexpr const size_t MAX_WIDTH = 90; static char **ConvertArgs(const std::vector<std::string> &vec) { char **res = static_cast...
TOOL
0.941796
7.392485
577c4650-dcbc-4287-a157-d4557e40326e
baodrate/SUSTech_CS205_Summer2017
Cplusplus-Primer-Plus-6thE/Code/Chapter 16/funadap.cpp
// funadap.cpp -- using function adapters #include <iostream> #include <vector> #include <iterator> #include <algorithm> #include <functional> void Show(double); const int LIM = 6; int main() { using namespace std; double arr1[LIM] = {28, 29, 30, 35, 38, 59}; double arr2[LIM] = {63, 65, 69, 75, 80, 99}; ...
TOOL
0.943593
5.433475
af150719-40b8-4ba4-928f-f4caf791c254
CodeCamper-Sub/Problem_Solving
baekjoon/22001-23000/22351.cpp
#include <bits/stdc++.h> #define INF (__LONG_LONG_MAX__ / 3) typedef long long ll; using namespace std; string s; ll A, B; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin >> s; ll tt = 0; A = -1; for(ll i = 1; i <= 3000 ; i++){ string a = to_string(i); string tmp = ""; ll t = tt...
ALGO
0.999969
3.651282
3b0cb36a-9498-4d65-a87f-0cd2e3c117e2
darrylteo/cp4-solutions
2 Data Structures and Libraries/2. library non-linear/c. Direct Addressing Table (DAT), Others/freefood.cpp
#include <bits/stdc++.h> using namespace std; int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); //freopen("error.txt", "w", stderr); ios_base::sync_with_stdio(false); cin.tie(nullptr); bool a[366] = {}; int N; cin >> N; for (int i = 0; i < N; ...
ALGO
0.999809
3.90054
a46aa6c1-5ad1-482a-866c-58fe5d1447d0
p59-project/p59
src/crypto/scrypt.cpp
#include "crypto/scrypt.h" #include "uint256.h" #include "utilstrencodings.h" #include <openssl/sha.h> #include <string> #include <string.h> #include <stdint.h> static inline void be32enc(void *pp, uint32_t x) { uint8_t *p = (uint8_t *)pp; p[3] = x & 0xff; p[2] = (x >> 8) & 0xff; p[1] = (x >> 16) & 0x...
ALGO
0.998799
5.312294
42adbb4b-0bc5-4226-b58d-40b3564ee085
sarvex/leetcode-basic
solution/1600-1699/1602.Find Nearest Right Node in Binary Tree/Solution.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999965
6.256085
339eb14d-068c-48f9-abe2-b72374733423
sukhada35/Sudoku
main/hint.cpp
#include<iostream> #include<vector> using namespace std; void giveHint(vector<vector<int>>& board, vector<pair<int, int>>& emptyCells, vector<vector<int>>& correctBoard) { if (emptyCells.empty()) { cout << "No more empty cells left to reveal!\n"; return; } // Randomly select one empty...
ALGO
0.999139
7.262871
8b353256-0435-40be-bb0b-dc5cbda6bd1c
wlmrh/CPP
cf/Codeforces Round 900 (Div. 3)/D. Reverse Madness.cpp
#include <bits/stdc++.h> using namespace std; int n, k = 0; int main() { std::ios::sync_with_stdio (0); std::cin.tie (0); //输入字符串 int t; cin >> t; for (int i = 0; i < t; i++) { string str; cin >> n >> k; int l[k], r[k]; cin >> str; for(int i = 0; i < k ; i++) { cin >> l[i]...
ALGO
0.999971
3.573573
242c194a-6e1f-44a3-8597-7c0beff43aa5
MDNROnik/DSA-Solves
551-student-attendance-record-i/student-attendance-record-i.cpp
class Solution { public: bool checkRecord(string s) { int a=0,l=0; for(int i=0;i<s.size();i++){ if(s[i]=='A'){ a++;l=0; } else if(s[i]=='L'){ l++; if(l==3){return 0;} } else {l=0;} ...
ALGO
0.99945
5.54775
85dad189-f68a-4916-b957-a55c8798b65f
JesyMiray/BigFileSorter
BigFileSorter.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <queue> #include <thread> #include <mutex> #include <condition_variable> #include <algorithm> #include <sstream> #include <atomic> #include <memory> #include <windows.h> #include <commdlg.h> #include <chrono> #include <iomanip> const ...
ALGO
0.999455
5.047528
b125a6be-5414-4102-b55d-21c364bd5120
TRDizer/CSC417_rigid-body-collision
extern/libigl/include/igl/boundary_conditions.cpp
#include "verbose.h" #include "EPS.h" #include "project_to_line.h" #include <vector> #include <map> #include <iostream> IGL_INLINE bool igl::boundary_conditions( const Eigen::MatrixXd & V , const Eigen::MatrixXi & /*Ele*/, const Eigen::MatrixXd & C , const Eigen::VectorXi & P , const Eigen::MatrixXi & BE...
ALGO
0.972676
6.247374
ddd6b80a-873c-4ca5-901d-06aeca3a1e22
andyly011/LehrMark_CSC5_40717_or_40718
Class_Lab/DynamicMemoryAllocationWithSorting/main.cpp
/* * File: main.cpp * Author: Dr. Mark E. Lehr * Created on February 5, 2015, 10:00 AM * Purpose: Illustration Dynamic Memory * with a sort */ //System Libraries #include <iostream> #include <cstdlib> #include <ctime> using namespace std; //User Libraries //Global Constants //Function ...
ALGO
0.99908
4.477965
5d61e959-8e19-4570-96ad-f63355643331
meherajmithun/problem-solving
codeforces/918B.cpp
/* IN THE NAME OF ALLAH Author: Meheraj Mithun Bangladesh University Of Businness and Teachnology */ #include<bits/stdc++.h> #define fastIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl '\n' using namespace std; int main(){ int n,m; cin >> n >> m; map<string , string>ip; for(int i = 0; i ...
ALGO
0.999639
3.877079
923bb722-6334-416b-9137-478f5d298f96
DushyantBhardwaj1/BasicCoding
Recurrsion/isSorted.cpp
#include <iostream> using namespace std; void isSorted(int arr[],int n,int i){ if(arr[i]>arr[i+1]){ cout<<"Not sorted"; return; } if (i==n-1){ cout<<"is sorted"; return; } i++; isSorted(arr,n,i); } int main(){ int n; cout<<"Enter Size of Array"; cin>>n...
ALGO
0.999513
4.340251
a46b5835-dae6-4e6f-b0ad-10a293458a32
grantgabriel/Competitive-Programming
Learning Progress/TLX Toki/Pemrograman Dasar/Submission/5/5D.cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define bug(a) cout << a #define bugs(a) cout << a << ' ' #define debug(a) cout << a << endl #define boost ios_base::sync_with_stdio(false); cin.tie(NULL) using namespace std; int main() { boost; int n; cin >> n; if(n > 0) co...
ALGO
0.999862
3.73085
7dc3b7f1-bdd5-4f69-97aa-9fccbaa4c87c
RamazanFIT/algorithms
part1/uiuiuiui/t3.cpp
#include <bits/stdc++.h> #define ENDL "\n" #define ff first #define ss second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define endd return 0; #define int ll #define repeat(x) for(int mmmmm = 0; mmmmm < x; mmmmm++) #define goodluck ios_base::sync_with_stdio(0...
ALGO
0.999926
4.119356
d3b1b799-c4a7-4a28-b1fc-430174460021
simon7426/Competitive-Programming-AC-Submissions
CodeForces/GNU C++11/235A | LCM Challenge/24005158.cpp
#include<iostream> using namespace std; main() { long long int n; cin>>n; if(n<3) cout<<n<<endl; else if(n%2!=0) cout<<n*(n-1)*(n-2)<<endl; else { if(n%6==0) cout<<(n-3)*(n-1)*(n-2)<<endl; else cout<<n*(n-1)*(n-3)<<endl; } }
ALGO
0.999974
3.436138
023a6190-8cc3-41bb-9b41-4fa08973525a
nhhoang1510/bt-tuan-9-
bt tuan 18.cpp
#include <iostream> #include <cstring> using namespace std; #define MAX_VERTICES 100 #define MAX_EDGES 100 class GraphList { int V; int adj[MAX_VERTICES][MAX_EDGES]; int degree[MAX_VERTICES]; public: GraphList(int vertices) : V(vertices) { memset(a...
ALGO
0.999977
6.355405
14e5ba75-bc29-490a-a950-c39f58e1d49f
MICHAEL-888/.work
codeforces/T2_29C.cpp
// // Created by Michael on 2024/2/29. // #include <bits/stdc++.h> #define endl '\n' using namespace std; int main() { int n, m; cin >> n >> m; if (n == m) { cout << "F is not emo today" << endl; } else if (n < m) { cout << "F is fine now" << endl; } else if (n > m) { for (...
ALGO
0.999752
3.748497
5708eff7-6645-45a1-954e-e053c6fb1252
kenjinote/CalcPlus
src/G_LLL_QP.cpp
#include <NTL/LLL.h> #include <NTL/vec_quad_float.h> #include <NTL/fileio.h> NTL_START_IMPL static inline void CheckFinite(double *p) { if (!IsFinite(p)) ResourceError("G_LLL_QP: numbers too big...use G_LLL_XD"); } static inline void CheckFinite(quad_float *p) { if (!IsFinite(p)) ResourceError("G_LLL_QP: numb...
ALGO
0.999889
5.331685
dc035d34-b75d-4880-ad9b-1e08165dbee9
apratimjaiswal/prep
cpp/LCO/3_Recurssion/2_PowerSet.cpp
#include<bits/stdc++.h> using namespace std; // Strings int Subsets_strings(string str, int index, string result) { int len = str.length(); if (index == len) { if (result.length() > 0) cout << result << endl; else cout << "{}" << endl; return 0; } Subsets_strings(str, index+1, ...
ALGO
0.997984
6.275141
3917cbdd-c1a5-4937-8392-ad53350be487
jr2bg/diverse_programs_CIC
julia_set.cpp
/************************************************* g++ julia_set.cpp -w -lSDL2 -lSDL2_image -o julia **************************************************/ #include <SDL2/SDL.h> #include <stdio.h> #include <math.h> struct ComplexNumb { float real, img; }; ComplexNumb complexMult(ComplexNumb a, ComplexNumb b) { Co...
ALGO
0.971493
4.497017
94539b25-039c-47e2-bc17-30dc56d53b8e
25pratiksha/Algo_Lab
10d.cpp
#include<bits/stdc++.h> using namespace std; int num[] ={2,3,5,7,11,13,17,19,23}; int rem[9]; // code referred from https://comeoncodeon.wordpress.com/category/algorithm/ /* This function calculates (a^b)%MOD */ long long pow(int a, int b, int MOD) { long long x=1,y=a; while(b > 0) { if(b%2 == 1...
ALGO
0.999908
4.642848
006ef58c-f726-44f9-9a2c-200748af1720
hongjonghwa/algorithms
practice/acmicpc/[모음] 프로그래밍 콘테스트 챌린징/6137-문자열생성.cpp
#include <cstdlib> #include <cstdio> #include <cassert> int N; char X[2000]; char ret[2001]; int comp(int a, int b){ if (X[a]<X[b]) return -1; if (X[a]>X[b]) return 1; return 0; } void solv(){ int i = 0, j = N-1, k = 0; while (i <= j){ int c = 0, t = 0; while ( (t = comp(i+c, j-c)...
ALGO
0.999958
3.619354
35cf3e15-4a78-4e3d-b4c5-6fbc81e95387
ArseniAnishchanka/leetcode
0988. Smallest String Starting From Leaf.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999949
6.161443
c07d9b0c-8b50-4f1f-9ba3-8f2fba972a36
abhilashGit-01/DSA
forloop/FActorial.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"enter n:"; cin>>n; int fact=1; for(int i=2;i<=n;i++){ fact*=i; } cout<<fact; }
ALGO
0.999969
4.567277
d514e7cc-c5aa-4a60-a451-948acf2b9a9c
RedaMokarrab/Udemy_DataStructure_Algo
15_01_DynamicProgramming/main.cpp
#include <iostream> #include <map> #include <unordered_map> #include <thread> using namespace std; int counter1=0; int counter2=0; int fibonacci (int n) { counter1++; if(n<2) return n; return fibonacci(n-1)+fibonacci(n-2); } int fibonacci_helper(unordered_map<int,int> &my_cache, int n ) { cou...
ALGO
0.98146
4.777823
5251f9fa-1d62-4acf-bb10-4da5fd090c1d
viyviyleta/ASD-2-term
2 лаба/lab2/lab1/lab2.cpp
#include <iostream> using namespace std; int main() { setlocale(0, ""); int N, N1, maxSteps = 1, result, order = 1, flag = 0, steps = 0; bool answer = 0; cout << "Введите N(от 1 до N) и загадайте число X: "; cin >> N; N1 = N; // Определение максимального количества шагов для бинар...
ALGO
0.999643
4.241573
1249fc94-1f31-4e3b-bebd-d257d2319109
CrBillman/LAMMPS
GPU/pair_lj_cut_coul_cut_gpu.cpp
/* ---------------------------------------------------------------------- Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include "pair_lj_cut_coul_cut_gpu.h" #include "atom.h" #include "atom...
ALGO
0.998783
6.422478