Problem | knapsack |
---|---|
User | snorky |
Submission Time | 2024-01-25 19:42:05 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
knapsack.cpp: In function ‘int helper(int&, int&, int&, int&, int, int, int)’:
knapsack.cpp:6:9: error: invalid types ‘int[int]’ for array subscript
6 | if(dp[S][index]!=-1) return dp[S][index];
| ^
knapsack.cpp:6:34: error: invalid types ‘int[int]’ for array subscript
6 | if(dp[S][index]!=-1) return dp[S][index];
| ^
knapsack.cpp:8:7: error: invalid types ‘int[int]’ for array subscript
8 | dp[S][index] = min(k[index],S/w[index]);
| ^
knapsack.cpp:8:29: error: invalid types ‘int[int]’ for array subscript
8 | dp[S][index] = min(k[index],S/w[index]);
| ^
knapsack.cpp:8:40: error: invalid types ‘int[int]’ for array subscript
8 | dp[S][index] = min(k[index],S/w[index]);
| ^
knapsack.cpp:12:18: error: invalid types ‘int[int]’ for array subscript
12 | if(S>=n*w[ind