Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef lli lli lli lli;

vector< pair<lli, lli> > wv;
lli dp[101][100001];

void knapsack(lli n,lli W)
{
	for(lli i = 0; i <= n; i++)
		for(lli w = 0; w <= W; w++)
		{
			if(i == 0|| w == 0)
				continue;
			else if(wv[i-1].first <= w)
				dp[i][w] = max(wv[i-1].second+ dp[i-1][w-wv[i-1].first], dp[i-1][w]);
			else
                 dp[i][w] = dp[i-1][w];
		}
	cout << dp[n][W] << endl;
}

int main()
{
	lli n, w;
	for(lli i = 0; i < n; i++)
	{
		lli w, v;
		cin >> w >> v;

		wv.push_back(make_pair(w,v));
	}

	knapsack(n,w);
	return 0;
}

Compiler output:
a.cc:3:9: error: 'lli' does not name a type
    3 | typedef lli lli lli lli;
      |         ^~~
a.cc:5:14: error: 'lli' was not declared in this scope
    5 | vector< pair<lli, lli> > wv;
      |              ^~~
a.cc:5:19: error: 'lli' was not declared in this scope
    5 | vector< pair<lli, lli> > wv;
      |                   ^~~
a.cc:5:22: error: template argument 1 is invalid
    5 | vector< pair<lli, lli> > wv;
      |                      ^
a.cc:5:22: error: template argument 2 is invalid
a.cc:5:24: error: template argument 1 is invalid
    5 | vector< pair<lli, lli> > wv;
      |                        ^
a.cc:5:24: error: template argument 2 is invalid
a.cc:6:1: error: 'lli' does not name a type
    6 | lli dp[101][100001];
      | ^~~
a.cc:8:6: error: variable or field 'knapsack' declared void
    8 | void knapsack(lli n,lli W)
      |      ^~~~~~~~
a.cc:8:15: error: 'lli' was not declared in this scope
    8 | void knapsack(lli n,lli W)
      |               ^~~
a.cc:8:21: error: 'lli' was not declared in this scope
    8 | void knapsack(lli n,lli W)
      |                     ^~~
a.cc: In function 'int main()':
a.cc:25:9: error: 'lli' was not declared in this scope
   25 |         lli n, w;
      |         ^~~
a.cc:26:16: error: expected ';' before 'i'
   26 |         for(lli i = 0; i < n; i++)
      |                ^~
      |                ;
a.cc:26:24: error: 'i' was not declared in this scope
   26 |         for(lli i = 0; i < n; i++)
      |                        ^
a.cc:26:28: error: 'n' was not declared in this scope; did you mean 'yn'?
   26 |         for(lli i = 0; i < n; i++)
      |                            ^
      |                            yn
a.cc:28:20: error: expected ';' before 'w'
   28 |                 lli w, v;
      |                    ^~
      |                    ;
a.cc:29:24: error: 'w' was not declared in this scope; did you mean 'wv'?
   29 |                 cin >> w >> v;
      |                        ^
      |                        wv
a.cc:29:29: error: 'v' was not declared in this scope; did you mean 'wv'?
   29 |                 cin >> w >> v;
      |                             ^
      |                             wv
a.cc:31:20: error: request for member 'push_back' in 'wv', which is of non-class type 'int'
   31 |                 wv.push_back(make_pair(w,v));
      |                    ^~~~~~~~~
a.cc:34:18: error: 'n' was not declared in this scope; did you mean 'yn'?
   34 |         knapsack(n,w);
      |                  ^
      |                  yn
a.cc:34:20: error: 'w' was not declared in this scope; did you mean 'wv'?
   34 |         knapsack(n,w);
      |                    ^
      |                    wv
a.cc:34:9: error: 'knapsack' was not declared in this scope
   34 |         knapsack(n,w);
      |         ^~~~~~~~