uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
b31b4b27-d76c-488e-b95b-15b2446a94c9
Yehn-an/px4-Autopilot-v1.14.2
src/modules/ekf2/EKF/range_height_control.cpp
/** * @file range_height_control.cpp * Control functions for ekf range finder height fusion */ #include "ekf.h" void Ekf::controlRangeHeightFusion() { static constexpr const char *HGT_SRC_NAME = "RNG"; bool rng_data_ready = false; if (_range_buffer) { // Get range data from buffer and check validity rng_d...
TOOL
0.989969
7.052335
46377b3e-7341-4cee-883b-5584476d471f
sleeg00/algorithm
11660/main.cpp
/* #include <iostream> #include <algorithm> using namespace std; long long arr[1026][1026]; int main(void) { cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); long long N, M; cin >> N >> M; for (int i = 1; i <= N; i++) { for (int j = 1; j <= N; j++) { cin >...
ALGO
0.999753
3.811864
833f98c5-7f7e-44bd-b960-a7e69562c94b
SIL1202/UVA
Volume_109(10900-10999)/10908 - Largest Square.cpp
#include <iostream> #include <vector> using namespace std; int square(vector<vector<char>> &grid, int r, int c) { int max_size = 1; int m = grid.size(); int n = grid[0].size(); char x = grid[r][c]; for (int h = 1; r - h >= 0 && r + h < m && c - h >= 0 && c + h < n; h++) { for (int j = c - h; j <= c + h;...
ALGO
0.999173
3.85793
8627d007-b96d-43f9-b054-67f23026d4a0
praveen-velliengiri/llvmnew
libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp
// <algorithm> // XFAIL: c++98, c++03, c++11, c++14 // template<class T> // const T& // clamp(const T& v, const T& lo, const T& hi); #include <algorithm> #include <cassert> #include "test_macros.h" struct Tag { Tag() : val(0), tag("Default") {} Tag(int a, const char *b) : val(a), tag(b) {} ~Tag() {}...
TEST
0.951172
6.762564
614fa897-d026-46b6-97f0-cb997ae7b3b8
dcyril233/LeetCode
0413.cpp
#ifdef LEETCODE #include <LeetCodeL.hpp> #endif class Solution { public: int numberOfArithmeticSlices(vector<int>& nums) { int n = nums.size(); if(nums.size() < 3) return 0; vector<int> dp(n, 0); for(int i = 2; i < n; ++i) { if(nums[i] - nums[i-1] == nums[i-1] - nums[i-2...
ALGO
0.999715
5.924785
f702540b-d4e9-4279-af65-939c6190d2f9
omonimus1/competitive-programming
Leetcode/remove-duplicates-from-linked-list.cpp
// https://leetcode.com/problems/remove-duplicates-from-sorted-list/submissions/ /** * 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) : v...
ALGO
0.999912
5.87697
3f2af474-efd1-4017-b43d-a8bd5ce09429
dimmkan/MSHP
lesson28/l28-2/l28-2/main.cpp
#include <iostream> using namespace std; int main() { const int SZ = 100; int n, k, ind = 0; int arr[SZ]; cin >> n; for(int i = 0; i < n; i++){ cin >> arr[i]; } cin >> k; for(int i = 0; i < n; i++){ if(arr[i] == k){ ind = i+1; break; } ...
ALGO
0.998104
4.659456
2df74274-8a41-472f-a5e2-5eeb4a9bf3de
Samundrakarki/Advance_Cplus
Queue_var/testQueue.cpp
/* CH08-320143 a2 p3.cpp Samundra karki <EMAIL> */ #include <iostream> #include "Queue.h" //defau;t constructor that sets the size of the queue to 10 template <class T> Queue<T>::Queue() : rear(0), front(0), len(10){ arr = new T; } //paratermtized constructor that sets the size of the array template <class T> Qu...
TOOL
0.978358
4.053245
9b3929c3-9677-482d-87db-642cd43cc731
piyush4for/coding_ninja_DSA
recursion 1/assignment 1a/4.cpp
#include<iostream> #define fst ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define ll long long int #include<algorithm> #include<string.h> using namespace std; bool Palrev(char str[],int i,int last){ if(i==last) return true; if(str[i]!=str[last]) return false; if(i<last) return Palrev(...
ALGO
0.999893
3.80692
45bb3752-fc20-47ae-b0ed-d7fcebadff13
ShubhamVashishth5/Leetcodepushes
1137-height-checker/height-checker.cpp
class Solution { public: int heightChecker(vector<int>& heights) { int freq[101]={0}; for(int x : heights)freq[x]++; int index=0, error=0; for(int i=0;i<101&& index<heights.size();i++){ while(freq[i]-- &&index<heights.size()){ if(i!=heights[index+...
ALGO
0.999922
5.465826
970bc50c-a860-408c-872c-49e2ed734fc3
Quantum-Chemistry-Group-BNU/PyNQS
cpp_src/tensor/integral.cpp
#include "integral.h" #include <sstream> #include <stdexcept> std::tuple<py::array_t<double>, py::array_t<double>> compress_h1e_h2e( const py::array_t<double> &h1e, const py::array_t<double> &h2e, const int sorb) { int pair = sorb * (sorb - 1) / 2; std::vector<double> int1e(sorb * sorb, 0.0); std::vecto...
ALGO
0.9948
4.574199
c94d46a4-9bcb-4e0a-af56-220383ab3801
redwanh25/cpp
C++ (container)/queue/1. push.pop.front.back.empty.cpp
#include<iostream> #include<queue> using namespace std; int main() { int k,sum=0; queue <int> red; for(int i=0; i<5; i++){ cin>>k; red.push(k); } while(!red.empty()){ /// cout<<++red.front()<<" "; cout<<red.front()<<" "; sum+=red.front(); red.pop(); /*...
ALGO
0.999772
3.123448
1eab7143-addf-49d5-9f56-9d64b3518166
PatriciaHaloiu/VF
tools/boost_1_80_0/libs/container/example/doc_recursive_containers.cpp
//[doc_recursive_containers #include <boost/container/vector.hpp> #include <boost/container/stable_vector.hpp> #include <boost/container/deque.hpp> #include <boost/container/list.hpp> #include <boost/container/map.hpp> #include <boost/container/string.hpp> using namespace boost::container; struct data { int ...
TOOL
0.958921
4.280384
aa7d9c21-96e6-41de-8ee5-22d0d9b883a6
hazedz/GizasDimitrios_CSC5_42829
Hmwk/Assignment 2/Savitch_9thED_Ch2_Problem2_ProgProj/main.cpp
/* * File: main.cpp * Author: Dimitrios Gizas * Created on March 9, 2016, 8:58 AM * Purpose: */ //System Libraries #include <iostream> using namespace std; //user libraries //global constants //function prototype //Execution int main(int argc, char** argv) { //declared variables const float per...
ALGO
0.983485
3.482354
d3c9453c-95cb-4828-b615-a14c6053d48b
kuntalojha/LeetCode-And-GFG
1678-goal-parser-interpretation/1678-goal-parser-interpretation.cpp
class Solution { public: string interpret(string command) { string res; for(int i = 0; i < command.size(); i++){ if(command[i] != '(' && command[i] != ')') res += command[i]; else if(command[i] == '(' && command[i + 1] == ')') res += 'o'; } return res; } };
ALGO
0.999541
5.118742
4c27f667-ffcf-45a7-99bd-e06f2cb96fde
khushikumari239/C-
p7.cpp
#include <bits/stdc++.h> using namespace std; void print(int n) { for (int i = 0; i <n; i++) { for (int j = 0; j <n-i-1; j++) { cout <<" " ; } for (int k = 0; k < 2*i+1; k++) { cout<<"*"; } for (int h= 0...
ALGO
0.999844
3.807178
885797ca-f686-4cfe-b16c-a05f78caaeb6
lytruongsinh123/Cplusplus
cây nhị phân/cây nhị phân/Source.cpp
#include<iostream> using namespace std; struct Node { int data; Node* left; Node* right; }; Node* createNode(int data) { Node* newNode = new Node(); newNode->data = data; newNode->left = NULL; newNode->right = NULL; return newNode; } void inorder(Node* root) { if (root != NULL) { inorder(root->left); co...
ALGO
0.999992
6.303679
2d1d9cae-3e7a-4418-b6be-68e693502930
anuragmukherjee2001/test
Assignment 11/infix_to_prefix.cpp
#include <iostream> #include <stdlib.h> #include <string.h> #define max 40 using namespace std; class Stack{ public: char arr[max]; int top; Stack(){ top = -1; } bool isEmpty(){ if (top == -1) { return true; } else { ...
ALGO
0.999903
3.853538
eed5f4f4-dd3a-4ad1-9bb9-3ff8bdd632e4
CPC-UTEC/theory
2020-I/Lessons/3/code/Contest1G.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; if (n <= 2) { cout << 1 << endl; cout << 1 << endl; return 0; } if (n == 3) { cout << 2 << endl; cout << 1 << ' ' << 3 << endl; return 0; } cout << n << endl; for (int x = 2; x <= n; x += 2) { cout << x << ' '; } for...
ALGO
0.999782
3.535168
ebbf2fd3-a9d8-4af1-9d3b-cbbb6e2e97e7
UITlogn/DSA_Assigment1
DSA1_VW05p_Enrichement.cpp
#include <bits/stdc++.h> //Logm using namespace std; #define int long long int n, m; vector<vector<int> > a; int getsum(int x, int y, int...
ALGO
0.999799
3.590755
5d26d044-e77c-4d0f-b4c8-9cf56755988d
AdhamHammoda/Competitive-Programming
CODEFORCES_RATING/900/A- Quasi-palindrome.cpp
/// ______ __________ _____ _____ _____ /// /// \\\ ||__|| \\\ ||| ||| || || |||\\\ ///||| /// /// \\\ ||__|| \\\ |||_____||| || || ||| \\\ /// ||| /// ///______\\\ ||__|| \\\ |||_____||| || || ||| \\\ /// ...
ALGO
0.999376
3.970752
087ea697-bd82-4700-9851-fc0aa4afcf35
rajatjc/Leet
Codeforces/893/893A.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int a, b, c; cin >> a >> b >> c; // Determine the winner based on the optimal strategy // If a > b, Anna will always have buttons left to press // If b >= a, Katie will press the c...
ALGO
0.999992
5.328675
d8ebc79d-5dc2-4c26-8a8a-d9f7a3641c10
Alhuuin/rl_controller
src/RLController.cpp
#include "RLController.h" #include <Eigen/src/Core/VectorBlock.h> #include <eigen3/Eigen/src/Core/Matrix.h> #include <mc_rtc/logging.h> #include <mc_rbdyn/configuration_io.h> #include <chrono> #include <cmath> RLController::RLController(mc_rbdyn::RobotModulePtr rm, double dt, const mc_rtc::Configuration & config) : mc...
TOOL
0.871006
4.580061
05797618-fcc7-4846-815d-98274e05aaf5
aszos/SchoolWork
Undergrad/CISC220/Lab3/DrozdekExercise/delimitertests/delimiter_long.cpp
//Procedural Programming technique shows creation of Pascal's Triangle #include <iostream> #include <iomanip> using namespace std; int** comb(int** a , int row , int col) { int mid = col/2; //clear matrix for( int i = 0 ; i < row ; i++) for( int j = 0 ; j < col ; j++) a[i][j...
ALGO
0.999913
5.856332
68ec3201-8d9a-4198-948f-4acdd930d3a4
SWEG-2014-EC-Batch/Albo-Coders
Hermela Dereje/Class work/Question 13.cpp
double maximum( double x,double y); double maximum(double x,double y,double z); int main() { cout<<"THE LARGEST FROM THE TWO NUMBERS IS:"<<maximum(10,20)<<endl; cout<<"THE LARGEST FROM THE THREE NUMBERS IS:"<<maximum(11.3,22.1,10); return 0; } double maximum(double x, double y) { return (x>y)?x:y; } dou...
ALGO
0.997569
3.96717
391bc08b-b21b-41ff-b971-d87496a10df5
patmarion/PCL
apps/src/pcd_organized_edge_detection.cpp
#include <pcl/console/print.h> #include <pcl/console/parse.h> #include <pcl/console/time.h> #include <pcl/features/organized_edge_detection.h> #include <pcl/io/pcd_io.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/visualization/cloud_viewer.h> #include <sensor_msgs/PointCloud2.h> using name...
ALGO
0.99178
6.812684
682d8585-bc2e-40c2-91e8-7cc4620bac65
SBidaibek/acm
balkanOI/2017/day2/b.cpp
#include <bits/stdc++.h> using namespace std; #define forn(i, x, n) for (int i = int(x); i <= int(n); ++i) #define for1(i, n, x) for (int i = int(n); i >= int(x); --i) #define F first #define S second #define pb push_back typedef unsigned long long ll; typedef pair <ll, ll> pii; typedef long double ld; typedef vecto...
ALGO
0.999736
3.626711
ca0a493d-a3dd-40a1-badf-2ae9263db007
alexandraback/datacollection
solutions_5769900270288896_0/C++/cmd/b.cpp
#if 1 #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #inc...
ALGO
0.999781
3.610352
d65684d8-7947-4609-85ad-325cfd62d852
tfia/THU-CST-OOP-24spring
hw3/T2/main.cpp
#include <iostream> #include "Shape.h" using namespace std; int main() { double width,height; cin>>width>>height; Shape* rectangle = new Rectangle(width,height); cout<<rectangle->getArea()<<endl; double radius; cin>>radius; Shape* circle = new Circle(radius); cout<<circle->getArea()<<...
ALGO
0.981948
3.783552
eda25417-3f84-4a5e-a9d5-54463f0e51ff
lcnzg/lammps-pi
src/kspace.cpp
#include "kspace.h" #include "atom.h" #include "atom_masks.h" #include "comm.h" #include "domain.h" #include "error.h" #include "force.h" #include "memory.h" #include "pair.h" #include "suffix.h" #include <cmath> #include <cstring> using namespace LAMMPS_NS; #define SMALL 0.00001 /* -------------------------------...
ALGO
0.973969
3.107868
7f243bc7-f7c4-4d5b-b584-81e7950c3fd1
RoyKwonn/Problem-Solving
Python-for-coding-test/5-DFS_BFS/Q18-괄호 변환.cpp
#include <bits/stdc++.h> using namespace std; bool check(const string &a) { int r = 0; for (char ch : a) { if (ch == '(') ++r; else --r; if (r < 0) return false; } return r == 0; } string solution(string p) { if (p == "") return ""; if (check(p)) return p; int i, t ...
ALGO
0.99975
5.697593
07e4fd26-4ccd-476b-8226-100d1041a4d7
SraAKu/Plasma-Simulations-Methods-Comparation
Prueba/Particle in Cell/Net.cpp
//Net class Implementation// #include "Net.h" #include <iostream> #include "stdafx.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include "fasttransforms.h" using namespace std; #define _PI 3.14159265 Net::Net( double x, double y, double cx, double cy) { px = x; py = y; Nx = cx * 1; Ny = ...
ALGO
0.998152
3.24858
c9047f19-72de-491c-b847-69719e1d9212
SETHJI01/DSA
Heap/minHeap.cpp
#include<bits/stdc++.h> using namespace std; class minHeap{ private: int *arr; int size; int capacity; public: minHeap(int c) { arr = new int[c]; capacity = c; size = 0; } int left(int i) { return 2 * i + 1; } int right(int i) { return 2 * i + 2; } int parent...
ALGO
0.999946
3.99692
da0f6675-0050-41a1-852c-347efa3018df
alexandraback/datacollection
solutions_5644738749267968_0/C++/dllu/d.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <queue> #include <cmath> #include <cstdio> #include <string> #include <complex> #include <stack> #include <iomanip> using namespace std; typedef long double ld; typedef complex<ld> pt; typedef vector<pt> pol; int main() { int N; ...
ALGO
0.999703
3.526984
9493535d-7b72-45d4-9d55-a9c7a5e4cf15
rt-kill/CompetitiveProgramming
LeetCode/Hard/minimum-difficulty-of-a-job-schedule/main.cpp
#include <bits/stdc++.h> using namespace std; /* Macros {{{ */ /* A lot of this is from some of Benq's submissions [https://codeforces.com/profile/Benq] Ugly af to the eyes, but with vim fold its barable Hopefully c++20 concepts can make all this stuff must cleaner */ /* Basics {{{ */ using ll = long lon...
ALGO
0.999833
5.62115
d8e960fc-7efe-4354-9045-2c8657c34fa1
gyger/OpenFilters
abeles/_abeles/needles.cpp
#include <cstdlib> #include <cmath> #include <complex> #include "_abeles.h" static const std::complex<double> j = std::complex<double>(0.0, 1.0); #ifdef __cplusplus extern "C" { #endif static const double two_pi = 2.0*M_PI; /*********************************************************************/ /* ...
ALGO
0.999451
4.773551
483c04a6-652c-45c4-9380-b0ea471f2bcb
richard-shi/CaveStoryOnline
src/ai/weapons/bubbler.cpp
#include "bubbler.h" #include "../ai.h" #include "weapons.h" #include "../../ObjManager.h" #include "../../caret.h" #include "../../game.h" #include "../../player.h" #include "../../input.h" #include "../../sound/sound.h" #include "../../common/misc.h" INITFUNC(AIRoutines) { ONTICK(OBJ_BUBBLER12_SHOT, ai_bubbler_l12)...
ALGO
0.902001
5.621258
2d4bf637-b053-4c85-bdbe-743823484e14
Vivek0311/leet-code
1071. Greatest Common Divisor of Strings.cpp
class Solution { public: string gcdOfStrings(string str1, string str2) { if ( str1 + str2 != str2 + str1) return ""; int largestgcd = gcd(str1.length(), str2.length()); return str1.substr(0, largestgcd); } };
ALGO
0.999824
5.959475
7d6ea41f-405d-4eee-8a82-5048e4496c75
Pahujalaveena/Patterns
pattern15.cpp
/* * ** *** **** ***** ****** ******* ******* ****** ***** **** *** ** * */ #include<iostream> #include<conio.h> using namespace std; int main() { int n; cout<<"Enter the number:"; cin>>n; for(int i=1;i<=n;i++) { for(int j=1;j<=n-i;j++) { cout<<" "; } for(int...
ALGO
0.999812
3.401647
adfc969a-1d44-47a5-8349-e7b043668492
Alejandro-Madero/guia-ejercicios-cpp
3/ejercicio-11/main.cpp
#include <iostream> using namespace std; int main() { int tempMax, tempMin; for (int i{0}; i < 10; i++) { int num; cout << "Ingrese el numero " << i + 1 << " de la lista: "; cin >> num; if (i == 0) { tempMax = num; tempMin = num; ...
ALGO
0.977316
3.633116
db003369-d4fc-49c2-a320-7fe94f5d4457
gromacs/gromacs
src/gromacs/linearalgebra/gmx_blas/dasum.cpp
#include <cmath> #include "../gmx_blas.h" double F77_FUNC(dasum, DASUM)(int* n__, double* dx, int* incx__) { int i__1, i__2; int i__, m, mp1; double dtemp; int nincx; int n = *n__; int incx = *incx__; --dx; dtemp = 0.; if (n <= 0 || incx <= 0) { return 0.0;...
ALGO
0.998798
5.694453
5d338207-77be-4e52-a391-9b562324392b
Vector-013/Algorithms_Laboratory-23
Data_structures/heap_leetcode/IPO.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; bool pairsort(pair<int, int> p1, pair<int, int> p2) { return p1.second < p2.second; } class Solution { public: priority_queue<pair<int, int>> pq; vector<pair<int, int>> v; int findMaximizedCapital(int k, int w, vector<int> &pro...
ALGO
0.99998
4.735842
556f5e6b-03fe-45d4-8ac7-b43de0f3b293
Magdy0Elhoseny/TunePlayerApp
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
d7344374-50dd-4b81-a19a-adac20859c6d
anm336/LeetCode-Questions
Knapsack with Duplicate Items - GFG/knapsack-with-duplicate-items.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: int func(int N, int rem, int val[], int wt[], vector<int> &dp){ if(rem==0) return 0; if(dp[rem]!=-1) return dp...
ALGO
0.999996
5.587961
d3e0ec26-c368-4d92-85c3-290e094d7e91
kinaphar/AtCoder
ABC/ABC227/b copy 2.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { // 追加2, 以降 cin の入力元が 'input.txt' になる std::ifstream in("b-input.txt"); std::cin.rdbuf(in.rdbuf()); // ... int n, b, ans, guess, flag = 0; // vector<int> data; cin >> n; ...
ALGO
0.999834
3.698606
cf37e674-f0a2-4d45-a85c-84098f26c04c
DionysiosB/CodeForces
1927D-FindTheDifferentOnes.cpp
#include <cstdio> #include <vector> int main(){ long t; scanf("%ld", &t); while(t--){ long n; scanf("%ld", &n); std::vector<long> v(n + 1, 0); long prev(0); for(long p = 1; p <= n; p++){ long x; scanf("%ld", &x); if(x != prev){v[p] = p - 1;} ...
ALGO
0.999945
3.728473
d61175de-d181-4d5e-990f-c62a79e725f7
peterzheng98/gpu-memory
src/save/pytorch/third_party/eigen/bench/perf_monitoring/trmv_up.cpp
#include "gemv_common.h" EIGEN_DONT_INLINE void trmv(const Mat &A, const Vec &B, Vec &C) { C.noalias() += A.triangularView<Upper>() * B; } int main(int argc, char **argv) { return main_gemv(argc, argv, trmv); }
ALGO
0.980556
4.868302
4fe6ca77-f7c2-4cea-a46d-92b71a761cac
Mayankjain2624/Dsa
0145-binary-tree-postorder-traversal/0145-binary-tree-postorder-traversal.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.999975
6.127155
0f5427e7-d0be-45dd-bdab-b9b63cb2fa3c
BinaryDSAStore/CodingNinjasQuestions
Length of the Largest Subarray II.cpp
#include <bits/stdc++.h> using namespace std; int maxLength(vector<int> &arr) { int N = arr.size(); int maxi = 0; for (int i = 0; i < N - 1; i++) { int cnt = 1, j; for (j = i; j < N; j++) { if (arr[j + 1] == arr[j] + 1) cnt++; else ...
ALGO
0.999775
4.322104
afe8426f-bbd1-4e99-8bf0-7410a4fdf2cf
ppaong/baekjoon
CPP/10845.cpp
#include <iostream> #include <queue> #include <string> using namespace std; int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); queue<int> S; string term; int N; cin >> N; for (int i = 0;i < N;i++) { cin >> term; switch (term[0]) { case 'p': if (term[1] == 'u') { int K; cin >> K; ...
ALGO
0.996421
3.727799
2474d908-a93d-4dd7-aa0f-c3d8868317dd
EdXian/Nanogui-example
ext/nanogui/ext/eigen/bench/benchmark-blocking-sizes.cpp
#include <iostream> #include <cstdint> #include <cstdlib> #include <vector> #include <fstream> #include <memory> #include <cstdio> bool eigen_use_specific_block_size; int eigen_block_size_k, eigen_block_size_m, eigen_block_size_n; #define EIGEN_TEST_SPECIFIC_BLOCKING_SIZES eigen_use_specific_block_size #define EIGEN_T...
TOOL
0.888517
5.950303
28cd6af8-61c0-4ec0-8b52-313eecd58626
urvashiparashar/Leetcode_prac
169-majority-element/169-majority-element.cpp
class Solution { public: int majorityElement(vector<int>& nums) { int ct=0,maj=nums[0]; for(int ele:nums) { if(ele==maj) //increment count if ele is same { ct++; } else { ct--; //as soon as we get dif...
ALGO
0.999809
5.639197
aada7831-ca3d-47bd-9c77-ee79cef9f436
lucasg1/sard_dataset_without_bias
dataset/Juliet-5/112608-v1.0.0/src/testcases/CWE761_Free_Pointer_Not_at_Start_of_Buffer/bad_CWE761_Free_Pointer_Not_at_Start_of_Buffer__char_console_72b.cpp
using namespace std; namespace NAMESPACE0 { void FUN0(vector<char *> dataVector); void FUN1() { char * data; vector<char *> dataVector; data = (char *)malloc(100*sizeof(char)); data[0] = '\0'; { size_t dataLen = strlen(data); if (100-dataLen > 1) { if (fgets(data+...
ALGO
0.995381
3.052764
cd7a8a00-d78d-42d7-afed-0e7e8590ab18
CarlosRiverosLopez/PRACTICA_01
PRACTICA_04/Ejercicio_04_04.cpp
// Materia: Programación I, Paralelo 1 // Autor: Carlos Riveros Lopez. // Fecha creación: 16/09/2024 // Número de ejercicio: 4 // Problema planteado:Leer 2 vectores de dimensión N y calcule la multiplicación de los mismos en otro vector. #include <iostream> #include <vector> using namespace std; vector<int> ingresar...
ALGO
0.999851
4.632104
007564e4-08cd-4554-8cbc-fc7430974511
KomiMoe/Arkari
libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14 // <numeric> // Became constexpr in C++20 // template<class InputIterator, class OutputIterator, class T> // OutputIterator inclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, T init); // #include <algorithm> #inc...
TEST
0.973821
7.097685
5146133e-7877-4b4b-9e78-44268d2b9540
AndresGarciaEscalante/Path-Planning-Autonomous-Car
CarND-Path-Planning-Project/src/Eigen-3.3/bench/vdw_new.cpp
#include <iostream> #include <Eigen/Core> using namespace Eigen; #ifndef SCALAR #define SCALAR float #endif #ifndef SIZE #define SIZE 10000 #endif #ifndef REPEAT #define REPEAT 10000 #endif typedef Matrix<SCALAR, Eigen::Dynamic, 1> Vec; using namespace std; SCALAR E_VDW(const Vec &interactions1, const Vec &inter...
ALGO
0.999696
3.537879
faca841c-2357-4666-a7bf-c12609f05830
kerrache/linkpred
examples/dnetwork/graphalg/traversal/extract.cpp
#include <linkpred.hpp> #include <set> #include <iostream> using namespace LinkPred; /** * @brief A class that collects nodes during traversal up to a certain limit. * @tparam Network The network type. */ template<typename Network = DNetwork<>> class CollectorLim { protected: std::queue<typename Network::NodeID> v...
ALGO
0.999631
6.600054
949dfc20-56a2-46db-9c9e-d60d8f0f1f49
TheRealBatman1/personal-projects
projects/Tic-Tac-Toe/TicTacToe.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; //Tic-Tac-Toe tables string table[3][3] = {{"1","2","3"}, {"4","5","6"}, {"7","8","9"}}; bool flag[3][3] = {{false,false,false}, {false,false,false}, {false,fal...
ALGO
0.999571
6.309747
69b7c550-0c9e-403e-9c30-956bfd42e6f5
LueyEscargot/mapper
src/utils/jsonUtils.cpp
#include "jsonUtils.h" #include <fstream> #include <rapidjson/error/en.h> #include <rapidjson/istreamwrapper.h> #include <rapidjson/stringbuffer.h> using namespace std; using namespace rapidjson; namespace mapper { namespace utils { bool JsonUtils::parse(Document &doc, string configFile, string schema, stringstream ...
TOOL
0.892663
5.656
945dcc86-ba11-42e6-8f48-e07450f1e29b
riyanwe/Tutorial-CPP
21_Fungsi_Kembalian/Fungsi_Kembalian.cpp
#include <iostream> using namespace std; int kuadrat(int x){ // fungsi kembalian int y; y = x * x; return y; } int tambah(int a, int b){ int c; c = a + b; return c; } int main (){ int input, hasil, a, b, hasil2; cout << "masukan nilai kuadrat dari: "; cin >> input; hasil = ku...
TOOL
0.904391
3.531788
212abe4a-df9f-4a9a-8ca5-e66c9a41437b
KevinMathewT/Competitive-Programming
LostLevel.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; // Author - Kevin Mathew // Birla Institute of Technology, Mesra ll n, a[100010]; vector<ll> ranges; const ll m = 1e9 + 7; ll mod_pow(ll a, ll x){ if(x == 0) return 1; if(x == 1) return a % m; if(x % 2 == 0) return mod_pow((a * a) % m, x /...
ALGO
0.999744
4.261113
70f65261-a813-477a-a814-0ba30d55fe2b
nghiapham110702/BIGINTEGERLIBRARY
ListTest.cpp
/********************************************************************************* * Nghia Pham, ngmpham * 2023 Winter CSE101 PA5 * ListTest.cpp *********************************************************************************/ #include<iostream> #include<string> #include<stdexcept> #include"List.h" using namespa...
TEST
0.870241
4.615827
9d753765-2d31-44d5-9f1d-b18d41da43cb
7matuag/DSA-Sheet-by-Love-Babbar-450-Questions-
Stacks & Queues/Rotten Oranges.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find minimum time required to rot all oranges. int orangesRotting(vector<vector<int>>& grid) { // Code here queue<pair<int,int>>q; int n=grid.size(),m=g...
ALGO
0.999924
6.420319
c47a78aa-773d-4755-aa2d-b85db8a6c8c5
morrischen890717/Leetcode
C++/2369.cpp
class Solution { public: bool validPartition(vector<int>& nums) { // using bottom-up DP // time complexity: O(N), space complexity: O(N) int n = nums.size(); vector<bool> dp(n + 1, false); dp[0] = true; for(int i = 1; i <= n; i++){ int j = i - 1; ...
ALGO
0.999987
5.744127
37e29f31-ace4-4a2c-878b-8128fb940dc7
kshitij86/didactic-octo-spork
sample/sortMatrixByOccurrences.cpp
#include <bits/stdc++.h> using namespace std; map<int, int> freqMap; bool customComparator(int a, int b){ return freqMap[a] <= freqMap[b]; } vector<vector<int>> sortMatrixByOccurrences(vector<vector<int>> m) { vector<int> straightMatrix; for(int i=0; i<m.size(); i++){ for(int j=0; j<m[0]...
ALGO
0.999992
5.118495
638b24ac-c0a3-4e2d-a156-c9881af742e5
humkyung/SmartDraw
SmartHSR/BSPTree.cpp
#include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include "SmartHSR.h" #include "BSPTree.h" #include "IsPlane3d.h" #define PREPEND_FACE(f,fl) (f->next = fl,fl = f) #define ISVERTEX_EQ(v1,v2) \ (ISEQUAL((v1)->pt->x,(v2)->pt->x) && \ ISE...
ALGO
0.996696
3.317258
8a6cf301-3176-4819-b7e1-a1dde3f44dc0
raincross7/code-similarity
codes/train_code/problem313/problem313_407.cpp
#include <bits/stdc++.h> using namespace std; int N, M; int par[100010]; int depth[100010]; void init(int n) { for (int i = 0; i < n; i++) { par[i+1] = i+1; depth[i+1] = 0; } } int find(int x) { if (par[x] == x) { return x; } else { return par[x] = find(par[x]); } } void unite(int x, int y...
ALGO
0.999941
4.146698
d020129c-75c3-4976-84ea-1e2638023365
Madophs/Data-Structures-and-Algorithms-Specialization
algorithmic-toolbox/week-3/Maximum_Number_Of_Prizes.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, price = 1; vector<int> pairs; cin >> n; while (n > 0) { if (n >= price) { n -= price; pairs.push_back(price); }...
ALGO
0.99991
4.02771
2f913389-3ef0-45e6-b0df-2d1e7ef86805
sofikulsk02/DSA_in_c-
practice/threeIn.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; long long solveQuery(vector<int>& A, int K) { priority_queue<long long, vector<long long>, greater<long long>> pq; // Add the first K elements to the priority queue for (int i = 0; i < K; ++i) { pq.push(A[i]); } ...
ALGO
0.999971
5.810049
92ae56a5-ceba-4ab5-a36d-035a4ed7dfb4
LuxLucas/Programacao-Aplicada
Matrizes_em_cpp/ler_matriz_3x3.cpp
#include <iostream> #include <vector> int receberNumero(); std::vector<int> receberLinha(int i); std::vector<int> multiplicarLinha(int multiplicador, std::vector<int> matriz); void mostrarMatriz(std::vector<int> matriz); int main(){ // Nem sei mais como arrumar isso std::vector<std::vector<int>> numero[3]; for(int...
ALGO
0.973274
3.831388
95f5ceed-9b66-4478-af6f-cdebb9bacd39
broeckho/bistro
main/cpp/pool/TravellerProfile.cpp
#include "TravellerProfile.h" #include "ContactPoolType.h" #include <trng/uniform_int_dist.hpp> #include <iostream> #include <pop/Population.h> namespace stride { TravellerProfile::TravellerProfile(std::size_t amountOfRegions, double amountOfTravel, double fractionWork, util::RnMan&...
TOOL
0.939412
6.437509
b34d62e2-9fcc-4107-8555-1c11b50bb74b
potionhook/potionhook
src/visual/picopng.cpp
#include <vector> #include "picopng.hpp" int decodePNG(unsigned char *&out_image, int &image_width, int &image_height, const unsigned char *in_png, size_t in_size, bool convert_to_rgba32) { static const unsigned long LENBASE[29] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83...
TOOL
0.985961
4.983769
ed12df20-9871-4a42-abf9-dd22945589b9
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-coop-gpt4/Codenet/p02290/363908728/response_7.cpp
#include <iostream> #include <vector> #include <complex> using namespace std; using D = double; struct Point { D x, y; Point(D x = 0.0, D y = 0.0) : x(x), y(y) {} }; struct Line { Point p1, p2; Line(const Point &p1 = Point(), const Point &p2 = Point()) : p1(p1), p2(p2) {} }; istream &operator>>(istream &is,...
ALGO
0.999911
4.150019
a59dc689-5aa0-446f-88eb-9f539eaaf6c8
Evervolv/android_packages_inputmethods_LatinIME
native/jni/src/dictionary/structure/pt_common/patricia_trie_reading_utils.cpp
#include "dictionary/structure/pt_common/patricia_trie_reading_utils.h" #include "defines.h" #include "dictionary/interface/dictionary_bigrams_structure_policy.h" #include "dictionary/interface/dictionary_shortcuts_structure_policy.h" #include "dictionary/utils/byte_array_utils.h" namespace latinime { typedef Patric...
TOOL
0.868581
7.646451
296487c4-792c-4392-8fe6-792e0e538301
bluster980/Leetcode-Solutions
0415-add-strings/0415-add-strings.cpp
class Solution { public: string addStrings(string num1, string num2) { reverse(num1.begin(),num1.end()); reverse(num2.begin(),num2.end()); string ans; int temp = 0; int range = max(num1.size(),num2.size()); for(int i=0; i<range; i++){ if(i<num1.size()){ ...
ALGO
0.999971
6.516799
650a2d1b-10b8-43e4-a556-88fdedec1e73
shobhit-glitch/Neet433fromleetcode
2216-delete-the-middle-node-of-a-linked-list/delete-the-middle-node-of-a-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* deleteMiddl...
ALGO
0.999856
5.897146
48c59e88-3729-49b5-8d07-34e29f45de18
khoinguyen28102002/DSA_HK231
exe9.cpp
#include<iostream> using namespace std; int findGCD(int a, int b) { if (b == 0) return a; return findGCD(b, a % b); } int findLCM(int a, int b) { return (a * b) / findGCD(a, b); } int main(){ cout << findLCM(10,102); return 0; }
ALGO
0.998954
4.043166
3db663a9-9ed9-4a65-93fe-61a3d361dfb8
csiimnida/codetree-TILs
240721/입력받아 계산 3/input-calculate-3.cpp
#include <iostream> using namespace std; int main() { // 여기에 코드를 작성해주세요. int a,b; cin >> a>> b; cout << a *b; return 0; }
ALGO
0.947895
3.874045
93dae78a-63da-4b1b-92ef-7a7452029718
LimJeonghyun/CodingTestStudy
Programmers/P_120583.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> array, int n) { int answer = 0; for (int i = 0; i < array.size(); i++) { if (array.at(i) == n) { answer++; } } return answer; }
ALGO
0.999665
5.877366
7aa86d6e-87db-43e4-9a66-342b3223be9a
GalangPratamaS/FlutterPrinterThermal
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
7d668529-bee9-4c14-b016-7906b4e75ef6
vi5hnuu/love-babbar-dssa-sheet-sol
coding ninjas ques/Diagonal Traversal of a binary tree.cpp
#include <bits/stdc++.h> /************************************************************ Following is the TreeNode class structure: template <typename T> class TreeNode { public: T data; TreeNode<T> *left; TreeNode<T> *right; TreeNode(T data) { this->data ...
ALGO
0.99999
5.262557
ac18efb1-1acc-48a6-a3f0-89bf5b2b3cbe
SayaliSolapure/Application
program303.cpp
#include<iostream> using namespace std; typedef struct node { int data; struct node *next; }NODE, *PNODE, **PPNODE; class SinglyLL { public: PNODE First; int iCount; SinglyLL(); void InsertFirst(int no); void InsertLast(int no); void InsertAtPos(int no,int...
ALGO
0.998397
4.41856
d1ab1416-45df-4a65-a1e1-77a65ac64676
LPD-EPFL/CS453-2023-project
grading/grading.cpp
/** * @file grading.cpp * @author Sébastien Rouault <<EMAIL>> * * @section LICENSE * * Copyright © 2018-2019 Sébastien Rouault. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eith...
TEST
0.888381
7.068929
764e6cc3-b7cc-4631-9bb9-ef3884b7c548
amansaca01/CppForCProgrammers
HW2/shortest_path.cpp
/* * shortest_path.cpp * * Created on: Jan 29, 2020 * Author: amanda.salazar */ #include "shortest_path.h" #include "priority_queue.h" #include "graph.h" #include <vector> #include <numeric> //iota #include<iostream> #include <algorithm> ShortestPath::ShortestPath(const graph &G) : G(G) { int size = thi...
ALGO
0.99982
4.648365
d20456ee-eab6-477a-ac99-5ea9d6788556
meetrk/cpp
OOPSlab/lab3/2.cpp
#include<iostream> using namespace std; void swap(int&,int&,int&); int main(){ int a=1,b=2,c=3; swap(a,b,c); cout << "a="<< a << " b=" << b << " c=" << c; return 0; } void swap(int& a,int& b,int& c){ int t; t=a; a=c; c=t; t=b; b=c; c=t; }
ALGO
0.998883
3.52178
e8a4ca8a-0718-4ffc-a5f1-4151cf8c3840
ishandutta2007/codeforces
ttklwxx/normal/1687/E.cpp
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; inline int read() { int n=0,f=1,ch=getchar(); while(ch<'0'||ch>'9') { if(ch=='-')f=-1; ch=getchar(); } while(ch>='0'&&ch<='9') { n=n*10+ch-'0'; ch=getchar(); } return n*f; } int a[100005]; bool vis[100005]; int b[25],cnt; int f...
ALGO
0.999984
3.182201
72f2de95-97a4-4a17-826f-84ec99769c47
guricerin/algo-method-submissions
src/14_various-data-structure/04_linked-list/05.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (int)(b); i++) #define rrep(i, a, b) for (int i = (a); i >= (int)(b); i--) #define all(x) (x).begin(), (x).end() using i64 = int64_t; int main() { int n, q; cin >> n >> q; vector<int> front(n, -1), back(n, -1); re...
ALGO
0.999784
4.101463
556b400d-c961-48ab-82d3-4b2308b12c61
ori12396/Anomaly-Detector
src/HybridAnomalyDetector.cpp
#include "HybridAnomalyDetector.h" HybridAnomalyDetector::HybridAnomalyDetector() = default; HybridAnomalyDetector::~HybridAnomalyDetector() = default; void HybridAnomalyDetector::learnNormalHelper(const TimeSeries &ts, string& f1, string& f2, float correlation, Point **...
ALGO
0.903663
5.487342
8b9e444c-3e0b-4811-af8b-8e0096a63ea6
junewaves/contests
Codeforces/2020/675/e.cpp
#include <bits/stdc++.h> using namespace std; struct compressed { string pre, suf; int len = 0; bool increase = false; void add(char c) { if (len && c != pre[0]) increase = c < pre[0]; len++; pre = c + pre; if ((int)suf.size() < 2) suf = c + suf; if ...
ALGO
0.999962
4.185717
2c9d00bf-2a90-4f0c-95f8-3c09d89cfe49
Farepal/myTLX
hps1sj.cpp
#include <bits/stdc++.h> using namespace std; int main(){ string x; cin >> x; string s; cin >> s; bool flag = false; for (int i = 0; i < x.length(); i++){ string temp = ""; for (int j = 0; j < x.length(); j++){ if (j == i) continue; temp += x[j]; } if (temp == s){ flag = true; break; }...
ALGO
0.999909
4.362254
01e4e96d-09b1-43fe-bbb8-7a67fa058575
Pulkit1822/GeeksforGeeks
Medium/Check if frequencies can be equal/check-if-frequencies-can-be-equal.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: bool sameFreq(string s) { int n = s.size(); int maxi = INT_MIN; int mini = INT_MAX; int maxiCnt = 0; int miniCnt = 0; ...
ALGO
0.99985
5.527394
632bf199-6e8d-495b-bc66-bb353a358ad8
ManuScript07/Mirea_course
Practic1/2.cpp
#include <iostream> using namespace std; int main() { setlocale(0, " "); double a, b; cin>>a>>b; double sum = a + b; double dif = a - b; double mul = a*b; if (b==0){ cout<<"Деление на ноль"; return 0; } double ch = a / b; return 0; }
ALGO
0.995212
3.30124
9f2c4ada-886f-4692-9aaa-4dcf7aaabd51
Naman4925/LeetCode
Implement Atoi - GFG/implement-atoi.cpp
// { Driver Code Starts //Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: /*You are required to complete this method */ /*int atoi(string str) { //Your code here int res=0; int i=0...
ALGO
0.993706
6.047294
a19caf6e-fd49-4dc6-b34a-3bca07767eba
cselab/CubismUP_3D
source/operators/FluidSolidForces.cpp
#include "FluidSolidForces.h" #include "../obstacles/ObstacleVector.h" CubismUP_3D_NAMESPACE_BEGIN using namespace cubism; namespace { struct KernelComputeForces : public ObstacleVisitor { ObstacleVector * const obstacle_vector; const double nu, dt; LabMPI * lab_ptr = nullptr; const BlockInfo * info_ptr = nu...
ALGO
0.997962
5.679605
66d6f13a-c31d-423a-943b-1a1843952f41
B1Z0N/Algodata
algorithms/sortings/heap_sort.cpp
#include <iostream> #include <algorithm> #include <vector> // commons library #include "container_printer/container_printer.hpp" template <typename T> void max_heapify( std::vector<T>& arr, std::size_t length, std::size_t index ) { std::size_t left = 2 * index + 1; std::size_t right = 2 * index + 2; std::size_t ...
ALGO
0.999893
5.609871
7814cc9e-472f-4e6a-b7b4-74185697c91b
ishandutta2007/codeforces
cinnamoroll/normal/1133/B.cpp
// warm heart, wagging tail,and a smile just for you! // // // // ...
ALGO
0.999962
3.651601
963712d7-b356-4c88-9521-fa556d9cfb86
Aerma7309/LeetCode
449.serialize-and-deserialize-bst.cpp
/* * @lc app=leetcode id=449 lang=cpp * * [449] Serialize and Deserialize BST */ #include <bits/stdc++.h> using namespace std; // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), ...
ALGO
0.999964
7.332087
876b9394-ed92-4455-9426-a07b0d09baf1
raincross7/code-similarity
codes/train_code/problem213/problem213_67.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vl = vector<ll>; using vll = vector<vl>; using Pll = pair<ll, ll>; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define all(v) v.begin(), v.end() #define sz(x) ((int) x.size()) #define pb push_back #define mp make_pair #defi...
ALGO
0.999954
3.643857
ddbd54a9-cf0f-4441-a662-c14e53e64f93
wataken44/topcoder
work/src/Quipu.cpp
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <list> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include ...
ALGO
0.99951
3.889534
7d59a3c8-3abd-4e39-bb12-f1ffff0f8d2c
fclaw/algorithms
algorithms/onlinejudge/dp/boxes.cpp
/* ─────────────────────────────────────────────────────────────── 🧳 UVa 11003 Boxes, rt: s ─────────────────────────────────────────────────────────────── Problem Summary: You're given 'n' boxes. Each box has: - w(i): its weight - c(i): the maximum weight it can carry (stacked on top of it) Goal: Find the maxim...
ALGO
0.999987
5.770013