Problem | 01knapsack |
---|---|
User | blob |
Submission Time | 2023-12-30 09:50:52 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
01knapsack.cpp: In function ‘int main()’:
01knapsack.cpp:14:1: error: ‘ts’ was not declared in this scope; did you mean ‘tm’?
14 | ts
| ^~
| tm
01knapsack.cpp:19:17: error: ‘dp’ was not declared in this scope
19 | dp[i][w] = max(dp[i - 1][w], dp[i - 1][w - weights[i]] + values[i]);
| ^~
01knapsack.cpp:21:17: error: ‘dp’ was not declared in this scope
21 | dp[i][w] = dp[i - 1][w];
| ^~
01knapsack.cpp:26:13: error: ‘dp’ was not declared in this scope
26 | cout << dp[N][W] << endl;
| ^~