For this Question: Bob has an array of N numbers. He wants to calculate the product of the array but does not want integers greater than 10<sup>18</sup>. So, if the result exceeds 10<sup>18</sup>, print -1 instead.<b>Constraints:</b>
2 &le; N &le; 10<sup>5</sup>
0 &le; A<sub>i</sub> &le; 10<sup>18</sup>
All values in the input are integers.Print the value of A<sub>1</sub>×A<sub>2</sub>....×A<sub>N</sub> as an integer, or -1 if the value exceeds 10<sup>18</sup>.Sample Input 1 
2
1000000000 1000000000

Sample Output 1 
1000000000000000000

Sample Input 2 
3
101 9901 999999000001

Sample Output 2 
-1

<b>Explanation</b>
We have 1000000000×1000000000=1000000000000000000.
We have 101×9901×999999000001=1000000000000000001, which exceeds 10<sup>18</sup>, so we should print -1 instead., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define f(i,p,q) for(long long int i=p;i<q;i++)
 
void solve(){
   ll n,m=1,x=0;
   cin>>n;
   vector<ll> a(n);
   f(i,0,n) cin>>a[i];
   ll k=pow(10,18);
   ll p=k;
   sort(a.begin(),a.end());
   reverse(a.begin(),a.end());
   f(i,0,n-1){
    p/=a[i];
    m*=a[i];
   }
   if(p<a[n-1]) cout<<-1<<endl;
   else cout<<m*a[n-1]<<endl;
}
int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    //ll t;
    //cin>>t;
    //while(t--)
     solve();
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?