Problem knapsack
User hwy
Submission Time 2023-07-23 01:27:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘int dp(int, int)’:
knapsack.cpp:23:9: error: expected ‘;’ before ‘ans’
23 | break
| ^
| ;
24 | ans = max(ans, dp(index+1, remW-(i*wLst[index])) + i*vLst[index]);
| ~~~
knapsack.cpp: In function ‘int main()’:
knapsack.cpp:30:25: error: expected ‘;’ before ‘:’ token
30 | ios::sync_with_stdio(0):
| ^
| ;