/in/foo.cc:3:7: error: 'i' was not declared in this scope
int w[i],c[i];
^
/in/foo.cc:3:12: error: 'i' was not declared in this scope
int w[i],c[i];
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:9:29: error: 'w' was not declared in this scope
for(int i=1;i<=n;i++) cin>>w[i]>>c[i];
^
/in/foo.cc:9:35: error: 'c' was not declared in this scope
for(int i=1;i<=n;i++) cin>>w[i]>>c[i];
^
/in/foo.cc:11:18: error: 'w' was not declared in this scope
for(int j=m;j>=w[i];j++)
^
/in/foo.cc:12:31: error: 'c' was not declared in this scope
dp[j]=max(dp[j],dp[j-w[i]]+c[i]);
^