uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
aabdfffb-bf63-494b-81cf-a20a7d93e431
WilderStill/C-Programs
洛谷/主题库/P3835 【模板】可持久化平衡树.cpp
#include<bits/stdc++.h> #define ll long long #define INF 0x3f3f3f3f using namespace std; ll tot,rt[11451411],n; struct node { ll v,size,key,l,r; }p[41451411]; void combine(ll k) { p[k].size=p[p[k].l].size+p[p[k].r].size+1; } ll newnode(ll val) { p[++tot].v=val; p[tot].key=rand()*rand()%INF+1; p[tot].l=...
ALGO
0.999948
3.979624
0bc4641b-2733-4e5a-ba97-ddcea5cd1662
kevinGmezIoT/OCR_LicenseApp
simple_edge_detection/ios/Classes/edge_detector.cpp
#include "edge_detector.hpp" #include <opencv2/opencv.hpp> #include <opencv2/imgproc/types_c.h> using namespace cv; using namespace std; // helper function: // finds a cosine of angle between vectors // from pt0->pt1 and from pt0->pt2 double EdgeDetector::get_cosine_angle_between_vectors(cv::Point pt1, cv::Point pt2...
ALGO
0.997563
5.802672
484bd724-3742-4cde-be55-097dbba7abb1
choonghyun-park/cpp_study
solved.ac/11659.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cout.tie(NULL); cin.tie(NULL); int N,M; cin >> N >> M; /* N : 수의 개수 M : 합을 구해야 하는 횟수 */ vector<int> inputs; vector<int> results; vector<int> sums; int sum=0; ...
ALGO
0.999937
4.435367
a9826c94-8171-40db-97ae-15c2215009a8
lega4e/olp
mai/ex/05/F.Подсчёт аннаграм/main2.cpp
#include <iostream> #include <map> constexpr long long const MOD = 1000000007; #define MOD(x) mod(x, MOD) using namespace std; // types typedef long long llong; // functions inline llong mod(llong a, llong b) { return (b + a%b) % b; } llong exgcd(llong a, llong b, llong &x, llong &y) { if(a == 0) { x = 0, y =...
ALGO
0.999758
4.478692
be81a35f-6740-4a65-aa0f-9318fe0b55f3
AlbertoAmayaSoria/Trabajos-Universidad
EstructuraDeDatos/Examenes/ColaMedieval/Sources/linkedList.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include "../Headers/linkedList.hpp" using namespace std; // Constructor LinkedList::LinkedList() : cabeza(nullptr), tamaño(0) {} // Constructor de copias LinkedList::LinkedList(const LinkedList& otra) : cabeza(nullptr), tamaño(0) { *th...
ALGO
0.944313
4.844191
ef9c31bf-5e74-4ff0-bd5a-d0f45c2e0938
elheck/HexapodBasicWalking
source/robot/LegInterpolation.cpp
/* * LegInterpolation.cpp * * Created on: Mar 31, 2018 * Author: aron */ #include <robot/LegInterpolation.hpp> #include "RobotConstants.hpp" LegInterpolation::LegInterpolation(Leg *leg){ this->leg = leg; this->viaX = 0; this->viaY = 0; this->viaZ = 0; this->endX = 0; this->endY = 0; this->endZ = 0; ...
ALGO
0.899479
4.779927
bbe41b6c-6bf4-4cf4-87a0-9339b8883667
sahil9001/LeetCode
May/5.cpp
class Solution { public: int jump(vector<int>& nums) { int dp[nums.size()+1]; dp[0] = 0; for(int i=1;i<nums.size();i++) dp[i] = INT_MAX; for(int i=1;i<nums.size();i++){ for(int j=0;j<i;j++){ for(int k=1;k<=nums[j];k++){ if(j+k<nums.size...
ALGO
0.99998
5.828138
db80e77a-13d6-42d4-bac5-3b82585f9b95
Rishabh-1999/Algorithms-and-Data-Structures
Dynamic Programming/Coin Change.cpp
#include <iostream> #include <string.h> using namespace std; int max(int a,int b) { return (a>b?a:b); } int solvebyrecursion( int S[], int m, int n ) { if (n == 0) return 1; if (n < 0) return 0; if (m <=0 && n >= 1) return 0; return solvebyrecursion( S, m - 1, n )...
ALGO
0.999983
4.079321
e93f953b-41f8-49b7-b272-70dcf66d1fbb
mitesh-200228/DS-Algo-Whole-Chapter
Graphs/15.cpp
#include <bits/stdc++.h> using namespace std; std::vector<std::unordered_set<int>> make_graph(int numTasks,std::vector<std::pair<int, int>> &prerequisites){ std::vector<std::unordered_set<int>> graph(numTasks); for (auto pre : prerequisites) graph[pre.second].insert(pre.first); return graph; } boo...
ALGO
0.999959
5.767073
e9f283b1-264a-44c9-8ec6-ff8ee6b72fe8
CmdSuzdal/libcmdsuzdal
src/chessgame.cpp
#include <algorithm> #include "cmdsuzdal/chessgame.h" namespace cSzd { // --- Constructor(s) -------------------------------------- ChessGame::ChessGame() { loadPosition(); } ChessGame::ChessGame(const FENRecord &fen) { loadPosition(fen.fen); } ChessGame::ChessGame(cons...
ALGO
0.97673
6.110643
c127fa1f-e574-49a9-9137-29de9164a92a
satryampriyam01/Leetcode
224-basic-calculator/basic-calculator.cpp
class Solution { public: int calculate(string s) { int n=s.size(); stack<int> stk; int sign=1; int result=0; int num=0; for(int i=0;i<n;i++) { if(isdigit(s[i])) { num=num*10+(s[i]-'0'); } ...
ALGO
0.999878
5.249584
b1eeea5d-5c7f-4a97-a906-5cd7dfebd751
begeli/advanced-systems-lab-homeworks
ASL_HW_3/src/vector_addition/main.cpp
#include <list> #include <vector> #include <string> #include <iostream> #include <random> #include "common.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #include <string.h> #include "tsc_x86.h" using namespace std; #define NR 32 #define CYCLES_REQUIRED (1*1e8) #define REP 50 #define E...
TOOL
0.952781
4.354789
e068fb9e-47cd-4388-8367-a2bc98126175
pranavv00/LeetCode-DSA-Solutions-
2690-house-robber-iv/2690-house-robber-iv.cpp
class Solution { public: int minCapability(vector<int>& nums, int k) { // Store the maximum nums value in maxReward. int minReward = 1, maxReward = *max_element(nums.begin(), nums.end()), totalHouses = nums.size(); // Use binary search to find the minimum reward possible. ...
ALGO
0.999979
6.036426
9a4904fa-4e79-477b-9bfe-e8ea48b7c4bf
Denver44/CP-and-DSA-in-CPP
DSA/7Recursion/Extra2/7Subsequence.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; vector<string> getSubsequence(string s) { if (s.empty()) { vector<string> temp; temp.push_back(""); return temp; } char firstchar = s[0]; vector<string> temp1; temp1 = ge...
ALGO
0.999896
5.153366
9794ff4d-69a5-41d6-b157-a7e78a84027c
AdityaGaur7/Contest_problems
problem/problem/1399A.cpp
// author - Aditya gaur // #include<bits/stdc++.h> using namespace std; // Macros #define vecv vector<int>v #define vpb(x) v.push_back(x) #define len(s) (int)s.size() #define mp(x,y) make_ pair(x,y) #define vp vector<pair<int,int>>vp #define st(a) sort(a.begin(),a.end()) #define F first #define S second #define rev(a) ...
ALGO
0.999695
4.405406
dea95a1f-7005-4163-b211-c9b8d950e5ed
gerrardgs/CPP-Heritage
CPPstudy/bab-18/stl_sort1.cpp
/****************************************************** Nama file: stl_sort1.cpp *******************************************************/ #include <iostream> #include <vector> // std::vector #include <algorithm> // std::sort() int main() { std::vector<std::string> v = {"C++","C","Ruby","Java","Python"}; ...
ALGO
0.999917
5.034026
ff204f4e-d596-4eea-880c-8bad702818e1
MikhalevMakar/NSU-projects-CXX
AdditionalWork/SeaBattle/Ship.cpp
#include "Ship.hpp" #include <iostream> bool Ship::CheckStatShip() { for(int i = 0; i < sizeMap; ++i) { if(StatShip[i] > 0) { return false; } } return true; } void Ship::InputCoordinates() { while (true) { std::cout << "Введите координаты: "; std::cin >...
TOOL
0.983364
3.471366
285e7131-675a-42ab-8bd7-1fc661445215
artax-committee/Artax
src/cryptopp/adler32.cpp
// adler32.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #include "adler32.h" NAMESPACE_BEGIN(CryptoPP) void Adler32::Update(const byte *input, size_t length) { const unsigned long BASE = 65521; unsigned long s1 = m_s1; unsigned long s2 = m_s2; if (length % 8 != 0) { do { s1...
ALGO
0.978564
6.628093
c8b62388-9ad4-4ab5-b2c7-83b996898fc2
klessydra/Software-Test-Suite
klessydra_contextual_bandits/Hybrid_Algorithm/hybrid_algorithm.cpp
//██╗░░██╗██╗░░░██╗██████╗░██████╗░██╗██████╗░ //██║░░██║╚██╗░██╔╝██╔══██╗██╔══██╗██║██╔══██╗ //███████║░╚████╔╝░██████╦╝██████╔╝██║██║░░██║ //██╔══██║░░╚██╔╝░░██╔══██╗██╔══██╗██║██║░░██║ //██║░░██║░░░██║░░░██████╦╝██║░░██║██║██████╔╝ //╚═╝░░╚═╝░░░╚═╝░░░╚═════╝░╚═╝░░╚═╝╚═╝╚═════╝░ // //░██████╗░█████╗░██████╗░██╗█████...
ALGO
0.999751
6.776987
9b5f5ec2-6f35-4043-9d88-99e8bc2054c1
fei0319/competitive-programming
code/codeforces/1740C.cpp
#include <bits/stdc++.h> using ll = long long int; constexpr int maxn = 2e5 + 19; int n, a[maxn]; void solve(void) { std::cin >> n; for (int i = 1; i <= n; ++i) { std::cin >> a[i]; } std::sort(a + 1, a + 1 + n); ll ans = a[n] - a[1]; for (int i = 3; i <= n; ++i) { ans = std::...
ALGO
0.999783
5.098064
0f62d80a-6961-4ed8-9b08-2c5279460110
nuaazs/VAF_2
cpp/top_src/calc_score.cpp
#include <iostream> #include <cstring> #include <sys/ipc.h> #include <sys/shm.h> #include <iostream> #include <malloc.h> #include "timer.h" #include "search_best.h" #define ALGIN (32) // 使用SIMD需要内存对齐,128bit的指令需要16位对齐,256bit的指令需要32位对齐 #include <chrono> #include <iostream> #include <fstream> #include <ss...
ALGO
0.975537
5.237581
d5603cb3-c41d-4e35-bb12-a87829f372d0
danihs2/A-Strong
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.998485
6.76775
6927bfee-322c-4df2-914a-b724e42ebc7d
Yichar/SStudy
OJ/stack&queue/HZ261_对顶栈.cpp
/************************************************************************* > File Name: HZ261_对顶栈.cpp > Author: Yichar > Mail: > Created Time: 五 2/19 17:01:33 2021 ************************************************************************/ #include <iostream> #include <vector> #include <map> #include <string> #in...
ALGO
0.99944
4.345563
06e0afcd-010e-49f5-b5b9-b5226766d695
ajaysoni12/Striver_AtoZ_DSA_Sheet
Step4 - LinkedList/020_SLL-add1Num.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node *next; Node(int val) { data = val; next = NULL; } }; /* method 1 (brute force approach: generate no., +1, and push again) */ Node *reverseList(Node *head) { if (head == NULL or head->next == NULL) ...
ALGO
0.99998
5.543146
554a2ff8-7700-4db8-b40c-2aefffcfad6c
coouir/codetree-TILs
241221/2의 거듭제곱수/pow-of-2.cpp
#include <iostream> using namespace std; int main() { // 여기에 코드를 작성해주세요. int N, cnt=0; cin >> N; while (N != 1) { N /= 2; cnt++; } cout << cnt; return 0; }
ALGO
0.999984
5.566376
15edf199-dc24-4408-a371-247997af6721
phasebook/phasebook
tools/CONSENT/src/correctionMSA.cpp
#include "correctionMSA.h" #include "utils.h" #include "../BMEAN/bmean.h" #include "correctionDBG.h" std::string weightConsensus(std::string& consensus, std::vector<std::string>& pile, robin_hood::unordered_map<kmer, unsigned>& merCounts, unsigned merSize, unsigned windowSize, unsigned solidThresh) { std::vector<std:...
ALGO
0.992275
5.22555
bbbddf55-6fe9-4eaa-ae22-460cdb511ede
arippbbc/leetcode
_findMin.cpp
class Solution { public: int findMin(vector<int> &num) { int sz = num.size(); if(sz == 1) return num[0]; if(sz == 2) return min(num[0], num[1]); int i = 0, j = sz-1, k = j/2; while(i<j){ if(num[i]>num[k]){ j = k; } ...
ALGO
0.999934
5.844089
b38d4d65-11ca-48e5-bf97-90b83c99e4c0
Den1er/LeetCode_first_time
LeetCode80.cpp
10. Regular Expression Matching 这题花了很久的时间在看答案 问题1:*符号的作用是匹配前一个或者0个或者多个字符 问题2:c_str()函数:一个将string转换为 const* char的函数,形参部分一定要写成const 的指针,否则runtime error class Solution { public: bool isMatch(string s, string p) { return isMatch(s.c_str(),p.c_str()); } bool isMatch(const char *s, const char *p) { ...
ALGO
0.993308
3.728237
fb2521ed-7570-4203-b766-4b38013c38dd
prateekpranveer/CodeChef-Cook
September Long One 2022/Interesting Subarray.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll t; cin>>t; while (t--) { ll n; cin>>n; ll arr[n]; ll ansmini = 1e18; ll ansmaxi = -1e18; for (ll i = 0; i<n; i++) { cin>>arr[i]; } sort (arr, arr+...
ALGO
0.999054
4.15434
d71e2540-f4ef-4487-be9e-120612b9ef92
ishandutta2007/codeforces
crtsir/normal/1674/A.cpp
#include<bits/stdc++.h> using namespace std; int T; int main(){ cin>>T; while(T--){ int x,y; cin>>x>>y; if(y%x==0) cout<<1<<' '<<y/x<<endl; else cout<<"0 0\n"; } }
ALGO
0.999542
4.496298
73c0f611-7d4f-44a0-a00b-08ed551ec311
doggydoggy0101/master-thesis
registration/src/robin.cpp
#include "registration/robin.h" std::vector<size_t> registration::outlier_rejection::robin(const PointCloud& src_point_cloud, const PointCloud& tar_point_cloud, double noise_bound, std::string robin_mo...
ALGO
0.984292
6.023013
07a84783-8de4-4248-a007-1266eaf2b6bf
harry7557558/Graphics
fitting/parametric2bezier/parametric2bezier_reparam.cpp
// Curve fitting experiment - fit 2d parametric curves to cubic Bezier spline // Using the reparameterization algorithm that is commonly used in vector graphics software // For parametric curves, it doesn't work better than numerical optimization; (faster but very unstable, produces a large number of curve pieces) #in...
ALGO
0.999805
6.694767
3d95ebcb-1349-444e-bd33-9d22b619399a
ed3276/cpp_primer
test10_11/main.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; void elimDups(vector<string> &words); auto isShorter(const string &s1, const string &s2) -> bool; int main() { cout << "Hello world!" << endl; vector<string> words = {"the", "quick", "red", "fox", "jumps", "over"...
ALGO
0.997785
5.192167
baad491a-cb7a-4c5a-9670-f12098cbaa1c
DanilBelka/AtDS-labs
Lab 1/Lab 1/Lab 1.cpp
#include <iostream> template <typename T> class sortedList { private: //structure for elements of list struct node { public: T data = NULL; node* next = nullptr; //recursive destructor ~node() { if(next != nullptr) delete next; ...
ALGO
0.998989
4.690077
cfb03607-d275-444c-bce3-0b63b4198725
ishabhray/Competitive-Programming
atcoder/abc227g.cpp
#include <bits/stdc++.h> using namespace std; #define PI 3.141592653589 #define ll long long int #define ld long double #define vi vector<int> #define vl vector<ll> #define ii pair<int,int> #define pb push_back #define mp make_pair #define ff first #define ss second #define pll pair<ll,ll> #define vv vector #define al...
ALGO
0.999967
4.321273
5fea7501-f83d-49ba-9a0f-cc2a3dcfb389
KKcuber/SummerTraining
STL/c.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define tc \ int t; \ cin >> t; \ while (t--) // This question is just brute force implementation of the problem. We can see that O(n^2) is good enough, so we go with brute force. int main() { ios_base::sync_with_stdio(false); ...
ALGO
0.999672
3.488904
31836285-1563-4f39-8d92-a6ecac59c70b
gaving747/eclispe-stuff
test project.cpp
#include <iostream> #include <string> #include <string.h> #include <vector> #include <array> #include <algorithm> #import "thing.h" #include <fstream> #include <array> using namespace std; int main() { string s = "LXXXIV"; int currentNum; int numSpots = 0; for(int j = 0; j < s.length(); j++){ ...
ALGO
0.999827
5.542573
735b3a4b-8426-45a0-be47-80dd44f7937b
shahriarc224/Competative-Programming
BeeCrowd/Beecrowd 2862.cpp
// https://judge.beecrowd.com/en/problems/view/2862 #include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int a; cin>>a; if(a>8000)cout<<"Mais de 8000!"<<endl; else cout<<"Inseto!"<<endl; } }
ALGO
0.99554
3.89396
7b81d6ff-8cf3-4835-8ab5-f3dbebb2bd5c
hlajungo/STL-testing
FIt_IIt_OIt/inner_product.cpp
#include <iostream> #include <vector> #include <numeric> // for inner_product int main() { std::vector<int> vec1 = {1, 2, 3}; std::vector<int> vec2 = {4, 5, 6}; // 計算內積 int dot_product = std::inner_product(vec1.begin(), vec1.end(), vec2.begin(), 0); std::cout << "內積結果為: " << dot_product << '\n'; ...
ALGO
0.99944
4.948123
2145a9eb-cd21-496d-b574-40f4ea3059cb
ishandutta2007/codeforces
imeimi/normal/1214/E.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <map> #include <cstdlib> #include <string> #include <cstring> #include <functional> #define fs first #define se second #ifdef imeimi #define debug(...) printf(__VA_ARGS__) #else #define debug(...) #endif using namespac...
ALGO
0.999953
3.186777
987f5154-bcc9-4be4-93b1-78e5e0cd81a9
ishandutta2007/codeforces
vkgainz/normal/557/D.cpp
#include <iostream> #include <vector> #include <algorithm> #include <random> #include <set> #include <map> #include <array> #include <queue> using namespace std; int main() { int n, m; cin >> n >> m; vector<vector<int>> adj(n); for (int i = 0; i < m; i++) { int a, b; cin >> a >> b; --a, ...
ALGO
0.999935
5.154974
4fec601a-3f03-433f-abb4-a04c6e93067d
Locheir/DSA_IN_CPP
20_Stack/reverse_a_string_using_stack.cpp
#include <iostream> using namespace std; template<class T> class Stack { private : int size; T *arr; T top_el; public : Stack(int size) { top_el = -1; this->size = size; arr = new T[size]; } void push(int x) { if ...
ALGO
0.998476
4.86671
0f71785f-1efd-4795-b0f9-9319553a78fb
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_774_1.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vll = vector<ll>; using pll = pair<ll, ll>; using pii = pair<int, int>; const double pi = acos(-1.0); int main() { int bb, g, ans = 0; vector<int> a(102, 0), b(102, 0)...
ALGO
0.999734
3.357635
0ac20492-08c4-436d-bcff-048394810725
Zhenghao-Liu/LeetCode_problem-and-solution
0071.简化路径/solution.cpp
class Solution { public: string simplifyPath(string path) { int path_size=path.size(); if (path_size<2) return "/"; stack<string> current_path; string command; for (int i=0;i<path_size;++i) { while (i<path_size && path.at(i)=='/') {...
ALGO
0.999968
5.720085
cbe84899-37c2-4d45-88a9-9ee2e301118e
probro27/leet-code
34-find-first-and-last-position-of-element-in-sorted-array/34-find-first-and-last-position-of-element-in-sorted-array.cpp
class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int high = nums.size()-1; int low = 0; // int mid; int flag = 0; int resultMid = 0; while(high >= low){ int mid = (high+low)/2; if(nums[mid]<target){ ...
ALGO
0.999947
6.368639
f82d3ac7-8e24-4e0a-ae9f-8b75623ab87f
zhhao1/fcgcl
src/tools/moses/moses/ForestInput.cpp
#include "ForestInput.h" #include <algorithm> #include <boost/make_shared.hpp> #include "util/tokenize_piece.hh" #include "moses/Syntax/F2S/Forest.h" #include "moses/TranslationModel/PhraseDictionary.h" #include "FactorCollection.h" #include "StaticData.h" #include "Util.h" namespace Moses { //! populate this In...
TOOL
0.888984
5.422432
765af8f5-080e-423b-8e51-9a77a2ccab3d
Gemechu-Asfaw/Leetcode-Problems
Same_Tree/submission2.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.999962
6.447662
244c91c5-0cdb-46f5-95d9-bf9e33b15a8f
Ashutxshj/LeetCode
NeetCode/Recursion/GFG/Fibonacci.cpp
class Solution { public: // Function to return list containing first n fibonacci numbers. int solve(int n) { if (n == 0) return 0; if (n == 1) return 1; return solve(n - 2) + solve(n - 1); } vector<int> fibonacciNumbers(int n) { vector<int...
ALGO
0.999859
5.904524
c4e4496e-ad75-4eeb-8815-e53a1da74ac4
jayeshpatel8/Coding-Practise-using-Leetcode-Coding-Platform
problems/uncrossed_lines/solution.cpp
class Solution { public: int maxUncrossedLines(vector<int>& nums1, vector<int>& nums2) { int N= nums1.size(), M = nums2.size(); vector<vector<int>> lcs(N+1,vector<int>(M+1)); for (int i=1; i<=N; i++){ for (int j=1; j<=M; j++){ if (nums1[i-1]==nums2[j-1]) ...
ALGO
0.999985
6.309584
52c2cdc1-5ff4-4c15-a0fc-d0d0a45a797e
hjiang13/LLMs-in-IR
POJ-104/12/614.cpp
#include <iostream> using namespace std; int main() { int a[17] , i , j , k; for (i = 1 ; i <= 16 ; i++) { a[i] = 1; } int count = 0; while (cin >> a[1]) { if (a[1] == -1) { break; } else { for (i = 2 ; a[i - 1] != 0 ; i++) { cin >> a[i]; } } i = i - 2; for (j =1 ; j <= i ; j++) { for (k=1 ; k <= i ; k++) { if ...
ALGO
0.998929
3.222391
f7a8449a-1f58-4f6b-899a-4fd29d673730
REWELLGOM/CodingTest
Bakjun/Lv3(For)/num11021.cpp
#include <iostream> using namespace std; int main(void) { int T; cin>>T; for(int i = 1; i < T+1; i++) { int a =0,b=0; cin>>a>>b; cout<<"Case #"<<i<<": "<<a+b<<endl; } }
ALGO
0.99498
5.374614
a78c8ae4-e3a2-466c-b442-9f8389b249ef
Ankit-Singh70/leetcode1
0002-add-two-numbers/0002-add-two-numbers.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* addTwoNumbe...
ALGO
0.999919
6.419803
9cb1d185-0992-4e87-baf3-81a9544ad47e
Hafsa-Begum/intro-to-cpp-and-codeforces-problems
intro_to_c++/input.cpp
#include<iostream> using namespace std; int main() { int a, b; cin>>a>>b; cout<<"sum = "<<a+b<<endl; return 0; }
TOOL
0.865043
3.488384
6bdb4516-fd80-4a0e-9302-464628d01e64
Sai-Nandan-Desetti/Learn-Cpp
Learning/00_Introduction/Hello World/c++20_test.cpp
#include <array> #include <iostream> #include <span> struct Foo { int a{ }; int b{ }; int c{ }; }; consteval int sum(std::span<const int> a) // std::span and consteval { int s{ 0 }; for (auto n : a) s += n; return s; } auto sum(auto x, auto y) -> decltype(x + y) // abbreviated functio...
ALGO
0.914946
6.337138
922be030-8f57-403a-aefc-aad404044816
hkatkade/CompetitiveProgramming-
Leetcode/Middle_of_the_linked_list.cpp
class Solution { public: ListNode* middleNode(ListNode* head) { if(!head){ return NULL; } ListNode *slow=head,*fast=head; while(fast && fast->next){ slow=slow->next; fast=fast->next->next; } return slow; } };
ALGO
0.999817
5.82081
26459bfa-08a7-4b32-a85c-161b0458a572
JKSL12/cppchat
boost_1_83_0/libs/contract/example/mitchell02/stack.cpp
//[mitchell02_stack #include <boost/contract.hpp> #include <boost/optional.hpp> #include <vector> #include <cassert> template<typename T> class stack { friend class boost::contract::access; void invariant() const { BOOST_CONTRACT_ASSERT(count() >= 0); // Non-negative count. } public: /* Creat...
TOOL
0.879971
6.890442
0dbd0499-a3a5-485e-afd8-791f51805ae1
wangqiim/mycode
洛谷/p1339.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; typedef pair<int,int> pp; struct node{ int t; //Ŀ int w; //Ȩ node(){} node(int t,int w):t(t),w(w){} }; const int maxn = 2501; const int maxm = 6201; vector<vector<node> > G(maxn+1); //ʹö̬ʵڽӱ bool isvis[maxn]; //ÿǷѾ int ds[maxn]; //s㵽ľ,-1...
ALGO
0.999936
4.208308
3e40b6e6-61e8-42c7-91b6-5903bdad0711
8bit-nyk/HSLAM
Thirdparty/opencv-3.4.6/modules/cudaimgproc/src/hough_segments.cpp
#include "precomp.hpp" using namespace cv; using namespace cv::cuda; #if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) Ptr<cuda::HoughSegmentDetector> cv::cuda::createHoughSegmentDetector(float, float, int, int, int) { throw_no_cuda(); return Ptr<HoughSegmentDetector>(); } #else /* !defined (HAVE_CUDA) */ namesp...
ALGO
0.856695
6.689178
cb75059b-adea-491f-9a6a-06e5e1e89456
anand-96/Competitive-Codes
Hackerearth/monk_and_sqroot.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ ll t; cin>>t; while(t--){ ll n, m;cin>>n>>m; ll ans = -1; for(ll i=0; i<m; i++) if((i*i)%m == n){ ans = i;break; } cout<<ans<<endl; }
ALGO
0.99992
4.122191
fdbc0f0b-ca38-4cce-aec7-c96dc53231bc
adahra/verbose-doodle
github-client/step_06/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.997969
6.786404
00150ceb-13df-4802-aab9-7fc7785f946e
Aadik1ng/LC
241-Different-Ways-to-Add-Parentheses.cpp
class Solution { public: vector<int> diffWaysToCompute(string expression) { vector<int> res; for (int i = 0; i < expression.size(); ++i) { if (expression[i] == '+' || expression[i] == '-' || expression[i] == '*') { vector<int> a = diffWaysToCompute(expression.substr(0, i)...
ALGO
0.999992
6.142675
49f5e12a-95b1-4de3-af73-b92a686b6ce8
blok98/HPP_bucketsort
src/erastothenes_MPI.cpp
#include <iostream> #include <climits> #include <mpi.h> #include <vector> #include <cmath> #include <chrono> using namespace std; using namespace chrono; vector<bool>* zeef(int N, int rank, int size){ cout << "zeef is executed by process: " << rank << endl; int chunk_size = (N + size - 1) / size; int st...
ALGO
0.999909
4.912886
1e36eefb-5f01-41f1-ae24-ac10511ba3f9
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-cot-gpt35/Codenet/p02349/682047210/response_8.cpp
#include <iostream> #include <vector> template <typename Monoid> struct LazySegmentTree { private: int N; std::vector<Monoid> node, lazy; public: LazySegmentTree(int sz = 0) { init(sz); } void init(int sz) { N = 1; while (N < sz) N <<= 1; node.reserve(2 * N - 1); lazy.reserve(2 * N - 1);...
ALGO
0.9997
5.285497
a35385d8-cbea-451d-8fad-f7ec97f810a5
Abdul-Samad-1020/DSA
DSA/LeetCode/LeetCode-master/LeetCode-master/C++/717. 1-bit and 2-bit Characters.cpp
class Solution { public: bool isOneBitCharacter(vector<int>& bits) { int i = 0, n = bits.size(); while(i < n - 1) i += bits[i] + 1; return i != n; } };
ALGO
0.999773
6.240137
2b50b324-b6d3-4f9a-9373-89a139ef685e
jxk15/Algo-DS-Code
dsacpp-src/src/greatest_slice/gs_dc.cpp
/*DSA*/#include <cstdlib> /*DSA*/#include "_share/util.h" extern int s_lo, s_hi; int gs_DC( int A[], int lo, int hi ) { //βԣO(n*logn) if ( hi - lo < 2 ) return A[lo]; int mi = (lo + hi) / 2; int gsL = A[mi-1], sL = 0, i = mi; //ö while ( lo < i-- ) //[i, mi) if ( gsL < (sL += A[i]) ) gsL = sL; ...
ALGO
0.999905
5.024564
40e76580-0a07-4c42-8b1c-1b2de7471a8a
vwmofo/android_frameworks_av
media/libstagefright/codecs/amrnb/enc/src/enc_lag3.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/enc_lag3.c Functions: Date: 01/28/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: Replaced "int" and/or "char" with OSCL defin...
ALGO
0.999629
7.237001
5ee4e044-383c-4c8a-a388-21cadd0c1e07
ruleless/programming
alg/poj/archive/1466/7282310_AC_1422MS_412K.cpp
#include <iostream> #include <cstdio> using namespace std; bool edge[505][505]; int n; int pre[505]; bool vis[505]; bool Find(int a) { int i,j,k; for(i=0;i<n;i++) { if(edge[a][i]&&!vis[i]) { vis[i]=true; if(pre[i]==-1||Find(pre[i])) { pre[i]=a; return true; } } } return false; } int s...
ALGO
0.998579
3.60685
ad02f13a-eb32-42ca-bfb6-7d56b208a5d6
victoriya40/leet
26-remove-duplicates-from-sorted-array/remove-duplicates-from-sorted-array.cpp
class Solution { public: int removeDuplicates(vector<int>& nums) { if(nums.empty()) return 0; int index=1; for(int i=1;i<nums.size();i++){ if(nums[i]!=nums[i-1]){ nums[index]=nums[i]; index++; } } return index; ...
ALGO
0.999931
6.08454
e88f4182-7705-4c7b-9484-036df2d23c43
Ashish707058/C-
pattern/invertedhalfPiramid.cpp
#include<iostream> using namespace std; int main() { int n; cout << "Enter the number of rows: "; cin >> n; for (int row = 0; row < n; row++) { for (int col = 1; col<= 6-row; col++){ cout <<"*"; } cout << endl; } return 0; }
ALGO
0.940898
3.66602
b2385227-7419-4c8b-b059-de26bb28c7b7
shreyash-Pandey-Katni/placementPractice
Trees/mergeSort.cpp
#include <iostream> #include <string> #include <vector> #include <unordered_map> using namespace std; void merge(int arr[], int l, int m, int r) { auto const subArrayOne = m - l + 1; auto *leftArray = new int[subArrayOne]; auto const subArrayTwo = r - l; auto *rightArray = new int[subArrayTwo]; for ...
ALGO
0.999945
5.069491
03d3b0b0-79de-428c-a6e4-aaba50d56885
luqmanarifin/cp
2012 ACM-ICPC World Finals/k_wiwit.cpp
#include <bits/stdc++.h> using namespace std; const int N = 55; int a[N][N]; int m[N]; int contain[N][N * N], dp[N * N][N]; int cnt[N * N]; int main() { int n, tt = 0; while (scanf("%d", &n) == 1) { vector<int> uniq; memset(contain, 0, sizeof contain); memset(dp, 0, sizeof dp); memset(cnt, 0...
ALGO
0.999915
3.469979
5a53ce61-d904-4196-9f50-ef768023f804
GrapheneOS-Archive/platform_frameworks_base-old
libs/androidfw/AssetsProvider.cpp
#include "androidfw/AssetsProvider.h" #include <sys/stat.h> #include <android-base/errors.h> #include <android-base/stringprintf.h> #include <android-base/utf8.h> #include <ziparchive/zip_archive.h> namespace android { namespace { constexpr const char* kEmptyDebugString = "<empty>"; } // namespace std::unique_ptr<A...
TOOL
0.912054
7.862351
7bb5552e-41ba-486b-afeb-7b3c568fb662
LuanLuKim/BTTH4
B1.SoPhuc/main.cpp
#include <iostream> #include "SoPhuc.h" using namespace std; int main() { SoPhuc a, b; SoPhuc sum, Hieu, Tich, Thuong; cin >> a >> b; cout << a << endl; cout << b << endl; sum = a + b; Hieu = a - b; Tich = a * b; cout << "Tong = " << sum << endl; cout << "Hieu = " << Hieu << endl; cout << "Tich = " << T...
ALGO
0.931763
3.386217
38726940-944e-4795-a26e-58c179e044e4
tiuphun/applied-algo
practice/2019.2/SKMIN/sk.cpp
#include <iostream> #include <string> #include <unordered_map> #include <vector> using namespace std; string s; // name int k; // nb of remain chars string ans; // new name vector<char> stack; int main(int argc, char const *argv[]) { cin >> s >> k; for (int i = 0; i < s.size(); ...
ALGO
0.999994
3.959409
b85eed5c-9225-4e63-beeb-8a9e98cd88a6
layinad/CodeHelp-DSA-Course-
Lecture91/topologicalsortusingbfs(KahnsAlgo).cpp
#include<bits/stdc++.h> using namespace std; vector<int> topologicalSort(vector<vector<int>> &edges, int v, int e) { //prepare adjList unordered_map<int,list<int>>adjList; for(int i=0;i<e;i++) { int u=edges[i][0]; int v=edges[i][1]; adjList[u].push_back(v); } ...
ALGO
0.999899
4.916211
0e9c0f16-fc6c-42d2-a8b7-666e1c26fd9e
TotoroCodingDojo/leetcode-cpp
456/sol0.cpp
class Solution { public: bool find132pattern(vector<int>& v) { int s1, s2, s3; stack<int> st; s3 = INT_MIN; for(int i=v.size()-1;i>=0;i--){ if(v[i] < s3){ return true; } else{ while(!st.empty() && ...
ALGO
0.999971
6.330472
9f51efd4-3127-48d2-bb7c-b646f1ba9f11
LauderWimberton/zerojudge-solutions
m932-2.cpp
#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0);cin.tie(0); vector<vector<char>> v; bool t[123]={0}; //統計用陣列 (輸出第二行時用的到) int m,n,k,d; //m,n,k為題目敘述 d代表的是input最後一行的整數 string s; cin>>m>>n>>k; int nowx=m-1,nowy=0,cnt=0; //nowx,nowy記錄現在位置的x和y cnt記...
ALGO
0.999889
3.826364
38559a57-6ddd-46ea-be40-95c83a8def43
dtrad/seismic_unix
sumyfilt.cpp
/* SUKMIG: $Date: March 1999 */ #include "su.h" #include "segy.h" #include "clibrarytd.h" /*********************** self documentation **********************/ char *sdoc[] = { " ", " SUMYFIT - Filter data with different filters. ", " Useful mainly for testing filters. ...
ALGO
0.861336
4.684269
9b1fdff5-8cc0-46a9-9a96-057a38d9cf0d
ArhantJain/Summer-18
Hackerrank/Lite/Priyanka_Toys.cpp
// Satyameva Jayate #include <bits/stdc++.h> using namespace std; #define ll long long #define l double #define endl "\n" int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n,i,W[100005],count,x; cin >> n; for(i=0;i<n;i++) { cin >> W[i]; } sort(W,W+n); x = W[0]+4; count=1; fo...
ALGO
0.999816
3.875073
60aa4b56-3be1-4d75-bbc2-88c9a531e21e
hienmv/Problems-Solving
C++/ThunderMountain.cpp
/* https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1744 #floyd-warshall #shortest-path */ #include<iostream> #include<vector> #include<algorithm> #include<iomanip> #include<cmath> using namespace std; typedef pair<int, int> Node; const double maxVal = 10.0; const double INF = 5...
ALGO
0.999868
4.793499
67961235-b18e-44ef-9a84-0eb124c461fc
liangf/lc2
minimum_depth_of_binary_tree.cpp
#include <iostream> #include <climits> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: int minDepth(TreeNode *root) { if (root == NULL) return 0; return dfs(root); } int dfs(TreeNode *root) { ...
ALGO
0.999647
6.138491
c97b4e7d-d064-4748-8b07-56ea36f653f5
dinox0r/comp-prog
cf/rounds/round-687/a.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int h, w, r, c; cin >> h >> w >> r >> c; int x[] = {1, w, 1, w}; int y[] = {1, 1, h, h}; int mm = -1; for (int i = 0; i < 4; i++) { int d = abs(x[i] - c) + abs(y[i] - r); mm = max(d, mm); ...
ALGO
0.999292
3.502553
f65a757a-240b-4e74-9dbb-f2bc825f553b
Lodour/ACM-ICPC
codes/hiho/1038.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> using namespace std; const int N = 555; const int M = 100100; int w[N], v[N]; int dp[M]; int main() { #ifdef MANGOGAO freopen("data.in", "r", stdin); #endif int n, m; scanf("%d%d", &n, &m); for (int i = 1; i <= n; i++) scanf("%d%d", &w[...
ALGO
0.999995
4.057819
0c0f65e2-7034-4aaf-8691-fcda432f4db3
samar-gupta/DSA_POTD
Leetcode/Power of Four.cpp
//Company Tags : Two Sigma //Leetcode Link : https://leetcode.com/problems/power-of-four/ //Approach-1 (Simplest for loop) //T.C : log(n) to base 4 class Solution { public: bool isPowerOfFour(int n) { if(n == 0) return false; while(n%4 == 0) { n = n/4; } ...
ALGO
0.999902
6.486644
b3e17535-19c1-49c8-8073-237f4566e752
wangsiping97/My-LeetCode-Solutions
518.cpp
// You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that amount. You may assume that you have infinite number of each kind of coin. #include <vector> using namespace std; class Solution { public: int change(int amount...
ALGO
0.999971
5.835496
d3f41dbe-63b6-43be-8b35-f84a7f9447e5
linjiafengyang/c-and-cpp
beginning_to_learn/第七章/30比较两个字符串.cpp
#include <stdio.h> int main() { char string1[80]; char string2[80]; printf("Enter two string2:"); scanf("%s%s", string1, string2); printf("The result is %d\n", mystery3(string1, string2)); return 0; } int mystery3(const char *s1, const char *s2) { for(; *s1 != '\0' && *s2 != '\0'; s1++, s2++) { if(*s1 != *s2) ...
ALGO
0.999078
3.42244
963aab6e-1160-4615-8914-ccff2572b048
thimanshu756/C-
input.cpp
#include <iostream> #include <limits.h> using namespace std; int main(){ int arr[5]; cout <<"Enter the numbers"; for (int i=0; i < 5; i++) { cin>> arr[i]; } for (int i=0; i < 5; i++) { cout<< 2*arr[i]; } return 0; }
ALGO
0.981021
3.068392
9a881f87-fab7-41ee-b752-1f5aee665631
zim2510/Online-Judge-Solves
2018/Murcia's skyline.cpp
#include <bits/stdc++.h> #define Read() freopen("in.txt", "r", stdin) #define Write() freopen("out.txt", "w", stdout) #define min3(a, b, c) min(a, min(b, c)) #define max3(a, b, c) max(a, max(b, c)) #define TC(i, a, b) for(int i = a; i<=b; i++) #define FOR(i, a, b) for(int i = a;...
ALGO
0.999953
3.710097
dfdbbe14-0471-4e26-a973-3b31fb49ed63
Priyasharma02821/Leetcode-Solutions
1695-maximum-erasure-value/1695-maximum-erasure-value.cpp
class Solution { public: int maximumUniqueSubarray(vector<int>& nums) { int result = 0, currentSum = 0, start = 0; unordered_set<int> seen; for (int end = 0; end < nums.size(); end++) { while (seen.find(nums[end]) != seen.end()) { seen.erase(nums[start]); ...
ALGO
0.999842
6.909712
07161d3b-8b27-4817-9bac-73a4bf39da12
harsh6754/DSA-Problems
DSA-Sheet/NeetCode150/ArrayAndHashing/FindAllDuplicateInAnArray.cpp
#include<bits/stdc++.h> using namespace std; class Solution{ public: vector<int>findDuplicate(vector<int>nums){ unordered_map<int,int>mp; for(int i = 0;i<nums.size();i++){ mp[nums[i]]++; } vector<int>ans; for(auto &x : mp){ if(x.second>=2){ ...
ALGO
0.99986
3.910863
9dc17922-56ed-4bb5-a87e-0f8802cce3f7
ann0nymouscoder/coding
Maximum Product Subarray.cpp
class Solution { public: int maxProduct(vector<int>& nums) { int maxProdArr=nums[0]; int maxProd=nums[0]; int minProd=nums[0]; for(int i=1;i<nums.size();i++) { if(nums[i]<0) { swap(maxProd,minProd); } maxProd=max(nums[i],maxProd*nums[i]); minProd=min(nums[i],minProd*nums[...
ALGO
0.999993
6.102206
ffb127d9-5c06-400f-8145-d0e305d0f80b
nguyencongvan10022002/CTDL_GTH
codeptit/bo_ba_so_pytago.cpp
#include<bits/stdc++.h> using namespace std; main(){ long long t; cin >> t; while(t--){ long long n; cin >> n; long long a[n]; for(long long i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); long long ok = 0; for(long long i = 0; i < n - 2; i++){ for(lon...
ALGO
0.999862
4.13338
d35add3d-feaa-4cf0-92d1-7a62f3816a2c
BitlDevelopmentStudios/Half-Life-2-Beta-Deathmatch-Source-Code-Archive
2007/hl2bdm/src/utils/vbsp/brushbsp.cpp
#include "vbsp.h" int c_nodes; int c_nonvis; int c_active_brushes; // if a brush just barely pokes onto the other side, // let it slide by without chopping #define PLANESIDE_EPSILON 0.001 //0.1 void FindBrushInTree (node_t *node, int brushnum) { bspbrush_t *b; if (node->planenum == PLANENUM_LEAF) { for (b=n...
ALGO
0.988795
4.662983
34f658d2-e20a-46c0-9318-62465e86ca42
cp-itb/contests
HPC2020/final/A-mhasan01.cpp
/** * Contest : HPC 2020 Final * Team : ItbNoFukkatsu * Author : Muhammad Hasan * Problem : A */ #include <bits/stdc++.h> using namespace std; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::ty...
ALGO
0.99981
4.323142
802f6c1b-bbe5-4d74-bfba-2f33823db35f
nkysggsy/leetcode
dp/4.2/673_findNumberOfLIS.cpp
// // Created by yesonggao on 2024/5/2. // class Solution { public: int findNumberOfLIS(vector<int>& nums) { int n = nums.size(); vector<int> f(n, 1); vector<int> g(n, 1); for (int i = 0; i < n; i++) for (int j = 0; j < i; j++) if (nums[i] > nums[j]) { ...
ALGO
0.999994
6.532234
613906b0-fe73-4623-a13d-817045383829
Yasg-uru/DSA-practice-
leetcode-submissions/1221_Split_a_String_in_Balanced_Strings.cpp
class Solution { public: int balancedStringSplit(string s) { int ans=0; int balance=0; for(int i=0;i<s.size();i++){ if(s[i]=='L'){ balance++; if(balance==0){ ans++; } }else{ ...
ALGO
0.999932
5.890471
d6e1ccbf-8ba8-4629-851e-add8266f9f42
ChromesDuzez/GameOfFifteen
GameOfFifteen/libraries/boost_1_81_0/libs/math/src/tr1/cyl_neumannf.cpp
extern "C" float BOOST_MATH_TR1_DECL boost_cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) BOOST_MATH_C99_THROW_SPEC { return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
TOOL
0.878085
3.744243
153e36a3-1bb2-4920-b49e-8a64270261ed
ishandutta2007/codeforces-t
thenymphsofdelphi/normal/127/B.cpp
#include<bits/stdc++.h> using namespace std; // Optimization //#pragma GCC optimize("O3") #define endl '\n' // Shortcut #define int long long #define eb emplace_back #define pb push_back #define pob pop_back #define mp make_pair #define upb upper_bound #define lwb lower_bound #define fi first #define se second #def...
ALGO
0.999904
3.947989
6c83a523-8bdd-49af-8e55-56490cd416d0
ravagerahul/DSA
25-11-23/matrix_chain_multiplication.cpp
// vector<int> arr int n=arr.size(); vector<vector<int>> dp(n,vector<int>(n,0)); for(int i=0;i<n;i++) { dp[i][i]=n; } for(int i=n-1;i>=1;i--) { for(int j=i+1;j<n;j++) { int mini=INT_MAX; for(int k=i;k<j;k++) { int sum=arr[i-1]*arr[k]*arr[j]+dp[i][k]+dp[k+1][j]; ...
ALGO
0.999958
4.279342
7cc4bb0e-4069-4655-831f-7ae7dde2c99d
PhuocVinhLee/system_exam_quiz_programming
online_exam_system_backend/temp/fg7sy5d.cpp
#include<stdio.h> int add(int a, int b){ int sum; sum = a + b; return sum; } int main() { int a = 3; int b = 2; int test; test = add(a,b);printf("%d", test); return 0; }
ALGO
0.896354
3.77549