Language: C++

#include<bits/stdc++.h>
#define fastIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int

int main(){
  fastIO
  ll n;
  cin>>n;
  ll arr,c=1;
  double p;
  while(n--){
  cin>>arr;
  c=c*arr;
   if(arr==0)
     cout<<0<<endl,break();
    p+=log10((double)arr);
  }
  if(arr>18.00 || c>1000000000000000000L) cout<<-1<<endl,break();
  cout<<c<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:16: error: 'ios_base' has not been declared
    2 | #define fastIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
      |                ^~~~~~~~
a.cc:6:3: note: in expansion of macro 'fastIO'
    6 |   fastIO
      |   ^~~~~~
a.cc:2:45: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | #define fastIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
      |                                             ^~~
a.cc:6:3: note: in expansion of macro 'fastIO'
    6 |   fastIO
      |   ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:2:56: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | #define fastIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
      |                                                        ^~~~
a.cc:6:3: note: in expansion of macro 'fastIO'
    6 |   fastIO
      |   ^~~~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |      cout<<0<<endl,break();
      |               ^~~~
      |               std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:15:20: error: expected primary-expression before 'break'
   15 |      cout<<0<<endl,break();
      |                    ^~~~~
a.cc:18:53: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |   if(arr>18.00 || c>1000000000000000000L) cout<<-1<<endl,break();
      |                                                     ^~~~
      |                                                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:18:58: error: expected primary-expression before 'break'
   18 |   if(arr>18.00 || c>1000000000000000000L) cout<<-1<<endl,break();
      |                                                          ^~~~~
a.cc:19:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |   cout<<c<<endl;
      |            ^~~~
      |            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~