Problem 01knapsack
User sikai004
Submission Time 2024-08-03 12:12:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

01knapsack.cpp: In function ‘long long int knapsack(long long int, long long int)’:
01knapsack.cpp:17:71: error: expected ‘;’ before ‘return’
17 | knapsackans[n][w]=max(knapsack(n-1,w),(knapsack(n-1,w-W[n])+V[n]))
| ^
| ;
18 | return knapsackans[n][w];
| ~~~~~~