Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
const double PI=3.14159265358979323846;
const in MOD = 1000000007;
const in INF=1<<30;
#define vec2(a,y,x) vector<vector<int>> a(y,vector<int>(x,0))
#define vec1(a,n) vector<int> a(n);rep(i,n)cin>>a[i]
using P=pair<int,int>;
vector<int> dx={0,1,-1,0};
vector<int> dy={1,0,0,-1};

bool chmax(int &a,int b){a>b?return 0:a=b;return 1;}
bool chmin(int &a,int b){a<b?return 0:a=b;return 1;}

int main(){
  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  intn,w;
  cin>>n>>w;
  vector<int> p(n),v(n);
  rep(i,n) cin>>p[i]>>v[i];
  
  vec2(dp,n+1,100003);//dp[i][j]:=i個目の荷物までで価値jの重さの最小値、無理ならw+2
 　rep(i,n+1)rep(j,100003) dp[i][j]=w+2;
  dp[0][0]=0;
  
  REP(i,1,n+1)rep(j,100003){
  	if(v[i-1]+j<100003) chmin(dp[i][j+v[i-1]],dp[i-1][j]+w[i-1]);
  }
  
  int ans=0;
  rep(i,100003){
    if(dp[n][100003-i]!=w+2) ans =100003-i;
  }
  cout<<ans<<'\n';
}

Compiler output:
a.cc:28:2: error: extended character 　 is not valid in an identifier
   28 |  　rep(i,n+1)rep(j,100003) dp[i][j]=w+2;
      |  ^
a.cc: In function 'bool chmax(int&, int)':
a.cc:17:30: error: expected primary-expression before 'return'
   17 | bool chmax(int &a,int b){a>b?return 0:a=b;return 1;}
      |                              ^~~~~~
a.cc:17:30: error: expected ':' before 'return'
   17 | bool chmax(int &a,int b){a>b?return 0:a=b;return 1;}
      |                              ^~~~~~
      |                              :
a.cc:17:30: error: expected primary-expression before 'return'
   17 | bool chmax(int &a,int b){a>b?return 0:a=b;return 1;}
      |                              ^~~~~~
a.cc: In function 'bool chmin(int&, int)':
a.cc:18:30: error: expected primary-expression before 'return'
   18 | bool chmin(int &a,int b){a<b?return 0:a=b;return 1;}
      |                              ^~~~~~
a.cc:18:30: error: expected ':' before 'return'
   18 | bool chmin(int &a,int b){a<b?return 0:a=b;return 1;}
      |                              ^~~~~~
      |                              :
a.cc:18:30: error: expected primary-expression before 'return'
   18 | bool chmin(int &a,int b){a<b?return 0:a=b;return 1;}
      |                              ^~~~~~
a.cc: In function 'int main()':
a.cc:22:3: error: 'intn' was not declared in this scope; did you mean 'int'?
   22 |   intn,w;
      |   ^~~~
      |   int
a.cc:22:8: error: 'w' was not declared in this scope
   22 |   intn,w;
      |        ^
a.cc:23:8: error: 'n' was not declared in this scope; did you mean 'yn'?
   23 |   cin>>n>>w;
      |        ^
      |        yn
a.cc:28:8: error: 'i' was not declared in this scope
   28 |  　rep(i,n+1)rep(j,100003) dp[i][j]=w+2;
      |        ^
a.cc:28:2: error: '　rep' was not declared in this scope
   28 |  　rep(i,n+1)rep(j,100003) dp[i][j]=w+2;
      |  ^~~~~
a.cc:28:18: error: 'j' was not declared in this scope
   28 |  　rep(i,n+1)rep(j,100003) dp[i][j]=w+2;
      |                  ^
a.cc:6:35: note: in definition of macro 'rep'
    6 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                   ^