Language: C++

#define int long
#include <bits/stdc++.h>
using namespace std;

signed main(){
  int N;
  cin >> N;
  int a;
  int ans = 0;
  for (int i = 0; i < N; i++) {
    cin >> a;
    ans *= a;
  }
  if (ans <= 1000000000000000000)
    cout << ans << endl;
  else
    cout << -1 << endl;
}


Compiler output:
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
      |             ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
                 from a.cc:2:
/usr/include/c++/14/cstddef:87:21: error: redefinition of 'struct std::__byte_operand<long int>'
   87 |   template<> struct __byte_operand<long> { using __type = byte; };
      |                     ^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/cstddef:85:21: note: previous definition of 'struct std::__byte_operand<long int>'
   85 |   template<> struct __byte_operand<int> { using __type = byte; };
      |                     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/cstddef:88:21: error: redefinition of 'struct std::__byte_operand<long unsigned int>'
   88 |   template<> struct __byte_operand<unsigned long> { using __type = byte; };
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/cstddef:86:21: note: previous definition of 'struct std::__byte_operand<long unsigned int>'
   86 |   template<> struct __byte_operand<unsigned int> { using __type = byte; };
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
      |             ^~~~
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' 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' 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' 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' 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
      |             ^~~~
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/cstdlib:81,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42:
/usr/include/c++/14/bits/std_abs.h:56:15: error: 'long int std::abs(long int)' conflicts with a previous declaration
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |               ^
In file included from /usr/include/c++/14/cstdlib:79:
/usr/include/stdlib.h:980:12: note: previous declaration 'long int abs(long int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33:
/usr/include/c++/14/cstdlib:181:27: error: 'ldiv_t std::div(long int, long int)' conflicts with a previous declaration
  181 |   div(long __i, long __j) _GLIBCXX_NOTHROW { return ldiv(__i, __j); }
      |                           ^~~~~~~~~~~~~~~~
/usr/include/stdlib.h:992:14: note: previous declaration 'div_t div(long int, long int)'
  992 | extern div_t div (int __numer, int __denom)
      |              ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:61,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/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_algobase.h:62:
/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 unsigned int>'
  134 |     struct __remove_unsigned<unsigned long>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:130:12: note: previous definition of 'struct __gnu_cxx::__remove_unsigned<long unsigned int>'
  130 |     struct __remove_unsigned<unsigned int>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: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> d