0_0_28009444_24064.cpp: In function 'int main()':
0_0_28009444_24064.cpp:18:26: error: 'n' was not declared in this scope
for(int i = 1;i<=n;i++)
^
0_0_28009444_24064.cpp:22:21: error: 'weight' was not declared in this scope
if(j >= weight[i]) dp[j] = max(dp[j],dp[j-k*weight[i]]+k*value[i]);
^
0_0_28009444_24064.cpp:22:70: error: 'value' was not declared in this scope
if(j >= weight[i]) dp[j] = max(dp[j],dp[j-k*weight[i]]+k*value[i]);
^
|