Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long;
int N,W;
 
const int MAX_N=100;
const int MAX_V=1e6;
int W[1e9],V[1000];
int mem[MAX_V];
const intINF=1e9;
 
unsigned main(){
	cin >>N >>W;
  	for (int i=0;i<N;i++)cin >>W[i] >>V[i];
  	fill(mem,mem+MAX_V,INF);
	for(int i=0;i<N;i++){
    for(int j=MAX_V;j>=0;j--){
      	if(j<=V[i]){
          mem[j]=min(mem[j],W[i]);
        }else{
          mem[j]=min(mem[j],mem[j-V[i]]+W[i]);	
      }}
      
     cout <<mem[MAV_V]<<endl;
}

Compiler output:
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:4:1: note: in expansion of macro 'int'
    4 | int N,W;
      | ^~~
a.cc:4:5: error: 'N' does not name a type
    4 | int N,W;
      |     ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:6:7: note: in expansion of macro 'int'
    6 | const int MAX_N=100;
      |       ^~~
a.cc:6:11: error: 'MAX_N' does not name a type
    6 | const int MAX_N=100;
      |           ^~~~~
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:7:7: note: in expansion of macro 'int'
    7 | const int MAX_V=1e6;
      |       ^~~
a.cc:7:11: error: 'MAX_V' does not name a type
    7 | const int MAX_V=1e6;
      |           ^~~~~
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:8:1: note: in expansion of macro 'int'
    8 | int W[1e9],V[1000];
      | ^~~
a.cc:8:5: error: 'W' does not name a type
    8 | int W[1e9],V[1000];
      |     ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:9:1: note: in expansion of macro 'int'
    9 | int mem[MAX_V];
      | ^~~
a.cc:9:5: error: 'mem' does not name a type
    9 | int mem[MAX_V];
      |     ^~~
a.cc:10:7: error: 'intINF' does not name a type
   10 | const intINF=1e9;
      |       ^~~~~~
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:13:15: error: 'N' was not declared in this scope
   13 |         cin >>N >>W;
      |               ^
a.cc:13:19: error: 'W' was not declared in this scope
   13 |         cin >>N >>W;
      |                   ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:14:14: note: in expansion of macro 'int'
   14 |         for (int i=0;i<N;i++)cin >>W[i] >>V[i];
      |              ^~~
a.cc:14:18: error: 'i' was not declared in this scope
   14 |         for (int i=0;i<N;i++)cin >>W[i] >>V[i];
      |                  ^
a.cc:14:25: error: expected ')' before ';' token
   14 |         for (int i=0;i<N;i++)cin >>W[i] >>V[i];
      |             ~           ^
      |                         )
a.cc:14:26: error: 'i' was not declared in this scope
   14 |         for (int i=0;i<N;i++)cin >>W[i] >>V[i];
      |                          ^
a.cc:15:14: error: 'mem' was not declared in this scope
   15 |         fill(mem,mem+MAX_V,INF);
      |              ^~~
a.cc:15:22: error: 'MAX_V' was not declared in this scope
   15 |         fill(mem,mem+MAX_V,INF);
      |                      ^~~~~
a.cc:15:28: error: 'INF' was not declared in this scope
   15 |         fill(mem,mem+MAX_V,INF);
      |                            ^~~
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:16:13: note: in expansion of macro 'int'
   16 |         for(int i=0;i<N;i++){
      |             ^~~
a.cc:16:24: error: expected ')' before ';' token
   16 |         for(int i=0;i<N;i++){
      |            ~           ^
      |                        )
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:12:16: note: to match this '{'
   12 | unsigned main(){
      |                ^