Problem 01knapsack
User MDXCI
Submission Time 2026-02-28 16:21:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

01knapsack.cpp: In function ‘int main()’:
01knapsack.cpp:24:31: error: invalid initialization of reference of type ‘long long int (&)[100][100000]’ from expression of type ‘long long int [101][100001]’
24 | cout << ks(0, s, n, W, V, memo);
| ^~~~
01knapsack.cpp:5:72: note: in passing argument 6 of ‘long long int ks(long long int, long long int, long long int&, std::vector<long long int>&, std::vector<long long int>&, long long int (&)[100][100000])’
5 | int ks(int id, int remW, int& n, vector<int>& W, vector<int>& V, int (&memo)[100][100000]){
| ^