Problem knapsack
User hwy
Submission Time 2023-07-26 20:43:30
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘int solve(int, int)’:
knapsack.cpp:16:13: error: ‘newLst’ was not declared in this scope
16 | if (j < newLst[i - 1].first) {
| ^~~~~~
knapsack.cpp:20:51: error: ‘newLst’ was not declared in this scope
20 | dp[i][j] = max(solve(i - 1, j), solve(i - 1, j - newLst[i - 1].first) + newLst[i - 1].second);
| ^~~~~~