Language: C++

#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

using ll = long long;

//~ const int INF = 1e9 + 5;

int main() {
    int n;
    scanf("%d", &n);
    vector<int> dp(3);
    // dp[i] - the total cost such that we did activity i on the last considered day
    for(int day = 0; day < n; ++day) {
        vector<int> new_dp(3, 0);
        vector<int> c(3);
        for(int i = 0; i < 3; ++i) {
            scanf("%d", &c[i]);
        }
        // int a, b, c - a lot of implementation
        for(int i = 0; i < 3; ++i) {
            for(int j = 0; j < 3; ++j) {
                if(i != j) {
                    new_dp[j] = max(new_dp[j], dp[i] + c[j]);
                }
            }
        }
        dp = new_dp;
    }
    printf("%d\n", max({dp[0], dp[1], dp[2]}));
}

Compiler output:
a.cc:15:1: error: 'sim' does not name a type
   15 | sim dor(const c&) { ris; }
      | ^~~
a.cc:17:1: error: expected declaration before '}' token
   17 | };
      | ^
a.cc: In function 'int main()':
a.cc:26:5: error: 'scanf' was not declared in this scope
   26 |     scanf("%d", &n);
      |     ^~~~~
a.cc:27:5: error: 'vector' was not declared in this scope
   27 |     vector<int> dp(3);
      |     ^~~~~~
a.cc:27:12: error: expected primary-expression before 'int'
   27 |     vector<int> dp(3);
      |            ^~~
a.cc:30:16: error: expected primary-expression before 'int'
   30 |         vector<int> new_dp(3, 0);
      |                ^~~
a.cc:31:16: error: expected primary-expression before 'int'
   31 |         vector<int> c(3);
      |                ^~~
a.cc:33:26: error: 'c' was not declared in this scope
   33 |             scanf("%d", &c[i]);
      |                          ^
a.cc:39:21: error: 'new_dp' was not declared in this scope
   39 |                     new_dp[j] = max(new_dp[j], dp[i] + c[j]);
      |                     ^~~~~~
a.cc:39:48: error: 'dp' was not declared in this scope
   39 |                     new_dp[j] = max(new_dp[j], dp[i] + c[j]);
      |                                                ^~
a.cc:39:56: error: 'c' was not declared in this scope
   39 |                     new_dp[j] = max(new_dp[j], dp[i] + c[j]);
      |                                                        ^
a.cc:39:33: error: 'max' was not declared in this scope
   39 |                     new_dp[j] = max(new_dp[j], dp[i] + c[j]);
      |                                 ^~~
a.cc:43:9: error: 'dp' was not declared in this scope
   43 |         dp = new_dp;
      |         ^~
a.cc:43:14: error: 'new_dp' was not declared in this scope
   43 |         dp = new_dp;
      |              ^~~~~~
a.cc:45:25: error: 'dp' was not declared in this scope
   45 |     printf("%d\n", max({dp[0], dp[1], dp[2]}));
      |                         ^~
a.cc:45:20: error: 'max' was not declared in this scope
   45 |     printf("%d\n", max({dp[0], dp[1], dp[2]}));
      |                    ^~~
a.cc:45:5: error: 'printf' was not declared in this scope
   45 |     printf("%d\n", max({dp[0], dp[1], dp[2]}));
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #ifdef LOCAL