Language: C++

#include<iostream>
using namespace std;
int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
 vector<vector<int>> dp(n,vector<int>(3));
  dp[0][0] = a[0];
  dp[0][1] = b[0];
  dp[0][2] = c[0];
  for(int i=1; i<n; i++){
  	dp[i][0] = a[i] + max(b[i], c[i]);
    dp[i][1] = b[i] + max(a[i], c[i]);
    dp[i][2] = c[i] + max(b[i], a[i]);
  }
  return max(max(dp[n-1][0],dp[n-1][1]), dp[n-1][2]);
}
int main(){
  int n;
  cin>>n;
  vector<int>a(n);
  vector<int>b(n);
  vector<int>c(n);
  for(int i=0;i<n;i++){
  	cin>>a[i]>>b[i]>>c[i];
  }
  cout<<vacation(a,b,c,n);
  return 0;
}

Compiler output:
a.cc:3:14: error: 'vector' was not declared in this scope
    3 | int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
      |              ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:3:21: error: expected primary-expression before 'int'
    3 | int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
      |                     ^~~
a.cc:3:28: error: 'vector' was not declared in this scope
    3 | int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
      |                            ^~~~~~
a.cc:3:28: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:3:35: error: expected primary-expression before 'int'
    3 | int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
      |                                   ^~~
a.cc:3:42: error: 'vector' was not declared in this scope
    3 | int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
      |                                          ^~~~~~
a.cc:3:42: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:3:49: error: expected primary-expression before 'int'
    3 | int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
      |                                                 ^~~
a.cc:3:57: error: expected primary-expression before 'int'
    3 | int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
      |                                                         ^~~
a.cc:3:62: error: expression list treated as compound expression in initializer [-fpermissive]
    3 | int vacation(vector<int>&a,vector<int>&b,vector<int>&c, int n){
      |                                                              ^
a.cc: In function 'int main()':
a.cc:18:3: error: 'vector' was not declared in this scope
   18 |   vector<int>a(n);
      |   ^~~~~~
a.cc:18:3: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:18:10: error: expected primary-expression before 'int'
   18 |   vector<int>a(n);
      |          ^~~
a.cc:19:10: error: expected primary-expression before 'int'
   19 |   vector<int>b(n);
      |          ^~~
a.cc:20:10: error: expected primary-expression before 'int'
   20 |   vector<int>c(n);
      |          ^~~
a.cc:22:14: error: 'a' was not declared in this scope
   22 |         cin>>a[i]>>b[i]>>c[i];
      |              ^
a.cc:22:20: error: 'b' was not declared in this scope
   22 |         cin>>a[i]>>b[i]>>c[i];
      |                    ^
a.cc:22:26: error: 'c' was not declared in this scope
   22 |         cin>>a[i]>>b[i]>>c[i];
      |                          ^
a.cc:24:18: error: 'a' was not declared in this scope
   24 |   cout<<vacation(a,b,c,n);
      |                  ^
a.cc:24:20: error: 'b' was not declared in this scope
   24 |   cout<<vacation(a,b,c,n);
      |                    ^
a.cc:24:22: error: 'c' was not declared in this scope
   24 |   cout<<vacation(a,b,c,n);
      |                      ^
a.cc:24:17: error: 'vacation' cannot be used as a function
   24 |   cout<<vacation(a,b,c,n);
      |         ~~~~~~~~^~~~~~~~~