Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main()
{
  int n, W;
  cin >> n >> W;
  vector<long long> weight(n), value(n);
  for(int i = 0 ; i < n ; i++ )
  {
    cin >>weight[i]>>value[i];
  }
  
  vector<vector<long long> > dp(n+1, vector<long long>(10**5+1, std::numeric_limits<double>::infinity();));
  dp[0][0] = 0

for(int i = 0 ; i < N+1 ; i++)
{
  for(int j = 0 ; j < 10**5+1 ; j++)
  {
    if(j-value[i-1] >= 0)
    {
      dp[i][j] = min(dp[i-1][j-value[i-1] + weight[i-1] , dp[i][j]);
    }
    dp[i][j] = min(dp[i][j],dp[i-1][j]);
  }                             
}                             
                             
for(int i = 10**5+1 ; i >= 0 ; i--)
    if(dp[N][i] <= W)
       cout<<i;


Compiler output:
a.cc: In function 'int main()':
a.cc:15:59: error: invalid type argument of unary '*' (have 'int')
   15 |   vector<vector<long long> > dp(n+1, vector<long long>(10**5+1, std::numeric_limits<double>::infinity();));
      |                                                           ^~
a.cc:15:70: error: 'numeric_limits' is not a member of 'std'
   15 |   vector<vector<long long> > dp(n+1, vector<long long>(10**5+1, std::numeric_limits<double>::infinity();));
      |                                                                      ^~~~~~~~~~~~~~
a.cc:15:55: error: expected primary-expression before '(' token
   15 |   vector<vector<long long> > dp(n+1, vector<long long>(10**5+1, std::numeric_limits<double>::infinity();));
      |                                                       ^
a.cc:15:59: error: invalid type argument of unary '*' (have 'int')
   15 |   vector<vector<long long> > dp(n+1, vector<long long>(10**5+1, std::numeric_limits<double>::infinity();));
      |                                                           ^~
a.cc:15:70: error: 'numeric_limits' is not a member of 'std'
   15 |   vector<vector<long long> > dp(n+1, vector<long long>(10**5+1, std::numeric_limits<double>::infinity();));
      |                                                                      ^~~~~~~~~~~~~~
a.cc:15:85: error: expected primary-expression before 'double'
   15 |   vector<vector<long long> > dp(n+1, vector<long long>(10**5+1, std::numeric_limits<double>::infinity();));
      |                                                                                     ^~~~~~
a.cc:15:105: error: expected primary-expression before ')' token
   15 |   vector<vector<long long> > dp(n+1, vector<long long>(10**5+1, std::numeric_limits<double>::infinity();));
      |                                                                                                         ^
a.cc:16:15: error: expected ';' before 'for'
   16 |   dp[0][0] = 0
      |               ^
      |               ;
   17 | 
   18 | for(int i = 0 ; i < N+1 ; i++)
      | ~~~            
a.cc:18:17: error: 'i' was not declared in this scope
   18 | for(int i = 0 ; i < N+1 ; i++)
      |                 ^
a.cc:18:21: error: 'N' was not declared in this scope
   18 | for(int i = 0 ; i < N+1 ; i++)
      |                     ^
a.cc:30:16: error: invalid type argument of unary '*' (have 'int')
   30 | for(int i = 10**5+1 ; i >= 0 ; i--)
      |                ^~
a.cc:32:16: error: expected '}' at end of input
   32 |        cout<<i;
      |                ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^