Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define square(x) pow(x 2.0)
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue(x) priority_queue<x, vector<x>, greater<x>>
#define big_sort(v) sort(all(v), [](int a, int b) { return a > b; })//大きい順にソート
using ll = long long;
using vi = vector<ll>;
using vvi = vector<vi>;
using vs = vector<string>;
#define co(x) cout << x << endl;
#define cins(n,v) rep(i,n){cin >> v.at(i);}
#define couts(v) rep(i,v.size()){cout << v.at(i) << endl;}
// aよりもbが大きいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}
// aよりもbが小さいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}
/*
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
*/
int main() {
  ll n,ans=1,a,flag = 0;
  ll num = 1e+18;
  cin >> n;
  vi a(n);
  rep(i,n){
    cin >> a[i];
  }
  big_sort(a);
  if(a.end()==0){cout << 0 << endl;return 0;}
  rep(i,n){
    ans*=a[i];
    if(ans>num){cout << -1 << endl;return 0;}
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:6: error: conflicting declaration 'vi a'
   63 |   vi a(n);
      |      ^
a.cc:60:14: note: previous declaration as 'll a'
   60 |   ll n,ans=1,a,flag = 0;
      |              ^
a.cc:65:13: error: invalid types 'll {aka long long int}[int]' for array subscript
   65 |     cin >> a[i];
      |             ^
a.cc:7:20: error: request for member 'begin' in 'a', which is of non-class type 'll' {aka 'long long int'}
    7 | #define all(x) (x).begin(),(x).end()
      |                    ^~~~~
a.cc:12:26: note: in expansion of macro 'all'
   12 | #define big_sort(v) sort(all(v), [](int a, int b) { return a > b; })//大きい順にソート
      |                          ^~~
a.cc:67:3: note: in expansion of macro 'big_sort'
   67 |   big_sort(a);
      |   ^~~~~~~~
a.cc:7:32: error: request for member 'end' in 'a', which is of non-class type 'll' {aka 'long long int'}
    7 | #define all(x) (x).begin(),(x).end()
      |                                ^~~
a.cc:12:26: note: in expansion of macro 'all'
   12 | #define big_sort(v) sort(all(v), [](int a, int b) { return a > b; })//大きい順にソート
      |                          ^~~
a.cc:67:3: note: in expansion of macro 'big_sort'
   67 |   big_sort(a);
      |   ^~~~~~~~
a.cc:68:8: error: request for member 'end' in 'a', which is of non-class type 'll' {aka 'long long int'}
   68 |   if(a.end()==0){cout << 0 << endl;return 0;}
      |        ^~~
a.cc:70:11: error: invalid types 'll {aka long long int}[int]' for array subscript
   70 |     ans*=a[i];
      |           ^