Problem | knapsack |
---|---|
User | hwy |
Submission Time | 2023-07-26 20:42:53 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
knapsack.cpp: In function ‘int solve(int, int)’:
knapsack.cpp:16:13: error: ‘lst’ was not declared in this scope
16 | if (j < lst[i - 1].first) {
| ^~~
knapsack.cpp:20:51: error: ‘lst’ was not declared in this scope
20 | dp[i][j] = max(solve(i - 1, j), solve(i - 1, j - lst[i - 1].first) + lst[i - 1].second);
| ^~~
knapsack.cpp: In function ‘int main()’:
knapsack.cpp:58:7: error: ‘mewLst’ was not declared in this scope; did you mean ‘newLst’?
58 | N2 = mewLst.size();
| ^~~~~~
| newLst