Language: C++

#define int long
#define repi(a,b) for(int i=(a); i<(b); i++)
#define repj(a,b) for(int j=(a); j<(b); j++)
#include <iostream>

int main()
{
  int n;
  std::cin >> n;
  int a[n];
  repi(0,n) std::cin >> a[i];
  int atmax=0;
  int atmax2=0;
  int max=0;
  repi(0,n)
    if(max<a[j])
    {
      max = a[j];
      atmax2 = atmax;
      atmax = i;
    }
  
  repi(0,n)
    if(i==atmax)
      std::cout >> a[atmax];
    else
      std::cout >> a[atmax2];
  return 0;
}

Compiler output:
a.cc:1:13: error: 'long' and 'short' specified together
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:4:
/usr/include/c++/14/new:94:27: error: different underlying type in enum 'enum class std::align_val_t'
   94 |   enum class align_val_t: size_t {};
      |                           ^~~~~~
<built-in>: note: previous definition here
/usr/include/c++/14/new:131:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/14/new:133:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/14/new:145:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/14/new:147:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/14/new:154:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                          ^~~~~~~~
/usr/include/c++/14/new:156:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                          ^~~~~~~~
/usr/include/c++/14/new:162:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
      |                          ^~~~~~~~
/usr/include/c++/14/new:164:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
      |                          ^~~~~~~~
/usr/include/c++/14/new:179:33: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                 ^~~~~~~~
/usr/include/c++/14/new:181:33: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
  181 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                 ^~~~~~~~
In file included from /usr/include/c++/14/bits/move.h:37,
                 from /usr/include/c++/14/bits/exception_ptr.h:41:
/usr/include/c++/14/type_traits:396:12: error: redefinition of 'struct std::__is_integral_helper<long int>'
  396 |     struct __is_integral_helper<long>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:388:12: note: previous definition of 'struct std::__is_integral_helper<long int>'
  388 |     struct __is_integral_helper<int>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:400:12: error: redefinition of 'struct std::__is_integral_helper<long unsigned int>'
  400 |     struct __is_integral_helper<unsigned long>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:392:12: note: previous definition of 'struct std::__is_integral_helper<long unsigned int>'
  392 |     struct __is_integral_helper<unsigned int>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:1605:43: error: no matching function for call to 'declval<void*>()'
 1605 |         noexcept(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))
      |                        ~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/14/type_traits:973:10: note: candidate: 'template<class _Tp> decltype (__declval<_Tp>(0)) std::declval()'
  973 |     auto declval() noexcept -> decltype(__declval<_Tp>(0));
      |          ^~~~~~~
/usr/include/c++/14/type_traits:973:10: note:   template argument deduction/substitution failed:
/usr/include/c++/14/type_traits: In substitution of 'template<class _Tp> decltype (__declval<_Tp>(0)) std::declval() [with _Tp = void*]':
/usr/include/c++/14/type_traits:1605:36:   required from here
 1605 |         noexcept(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))
      |                        ~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/14/type_traits:973:55: error: call of overloaded '__declval<void*>(int)' is ambiguous
  973 |     auto declval() noexcept -> decltype(__declval<_Tp>(0));
      |                                         ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/type_traits:965:5: note: candidate: '_Up std::__declval(long int) [with _Tp = void*; _Up = void*&&]'
  965 |     __declval(int);
      |     ^~~~~~~~~
/usr/include/c++/14/type_traits:969:5: note: candidate: '_Tp std::__declval(long int) [with _Tp = void*]'
  969 |     __declval(long);
      |     ^~~~~~~~~
/usr/include/c++/14/type_traits:1801:12: error: redefinition of 'struct std::__make_unsigned<long int>'
 1801 |     struct __make_unsigned<long>
      |            ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:1797:12: note: previous definition of 'struct std::__make_unsigned<long int>'
 1797 |     struct __make_unsigned<int>
      |            ^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:1961:12: error: redefinition of 'struct std::__make_signed<long unsigned int>'
 1961 |     struct __make_signed<unsigned long>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:1957:12: note: previous definition of 'struct std::__make_signed<long unsigned int>'
 1957 |     struct __make_signed<unsigned int>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:13: error: 'long' and 'short' specified together
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long' and 'short' specified together
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long' and 'short' specified together
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long' and 'short' specified together
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long' and 'short' specified together
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
a.cc:1:13: error: 'long long long' is too long for GCC
    1 | #define int long
      |             ^~~~
In file included from /usr/include/c++/14/string:44,
                 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:
/usr/include/c++/14/bits/cpp_type_traits.h:229:12: error: redefinition of 'struct std::__is_integer<long int>'
  229 |     struct __is_integer<long>
      |            ^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/cpp_type_traits.h:215:12: note: previous definition of 'struct std::__is_integer<long int>'
  215 |     struct __is_integer<int>
      |            ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/cpp_type_traits.h:236:12: error: redefinition of 'struct std::__is_integer<long unsigned int>'
  236 |     struct __is_integer<unsigned long>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/cpp_type_traits.h:222:12: note: previous definition of 'struct std::__is_integer<long unsigned int>'
  222 |     struct __is_integer<unsigned int>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_iterator.h:65,
                 from /usr/include/c++/14/string:48:
/usr/include/c++/14/ext/type_traits.h:91:12: error: redefinition of 'struct __gnu_cxx::__add_unsigned<long int>'
   91 |     struct __add_unsigned<long>
      |            ^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:87:12: note: previous definition of 'struct __gnu_cxx::__add_unsigned<long int>'
   87 |     struct __add_unsigned<int>
      |            ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:134:12: error: redefinition of 'struct __gnu_cxx::__remove_unsigned<long unsigne