Problem knapsack
User Dan64091
Submission Time 2026-07-08 15:53:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘int32_t main()’:
knapsack.cpp:32:10: error: overloaded function with no contextual type information
32 | count.push_back(take);
| ^~~~~~~~~
knapsack.cpp:39:22: error: ‘newWeight’ was not declared in this scope; did you mean ‘weight’?
39 | for(int j = S;j >= newWeight; j--)
| ^~~~~~~~~
| weight