Language: C++

───────────────────────────────────────────────────────────────────
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;

  int a = 0;
  int b = 0;
  int ab = 0;

  // 必要なピザの枚数を比較して、A・Bの両方で最低限必要な枚数を算出
  int n = min(X, Y);

  // ABを2枚購入する方が、A・Bを1枚ずつ購入するより安い場合
  if ((C * 2) < (A + B)) {
    ab = n * 2;
  // ABを2枚購入する方が、A・Bを1枚ずつ購入するより高い場合
  } else {
    a = n;
    b = n;
  }

  // 残りの必要なピザの枚数
  int x_rest = X - n;
  int y_rest = Y - n;

  // 残りのAピザを、Aピザ1枚 or ABピザ2枚の安い方で補填する
  if ((C * 2) < A) {
    ab += x_rest * 2;
  } else {
    a += x_rest;
  }

  // 残りのBピザを、Bピザ1枚 or ABピザ2枚の安い方で補填する
  if ((C * 2) < B) {
    ab += y_rest * 2;
  } else {
    b += y_rest;
  }

  cout << (A * a + B * b + C * ab) << endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: extended character ─ is not valid in an identifier
    1 | ───────────────────────────────────────────────────────────────────
      | ^
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: extended character ─ is not valid in an identifier
a.cc:1:1: error: '\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500\U00002500' does not name a type
    1 | ───────────────────────────────────────────────────────────────────
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
  164 |   __is_null_pointer(std::nullptr_t)
      |                                   ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
  159 |     __is_null_pointer(_Type)
      |     ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
  164 |   __is_null_pointer(std::nullptr_t)
      |                          ^~~~~~~~~
In file included from /usr/include/c++/14/cstddef:50,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
  443 |   typedef decltype(nullptr) nullptr_t;
      |                             ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
                 from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
  666 |     struct is_null_pointer<std::nullptr_t>
      |                                 ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
  443 |   typedef decltype(nullptr) nullptr_t;
      |                             ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
  666 |     struct is_null_pointer<std::nullptr_t>
      |                                          ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
  670 |     struct is_null_pointer<const std::nullptr_t>
      |                                                ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
  674 |     struct is_null_pointer<volatile std::nullptr_t>
      |                                                   ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
  678 |     struct is_null_pointer<const volatile std::nullptr_t>
      |                                                         ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1429 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
 1429 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                                         ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1438 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
 1438 |     : public integral_constant<std::size_t, 0> { };
      |                                              ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
 1440 |   template<typename _Tp, std::size_t _Size>
      |                          ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
 1441 |     struct rank<_Tp[_Size]>
      |                     ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
 1441 |     struct rank<_Tp[_Size]>
      |                           ^
/usr/include/c++/14/ty