It is allowed to use an unlimited quantity of an item.
dp[i][c] = max(dp[i-1][c], profit[i] + dp[i][c - weight[i]])
// TODO
Last updated 4 years ago