/in/foo.cc: In function 'int main()':
/in/foo.cc:16:56: error: 'max' was not declared in this scope
f[i][j] = max(f[i][j] + c[i], f[i-1][j+v[i]]);
^
/in/foo.cc:16:56: 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)
^~~
/in/foo.cc:20:30: error: 'max' was not declared in this scope
ans = max(ans, f[n][i]);
^
/in/foo.cc:20:30: 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)
^~~