Language: C++

#include <iostream>
#include <vector>
#include <cstring>

int main(void) {
  int N;
  std::cin >> N;

  // 入力の受け取り
  std::vector<int> a(N), b(N), c(N);
  for (int i = 0; i < N; i++) {
    std::cin >> a[i] >> b[i] >> c[i];
  }

  // DP
  int dp[100002][3];
  memset(dp, 0, sizeof(dp));
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < 3; j++) {
      dp[i + 1][0] =
        std::max({
          dp[i + 1][0],
          dp[i][1] + a[i],
          dp[i][2] + a[i] 
        });

      dp[i + 1][1] =
        std::max({
          dp[i + 1][1],
          dp[i][0] + b[i],
          dp[i][2] + b[i] 
        });

      dp[i + 1][2] =
        std::max({
          dp[i + 1][2],
          dp[i][0] + c[i],
          dp[i][1] + c[i]
        });
    }
  }
  std::cout << std::max({dp[N][0], dp[N][1], dp[N][2]}) << std::endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   21 |         std::max({
      |         ~~~~~~~~^~
   22 |           dp[i + 1][0],
      |           ~~~~~~~~~~~~~
   23 |           dp[i][1] + a[i],
      |           ~~~~~~~~~~~~~~~~
   24 |           dp[i][2] + a[i]
      |           ~~~~~~~~~~~~~~~
   25 |         });
      |         ~~       
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:28:17: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   28 |         std::max({
      |         ~~~~~~~~^~
   29 |           dp[i + 1][1],
      |           ~~~~~~~~~~~~~
   30 |           dp[i][0] + b[i],
      |           ~~~~~~~~~~~~~~~~
   31 |           dp[i][2] + b[i]
      |           ~~~~~~~~~~~~~~~
   32 |         });
      |         ~~       
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:35:17: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   35 |         std::max({
      |         ~~~~~~~~^~
   36 |           dp[i + 1][2],
      |           ~~~~~~~~~~~~~
   37 |           dp[i][0] + c[i],
      |           ~~~~~~~~~~~~~~~~
   38 |           dp[i][1] + c[i]
      |           ~~~~~~~~~~~~~~~
   39 |         });
      |         ~~       
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:42:24: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   42 |   std::cout << std::max({dp[N][0], dp[N][1], dp[N][2]}) << std::endl;
      |                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided