Problem knapsack
User Daddy
Submission Time 2023-11-10 15:03:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘int32_t main()’:
knapsack.cpp:63:29: error: invalid initialization of reference of type ‘std::vector<std::tuple<long long int, long long int, long long int> >&’ from expression of type ‘std::tuple<long long int, long long int, long long int> [n]’
63 | int result=KnappySacky(s,n,items);
| ^~~~~
knapsack.cpp:11:60: note: in passing argument 3 of ‘int32_t KnappySacky(long long int, long long int, std::vector<std::tuple<long long int, long long int, long long int> >&)’
11 | int32_t KnappySacky(int s,int n,vector<tuple<int,int,int>>&items) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~