criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long b=1e18;
int main()
{
  long long n;
  long long mul;
  cin>>n;
  int i;
  long long a[b];
  for(i=0;i<n;i++)
  {
  if (a[i]<=b/mul)
  {
    mul=mul*a[i];
  }
  else
  {
    cout<<-1<<endl;
  }
    
  }
  if(mul<b)
  {
    cout<<mul<<endl
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:20: error: expected ';' before '}' token
   25 |     cout<<mul<<endl
      |                    ^
      |                    ;
   26 |   }
      |   ~
Language: Java

import java.math.BigInteger;
 
public class Main{
  
  public static void main(String[] args){
  
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    
    BigInteger ans  = BigInteger.ONE;
    long l = (long)Math.pow(10,18);
    BigInteger L = BigInteger.valueOf(l);

    while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        System.out.println(0);
        return;        
      }
      ans = ans.multiply(BigInteger.valueOf(a));
      if(ans.compareTo(L) > 0){
        System.out.println(-1);
        return;
      }
    }
    System.out.println(ans);
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long ans = 1;
		int check = 0;
		long[] a = new long[n];
		for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextLong();
          if(a[i]==0){
              check = 1;
          }
        }
        int[] b = new int[18];
        for(int j=0; j<18; ++j){
            b[j] = 10;
        }
        long num = 1;
        for(int j=0; j<18; ++j){
            num = num*b[j];
        }
         for(int i=0; i<n; ++i){
           if(a[i]<=num/ans){
            ans = ans*a[i];
           }else
             ans=0;
          	break;
           }
         }
         if(check == 0){
             if(ans == 0){
             System.out.println("-1");
            }else{
              System.out.println(ans);
            }
         }else{
             System.out.println("0");
         }
	}
}


Compiler output:
Main.java:31: error: illegal start of type
         if(check == 0){
         ^
Main.java:31: error: <identifier> expected
         if(check == 0){
                 ^
Main.java:37: error: illegal start of type
         }else{
          ^
Main.java:41: error: class, interface, enum, or record expected
}
^
4 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long ans = 1;
		int check = 0;
		long[] a = new long[n];
		for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextLong();
          if(a[i]==0){
              check = 1;
          }
        }
        int[] b = new int[18];
        for(int j=0; j<18; ++j){
            b[j] = 10;
        }
        long num = 1;
        for(int j=0; j<18; ++j){
            num = num*b[j];
        }
         for(int i=0; i<n; ++i){
           if(a[i]<=num/ans)
            ans = ans*a[i];
           if(ans > num){
             ans=0;
             break;
           }if(ans < 0){
             ans=0;
             break;
           }
         }
         }
         if(check == 0){
             if(ans == 0){
             System.out.println("-1");
            }else{
              System.out.println(ans);
            }
         }else{
             System.out.println("0");
         }
	}
}


Compiler output:
Main.java:35: error: illegal start of type
         if(check == 0){
         ^
Main.java:35: error: <identifier> expected
         if(check == 0){
                 ^
Main.java:41: error: illegal start of type
         }else{
          ^
Main.java:45: error: class, interface, enum, or record expected
}
^
4 errors
Language: C++

#include <iostream>
typedef long long int ll;


int main(void){
	int N;
	ll res = 1, a, max_value = 1000000000000000000;
	std::cin >> N;
	
  	bool ok = true;
	for(int i = 0; i < N; i++){
		std::cin >> a;
      	if(a==0){
        	cout<<0<<endl;
          	return 0;
        }
      	if(!ok) continue;
      	if(res > max_value / a){
        	ok=false;
        }
	    res *= a;
	}
	
	std::cout << (ok ? res : -1 ) << std::endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |                 cout<<0<<endl;
      |                 ^~~~
      |                 std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |                 cout<<0<<endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

  		int num = sc.nextInt(); 
      	long long nums[] = new long long[num];
      	long long ans = 1;
      	boolean con = true;
      
      	for(int i = 0;i < num && con; i++) {
          ans *= sc.nextLong();
          if(Mash.log(ans) <= 18) con = false;
        }
      	
      	if(con) System.out.println(ans);
      	else System.out.println(-1);
        
	}
}


Compiler output:
Main.java:7: error: not a statement
      	long long nums[] = new long long[num];
      	^
Main.java:7: error: ';' expected
      	long long nums[] = new long long[num];
      	    ^
Main.java:7: error: '[' expected
      	long long nums[] = new long long[num];
      	                           ^
Main.java:7: error: ']' expected
      	long long nums[] = new long long[num];
      	                                 ^
Main.java:7: error: ';' expected
      	long long nums[] = new long long[num];
      	                                    ^
Main.java:8: error: not a statement
      	long long ans = 1;
      	^
Main.java:8: error: ';' expected
      	long long ans = 1;
      	    ^
