Problem knapsack
User Vinayak01
Submission Time 2024-02-22 20:28:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘int knapsack(int, const std::vector<int>&, const std::vector<int>&, const std::vector<int>&)’:
knapsack.cpp:5:10: error: ‘weight’ was not declared in this scope; did you mean ‘weights’?
5 | int n = weight.size();
| ^~~~~~
| weights
knapsack.cpp: In function ‘int main()’:
knapsack.cpp:36:7: error: expected ‘;’ before numeric constant
36 | count 0;
| ^~
| ;
knapsack.cpp:36:9: error: statement cannot resolve address of overloaded function
36 | count 0;
| ^