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

#include<iostream>
using namespace std;
int main () {
    long n, min, max;
    long total;
    min = 1000000;
    max = -1000000;
    cin >> n;
    for(int i=0; i < n; i++) {
        cin >> b;
        if (b < min) {
            min = b;
        }
        if (a[i] > max) {
            max = b;
        }
        total = total + b;
    }
    cout << min << " " << max << " " << total << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'b' was not declared in this scope
   10 |         cin >> b;
      |                ^
a.cc:14:13: error: 'a' was not declared in this scope
   14 |         if (a[i] > max) {
      |             ^
Language: C++

#include<iostream>
using namespace std;
int main () {
    long n, b, min, max;
    long total;
    min = 1000000;
    max = -1000000;
    cin >> n;
    for(int i=0; i < n; i++) {
        cin >> b;
        if (b < min) {
            min = b;
        }
        if (a[i] > max) {
            max = b;
        }
        total = total + b;
    }
    cout << min << " " << max << " " << total << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'a' was not declared in this scope
   14 |         if (a[i] > max) {
      |             ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
  int n,m;
  cin >> n;
  m = 10000000
  int a[10010];
  for(int i = 0; i < n; i++){
    cin >> a[i];
  }
  for(int i = 0; i < n;i++){
    m = min(m,a[i]);
  }
  cout << m << " " << max(a)<< " " << sum(a) << endl;
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: expected ';' before 'int'
   26 |   m = 10000000
      |               ^
      |               ;
   27 |   int a[10010];
      |   ~~~          
a.cc:29:12: error: 'a' was not declared in this scope
   29 |     cin >> a[i];
      |            ^
a.cc:32:15: error: 'a' was not declared in this scope
   32 |     m = min(m,a[i]);
      |               ^
a.cc:34:27: error: 'a' was not declared in this scope
   34 |   cout << m << " " << max(a)<< " " << sum(a) << endl;
      |                           ^
a.cc:34:39: error: 'sum' was not declared in this scope
   34 |   cout << m << " " << max(a)<< " " << sum(a) << endl;
      |                                       ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
  int n,m;
  cin >> n;
  minimum = 10000000
  maximum = -10000000
  s = 0
  int a[10010];
  for(int i = 0; i < n; i++){
    cin >> a[i];
  }
  for(int i = 0; i < n;i++){
    minimum = min(m,a[i]);
    maximum = max(m,a[i])
    s += a[i]
  }

  cout << minimum << " " << maximum << " " << s << endl;
  return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:26:3: error: 'minimum' was not declared in this scope; did you mean 'fminimum'?
   26 |   minimum = 10000000
      |   ^~~~~~~
      |   fminimum
a.cc:31:12: error: 'a' was not declared in this scope
   31 |     cin >> a[i];
      |            ^
a.cc:34:21: error: 'a' was not declared in this scope
   34 |     minimum = min(m,a[i]);
      |                     ^
a.cc:35:5: error: 'maximum' was not declared in this scope; did you mean 'fmaximum'?
   35 |     maximum = max(m,a[i])
      |     ^~~~~~~
      |     fmaximum
a.cc:39:29: error: 'maximum' was not declared in this scope; did you mean 'fmaximum'?
   39 |   cout << minimum << " " << maximum << " " << s << endl;
      |                             ^~~~~~~
      |                             fmaximum
a.cc:39:47: error: 's' was not declared in this scope
   39 |   cout << minimum << " " << maximum << " " << s << endl;
      |                                               ^
Language: C++

  for (int i=0; i<n; i++){
    mn = min(mn, a[i]);
    mx = max(mx, a[i]);
    sum += a[i];
  }

  cout<<mn<<" "<<mx<<" "<<sum<<endl;
  

  return 0;
  
}
	


Compiler output:
a.cc:1:3: error: expected unqualified-id before 'for'
    1 |   for (int i=0; i<n; i++){
      |   ^~~
a.cc:1:17: error: 'i' does not name a type
    1 |   for (int i=0; i<n; i++){
      |                 ^
a.cc:1:22: error: 'i' does not name a type
    1 |   for (int i=0; i<n; i++){
      |                      ^
a.cc:7:3: error: 'cout' does not name a type
    7 |   cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |   ^~~~
a.cc:10:3: error: expected unqualified-id before 'return'
   10 |   return 0;
      |   ^~~~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

include <iostream>
using namespace std;
int main(void){
   long long int n, a[10001] = {0}; //100個
   cin >> n;
   for(int i = 0; i < n; i++){
       cin >> a[i];
   }
   long long int min=100000,max=100000,sum=0;
   for(int i = 1; i < n; i++){
       if(a[i]<min){
           min=a[i];
       }
       else if(a[i]>max){
       sum=sum+a[i];
   }
   cout <<min<<" "<<max<<" "<<sum;
}
    
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:4: error: 'cin' was not declared in this scope
    5 |    cin >> n;
      |    ^~~
a.cc:17:4: error: 'cout' was not declared in this scope
   17 |    cout <<min<<" "<<max<<" "<<sum;
      |    ^~~~
Language: C++

int main(void){
    int n;
    long long a[10001] = {0};
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    long long min = 1000000, max = -1000000, sum = 0;
    for(int i = 0; i < n; i++){
        if(a[i]<min){
            min = a[i];
        }
        else{
            max = a[i];
        }
        sum = sum + a[i];
    }
    cout << min << " " << max << " " << sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> n;
      |     ^~~
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << min << " " << max << " " << sum;
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int n;
    long long a[10001]={0};
    cin>>n;
    for(int i=0; i<n; i++){
        cin>>a[i];
    }
    long long min=1000000,max=-1000000, sum=0;
    for(int i=0; i<n i++){
        if(a[i]<min){
            min=a[i];
        }
        else if{
            max=a[i];
        }
        cout<<min<<" "<<max<<" "<<sum;
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before 'i'
   11 |     for(int i=0; i<n i++){
      |                     ^~
      |                     ;
a.cc:15:16: error: expected '(' before '{' token
   15 |         else if{
      |                ^
      |                (
Language: C++

#include <stdio.c>
#include <algorithm>

using namespace std;

int main(){
        int n,max_num= -1000001,min = 1000001,tmp;
        long long int sum = 0;
        scanf("%d",&tmp);
        for(int i = 0; i < n; i++){
                scanf("%d",&tmp);
                sum += tmp;
                max_num = min(min_num,tmp);
                min_num = min(min_num,tmp);
        }
        printf("%d %d %lld\n",min_num,max_num,sum);
}


Compiler output:
a.cc:1:10: fatal error: stdio.c: No such file or directory
    1 | #include <stdio.c>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

{-# LANGUAGE BangPatterns #-}

module Main where

import Data.Char
import Data.List
import Control.Monad
import Control.Applicative
import Text.Printf


readInt :: IO Int
readInt = read <$> (input `seq` input)
    where input = do
            !c <- getChar
            if isDigit c || c == '-'
                then (c :) <$> input
                else return []

prints :: Show a => [a] -> IO ()
prints as = putStrLn $ concat $ intersperse " " $ map show as

main = do
    n <- readInt
    as <- replicateM n readInt
    putStrLn $ printf "%d %d %d" (minimum as) (maximum as) (sum as)


Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | {-# LANGUAGE BangPatterns #-}
      |   ^
a.cc:1:27: error: stray '#' in program
    1 | {-# LANGUAGE BangPatterns #-}
      |                           ^
a.cc:13:27: error: stray '`' in program
   13 | readInt = read <$> (input `seq` input)
      |                           ^
a.cc:13:31: error: stray '`' in program
   13 | readInt = read <$> (input `seq` input)
      |                               ^
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {-# LANGUAGE BangPatterns #-}
      | ^
a.cc:3:1: error: 'module' does not name a type
    3 | module Main where
      | ^~~~~~
a.cc:3:1: note: C++20 'module' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)
using namespace std;

int main()
{
    int n,sum=0;
    cin>>n;
    int x[n];
    REP(i,n){cin>>>x[i];sum+=x[i];}
    sort(x.begin(),x.end());
    cout<<x[0]<<" "<<x[x.size()-1]<<" "<<sum<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: expected primary-expression before '>' token
   11 |     REP(i,n){cin>>>x[i];sum+=x[i];}
      |                   ^
a.cc:12:12: error: request for member 'begin' in 'x', which is of non-class type 'int [n]'
   12 |     sort(x.begin(),x.end());
      |            ^~~~~
a.cc:12:22: error: request for member 'end' in 'x', which is of non-class type 'int [n]'
   12 |     sort(x.begin(),x.end());
      |                      ^~~
a.cc:13:26: error: request for member 'size' in 'x', which is of non-class type 'int [n]'
   13 |     cout<<x[0]<<" "<<x[x.size()-1]<<" "<<sum<<endl;
      |                          ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)
using namespace std;

int main()
{
    int n,sum=0;
    cin>>n;
    int x[n];
    REP(i,n){cin>>x[i];sum+=x[i];}
    sort(x.begin(),x.end());
    cout<<x[0]<<" "<<x[x.size()-1]<<" "<<sum<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: request for member 'begin' in 'x', which is of non-class type 'int [n]'
   12 |     sort(x.begin(),x.end());
      |            ^~~~~
a.cc:12:22: error: request for member 'end' in 'x', which is of non-class type 'int [n]'
   12 |     sort(x.begin(),x.end());
      |                      ^~~
a.cc:13:26: error: request for member 'size' in 'x', which is of non-class type 'int [n]'
   13 |     cout<<x[0]<<" "<<x[x.size()-1]<<" "<<sum<<endl;
      |                          ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int n,seisu,goukei=0;
  int i;
  int max,min;

  cin >> n;


  for(i = 0;i < n;i++){

    cin >> seisu;

    if(max =< seisu){

      max = seisu;

    }

    if(min >= seisu){

      min = seisu;

    }

    goukei = goukei + seisu;

  }

  cout << min << " " << max << " " << goukei << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected primary-expression before '<' token
   16 |     if(max =< seisu){
      |             ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int n,seisu,goukei;
  int i;
  int max,min;

  cin >> n;
 
 cin >> seisu;

 max = seisu;
 min = seisu;
 goukei = seisu;

  for(i = 0;i < n-1;i++){

    cin >> seisu;

   

    if(max <= seisu){

      max = seisu;

    }

    if(min >= seisu){

      min = seisu;

    }

    goukei = goukei + seisu;

  }

Compiler output:
a.cc: In function 'int main()':
a.cc:37:4: error: expected '}' at end of input
   37 |   }
      |    ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n,i,j,min=1000000,max=-1000000
	long sum=0;
	
	for(cin>>n,j=0;j<n;++j){
		cin>>i;
		
		if(i<min)min=i;
		if(i>max)max=i;
		sum+=i;
	}
	
	cout<<min<<" "<<max<<" "<<sum<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ',' or ';' before 'long'
    6 |         long sum=0;
      |         ^~~~
a.cc:13:17: error: 'sum' was not declared in this scope
   13 |                 sum+=i;
      |                 ^~~
a.cc:16:35: error: 'sum' was not declared in this scope
   16 |         cout<<min<<" "<<max<<" "<<sum<<endl;
      |                                   ^~~
Language: C++

#include <stdio.h>

int main(void)
{
    int n;
    scanf("%d", &n);
    if ( n == 0) {
        break;
    } if else {
        int a[n - 1];
        int min = 1000000;
        int max = -1000000;
        int sum = 0;
        for(int i = 0; i < n - 1; ++i) {
            scanf("%d ", &a[i]);
            if (a[i] < min) {
                min = a[i];
            }
            if (a[i] > max) {
                max = a[i];
            }
            sum = sum + a[i];
        }
        scanf("%d", &a[n - 1]);
        if (a[n - 1] < min) {
            min = a[n -1];
        }
        if (a[n - 1] > max) {
            max = a[n - 1];
        }
        sum = sum + a[n - 1];
        printf("%d %d %d\n", min, max, sum);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: break statement not within loop or switch
    8 |         break;
      |         ^~~~~
a.cc:9:10: error: expected '(' before 'else'
    9 |     } if else {
      |          ^~~~
      |          (
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    int a[10000], n, i, sum;
    cin >> n;
    for(i = 0; i < n; i++){
        cin >> a[i];
        sum += a[i];
    }
    sort(a,a+n)
    cout << a[0] << " "  << a[i] << " " << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before 'cout'
   13 |     sort(a,a+n)
      |                ^
      |                ;
   14 |     cout << a[0] << " "  << a[i] << " " << sum;
      |     ~~~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    int a[10000], n, i, sum;
    cin >> n;
    for(i = 0; i < n; i++){
        cin >> a[i];
        sum += a[i];
    }
    sort(a,i);
    cout << a[0] << " " << a[i] << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: no matching function for call to 'sort(int [10000], int&)'
   13 |     sort(a,i);
      |     ~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   template argument deduction/substitution failed:
a.cc:13:9: note:   deduced conflicting types for parameter '_RAIter' ('int*' and 'int')
   13 |     sort(a,i);
      |     ~~~~^~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    int a[10000], n, i, sum;
    cin >> n;
    for(i = 0; i < n; i++){
        cin >> a[i];
        sum += a[i];
    }
    sort(a,*a[i]);
    cout << a[0] << " " << a[i] << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: invalid type argument of unary '*' (have 'int')
   13 |     sort(a,*a[i]);
      |            ^~~~~
Language: C++

#include <stdio.h>
int main()
{
int n;
scanf("%d", &n);

int min = INT_MAX;
int max = INT_MIN;
int total = 0;

for(int i = 0; i < n; ++i)
{
int k;
scanf("%d",&k);

total+=k;
if( min > k) min = k;
if( max < k) max = k;
}

printf("%d %d %d\n", min, max, total);


return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'INT_MAX' was not declared in this scope
    7 | int min = INT_MAX;
      |           ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <stdio.h>
  +++ |+#include <climits>
    2 | int main()
a.cc:8:11: error: 'INT_MIN' was not declared in this scope
    8 | int max = INT_MIN;
      |           ^~~~~~~
a.cc:8:11: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include<iostream>
int main(){
	int n,a[10000];
	int na = -1000001,nb = 1000001;
	__int64 sum;
	std::cin>>n;
	for(int i = 0; i < n; ++i){
		std::cin>>a[i];
		if(na < a[i])
			na = a[i];
		if(nb > a[i])
			nb = a[i];
		sum += a[i];
	}
	std::cout<<nb<<" "<<na<<" "<<sum<<std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    5 |         __int64 sum;
      |         ^~~~~~~
      |         __int64_t
a.cc:13:17: error: 'sum' was not declared in this scope
   13 |                 sum += a[i];
      |                 ^~~
a.cc:15:38: error: 'sum' was not declared in this scope
   15 |         std::cout<<nb<<" "<<na<<" "<<sum<<std::endl;
      |                                      ^~~
Language: C++

#include<iostream>
int main(){
	int n,a[10000];
	int na = -1000001,nb = 1000001;
	_Longlong sum;
	std::cin>>n;
	for(int i = 0; i < n; ++i){
		std::cin>>a[i];
		if(na < a[i])
			na = a[i];
		if(nb > a[i])
			nb = a[i];
		sum += a[i];
	}
	std::cout<<nb<<" "<<na<<" "<<sum<<std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: '_Longlong' was not declared in this scope
    5 |         _Longlong sum;
      |         ^~~~~~~~~
a.cc:13:17: error: 'sum' was not declared in this scope
   13 |                 sum += a[i];
      |                 ^~~
a.cc:15:38: error: 'sum' was not declared in this scope
   15 |         std::cout<<nb<<" "<<na<<" "<<sum<<std::endl;
      |                                      ^~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int n;x, min, max, sum;
    cin >> n;
    
    int x, min, max, sum;
    cin >> x;
    min = max = sum = x;
    for (int i = 1; i < n; ++i)
    {
        cin >> x;
        if (x < min) min = x;
        if (max < x) max = x;
        sum += x;
    }
    cout << min << ' ' << max << ' ' << sum << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'x' was not declared in this scope
    7 |     int n;x, min, max, sum;
      |           ^
a.cc:7:24: error: 'sum' was not declared in this scope
    7 |     int n;x, min, max, sum;
      |                        ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
	int n;
	ll int sum = 0;
	int saidai = ???9000000;
	int saishou = 9000000
	REP(i,n){
		int tmp;
		cin >> tmp;
		sum += tmp;
		saidai = max(saidai,tmp);
		saishou = min(saishou,tmp);
	}
	cout << saishou << " " << saidai << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:22: error: expected primary-expression before '?' token
   29 |         int saidai = ???9000000;
      |                      ^
a.cc:29:23: error: expected primary-expression before '?' token
   29 |         int saidai = ???9000000;
      |                       ^
a.cc:29:24: error: expected primary-expression before '?' token
   29 |         int saidai = ???9000000;
      |                        ^
a.cc:29:32: error: expected ':' before ';' token
   29 |         int saidai = ???9000000;
      |                                ^
      |                                :
a.cc:29:32: error: expected primary-expression before ';' token
a.cc:29:32: error: expected ':' before ';' token
   29 |         int saidai = ???9000000;
      |                                ^
      |                                :
a.cc:29:32: error: expected primary-expression before ';' token
a.cc:29:32: error: expected ':' before ';' token
   29 |         int saidai = ???9000000;
      |                                ^
      |                                :
a.cc:29:32: error: expected primary-expression before ';' token
a.cc:19:18: error: expected ',' or ';' before 'for'
   19 | #define REP(i,n) for(int i=0;i<(int)(n);i++)
      |                  ^~~
a.cc:31:9: note: in expansion of macro 'REP'
   31 |         REP(i,n){
      |         ^~~
a.cc:31:13: error: 'i' was not declared in this scope
   31 |         REP(i,n){
      |             ^
a.cc:19:30: note: in definition of macro 'REP'
   19 | #define REP(i,n) for(int i=0;i<(int)(n);i++)
      |                              ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
	int n;
	ll int sum = 0;
	int saidai = ???9000000;
	int saishou = 9000000;
	REP(i,n){
		int tmp;
		cin >> tmp;
		sum += tmp;
		saidai = max(saidai,tmp);
		saishou = min(saishou,tmp);
	}
	cout << saishou << " " << saidai << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:22: error: expected primary-expression before '?' token
   29 |         int saidai = ???9000000;
      |                      ^
a.cc:29:23: error: expected primary-expression before '?' token
   29 |         int saidai = ???9000000;
      |                       ^
a.cc:29:24: error: expected primary-expression before '?' token
   29 |         int saidai = ???9000000;
      |                        ^
a.cc:29:32: error: expected ':' before ';' token
   29 |         int saidai = ???9000000;
      |                                ^
      |                                :
a.cc:29:32: error: expected primary-expression before ';' token
a.cc:29:32: error: expected ':' before ';' token
   29 |         int saidai = ???9000000;
      |                                ^
      |                                :
a.cc:29:32: error: expected primary-expression before ';' token
a.cc:29:32: error: expected ':' before ';' token
   29 |         int saidai = ???9000000;
      |                                ^
      |                                :
a.cc:29:32: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
	int n;
	ll int sum = 0;
	ll int saidai = ???9000000;
	ll int saishou = 9000000;
	REP(i,n){
		ll int tmp;
		cin >> tmp;
		sum += tmp;
		saidai = max(saidai,tmp);
		saishou = min(saishou,tmp);
	}
	cout << saishou << " " << saidai << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:25: error: expected primary-expression before '?' token
   29 |         ll int saidai = ???9000000;
      |                         ^
a.cc:29:26: error: expected primary-expression before '?' token
   29 |         ll int saidai = ???9000000;
      |                          ^
a.cc:29:27: error: expected primary-expression before '?' token
   29 |         ll int saidai = ???9000000;
      |                           ^
a.cc:29:35: error: expected ':' before ';' token
   29 |         ll int saidai = ???9000000;
      |                                   ^
      |                                   :
a.cc:29:35: error: expected primary-expression before ';' token
a.cc:29:35: error: expected ':' before ';' token
   29 |         ll int saidai = ???9000000;
      |                                   ^
      |                                   :
a.cc:29:35: error: expected primary-expression before ';' token
a.cc:29:35: error: expected ':' before ';' token
   29 |         ll int saidai = ???9000000;
      |                                   ^
      |                                   :
a.cc:29:35: error: expected primary-expression before ';' token
Language: C++


int main(){
	long int a = -1000000, b = 1000000,c=0,tmp=0,tmp2=0;
	cin >> tmp2;
	for (int i = 0; i < tmp2; i++){
		cin>>tmp;
		c += tmp;
		a = max(a, tmp);
		b = min(b, tmp);
	}
	cout << b << " " << a << " " << c << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> tmp2;
      |         ^~~
a.cc:8:21: error: 'max' was not declared in this scope
    8 |                 a = max(a, tmp);
      |                     ^~~
a.cc:9:21: error: 'min' was not declared in this scope; did you mean 'main'?
    9 |                 b = min(b, tmp);
      |                     ^~~
      |                     main
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << b << " " << a << " " << c << endl;
      |         ^~~~
a.cc:11:46: error: 'endl' was not declared in this scope
   11 |         cout << b << " " << a << " " << c << endl;
      |                                              ^~~~
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner( System.in );
		int count = sc.nextInt();
		
		int min		= 1000000;
		int max		= -1000000;
		long calc	= 0;
		
		for(int i = 0; i < count; i++) {
			int a = sc.nextInt();
			
			calc += a;
			
			if( a > max ) {
				max = a;
				
			}
			if ( a < min ) {
				min = a;
			}
				
		}
		System.out.printf("%d %d %d", min, max, calc);
		
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <math.h>

using namespace std;

int main() {
	int n; cin >> n;
	int m; cin >> m;
	int M = m;
	int sum = 0;
	for (int i = 1; i < n; ++i) {
		int v; cin >> v;
		ans = min(ans, v);
		sum += v;
		M = max(M, v);
	}
	cout << m << " " << M << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |                 ans = min(ans, v);
      |                 ^~~
      |                 abs
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <math.h>

using namespace std;

int main() {
	int n; cin >> n;
	if (n) {
		int m; cin >> m;
		int M = m;
		int sum = m;
		for (int i = 1; i < n; ++i) {
			int v; cin >> v;
			m = min(m, v);
			sum += v;
			M = max(M, v);
		}
		cout << m << " " << M << " " << sum << endl;
	}
	else {
		cout << 1000000 << " " << ???1000000 << " " << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:43: error: expected primary-expression before '?' token
   24 |                 cout << 1000000 << " " << ???1000000 << " " << 0 << endl;
      |                                           ^
a.cc:24:44: error: expected primary-expression before '?' token
   24 |                 cout << 1000000 << " " << ???1000000 << " " << 0 << endl;
      |                                            ^
a.cc:24:45: error: expected primary-expression before '?' token
   24 |                 cout << 1000000 << " " << ???1000000 << " " << 0 << endl;
      |                                             ^
a.cc:24:54: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   24 |                 cout << 1000000 << " " << ???1000000 << " " << 0 << endl;
      |                                              ~~~~~~~ ^~ ~~~
      |                                              |          |
      |                                              int        const char [2]
a.cc:24:73: error: expected ':' before ';' token
   24 |                 cout << 1000000 << " " << ???1000000 << " " << 0 << endl;
      |                                                                         ^
      |                                                                         :
a.cc:24:73: error: expected primary-expression before ';' token
a.cc:24:73: error: expected ':' before ';' token
   24 |                 cout << 1000000 << " " << ???1000000 << " " << 0 << endl;
      |                                                                         ^
      |                                                                         :
a.cc:24:73: error: expected primary-expression before ';' token
a.cc:24:73: error: expected ':' before ';' token
   24 |                 cout << 1000000 << " " << ???1000000 << " " << 0 << endl;
      |                                                                         ^
      |                                                                         :
a.cc:24:73: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <math.h>

using namespace std;

int main() {
	int n; cin >> n;
	if (n) {
		int m; cin >> m;
		int M = m;
		int sum = m;
		for (int i = 1; i < n; ++i) {
			int v; cin >> v;
			m = min(m, v);
			sum += v;
			M = max(M, v);
		}
		cout << m << " " << M << " " << sum << endl;
	}
	else {
		cout << 1000000 << " " << (???1000000) << " " << 0 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:44: error: expected primary-expression before '?' token
   24 |                 cout << 1000000 << " " << (???1000000) << " " << 0 << endl;
      |                                            ^
a.cc:24:45: error: expected primary-expression before '?' token
   24 |                 cout << 1000000 << " " << (???1000000) << " " << 0 << endl;
      |                                             ^
a.cc:24:46: error: expected primary-expression before '?' token
   24 |                 cout << 1000000 << " " << (???1000000) << " " << 0 << endl;
      |                                              ^
a.cc:24:54: error: expected ':' before ')' token
   24 |                 cout << 1000000 << " " << (???1000000) << " " << 0 << endl;
      |                                                      ^
      |                                                      :
a.cc:24:54: error: expected primary-expression before ')' token
a.cc:24:54: error: expected ':' before ')' token
   24 |                 cout << 1000000 << " " << (???1000000) << " " << 0 << endl;
      |                                                      ^
      |                                                      :
a.cc:24:54: error: expected primary-expression before ')' token
a.cc:24:54: error: expected ':' before ')' token
   24 |                 cout << 1000000 << " " << (???1000000) << " " << 0 << endl;
      |                                                      ^
      |                                                      :
a.cc:24:54: error: expected primary-expression before ')' token
Language: C++

#include<stdio.h>

int main()
{
	int n, A[10001];
	scanf_s("%d", &n);
	int i;
	for (i = 0; i <= n-1; i++)
	{
		scanf_s("%d ", &A[i]);
	}
	int min=-1000001, max=1000000, total=0;
	for (i = 0; i <= n - 1; i++)
	{
		if (min > A[i]) min = A[i];
		if (max < A[i]) max = A[i];
		total = total + A[i];
	}
	printf("%d %d %d\n", min, max, total);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    6 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
using namespace std;

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

	int a;
	cin >> a;

	int min, max, sum;
	min = a;
	max = a;
	sum = a;

	while (--n) {
		cin >> a;

		sum += a;
		if (a < min) min = a;
		else if (max < b) max = a;
	}

	cout << min << ' ' << max << ' ' << sum << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:32: error: 'b' was not declared in this scope
   22 |                 else if (max < b) max = a;
      |                                ^
Language: C++

int main(void)
{
	int n,i,max,min,sum;
	int a[10001];

	scanf("%d",&n);
	max=-1000000;
	min=1000000;	
	sum=0;
	for(i=1;i<=n;i++){
		scanf("%d",&a[i]);
		if(max<a[i]){
			max=a[i];
		}
		if(min>a[i]){
			min=a[i];
		}
		sum=sum+a[i];
	}
	printf("%d %d %d\n",min,max,sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf' was not declared in this scope
    6 |         scanf("%d",&n);
      |         ^~~~~
a.cc:20:9: error: 'printf' was not declared in this scope
   20 |         printf("%d %d %d\n",min,max,sum);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
Language: C++

#include <stdio.h>

int main(void){
    int n, x, max=-1000000, min=1000000, sum=0;

    for (int i=0; i<n; i++){
        scanf("%d", &x);
        max = x>max ? x: max;
        min =???x<min ? x: min;
        sum += x;
    }
    printf("%d, %d, %d", min, max, sum);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected primary-expression before '?' token
    9 |         min =???x<min ? x: min;
      |              ^
a.cc:9:15: error: expected primary-expression before '?' token
    9 |         min =???x<min ? x: min;
      |               ^
a.cc:9:16: error: expected primary-expression before '?' token
    9 |         min =???x<min ? x: min;
      |                ^
a.cc:9:31: error: expected ':' before ';' token
    9 |         min =???x<min ? x: min;
      |                               ^
      |                               :
a.cc:9:31: error: expected primary-expression before ';' token
a.cc:9:31: error: expected ':' before ';' token
    9 |         min =???x<min ? x: min;
      |                               ^
      |                               :
a.cc:9:31: error: expected primary-expression before ';' token
a.cc:9:31: error: expected ':' before ';' token
    9 |         min =???x<min ? x: min;
      |                               ^
      |                               :
a.cc:9:31: error: expected primary-expression before ';' token
Language: C++

#include <stdio.h>

int main(void){
    int n, x, max=-1000000, min=1000000, sum=0;

    for (int i=0; i<n; i++){
        scanf("%d", &x);
        max = x>max ? x : max;
        min =???x<min ? x : min;
        sum += x;
    }
    printf("%d, %d, %d", min, max, sum);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected primary-expression before '?' token
    9 |         min =???x<min ? x : min;
      |              ^
a.cc:9:15: error: expected primary-expression before '?' token
    9 |         min =???x<min ? x : min;
      |               ^
a.cc:9:16: error: expected primary-expression before '?' token
    9 |         min =???x<min ? x : min;
      |                ^
a.cc:9:32: error: expected ':' before ';' token
    9 |         min =???x<min ? x : min;
      |                                ^
      |                                :
a.cc:9:32: error: expected primary-expression before ';' token
a.cc:9:32: error: expected ':' before ';' token
    9 |         min =???x<min ? x : min;
      |                                ^
      |                                :
a.cc:9:32: error: expected primary-expression before ';' token
a.cc:9:32: error: expected ':' before ';' token
    9 |         min =???x<min ? x : min;
      |                                ^
      |                                :
a.cc:9:32: error: expected primary-expression before ';' token
Language: C++

#include <stdio.h>

int main(void){
    int n, x, max=-1000000, min=1000000, sum=0;

    scanf("%d", &n);
    for (int i=0; i<n; i++){
        scanf("%d", &x);
        max = x>max ? x : max;
        min =???x<min ? x : min;
        sum += x;
    }
    printf("%d, %d, %d", min, max, sum);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected primary-expression before '?' token
   10 |         min =???x<min ? x : min;
      |              ^
a.cc:10:15: error: expected primary-expression before '?' token
   10 |         min =???x<min ? x : min;
      |               ^
a.cc:10:16: error: expected primary-expression before '?' token
   10 |         min =???x<min ? x : min;
      |                ^
a.cc:10:32: error: expected ':' before ';' token
   10 |         min =???x<min ? x : min;
      |                                ^
      |                                :
a.cc:10:32: error: expected primary-expression before ';' token
a.cc:10:32: error: expected ':' before ';' token
   10 |         min =???x<min ? x : min;
      |                                ^
      |                                :
a.cc:10:32: error: expected primary-expression before ';' token
a.cc:10:32: error: expected ':' before ';' token
   10 |         min =???x<min ? x : min;
      |                                ^
      |                                :
a.cc:10:32: error: expected primary-expression before ';' token
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
  int a;
  int max;
  int min;
  int sum;
  
  cin >> n;

  for(int i=0; i<n; i++){
    cin >> a;
    
    if(i == 0){
      max = a;
      min = a;
      sum = a;
    }
    
    else{
      if(max < a)max = a;
      if(min > a)min = a;
      sum += a;
    }
  
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:28:4: error: expected '}' at end of input
   28 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

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

 int array[num];
 for (int i = 0; i < num; i++) {
  cin >> array[i];
 }

 int min, max, sum = array[0];
 for (int i = 1; i < num; i++) {
  min = array[0];
  max = array[0]:
  sum += array[i];
  if (min > array[i]) {
   min = array[i];
  }

  if (max < array[i]) {
   max = array[i];
  }
 }

 cout << min << " " << max << " " << sum << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before ':' token
   16 |   max = array[0]:
      |                 ^
      |                 ;
Language: C++

#include <iostream>
using namespace std;

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

 int max = -1000001, min = 1000001, data;
 int sum = 0;
 for (int i = 0; i < num; i++) {
  cin >> data;
  if (min > data) {
   min = data;
  }
  if (max < data) {
   max = data;
  }
  sum += data;
 }

 //cout << min << " " << max << " " << sum << endl;
printf(%d %d %ld\n, min, max, sum);

 return 0;
}

Compiler output:
a.cc:22:17: error: stray '\' in program
   22 | printf(%d %d %ld\n, min, max, sum);
      |                 ^
a.cc: In function 'int main()':
a.cc:22:8: error: expected primary-expression before '%' token
   22 | printf(%d %d %ld\n, min, max, sum);
      |        ^
a.cc:22:9: error: 'd' was not declared in this scope
   22 | printf(%d %d %ld\n, min, max, sum);
      |         ^
a.cc:22:15: error: 'ld' was not declared in this scope
   22 | printf(%d %d %ld\n, min, max, sum);
      |               ^~
Language: C++

#include<stdio.h>

int main(){
	long long a,b[10000],i,max=0,min=0,d=0;
	max=max-1000000;
	min=min+1000000;
	scanf("%d",&a);
	for(i=0;i<a;i++){
	scanf("%d",&b[i]);}
	for(i=0;i<=a-1;i++){
		if(b[i]>=max){
			max=b[i];}
		d=d+b[i];
		if(b[i]<=min){
			min=b[i];}
	}
	printf("%d %d %d\n",min ,max ,d);
		
	
	return 0;

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

#include<iostream>
using namespace std;

int main()
{
	int a, b, SUM;

	cin >> a;

	for (int i = 0; i < a; i++)
		cin >> b;

	SUM = b;

	cout << INT_MIN << " " << INT_MAX << " " << SUM << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'INT_MIN' was not declared in this scope
   15 |         cout << INT_MIN << " " << INT_MAX << " " << SUM << endl;
      |                 ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:15:35: error: 'INT_MAX' was not declared in this scope
   15 |         cout << INT_MIN << " " << INT_MAX << " " << SUM << endl;
      |                                   ^~~~~~~
a.cc:15:35: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <cstdio>
int main(){
 int n,buf,max,min;
 scanf("%d",&n);
 
 scanf("%d",&buf);
 max=min=sum=buf;

 for(int i=1;i<n;i++){
  scanf("%d",&buf);
  if(buf>max){max=buf;}
  if(buf<min){min=buf;}
  sum += buf;
 }

 printf("%d %d %d\n",min,max,sum);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'sum' was not declared in this scope
    7 |  max=min=sum=buf;
      |          ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n;
    long long max = -1000000;
    long long min = 1000000;
    int a;
    int sum;
    cin >> n;
    for(i = 0; i < n ; ++i){
       cin >> a;
       if(a > max) max = a;
       if(a < min) min = a;
       sum += a;
      }
    cout << min << " " << max << " " << sum;
  }
     

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     for(i = 0; i < n ; ++i){
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n;
    long long max = -1000000;
    long long min = 1000000;
    long long a;
    long long sum = 0
    cin >> n;
    for(int i = 0; i < n ; ++i){
       cin >> a;
       if(a > max) max = a;
       if(a < min) min = a;
       sum += a;
      }
    cout << min << " " << max << " " << sum << endl;
    return 0;
  }
     

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected ',' or ';' before 'cin'
   10 |     cin >> n;
      |     ^~~
Language: C++


#include<vector>
#include<algorithm>
using namespace std;

int main(){

    int a;
    long long s=0;
    
    scanf("%d",&a);
    
    vector<long>ar(a);
    
    for(auto&e:ar){
        scanf("%ld",&e);
    }
    
    sort(ar.begin(),ar.end());
    
    for(int i=0;i<a;i++){
        s+=ar[i];
    }
    
    printf("%ld %ld %lld\n",ar[0],ar[a-1],s);
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'scanf' was not declared in this scope
   11 |     scanf("%d",&a);
      |     ^~~~~
a.cc:25:5: error: 'printf' was not declared in this scope
   25 |     printf("%ld %ld %lld\n",ar[0],ar[a-1],s);
      |     ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include<algorithm>
  +++ |+#include <cstdio>
    4 | using namespace std;
Language: C++

/*int n;
	int *a_heap; //int???????????????????????????????????¨????????¨?????????
	cin>>n;
	a_heap = new int[n];//new???????????§??´??°n??????????????¢???????¢????
						//????´???°?????????????????¨????????¨???????????¨???OK

	for(int i=0;i<n;i++){
		int ai;
		cin>>ai;
		a_heap[i]=ai;
	}

	int max=0,min=1000000,sum=0;
	for(int j=0;j<n;j++){
		if(max<a_heap[j]){
			max=a_heap[j];
		}
		if(min>a_heap[j]){
			min=a_heap[j];
		}
		sum += a_heap[j];
	}

	cout<<min<<" "<<max<<" "<<sum <<endl;*/

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int a[10000],n,max,min,sum;

  cin >>n;
  cin >>a[];

  max=a[0];
  min=a[0];
  sum=0;

  for(int i=0;i <n+1;i++){
    if(a[i]>max){max=a[i];}
    if(a[i]<min){min=a[i];}
    sum+=a[i];
  }

  cout<<min<<" "<<max<<" "<<sum<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected primary-expression before ']' token
    9 |   cin >>a[];
      |           ^
Language: C++

#include <iostream>

using namespace std;

int main(){
	int n,i;
	cin>>n;
	int min=1000000,max=-1000000;
	__int64 sum=0;
	if (n==0){
		cout<<"0 0 0"<<endl;
		return 0;
	}
	for (i=0;i<n;i++){
		int a;
		cin>>a;
		if (a<min){
			min=a;
		}
		if (a>max){
			max=a;
		}
		sum+=a;
	}
	cout<<min<<" "<<max<<" "<<sum<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    9 |         __int64 sum=0;
      |         ^~~~~~~
      |         __int64_t
a.cc:23:17: error: 'sum' was not declared in this scope
   23 |                 sum+=a;
      |                 ^~~
a.cc:25:35: error: 'sum' was not declared in this scope
   25 |         cout<<min<<" "<<max<<" "<<sum<<endl;
      |                                   ^~~