foo.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
foo.c:4:5: error: variably modified 'w' at file scope
    4 | int w[N],v[N],p[N];
      |     ^
foo.c:4:10: error: variably modified 'v' at file scope
    4 | int w[N],v[N],p[N];
      |          ^
foo.c:4:15: error: variably modified 'p' at file scope
    4 | int w[N],v[N],p[N];
      |               ^
foo.c:5:5: error: variably modified 'f' at file scope
    5 | int f[N][N][N];
      |     ^
foo.c:5:5: error: variably modified 'f' at file scope
foo.c:5:5: error: variably modified 'f' at file scope
foo.c: In function 'main':
foo.c:10:9: error: 'cin' undeclared (first use in this function)
   10 |         cin>>W>>V>>n;
      |         ^~~
foo.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:18:52: warning: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   18 |                                         f[i][j][k]=max(f[i][j][k],f[i+1][j-w[i]][k-v[i]]+p[i]);
      |                                                    ^~~
foo.c:21:9: error: 'cout' undeclared (first use in this function)
   21 |         cout<<f[1][W][V]<<endl;
      |         ^~~~
foo.c:21:27: error: 'endl' undeclared (first use in this function)
   21 |         cout<<f[1][W][V]<<endl;
      |                           ^~~~
   
  
    [Hydro](https://hydro.ac)提供评测服务