/in/foo.cc: In function 'int main()':
/in/foo.cc:6:5: error: 'cin' was not declared in this scope
cin>>n>>m;
^~~
/in/foo.cc:6:5: note: suggested alternative:
In file included from /in/foo.cc:1:0:
/usr/include/c++/6/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^~~
/in/foo.cc:12:55: error: 'max' was not declared in this scope
if(j>=W[i]) f[i][j]=max(f[i][j],f[i][j-W[i]]+V[i]);
^
/in/foo.cc:12:55: note: suggested alternative:
In file included from /usr/include/c++/6/algorithm:62:0,
from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algo.h:3465:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^~~