0_0_15814478_17017.cpp: In function 'long long int dfs(int, int, int)':
0_0_15814478_17017.cpp:17:20: error: invalid types 'long long int[int]' for array subscript
if(dp[n][len][k]!=-1) return dp[n][len][k];
^
0_0_15814478_17017.cpp:17:46: error: invalid types 'long long int[int]' for array subscript
if(dp[n][len][k]!=-1) return dp[n][len][k];
^
0_0_15814478_17017.cpp:18:24: error: invalid types 'long long int[int]' for array subscript
return dp[n][len][k]=max(dfs(n-1,len,k),max(dfs(n-1,len-a[n],k)+w[n],dfs(n-1,len-(a[n]+1)/2,k-1)+w[n]));
^
0_0_15814478_17017.cpp: In function 'int main()':
0_0_15814478_17017.cpp:43:35: error: invalid types 'long long int[int]' for array subscript
dp[i][j][k]=max(dp[j][k],dp[j-(a[i])/2][k-1]+w[i]);
^
|