7 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long ans = 1;
		long[] a = new long[n];
		for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextLong();
        }
        int[] b = new int[18];
        for(int j=0; j<18; ++j){
            b[j] = 10;
        }
        long num = 1;
        for(int j=0; j<18; ++j){
            num = num*b[j];
        }
         for(int i=0; i<n; ++i){
            ans = ans*a[i];
            if(ans > num){
                ans = -1;
            }
         }
      	 if(a[i] == 0){
            System.out.println("0");
         }
        if(ans < 0){
            System.out.println("-1");
        }else{
             System.out.println(ans);
        }
	}
}


Compiler output:
Main.java:25: error: cannot find symbol
      	 if(a[i] == 0){
      	      ^
  symbol:   variable i
  location: class Main
1 error
Language: C++

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

int main(void)
{
    int N;

    cin >> N;

    long long A[110000]; 

    for (int i = 0; i < N; i++) cin >> A[i];


    long long ans = 1;
    for(int i = 0; i < N; i++){
        if( A[i] = 0){
            ans = 0;
            cout << ans << endl;
            return;

        }
    }

    for (int i = 0; i < N; i++){
        if( A[i] > 1000000000000000000 / ans)
        {
            ans = -1;
            break;
        }
        ans *= A[i];
    } 

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |             return;
      |             ^~~~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
int main(){
  unsigned long long N;
  cin >> N;
  unsigned long long a[100000];
  unsigned long long ans = 1;
  for(unsigned long long i=0;i<N;i++){
    cin >> a[i];
    if(a[i]==0){
      ans = 0;
      break;
    }
  }
  int s=1;
  if(ans != 0){
    for(unsigned long long i=0;i<N;i++){
      ans = ans*a[i];
      if(ans>1000000000000000000){
          s = 0;
          break;
      }
    }
  }
  if(s==1){
    cout << ans;
  }else{
    cout << "-1";
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout << ans;
      |     ^~~~
a.cc:28:5: error: 'cout' was not declared in this scope
   28 |     cout << "-1";
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
     int n;
    unsigned long int a[n];
    unsigned long long int s = 1;
    int t=0;
    cin>>n;
    for(int i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>1000000000000000000/s)
             s*=a[i];
            
             (s>1000000000000000000)
               t=1;
        }
   if(t==1)
    cout<<-1;
    else
    cout<<s;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:37: error: expected ';' before 't'
   17 |              (s>1000000000000000000)
      |                                     ^
      |                                     ;
   18 |                t=1;
      |                ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  long long A[N];
  for (int i=0; i<N; i++){
    cin >> A[i];
  }
  long long ans=1;
  bool is_zero
  for(int i=0; i<N; i++){
    if(A[i]==0){
      is_zero=true;
      break;
    }
  }
  if(is_zero){
    cout << 0 << endl;
  } else {
    for (int i=0; i<N; i++){
      ans=ans*A[i];
      if(ans>1000000000000000000){
        ans=-1;
        break;
      }
    }
    cout << ans << endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected initializer before 'for'
   12 |   for(int i=0; i<N; i++){
      |   ^~~
a.cc:12:16: error: 'i' was not declared in this scope
   12 |   for(int i=0; i<N; i++){
      |                ^
a.cc:18:6: error: 'is_zero' was not declared in this scope; did you mean 'iszero'?
   18 |   if(is_zero){
      |      ^~~~~~~
      |      iszero
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int A[N];
  cin>>A[N];
  long long ans=A[i];
  cin>>A[i];
  for(int i=0;i<N;i--){
    if(ans<A[i]){
    ans=ans*A[i];
    }
  }
  if(ans<1000000000000000000){
    cout<<ans<<endl;
  }else{
    cout<<"-1"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'i' was not declared in this scope
    8 |   long long ans=A[i];
      |                   ^
Language: C++

#include <bits/stdc++.h>
 using namespace std;
 int main(){
   long long N;
   cin >>N;
   long long ans=1;
   long long a[N];
   for(int i=0; i<N ;i++){
     cin>>a[i];
     ans=ans*a[i];
   }if(ans>1000000000000000000){
    ans="-1";
   }
   cout <<ans<<endl;
 }
   

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: invalid conversion from 'const char*' to 'long long int' [-fpermissive]
   12 |     ans="-1";
      |         ^~~~
      |         |
      |         const char*
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long main(){
  int N;
  cin>>N;
  int A[N];
  cin>>A[N];
  long long ans=A[1];
  for(int i=1;i<N;i++){
    ans=ans*A[i];
  }
  if(ans<=10^18){
    cout<<ans<<endl;
  }else{
    cout<<"-1"<<endl;
  }
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long main(){
  int N;
  cin>>N;
  int A[N];
  cin>>A[N];
  int ans=A[1];
  for(int i=1;i<N;i++){
    ans=ans*A[i];
  }
  if(ans<=10^18){
    cout<<ans<<endl;
  }else{
    cout<<"-1"<<endl;
  }
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		long A[] = new long[N];
		long answer;
		for(int i = 0; i < N; ++i){
		    A[i] = sc.nextLong();
		}
		
		for(int i = 0; i < N; ++i){
		    if(A[i] < ((long)Math.pow(10,18)/answer)){
		        answer *= A[i];
		    }else{
		        answer = -1;
		    }
		}
		System.out.println(answer);
	}
}

Compiler output:
Main.java:14: error: variable answer might not have been initialized
		    if(A[i] < ((long)Math.pow(10,18)/answer)){
		                                     ^
Main.java:20: error: variable answer might not have been initialized
		System.out.println(answer);
		                   ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		long A[] = new int[N];
		
		for(int i; i < N; ++i){
		    A[i] = sc.nextLong();
		}
		for(int i; i < N; i++){
		    if(A[i] < (long)Math.pow(10,18)){
		        int ans *= A[i];
		    }else{
		        ans = -1;
		    }
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:14: error: ';' expected
		        int ans *= A[i];
		               ^
Main.java:14: error: not a statement
		        int ans *= A[i];
		                    ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		long A = new int[N];
		
		for(int i; i < N; ++i){
		    A[i] = sc.nextLong();
		}
		for(int i; i < N; i++){
		    if(A[i] < (long)Math.pow(10,18)){
		        int ans *= A[i];
		    }else{
		        ans = -1;
		    }
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:14: error: ';' expected
		        int ans *= A[i];
		               ^
Main.java:14: error: not a statement
		        int ans *= A[i];
		                    ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		long A = new int[N];
		
		for(int i; i < N; ++i){
		    A[i] = sc.nextLong();
		}
		for(int i; i < N-1; ++i){
		    int num = A[i]*A[i+1];
		    int ans += num;
		}
		if(ans =< 10^18){
		    System.out.println(ans);
		}
		System.out.println(-1);

Compiler output:
Main.java:14: error: ';' expected
		    int ans += num;
		           ^
Main.java:14: error: not a statement
		    int ans += num;
		               ^
Main.java:16: error: illegal start of type
		if(ans =< 10^18){
		          ^
Main.java:16: error: not a statement
		if(ans =< 10^18){
		            ^
Main.java:16: error: ';' expected
		if(ans =< 10^18){
		               ^
Main.java:19: error: reached end of file while parsing
		System.out.println(-1);
		                       ^
6 errors
Language: C++

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

int main() {
  long long n;cin>>n;vector<long long>v(n);cin>>v[0];long long p=v[0];
  for(int i=1;i<n;i++){
    cin>>v[i];
    if(v[i]==0){cout<<0<<endl;exit (0);}
    else if(v[i]>1000000000000000000)cout<<-1<<endl;exit (0);}
    else p*=v[i];
  }cout<<p<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'else' without a previous 'if'
   10 |     else p*=v[i];
      |     ^~~~
a.cc:10:15: error: 'i' was not declared in this scope
   10 |     else p*=v[i];
      |               ^
a.cc: At global scope:
a.cc:11:4: error: 'cout' does not name a type
   11 |   }cout<<p<<endl;
      |    ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++



#include<bits/stdc++.h>
#define ll long long

using namespace std;
int main()
{
    vector<int>v;
    vector<int>v1;
    vector<int>v2;
    set <char>s;
    int t,coun1=0,a,ans3,coun2=0,x,y=0,ans1=0,b,sum=0,flag=0,ans2;

    long double li=1;
    long long ai,n;

    cin >> n;

   for(long long i=0;i<n;i++)
   {
       cin >> ai;
       
       if(ai ==0)
       {
           cout << "0";
       }
       li=li*ai;
       
       

   }
   if(li > 100000000000000000 || li < 0)
       {
           cout << "-1";

       }
   else
   {

           cout << (long long)li;

   }






return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:50:10: error: expected '}' at end of input
   50 | return 0;
      |          ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

#include <bits/stdc++.h>

int main ()
{
	int N;

	cin >> N;

	int n;

	int sum = 1;

	for (int i = 0; i < N; i++)
	{
		cin >> n;
		sum *= n;
	}

	if (sum > 1.0e+18)
		sum = -1;

	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> N;
      |         ^~~
      |         std::cin
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:22:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |         cout << sum << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:22:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |         cout << sum << endl;
      |                        ^~~~
      |                        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)
      |     ^~~~
Language: C++

#include<iostream>
#include<cstring>
using namespace std;

int main(){
	#ifndef ONLINE_JUDGE
	    // for getting input from input.txt
	    freopen("input.txt", "r", stdin);
	    // for writing output to output.txt
	    freopen("output.txt", "w", stdout);
	#endif

	int n;
	long long prod=1, boy, maxi=1000000000000000000;
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> boy;
		if(boy==0){
			cout << 0;
			return 0;
		}
	}
	prod = 1
	for(int i=0;i<n;i++){
		cin >> boy;
		if(boy > (maxi/prod)){
			cout << -1;
			return 0;
		}
		prod *= boy;
	}
	cout << prod;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: expected ';' before 'for'
   23 |         prod = 1
      |                 ^
      |                 ;
   24 |         for(int i=0;i<n;i++){
      |         ~~~      
a.cc:24:21: error: 'i' was not declared in this scope
   24 |         for(int i=0;i<n;i++){
      |                     ^
Language: C++

/* I have already deleted My old account because somebody stole my code
and i have no idea how. If you are copying this code atleast make it look different 
Yours Faithfully
Shobhit Yadav */

#include<bits/stdc++.h>
using namespace std;
#define ll long long 
const in MOD = 1e18;
ll N,T;
/*ll freq[200005];*/
void solve(){
	 /*memset(freq,0,sizeof(freq));*/
  ll temp;
  cin>>N;
  ll mul = 1;
  ll turn = 0;
  
  for(ll i = 0 ; i<N ; i++){
   cin>>temp;
    mul *= temp;
    if(mul > MOD){
      turn++;
      mul %= MOD;
    }
  }
  
  if(turn>0)
    cout<<-1<<'\n';

 else{
 cout<<mul<<'\n';
 }

}



int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	
   cin>>T;
   while(T--) solve();

	return 0;
}

Compiler output:
a.cc:9:7: error: 'in' does not name a type; did you mean 'int'?
    9 | const in MOD = 1e18;
      |       ^~
      |       int
a.cc: In function 'void solve()':
a.cc:22:14: error: 'MOD' was not declared in this scope
   22 |     if(mul > MOD){
      |              ^~~
Language: C++

int inAddition (int a; int b){
  if(a==0){
  	return 0;
  }
  if(b==0){
    return 0;
  }
  else{
    return a*b;
  }
}

Compiler output:
a.cc:1:22: error: expected ')' before ';' token
    1 | int inAddition (int a; int b){
      |                ~     ^
      |                      )
a.cc:1:29: error: expected initializer before ')' token
    1 | int inAddition (int a; int b){
      |                             ^
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
    typedef unsigned long long ll;
    typedef long long ull;
    /*
    void solver(){

    }*/

    int main(){

    /*    int t;
        cin >> t;
        while(t--){
            solver();
        }
    */
    const long long d = pow(10,18);
long longe a,b = 1,c;
cin >> a;
while(a--){
    cin >> c;
    b *= c;
    if(b>d){
        cout << "-1";
        return 0;

    }
}
cout << b;
        return 0;
    }









Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: expected initializer before 'a'
   19 | long longe a,b = 1,c;
      |            ^
a.cc:20:8: error: 'a' was not declared in this scope
   20 | cin >> a;
      |        ^
a.cc:22:12: error: 'c' was not declared in this scope
   22 |     cin >> c;
      |            ^
a.cc:23:5: error: 'b' was not declared in this scope
   23 |     b *= c;
      |     ^
a.cc:30:9: error: 'b' was not declared in this scope
   30 | cout << b;
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
  	vector<long long>vec(n);
  for(auto& i:vec)
    cin>>i;
  long long ans=1;
  for(auto i:vec)
    ans*=i;
  if(ans>1e18ll)
    cout<<-1<<endl;
  else 
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: unable to find numeric literal operator 'operator""ll'
   11 |   if(ans>1e18ll)
      |          ^~~~~~
Language: C++

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

int main()
{
	
  long long int n,b=0,pro=1;
  cin >> n;
  
  for(int i=0;i<n;i++)
  {
    int x;
    cin >> x;
    
    if((pro*x)<=(1e18) && c==0)
    {
      pro *=x;
    }
    else 
    {
    	c=1;
    }
  }
  
  if(c==0)
    cout << pro << endl;
  else 
    cout << -1 << endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: 'c' was not declared in this scope
   15 |     if((pro*x)<=(1e18) && c==0)
      |                           ^
a.cc:25:6: error: 'c' was not declared in this scope
   25 |   if(c==0)
      |      ^
Language: C

#include <stdio.h>
int main()
{
    int N,i;
    long long int  c=1000000000000000000,d=1;
    scanf("%d",&a);
    long long int A[N];
    for(i=0;i<N;i++)
    {
      scanf("%lld",&A[i]);
      if(A[i]==0)
        d=0;
    }
    for(i=0;i<N;i++)
    {
        if(A[N]==0) {
          d=0;
          break;
        }
        else if(c/A[i]<d)  {
          d=-1;
          break;
        }
        else d*=A[i];
    }
    printf("%lld",d);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: 'a' undeclared (first use in this function)
    6 |     scanf("%d",&a);
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main()
{
  longC=1,N;
  scanf("%ld",&N);
   long A[10000]
  for(long i=0;i<=N;i++){
    scanf("%ld",&A[i]);
  }
  for(long i=0;i<=N;i++){
    C=C*A[i];
    if (C==0)
    {
      printf("0");
    }
  } 
  if(C>=1000000000000000000){
    printf("%ld",C);
  }else{
    printf("-1");
  }
  return 0;
}
  
 


Compiler output:
main.c: In function 'main':
main.c:5:3: error: 'longC' undeclared (first use in this function)
    5 |   longC=1,N;
      |   ^~~~~
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:11: error: 'N' undeclared (first use in this function)
    5 |   longC=1,N;
      |           ^
main.c:8:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
    8 |   for(long i=0;i<=N;i++){
      |   ^~~
main.c:9:18: error: 'A' undeclared (first use in this function)
    9 |     scanf("%ld",&A[i]);
      |                  ^
main.c:12:5: error: 'C' undeclared (first use in this function)
   12 |     C=C*A[i];
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    std::ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    /*ll t,w;
    cin>>t;
    w=0;
    while(w<t)
    {*/
        //cout<<"Case #"<<w+1<<": ";
        ll n,i,j,k;
        cin>>n;
        ll lmt= (ll)(1e18);
        //cout<<lmt<<"\n";
        ll a[n],flg=0,ans=1;
        for(i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]==0)flg=1;
        }
        if(flg)cout<<"0\n";
        else 
        {
            for(i=0;i<n;i++)
            {
                if(a[i]*ans>lmt)
                {
                    flg=1;
                    cout<<"-1\n";
                    break;
                }
                ans*=a[i];
            }
            if(flg==0)cout<<ans<<"\n";
        }
        /*w++;
    }*/
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'll' was not declared in this scope
   14 |         ll n,i,j,k;
      |         ^~
a.cc:15:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   15 |         cin>>n;
      |              ^
      |              yn
a.cc:16:11: error: expected ';' before 'lmt'
   16 |         ll lmt= (ll)(1e18);
      |           ^~~~
      |           ;
a.cc:18:11: error: expected ';' before 'a'
   18 |         ll a[n],flg=0,ans=1;
      |           ^~
      |           ;
a.cc:19:13: error: 'i' was not declared in this scope
   19 |         for(i=0;i<n;i++)
      |             ^
a.cc:21:18: error: 'a' was not declared in this scope
   21 |             cin>>a[i];
      |                  ^
a.cc:22:24: error: 'flg' was not declared in this scope
   22 |             if(a[i]==0)flg=1;
      |                        ^~~
a.cc:24:12: error: 'flg' was not declared in this scope
   24 |         if(flg)cout<<"0\n";
      |            ^~~
a.cc:27:17: error: 'i' was not declared in this scope
   27 |             for(i=0;i<n;i++)
      |                 ^
a.cc:29:20: error: 'a' was not declared in this scope
   29 |                 if(a[i]*ans>lmt)
      |                    ^
a.cc:29:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |                 if(a[i]*ans>lmt)
      |                         ^~~
      |                         abs
a.cc:29:29: error: 'lmt' was not declared in this scope
   29 |                 if(a[i]*ans>lmt)
      |                             ^~~
a.cc:35:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   35 |                 ans*=a[i];
      |                 ^~~
      |                 abs
a.cc:35:22: error: 'a' was not declared in this scope
   35 |                 ans*=a[i];
      |                      ^
a.cc:37:29: error: 'ans' was not declared in this scope; did you mean 'abs'?
   37 |             if(flg==0)cout<<ans<<"\n";
      |                             ^~~
      |                             abs
Language: C

#include<stdio.h>

int main(void)
{
  long A[10000],C=1,N;
  scanf("%ld",&N);
  for(long i=0;i<=N;i++){
    scanf("%ld",&A[i]);
  }
  for(long i=0;i<=N;i++){
    C=C*A[i];
    if (C==0)
    {
      printf("0");
    }
  } 
  if(C>=100000000000000000){
    printf("%ld",C);
  }if else(C<100000000000000000){
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:19:7: error: expected '(' before 'else'
   19 |   }if else(C<100000000000000000){
      |       ^~~~
      |       (
Language: C

#include<stdio.h>

int main(void)
{
  long A[10000],C=1,N;
  scanf("%ld",&N);
  for(long i=0;i<=N;i++){
    scanf("%ld",&A[i]);
  }
  for(long i=0;i<=N;i++){
    C=C*A[i];
  } 
  if(C>=100000000000000000){
    printf("%ld",C);
  }if  else(C==){
    printf("0");
  }if else(C<100000000000000000)
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:15:8: error: expected '(' before 'else'
   15 |   }if  else(C==){
      |        ^~~~
      |        (
main.c: At top level:
main.c:20:3: error: expected identifier or '(' before 'return'
   20 |   return 0;
      |   ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C

#include<stdio.h>

int main(void)
{
  long A[10000],C=1,N;
  sacnf("%ld",&N);
  for(long i=0;i<=N;i++){
    scanf("%ld",&A[i]);
  }
  for(long i=0;i<=N;i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%ld",C);
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |   sacnf("%ld",&N);
      |   ^~~~~
      |   scanf
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  long A[10000],C=1;
  sacnf("%d",&N);
  for(long i=0;i<=N;i++){
    scanf("%ld",&A[i]);
  }
  for(long i=0;i<=N;i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%ld",C);
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   sacnf("%d",&N);
      |   ^~~~~
      |   scanf
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  long A[10000],C=1;
  sacnf("%ld",&N);
  for(long i=0;i<=N;i++){
    scanf("%ld",&A[i]);
  }
  for(long i=0;i<=N;i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%ld",C);
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   sacnf("%ld",&N);
      |   ^~~~~
      |   scanf
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  long A[10000],C=1;
  sacnf("%ld",&N);
  for(int i=0;i<=N;i++){
    scanf("%ld",&A[i]);
  }
  for(int i=0;i<=N;i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%ld",C);
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   sacnf("%ld",&N);
      |   ^~~~~
      |   scanf
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  long A[10000],C=1;
  sacnf("%ld",&N);
  for(int i=0;i<=N;i++){
    scanf("%d",&A[i]);
  }
  for(int i=0;i<=N;i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%ld",C);
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   sacnf("%ld",&N);
      |   ^~~~~
      |   scanf
Language: C

#include<stdio.h>

main(void)
{
  int N;
  long A[10000],C=1;
  sacnf("%d",&N);
  for(int i=0;i<=N;i++){
    scanf("%d",&A[i]);
  }
  for(int i=0;i<=N;i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%ld",C)
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(void)
      | ^~~~
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   sacnf("%d",&N);
      |   ^~~~~
      |   scanf
main.c:15:20: error: expected ';' before '}' token
   15 |     printf("%ld",C)
      |                    ^
      |                    ;
   16 |   }else{
      |   ~
Language: C

#include<stdio.h>

main(void)
{
  int N;
  long A[10000],C=1;
  sacnf("%d",&N);
  for(int i=0,i<=N,i++){
    scanf("%d",&A[i])
  }
  for(i=0,i<=N,i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%d",C)
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(void)
      | ^~~~
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   sacnf("%d",&N);
      |   ^~~~~
      |   scanf
main.c:8:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
    8 |   for(int i=0,i<=N,i++){
      |                ^~
main.c:11:3: error: expected expression before 'for'
   11 |   for(i=0,i<=N,i++){
      |   ^~~
main.c:20:1: error: expected expression before '}' token
   20 | }
      | ^
main.c:20:1: error: expected expression before '}' token
Language: C

#include

main(void);
{
  int N;
  long A[10000],C=1;
  sacnf("%d",&N);
  for(int i=0,i<=N,i++){
    scanf("%d",&A[i])
  }
  for(i=0,i<=N,i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%d",C)
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |         ^
main.c:3:1: warning: data definition has no type or storage class
    3 | main(void);
      | ^~~~
main.c:3:1: error: type defaults to 'int' in declaration of 'main' [-Wimplicit-int]
main.c:4:1: error: expected identifier or '(' before '{' token
    4 | {
      | ^
Language: C

#include

void(main);
{
  int N;
  long A[10000],C=1;
  sacnf("%d",&N);
  for(int i=0,i<=N,i++){
    scanf("%d",&A[i])
  }
  for(i=0,i<=N,i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%d",C)
  }else{
    printf("-1");
  }
  return 0;
}
  


Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |         ^
main.c:4:1: error: expected identifier or '(' before '{' token
    4 | {
      | ^
Language: C

#include

void(main);
{
  int N;
  long A[10000],C=1;
  for(int i=0,i<=N,i++){
    scanf("%d",&A[i])
  }
  for(i=0,i<=N,i++){
    C=C*A[i];
  } 
  if(C>1000000000000000000){
    printf("%d",C)
  }else{
    printf("-1");
  }
  return 0;
}
  

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |         ^
main.c:4:1: error: expected identifier or '(' before '{' token
    4 | {
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> v;
    int co =1;
    for(int i =0; i < n; i++)
    {
       int x; cin >> x;
       if(!x)
       {
          cout << 0;
          return 0;
       }
       v.push_back(x);
    }

    long long unsigned res = 1;
    long long unsigned tmp;
    for(int i =0; i < n; i++)
    {
       tmp = ceil((1e18+1)/res);
       else(v[i] > tmp)
       {
          cout << -1;
          return 0;
       }
       res*=v[i];
    }
    cout << res;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:8: error: 'else' without a previous 'if'
   27 |        else(v[i] > tmp)
      |        ^~~~
a.cc:27:24: error: expected ';' before '{' token
   27 |        else(v[i] > tmp)
      |                        ^
      |                        ;
   28 |        {
      |        ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> v;
    int co =1;
    for(int i =0; i < n; i++)
    {
       int x; cin >> x;
       if(!x)
       {
          cout << 0;
          return 0;
       }
       v.push_back(x);
    }

    long long unsigned res = 1;
    long long unsigned tmp;
    for(int i =0; i < n; i++)
    {
       tmp = ceil((1e18+1)/res);
       if(tmp*v[i] == 1e18);
       else(v[i] >= tmp)
       {
          cout << -1;
          return 0;
       }
       res*=v[i];
    }
    cout << res;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:25: error: expected ';' before '{' token
   28 |        else(v[i] >= tmp)
      |                         ^
      |                         ;
   29 |        {
      |        ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> v;
    int co =1;
    for(int i =0; i < n; i++)
    {
       int x; cin >> x;
       if(!x)
       {
          cout << 0;
          return 0;
       }
       v.push_back(x);
    }

    long long unsigned res = 1;
    long long unsigned tmp;
    for(int i =0; i < n; i++)
    {
       tmp = ceil((1e18+1)/res);
       if(res*v[i] == 1e18);
       else(v[i] >= tmp)
       {
          cout << -1;
          return 0;
       }
       res*=v[i];
    }
    cout << res;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:25: error: expected ';' before '{' token
   28 |        else(v[i] >= tmp)
      |                         ^
      |                         ;
   29 |        {
      |        ~
Language: C++

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

int main() {
  int a;
  cin >> a;
  
  long long ans;
  cin >> ans;
  for(int i = 0; i < (a - 1); i++) {
   long long b;
    cin >> b;
    ans *= b;
    
    if( b == 0 ) {
	  cout << "0" << endl;
      return 0;
    }
    if(||ans < 0 || ans > 1000000000000000000) {
      cout << "-1" << endl;
      return 0;
    }
    
  }
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: expected primary-expression before '||' token
   19 |     if(||ans < 0 || ans > 1000000000000000000) {
      |        ^~
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
 
int main(){
  int N;
  unsigned long long ans= 1;
  int flag =0;
  
  std::cin>>N;
  
  for(int i=0; i<N; i++){
    int a;
    std::cin>>a;
    
    if(a == 0){
    	ans = 0;
      	flag = 0;
    }
    else if(flag == 0){
        
      	ans = ans*a;
      
      	if(log10((float)ans)> 18.0){
    		flag = 1;
    	}
      
    }
    
    
    
    
  }
  
  if(flag == 0){
    	std::cout<<ans;
    }else{
  		std::cout<<"-1";
  }
 

Compiler output:
a.cc: In function 'int main()':
a.cc:24:12: error: 'log10' was not declared in this scope
   24 |         if(log10((float)ans)> 18.0){
      |            ^~~~~
a.cc:39:4: error: expected '}' at end of input
   39 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n ,m;cin>>n;
int x[n];
unsigned long long int m = 1;
if(n>=2&&n<=pow(10,5)){
    for(int i=0;i<n;i++){
        cin>>m;
        if(m>=0&&m<=pow(10,18))
            x[i]=m;
        }
    }
    for(int i=0;i<n;i++)
        m=m*x[i];
    if(m<=pow(10,18)+1)
        cout<<m<<endl;
    else
        cout<<-1<<endl;
}

return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: conflicting declaration 'long long unsigned int m'
    6 | unsigned long long int m = 1;
      |                        ^
a.cc:4:8: note: previous declaration as 'int m'
    4 | int n ,m;cin>>n;
      |        ^
a.cc: At global scope:
a.cc:22:1: error: expected unqualified-id before 'return'
   22 | return 0;}
      | ^~~~~~
a.cc:22:10: error: expected declaration before '}' token
   22 | return 0;}
      |          ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#define rep(i,n) for(int i=1;i<=(int)(n);i++)
#define max 10000000000000000000
using namespace std;
typedef long long ll;
int main(){
    ll n;
    cin>>n;
    vector <<ll>> a(n);
    ll s=a[0];
    for(int i=1;i<n;i++){
        s=s*a[i];
    }
    if(s>max){
        cout<<-1<<endl;
    }else{
        cout<<s<<endl;
    }
}


Compiler output:
a.cc:22:10: warning: integer constant is so large that it is unsigned
   22 |     if(s>max){
      |          ^~~
a.cc: In function 'int main()':
a.cc:17:12: error: expected unqualified-id before '<<' token
   17 |     vector <<ll>> a(n);
      |            ^~
a.cc:18:10: error: 'a' was not declared in this scope
   18 |     ll s=a[0];
      |          ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#define rep(i,n) for(int i=1;i<=(int)(n);i++)
using namespace std;
typedef long long ll;
int main(){
    ll n;
    cin>>n;
    vector <<ll>> a(n);
    ll s=a[0];
    for(int i=1;i<n;i++){
        s=s*a[i];
    }
    if(s>10000000000000000000){
        cout<<-1<<endl;
    }else{
        cout<<s<<endl;
    }
}


Compiler output:
a.cc:21:10: warning: integer constant is so large that it is unsigned
   21 |     if(s>10000000000000000000){
      |          ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:16:12: error: expected unqualified-id before '<<' token
   16 |     vector <<ll>> a(n);
      |            ^~
a.cc:17:10: error: 'a' was not declared in this scope
   17 |     ll s=a[0];
      |          ^
Language: C++

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

using ll = long long;

int main()
{
    int n;
    cin >> n;
    ll val = 1;
    ll x;
    bool ok = true;
    for(int i = 0; i < n; i++) {
        cin >> x;
        if(x == 0) {
            cout << "0" << endl;
            return 0;
        }
        if(ok == false) {
            continue;
        }
        if(1e18/val < x || (1e18/val == x && 1e18%val != 0)) {
            ok = false;
        }
        val *= x;
    }
    if(ok) {
        cout << val << endl;
    }
    else {
        cout << "-1" << endl;;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:50: error: invalid operands of types 'double' and 'll' {aka 'long long int'} to binary 'operator%'
   22 |         if(1e18/val < x || (1e18/val == x && 1e18%val != 0)) {
      |                                              ~~~~^~~~
      |                                              |    |
      |                                              |    ll {aka long long int}
      |                                              double
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n; cin >> n;
  long long a[n]; 
  for (int i=0; i<n; i++){
    cin >> a[i];
    if (a[i] == 0) {
      cout << 0 << endl;
      return 0;
    }
  }

  long long ans = 1;
  
  for (int i=0; i<n; ++i) {
    if (a >= 1000000000000000001) {
      cout << -1 << endl;
      return 0;
    }
    ans *= a;

    if (ans >= 1000000000000000001) {
      cout << -1 << endl;
      return 0;
    }
  }
  
  cout << ans << endl;
  return 0;  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if (a >= 1000000000000000001) {
      |         ~~^~~~~~~~~~~~~~~~~~~~~~
a.cc:22:9: error: invalid operands of types 'long long int' and 'long long int*' to binary 'operator*'
   22 |     ans *= a;
      |     ~~~~^~~~
a.cc:22:9: note:   in evaluation of 'operator*=(long long int, long long int*)'
Language: C++

#include <iostream>
#include<cstring>
#include<algorithm>
#define ll long long
using namespace std;
ll maxv = 1e18;
int main(){
    ll n,temp,sum=1;
    scanf("%lld",&n);
    for(int i = 0;i<n;i++){
        scanf("%lld",&temp);
        if(temp==0){
            printf("0\n");
            return ;
        }
        sum *= temp;
    }
    sum>maxv? printf("-1\n"):printf("%lld\n",sum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |             return ;
      |             ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std; 

int main () {
		int N; cin >> N;

		long long c; 

		while (N--) {
			long long t; 
			cin >> t;
			c *= t;

			if (c > 10e18) {
				cout << -1;
				return;
			}
		}

		return c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:33: error: return-statement with no value, in function returning 'int' [-fpermissive]
   17 |                                 return;
      |                                 ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int t;
	for(int i=1;i<=t;i++)
	{
	long x,y;
	cin >> x >> y;
    }
	cout << x*y;
	if(x*y>pow(10,18))
		cout << -1;
	
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'x' was not declared in this scope
   11 |         cout << x*y;
      |                 ^
a.cc:11:19: error: 'y' was not declared in this scope
   11 |         cout << x*y;
      |                   ^
Language: C++

#include<iostream>
using namespace std;

int main(){
int a=0;
  int b=0;
cin>>a;
  for(int i=0;i<a;i++){
  b*=b;}
  if(b>10000000000000000000)
    cout<<"-1"<<endl;
}
else{
cout<<b<<endl;
}


Compiler output:
a.cc:10:8: warning: integer constant is so large that it is unsigned
   10 |   if(b>10000000000000000000)
      |        ^~~~~~~~~~~~~~~~~~~~
a.cc:13:1: error: expected unqualified-id before 'else'
   13 | else{
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  unsigned long long int n,i,a[100005],sum=1,result=1000000000000000000;
  cin>>n;
  for(i=0;i<n;i++)
  {
   cin>>a[i];
    sum=sum*a[i];
  }
  //result=result+result;
  sum=abs(sum);
  if(sum>1000000000000000000)
  {
   cout<<"-1";
  }
  else
  {
   cout<<sum;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: call of overloaded 'abs(long long unsigned int&)' is ambiguous
   13 |   sum=abs(sum);
      |       ~~~^~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~