Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long;

vector<ll> w(101,-1),v(101,-1);
map<ll,ll>m;
ll n,w;

ll solve(ll a,ll b)
{
  	if(a>=n)
      return 0;
 	if(m[a][b]!=0)
      return m[a][b];
  	if(b>=w[a]){
		m[a][b]=v[a]+solve(a+1,w-v[a]);
    }
  	m[a][b]=max(m[a][b],solve(a+1,w);
    return m[a][b];
}
int main(){
	
  	cin>>n>>w;
  	
  	for(int i=0;<n;i++){
    	cin>>w[i]>>v[i];
    }
  	cout<<solve(0,w);
  	return 0;
}

Compiler output:
a.cc:3:17: error: template argument 1 is invalid
    3 | #define ll long long;
      |                 ^~~~
a.cc:5:8: note: in expansion of macro 'll'
    5 | vector<ll> w(101,-1),v(101,-1);
      |        ^~
a.cc:3:17: error: template argument 2 is invalid
    3 | #define ll long long;
      |                 ^~~~
a.cc:5:8: note: in expansion of macro 'll'
    5 | vector<ll> w(101,-1),v(101,-1);
      |        ^~
a.cc:5:10: error: expected unqualified-id before '>' token
    5 | vector<ll> w(101,-1),v(101,-1);
      |          ^
a.cc:3:17: error: wrong number of template arguments (1, should be at least 2)
    3 | #define ll long long;
      |                 ^~~~
a.cc:6:5: note: in expansion of macro 'll'
    6 | map<ll,ll>m;
      |     ^~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:6:7: error: expected unqualified-id before ',' token
    6 | map<ll,ll>m;
      |       ^
a.cc:3:12: error: expected unqualified-id before 'long'
    3 | #define ll long long;
      |            ^~~~
a.cc:6:8: note: in expansion of macro 'll'
    6 | map<ll,ll>m;
      |        ^~
a.cc:6:10: error: expected unqualified-id before '>' token
    6 | map<ll,ll>m;
      |          ^
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:7:1: note: in expansion of macro 'll'
    7 | ll n,w;
      | ^~
a.cc:7:4: error: 'n' does not name a type
    7 | ll n,w;
      |    ^
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:9:1: note: in expansion of macro 'll'
    9 | ll solve(ll a,ll b)
      | ^~
a.cc:3:21: error: expected ')' before ';' token
    3 | #define ll long long;
      |                     ^
a.cc:9:10: note: in expansion of macro 'll'
    9 | ll solve(ll a,ll b)
      |          ^~
a.cc:9:9: note: to match this '('
    9 | ll solve(ll a,ll b)
      |         ^
a.cc:3:21: error: expected constructor, destructor, or type conversion before ';' token
    3 | #define ll long long;
      |                     ^
a.cc:9:10: note: in expansion of macro 'll'
    9 | ll solve(ll a,ll b)
      |          ^~
a.cc:9:13: error: 'a' does not name a type
    9 | ll solve(ll a,ll b)
      |             ^
a.cc:9:18: error: 'b' does not name a type
    9 | ll solve(ll a,ll b)
      |                  ^
a.cc: In function 'int main()':
a.cc:23:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   23 |         cin>>n>>w;
      |              ^
      |              yn
a.cc:23:17: error: 'w' was not declared in this scope
   23 |         cin>>n>>w;
      |                 ^
a.cc:25:21: error: expected primary-expression before '<' token
   25 |         for(int i=0;<n;i++){
      |                     ^
a.cc:26:20: error: 'v' was not declared in this scope
   26 |         cin>>w[i]>>v[i];
      |                    ^
a.cc:28:15: error: 'solve' was not declared in this scope
   28 |         cout<<solve(0,w);
      |               ^~~~~