Problem 01knapsack
User chiefoggy
Submission Time 2023-12-23 20:39:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

01knapsack.cpp: In function ‘int main()’:
01knapsack.cpp:16:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
16 | if (j >= weight) dp[i][j] = max (dp[i-1][j], dp[i-1][j-weight[i]] + value[i]);
| ^~~~~~