Language: C++

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

int main() {
// #ifndef ONLINE_JUDGE
// 	freopen("input.txt", "r", stdin);
// 	freopen("output.txt", "w", stdout);
// #endif

	ios_base::sync_with_stdio(false);
	cin.tie(NULL); cout.tie(NULL);

	ll n;
	cin >> n;

	vector<vector<ll>> abc(n, vector<ll> (3, 0)), dp(n, vector<ll> (3, 0));

	for (ll i = 0; i < n; i++)	cin >> abc[i][0] >> abc[i][1] >> abc[i][2];

	dp[0][0] = abc[0][0];
	dp[0][1] = abc[0][1];
	dp[0][2] = abc[0][2];

	for (ll i = 1; i < n; i++) {
		dp[i][0] =  max(dp[i - 1][1] + abc[i][0], dp[i - 1][2] + abc[i][0]);
		dp[i][1] =  max(dp[i - 1][0] + abc[i][1], dp[i - 1][2] + abc[i][1]);
		dp[i][2] =  max(dp[i - 1][0] + abc[i][2], dp[i - 1][1] + abc[i][2]);
	}

	cout << *max_element(dp[n - 1].begin(), dp[n - 1].end())  << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'll' was not declared in this scope
   13 |         ll n;
      |         ^~
a.cc:14:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   14 |         cin >> n;
      |                ^
      |                yn
a.cc:16:23: error: template argument 2 is invalid
   16 |         vector<vector<ll>> abc(n, vector<ll> (3, 0)), dp(n, vector<ll> (3, 0));
      |                       ^~
a.cc:16:25: error: template argument 1 is invalid
   16 |         vector<vector<ll>> abc(n, vector<ll> (3, 0)), dp(n, vector<ll> (3, 0));
      |                         ^~
a.cc:16:25: error: template argument 2 is invalid
a.cc:16:44: error: template argument 2 is invalid
   16 |         vector<vector<ll>> abc(n, vector<ll> (3, 0)), dp(n, vector<ll> (3, 0));
      |                                            ^
a.cc:16:52: error: expression list treated as compound expression in initializer [-fpermissive]
   16 |         vector<vector<ll>> abc(n, vector<ll> (3, 0)), dp(n, vector<ll> (3, 0));
      |                                                    ^
a.cc:16:70: error: template argument 2 is invalid
   16 |         vector<vector<ll>> abc(n, vector<ll> (3, 0)), dp(n, vector<ll> (3, 0));
      |                                                                      ^
a.cc:16:78: error: expression list treated as compound expression in initializer [-fpermissive]
   16 |         vector<vector<ll>> abc(n, vector<ll> (3, 0)), dp(n, vector<ll> (3, 0));
      |                                                                              ^
a.cc:18:16: error: expected ';' before 'i'
   18 |         for (ll i = 0; i < n; i++)      cin >> abc[i][0] >> abc[i][1] >> abc[i][2];
      |                ^~
      |                ;
a.cc:18:24: error: 'i' was not declared in this scope
   18 |         for (ll i = 0; i < n; i++)      cin >> abc[i][0] >> abc[i][1] >> abc[i][2];
      |                        ^
a.cc:20:11: error: invalid types 'int[int]' for array subscript
   20 |         dp[0][0] = abc[0][0];
      |           ^
a.cc:20:23: error: invalid types 'int[int]' for array subscript
   20 |         dp[0][0] = abc[0][0];
      |                       ^
a.cc:21:11: error: invalid types 'int[int]' for array subscript
   21 |         dp[0][1] = abc[0][1];
      |           ^
a.cc:21:23: error: invalid types 'int[int]' for array subscript
   21 |         dp[0][1] = abc[0][1];
      |                       ^
a.cc:22:11: error: invalid types 'int[int]' for array subscript
   22 |         dp[0][2] = abc[0][2];
      |           ^
a.cc:22:23: error: invalid types 'int[int]' for array subscript
   22 |         dp[0][2] = abc[0][2];
      |                       ^
a.cc:24:16: error: expected ';' before 'i'
   24 |         for (ll i = 1; i < n; i++) {
      |                ^~
      |                ;
a.cc:24:24: error: 'i' was not declared in this scope
   24 |         for (ll i = 1; i < n; i++) {
      |                        ^