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_N][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_N,INF);
	for(int i=0;i<N;i++)if(i<=V[i])mem[0][i]=W[i];
    for(int i=0;i<N;i++){
      for(int j=1;j<=MAX_V;j++){
        mem[i+1][j]=mem[i][j];
		if(j>=V[i])mem[i+1][j]=min(mem[i+1][j],mem[i][j-V[i]]+W[i]);	
      }}
      
     cout <<mem[MAX_N-1][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_N][MAX_V];
      | ^~~
a.cc:9:5: error: 'mem' does not name a type
    9 | int mem[MAX_N][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_N,INF);
      |              ^~~
a.cc:15:22: error: 'MAX_N' was not declared in this scope
   15 |         fill(mem,mem+MAX_N,INF);
      |                      ^~~~~
a.cc:15:28: error: 'INF' was not declared in this scope
   15 |         fill(mem,mem+MAX_N,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++)if(i<=V[i])mem[0][i]=W[i];
      |             ^~~
a.cc:16:24: error: expected ')' before ';' token
   16 |         for(int i=0;i<N;i++)if(i<=V[i])mem[0][i]=W[i];
      |            ~           ^
      |                        )
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:17:9: note: in expansion of macro 'int'
   17 |     for(int i=0;i<N;i++){
      |         ^~~
a.cc:17:20: error: expected ')' before ';' token
   17 |     for(int i=0;i<N;i++){
      |        ~           ^
      |                    )
a.cc:23:26: error: 'MAV_V' was not declared in this scope
   23 |      cout <<mem[MAX_N-1][MAV_V]<<endl;
      |                          ^~~~~