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

#include <iostream>
#include <algorithm>

int main(){
	int *array;
	int n,max=-INT_MAX,min=INT_MAX;
	long long sum=0;
	std::cin >> n;
	array= new int[n];

		for(int i=0;i<n;i++){
		std::cin >> array[i];
		max = std::max(max, array[i]);
		min = std::min(min, array[i]);
		sum += array[i];
		}
	std::cout << min << " " << max << " " << sum << std::endl;
	delete [] array;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'INT_MAX' was not declared in this scope
    6 |         int n,max=-INT_MAX,min=INT_MAX;
      |                    ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <algorithm>
  +++ |+#include <climits>
    3 | 
a.cc:14:17: error: 'min' was not declared in this scope; did you mean 'std::min'?
   14 |                 min = std::min(min, array[i]);
      |                 ^~~
      |                 std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:17:22: error: 'min' was not declared in this scope; did you mean 'std::min'?
   17 |         std::cout << min << " " << max << " " << sum << std::endl;
      |                      ^~~
      |                      std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include <iostream>
#include <algorithm>


int main(){
	int *array;
	int n,max=-INT_MAX,min=INT_MAX;
	long long sum=0;
	std::cin >> n;
	array= new int[n];

		for(int i=0;i<n;i++){
		std::cin >> array[i];
		max = std::max(max, array[i]);
		min = std::min(min, array[i]);
		sum += array[i];
		}
	std::cout << min << " " << max << " " << sum << std::endl;
	delete [] array;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'INT_MAX' was not declared in this scope
    7 |         int n,max=-INT_MAX,min=INT_MAX;
      |                    ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <algorithm>
  +++ |+#include <climits>
    3 | 
a.cc:15:17: error: 'min' was not declared in this scope; did you mean 'std::min'?
   15 |                 min = std::min(min, array[i]);
      |                 ^~~
      |                 std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:18:22: error: 'min' was not declared in this scope; did you mean 'std::min'?
   18 |         std::cout << min << " " << max << " " << sum << std::endl;
      |                      ^~~
      |                      std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_4_D
#include <iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[n];
  for(int i=0; i < n; i++){
    cin >> a[i];
  }
  int min = a[0], max = a[0]
  long sum = 0;
  for(int i=0; i < n; i++){
    if(min > a[i]){
      min = a[i];
    }
    if(max < a[i]){
      max = a[i];
    }
    sum += a[i];
  }
  cout << min << " " << max << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'long'
   12 |   long sum = 0;
      |   ^~~~
a.cc:20:5: error: 'sum' was not declared in this scope
   20 |     sum += a[i];
      |     ^~~
a.cc:22:39: error: 'sum' was not declared in this scope
   22 |   cout << min << " " << max << " " << sum << endl;
      |                                       ^~~
Language: C++

#include <iostream>
#include <vector>
int main(){
	int n;
	std::cin>>n;
	std::vector<int> v(n);
	for(int i=0;i<n;i++){
		std::cin>>v[i];
	}
	int max=v[0],min=v[0],all=0;
	for(int i=1;i<n;i++){
		if(max<v[i]){
			max=v[i];
		}
		if(min>v[i]){
			min=v[i]
		}
		all=all+v[i];
	}
	std::cout<<min<<" "<<max<<" "<<all<<std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: expected ';' before '}' token
   16 |                         min=v[i]
      |                                 ^
      |                                 ;
   17 |                 }
      |                 ~
Language: C++

#include <vector>
int main(){
	int n;
	std::cin>>n;
	std::vector<int> v(n);
	for(int i=0;i<n;i++){
		std::cin>>v[i];
	}
	int max=v[0],min=v[0],all=0;
	for(int i=0;i<n;i++){
		if(max<v[i]){
			max=v[i];
		}
		if(min>v[i]){
			min=v[i];
		}
		all=all+v[i];
	}
	std::cout<<min<<" "<<max<<" "<<all<<std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: 'cin' is not a member of 'std'
    4 |         std::cin>>n;
      |              ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <vector>
  +++ |+#include <iostream>
    2 | int main(){
a.cc:7:22: error: 'cin' is not a member of 'std'
    7 |                 std::cin>>v[i];
      |                      ^~~
a.cc:7:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:14: error: 'cout' is not a member of 'std'
   19 |         std::cout<<min<<" "<<max<<" "<<all<<std::endl;
      |              ^~~~
a.cc:19:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:50: error: 'endl' is not a member of 'std'
   19 |         std::cout<<min<<" "<<max<<" "<<all<<std::endl;
      |                                                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <vector>
  +++ |+#include <ostream>
    2 | int main(){
Language: C++

#include<iostream>
#include <string>
using namespace std;
int main(){
	int n;
	double a[n],i,max=0,min=10000,sum=0;
	cin>>n;
	for(i=1;i<=n;i++){
	cin>>a[i];
	sum=sum+a[i];
	if(a[i]>max){
		max=a[i];}
	else if(a[i]<min){
	min=a[i];
	}}
    cout<<min<<" "<<max<<" "<<sum<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: invalid types 'double [n][double]' for array subscript
    9 |         cin>>a[i];
      |               ^
a.cc:10:18: error: invalid types 'double [n][double]' for array subscript
   10 |         sum=sum+a[i];
      |                  ^
a.cc:11:13: error: invalid types 'double [n][double]' for array subscript
   11 |         if(a[i]>max){
      |             ^
a.cc:12:22: error: invalid types 'double [n][double]' for array subscript
   12 |                 max=a[i];}
      |                      ^
a.cc:13:18: error: invalid types 'double [n][double]' for array subscript
   13 |         else if(a[i]<min){
      |                  ^
a.cc:14:14: error: invalid types 'double [n][double]' for array subscript
   14 |         min=a[i];
      |              ^
Language: C++

#include <isotream>
#include <algorithm>
using namespace std;
int x[10000],n,sum;
int main(){
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x[i];
		sum=sum+x[i];
	}
	sort(x,x+n);
	cout<<x[0]<<" "<<x[n-1]<<" "<<sum<<endl;
	return 0;
}

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

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

int n,sum;


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

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

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

int n,sum;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected ';' before 'sum'
   13 |         cin>>a[i]
      |                  ^
      |                  ;
   14 |         sum=sum+a[i]
      |         ~~~
Language: C++

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

int n,sum;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected ';' before 'sum'
   13 |         cin>>a[i]
      |                  ^
      |                  ;
   14 |         sum=sum+a[i];
      |         ~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
long long long int x[10000],n,sum;
int main(){
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x[i];
		sum=sum+x[i];
	}
	sort(x,x+n);
	cout<<x[0]<<" "<<x[n-1]<<" "<<sum<<endl;
	return 0;
}

Compiler output:
a.cc:4:11: error: 'long long long' is too long for GCC
    4 | long long long int x[10000],n,sum;
      |           ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
long int x[10000],n,sum;
 int main(){
   sin>>n;
    for(int i=0,i<n,i++){
       cin>>x[i];
       sum=sum+x[i];
}
  sort(x,x+n);
  cout<<x[0]<<" "<<x[n-1]<<" "<<sum<<endl;
      return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: 'sin' was not declared in this scope
    6 |    sin>>n;
      |    ^~~
a.cc:7:18: error: expected ';' before '<' token
    7 |     for(int i=0,i<n,i++){
      |                  ^
      |                  ;
a.cc:7:18: error: expected primary-expression before '<' token
a.cc:7:24: error: expected ';' before ')' token
    7 |     for(int i=0,i<n,i++){
      |                        ^
      |                        ;
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
long int x[10000],n,sum;
 int main(){
   sin>>n;
    for(int i=0;i<n,i++){
       cin>>x[i];
       sum=sum+x[i];
}
  sort(x,x+n);
  cout<<x[0]<<" "<<x[n-1]<<" "<<sum<<endl;
      return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: 'sin' was not declared in this scope
    6 |    sin>>n;
      |    ^~~
a.cc:7:24: error: expected ';' before ')' token
    7 |     for(int i=0;i<n,i++){
      |                        ^
      |                        ;
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a[10000], n;
  int max = -1000000, min a = 1000000, sum = 0;

  cin >> n;
  for(int i = 0; i < 1000; i++) cin >> a[i];

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:27: error: expected initializer before 'a'
    6 |   int max = -1000000, min a = 1000000, sum = 0;
      |                           ^
a.cc:15:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   15 |     if(a[i] < min) min = a[i];
      |        ~~~~~^~~~~
a.cc:15:29: error: overloaded function with no contextual type information
   15 |     if(a[i] < min) min = a[i];
      |                             ^
a.cc:18:5: error: 'sum' was not declared in this scope
   18 |     sum += a[i];
      |     ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n;
  int max, min; long sum;

  cin >> n;
  long a[n];
  
  for(int i = 0; i < 1000; i++) cin >> a[i];

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: expected ';' before 'if'
   15 |     if(a[i] > max) max = a[i]
      |                              ^
      |                              ;
   16 |     if(a[i] < min) min = a[i];
      |     ~~
Language: C++

#include <iostream>
using namespace std;
int main() {
	int i;
	cin >> i;
	long long int a[i-1], s;
	s = 0;
	for (int j = 0; j < i ; j++ ) {
		cin >> a[j] ;
		s = s + a[j];
	}
	sort(a, a+i);
	cout << a[0] << " " << a[i-1] << " " << s << endl;
}		

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |         sort(a, a+i);
      |         ^~~~
      |         short
Language: C++

#include <iostream>
#include <stdio.h>
int min(int *p,int size){
  int min =0;
  min=p[0];
  
  for(int i=0;i<size;i++){
    if(min<p[i]){ min=p[i];}
  }
  return min;
}

int max(int *p,int size){
  int max = 0;
  max=p[0];
  for(int i=0;i<size;i++){
    if(max<p[i]){ max=p[i];}
  }
  return max;
}

int sum(int *p,int size){
  int sum =0;
  for(int i=0;i<size;i++){
    sum +=p[i];
  }
  return sum;
}
    


int main(){
  int size = 0;
  scanf("%d",&size);
  int numbers[size];
  for(int i=0;i<size;i++){
    scanf("%d",&numbers[i]);
  }
  int min=0,max=0,sum=0;
  min=min(numbers,size);
  max=max(numbers,size);
  sum=sum(numbers,size);
 
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:40:10: error: 'min' cannot be used as a function
   40 |   min=min(numbers,size);
      |       ~~~^~~~~~~~~~~~~~
a.cc:41:10: error: 'max' cannot be used as a function
   41 |   max=max(numbers,size);
      |       ~~~^~~~~~~~~~~~~~
a.cc:42:10: error: 'sum' cannot be used as a function
   42 |   sum=sum(numbers,size);
      |       ~~~^~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	long float N;
	cin >> N;
	long float sum = 0,num[10000];
	for (int i = 0; i < N; i++){
		cin >> num[i];
		sum = sum + num[i];
	}
	long float max0=num[0], min0=num[0];
	for (int i = 0; i < N; i++){
		if (max0 < num[i]){
			max0 = num[i];
		}
		if (min0 > num[i]){
			min0 = num[i];
		}
	}
	cout << min0 << " " << max0 << " " << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'long' specified with 'float'
    4 |         long float N;
      |         ^~~~
a.cc:6:9: error: 'long' specified with 'float'
    6 |         long float sum = 0,num[10000];
      |         ^~~~
a.cc:6:9: error: 'long' specified with 'float'
a.cc:11:9: error: 'long' specified with 'float'
   11 |         long float max0=num[0], min0=num[0];
      |         ^~~~
a.cc:11:9: error: 'long' specified with 'float'
Language: C++

#include <iostream>
using namespace std;

long long sum(int size,int ary[]);
int min(int size,int ary[]);
int max(int size,int ary[]);
int main(){
	int size=0;
	cin >>size;
	int nums[size];
	for(int i=0;i<size;i++){
		cin >> nums[i];
	}
	
	int a=0,b=0;
	long long c=0;
	a=min(size,nums);
	b=max(size,nums);
	c=sum(size,nums);
	cout <<a<<" "<<b<<" "<<c<<endl;

	return 0;	
}

long long sum(int size,int ary[]){
	long long ret=0;
	for(i=0;i<size+i++){
		ret +=ary[i];
	}
	return ret;
}

int min(int size,int ary[]){
	int ret=ary[0];
	for(int i=1;i<size;i++){
		if(ary[i]<ret) ret = ary[i];
	}
	return ret;
}

int max(int size,int ary[]){
	int ret=ary[0];
	for(int i=1;i<size;i++){
		if(ary[i]>ret) ret = ary[i];
	}
	return ret;
}

Compiler output:
a.cc: In function 'long long int sum(int, int*)':
a.cc:27:13: error: 'i' was not declared in this scope
   27 |         for(i=0;i<size+i++){
      |             ^
a.cc:27:27: error: expected ';' before ')' token
   27 |         for(i=0;i<size+i++){
      |                           ^
      |                           ;
Language: C++

#include <iostream>
using namespace std;

long long sum(int size,int ary[]);
int min(int size,int ary[]);
int max(int size,int ary[]);
int main(){
	int size=0;
	cin >>size;
	int nums[size];
	for(int i=0;i<size;i++){
		cin >> nums[i];
	}
	
	int a=0,b=0;
	long long c=0;
	a=min(size,nums);
	b=max(size,nums);
	c=sum(size,nums);
	cout <<a<<" "<<b<<" "<<c<<endl;

	return 0;	
}

long long sum(int size,int ary[]){
	long long ret=0;
	for(i=0;i<size;i++){
		ret +=ary[i];
	}
	return ret;
}

int min(int size,int ary[]){
	int ret=ary[0];
	for(int i=1;i<size;i++){
		if(ary[i]<ret) ret = ary[i];
	}
	return ret;
}

int max(int size,int ary[]){
	int ret=ary[0];
	for(int i=1;i<size;i++){
		if(ary[i]>ret) ret = ary[i];
	}
	return ret;
}

Compiler output:
a.cc: In function 'long long int sum(int, int*)':
a.cc:27:13: error: 'i' was not declared in this scope
   27 |         for(i=0;i<size;i++){
      |             ^
Language: C++

class MinMaxSumSolver {
int N, A[10010];
public:
void setup();
int min() {
return ...;
}
int max() {
return ...;
}
int sum() {
return ...;
}
void solve();
};
int main() {
auto_ptr<MinMaxSumSolver> solver(new MinMaxSumSolver());
solver->solve();
}

Compiler output:
a.cc: In member function 'int MinMaxSumSolver::min()':
a.cc:6:8: error: expected primary-expression before '...' token
    6 | return ...;
      |        ^~~
a.cc:6:8: error: expected ';' before '...' token
a.cc:6:8: error: expected primary-expression before '...' token
a.cc: In member function 'int MinMaxSumSolver::max()':
a.cc:9:8: error: expected primary-expression before '...' token
    9 | return ...;
      |        ^~~
a.cc:9:8: error: expected ';' before '...' token
a.cc:9:8: error: expected primary-expression before '...' token
a.cc: In member function 'int MinMaxSumSolver::sum()':
a.cc:12:8: error: expected primary-expression before '...' token
   12 | return ...;
      |        ^~~
a.cc:12:8: error: expected ';' before '...' token
a.cc:12:8: error: expected primary-expression before '...' token
a.cc: In function 'int main()':
a.cc:17:1: error: 'auto_ptr' was not declared in this scope
   17 | auto_ptr<MinMaxSumSolver> solver(new MinMaxSumSolver());
      | ^~~~~~~~
a.cc:17:25: error: expected primary-expression before '>' token
   17 | auto_ptr<MinMaxSumSolver> solver(new MinMaxSumSolver());
      |                         ^
a.cc:17:27: error: 'solver' was not declared in this scope
   17 | auto_ptr<MinMaxSumSolver> solver(new MinMaxSumSolver());
      |                           ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <iomanip>
#include <cmath>
using namespace std;


int main(void){

	int max,min,sum,N;
	cin >> N;
	int temp;
	max = min = -10000000
	sum = 0;
	for(int i = 0; i < N; i++){
		cin >> temp;
		if(temp > max) max = temp;
		if(temp < min) min = temp;
		sum = sum + temp;
	}
	cout << min << " " << max << " " << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: expected ';' before 'sum'
   13 |         max = min = -10000000
      |                              ^
      |                              ;
   14 |         sum = 0;
      |         ~~~
Language: C++

#include <iostream>
#include <vector>
#include <iomanip>
#include <cmath>
using namespace std;


int main(void){

	__int64 sum;
	int max, min, N;
	cin >> N;
	int temp;
	for(int i = 0; i < N; i++){
		cin >> temp;
		if(i == 0){
			sum = temp;
			min = temp;
			max = temp;
		}
		else{
			if(temp > max) max = temp;
			if(temp < min) min = temp;
			sum = sum + temp;
		}
		
	}
	cout << min << " " << max << " " << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
   10 |         __int64 sum;
      |         ^~~~~~~
      |         __ynf64
a.cc:17:25: error: 'sum' was not declared in this scope
   17 |                         sum = temp;
      |                         ^~~
a.cc:24:25: error: 'sum' was not declared in this scope
   24 |                         sum = sum + temp;
      |                         ^~~
a.cc:28:45: error: 'sum' was not declared in this scope
   28 |         cout << min << " " << max << " " << sum << endl;
      |                                             ^~~
Language: C++

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

int main(){
int a[1000000],n,MIN,MAX,SUM
MIN=100000000;
MAX=-100000000;
SUM=0;
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
if(MIN>a[i]){
MIN=a[i];
}
if(MAX<a[i]){
MAX=a[i];
}
SUM += a[i];
}
cout<<MIN<<" "<<MAX<<" "<<SUM<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected initializer before 'MIN'
    7 | MIN=100000000;
      | ^~~
a.cc:9:1: error: 'SUM' was not declared in this scope
    9 | SUM=0;
      | ^~~
Language: C++

#include<stdio.h>

int main(void)
{
	int n,i,min,max;
	__int64 sum;
	int a[10000];
	scanf("%d",&n);
	if(0<n && n<=10000){
		for(i=0;i<n;i++){
			scanf("%7d",&a[i]);
			if(-1000000 >= a[i] && a[i]>=1000000) a[i]=0;
		}
		min=max=sum=a[0];
		for(i=1;i<n;i++){
			sum+=a[i];
			if(min>a[i]) min=a[i];
			if(max<a[i]) max=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: '__int64' was not declared in this scope; did you mean '__int64_t'?
    6 |         __int64 sum;
      |         ^~~~~~~
      |         __int64_t
a.cc:14:25: error: 'sum' was not declared in this scope
   14 |                 min=max=sum=a[0];
      |                         ^~~
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
#include <unordered_map>
#include <math.h>
using namespace std;
#define _USE_MATH_DEFINES

int main() {
	int n,tmp;
	int min1 = 1e10;
	int max1 = -1e10;
	int sum = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> tmp;
		sum += tmp;
		if (tmp < min1)
			min1 = tmp;
		if (tmp > max)
			max1 = tmp;
	}
	cout << min1 << " " << max1 << " " << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+10' to '2147483647' [-Woverflow]
   14 |         int min1 = 1e10;
      |                    ^~~~
a.cc:15:20: warning: overflow in conversion from 'double' to 'int' changes value from '-1.0e+10' to '-2147483648' [-Woverflow]
   15 |         int max1 = -1e10;
      |                    ^~~~~
a.cc:23:25: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>'
   23 |                 if (tmp > max)
      |                     ~~~~^~~~~
Language: C++

#include<stdio.h>
#include<string.h>
#define N 256

int main(){
  int min=1000000,Max=-1000000,Sum,m,i,q;
  char a[N],z;
  char *x;
  int y[N];
  scanf("%d\n",&m);
  fgets(a,sizeof(a),stdin);
  x = strtok(a," ");
    while(x != NULL){
      q = atoi(x);
      if(q < min){
        min = q;
      }
      if(q > Max){
        Max = q;
      }
      Sum += q;
      x = strtok(NULL," ");
    }
  printf("%d %d %d\n",min,Max,Sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'atoi' was not declared in this scope
   14 |       q = atoi(x);
      |           ^~~~
Language: C++

#include<stdio.h>
#include<string.h>
#define N 256

int main(){
  int min=1000000,Max=-1000000,Sum,m,i=0,q;
  char a[N],z;
  char *x;
  int y[N];
  scanf("%d\n",&m);
  fgets(a,sizeof(a),stdin);
  x = strtok(a," ");
    while(x != NULL){
      if(i == m){
	break;
      }
      q = atoi(x);
      if(q < min){
        min = q;
      }
      if(q > Max){
        Max = q;
      }
      Sum += q;
      x = strtok(NULL," ");
      i++;
    }
  printf("%d %d %d\n",min,Max,Sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'atoi' was not declared in this scope
   17 |       q = atoi(x);
      |           ^~~~
Language: C++

#include<stdio.h>
#include<string.h>
#define N 256

int main(){
  long long min=1000000,Max=-1000000,Sum;
  int m,i=0,q;
  char a[N];
  char *x;
  scanf("%d\n",&m);
  fgets(a,sizeof(a),stdin);
  x = strtok(a," ");
    while(x != NULL){
      if(i == m){
	break;
      }
      q = atoi(x);
      if(q < min){
        min = q;
      }
      if(q > Max){
        Max = q;
      }
      Sum += q;
      x = strtok(NULL," ");
      i++;
    }
  printf("%lld %lld %lld\n",min,Max,Sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'atoi' was not declared in this scope
   17 |       q = atoi(x);
      |           ^~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
    int n, a;
    int min = INT_MAX;
    int max = INT_MIN;
    long long sum = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> a;
        min = a < min ? a : min;
        max = a > max ? a : max;
        sum += a;
    }
    cout << min << ' ' << max << ' ' << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'INT_MAX' was not declared in this scope
    6 |     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<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:7:15: error: 'INT_MIN' was not declared in this scope
    7 |     int max = INT_MIN;
      |               ^~~~~~~
a.cc:7:15: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include<iostream>
using namespace std;
int main(){
	long long n,i=1,max=1000000,min=-100000,sum,a;
	cin>>n;
	while(i<=n){
			cin>>a;
			if(a<min) min=a;
			if(a>max) max=a;
			sum+=a;
			i++
		}
		cout<<min<<" "<<max<<" "<<sum<<endl;
		return 0;
		}
		
			

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ';' before '}' token
   11 |                         i++
      |                            ^
      |                            ;
   12 |                 }
      |                 ~
Language: C++

include<cstdio>
include<iostream>
using namesace std;

int main(){
 int n,x,min = 1000000,max = -1000000,i;
 long long sum;

 cin >> n;

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

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

 return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<cstdio>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:2: error: 'cin' was not declared in this scope; did you mean 'min'?
    9 |  cin >> n;
      |  ^~~
      |  min
a.cc:20:2: error: 'cout' was not declared in this scope
   20 |  cout << min << " " << max << " " << sum << endl;
      |  ^~~~
a.cc:20:45: error: 'endl' was not declared in this scope
   20 |  cout << min << " " << max << " " << sum << endl;
      |                                             ^~~~
Language: C++

#include<cstdio>
#include<iostream>
using namesace std;

int main(){
 int n,x,min = 1000000,max = -1000000,i;
 long long sum;

 cin >> n;

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

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

 return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesace'
    3 | using namesace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:9:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |  cin >> n;
      |  ^~~
      |  std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:20:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |  cout << min << " " << max << " " << 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:20:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |  cout << min << " " << max << " " << sum << 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: C++

#include <iostream>
using namespace std;

int main(void){
	int n,max,min,sum = 0;
	cin >> n;
	double *a = new double[n];
	cin >> b[n];
	max = a[0];
	min = a[0];

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'b' was not declared in this scope
    8 |         cin >> b[n];
      |                ^
a.cc:12:13: error: 'i' was not declared in this scope
   12 |         for(i = 0;i < n;i++){
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main() {
int n;
long long a;
long long minValue = 1000000;
long long maxValue = -1000000;
long long sum=0;

cin>>n;
for(int i=0; i<n; i++){
cin>>a;
if(a<minValue) minValue=a;
if(a>maxValue) maxValue=a;
sum+= a;
}
cout<< minValue <<" "<<maxvalue <<" "<< sum << endl;
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: 'maxvalue' was not declared in this scope; did you mean 'maxValue'?
   18 | cout<< minValue <<" "<<maxvalue <<" "<< sum << endl;
      |                        ^~~~~~~~
      |                        maxValue
Language: C++

#include <iostream>
using namespace std;
#define N_MAX 100000

int main(){
	int n;
	int value[N_MAX];
	int sum = 0;
	cin >> n;
	for (i = 0, i < n; i++){
		cin >> value[i];
		sum += value[i];
	}
	cout << min(value) << max(value) << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'i' was not declared in this scope
   10 |         for (i = 0, i < n; i++){
      |              ^
a.cc:10:31: error: expected ';' before ')' token
   10 |         for (i = 0, i < n; i++){
      |                               ^
      |                               ;
a.cc:14:20: error: no matching function for call to 'min(int [100000])'
   14 |         cout << min(value) << max(value) << sum << endl;
      |                 ~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:14:34: error: no matching function for call to 'max(int [100000])'
   14 |         cout << min(value) << max(value) << sum << endl;
      |                               ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <iostream>
using namespace std;
#define N_MAX 100000

int main(){
	int n, i;
	int value[N_MAX];
	int sum = 0;
	cin >> n;
	for (i = 0, i < n; i++){
		cin >> value[i];
		sum += value[i];
	}
	cout << min(value) << max(value) << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: expected ';' before ')' token
   10 |         for (i = 0, i < n; i++){
      |                               ^
      |                               ;
a.cc:14:20: error: no matching function for call to 'min(int [100000])'
   14 |         cout << min(value) << max(value) << sum << endl;
      |                 ~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:14:34: error: no matching function for call to 'max(int [100000])'
   14 |         cout << min(value) << max(value) << sum << endl;
      |                               ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <iostream>
using namespace std;
#define N_MAX 100000

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: expected ';' before ')' token
   10 |         for (i = 0, i < n; i++){
      |                               ^
      |                               ;
a.cc:14:20: error: no matching function for call to 'min(int [n])'
   14 |         cout << min(value) << max(value) << sum << endl;
      |                 ~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:14:34: error: no matching function for call to 'max(int [n])'
   14 |         cout << min(value) << max(value) << sum << endl;
      |                               ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <iostream>
using namespace std;
#define N_MAX 100000

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: expected ';' before ')' token
   10 |         for (i = 0, i < n; i++){
      |                               ^
      |                               ;
a.cc:14:20: error: no matching function for call to 'min(int [n])'
   14 |         cout << min(value) << max(value) << sum << endl;
      |                 ~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:14:34: error: no matching function for call to 'max(int [n])'
   14 |         cout << min(value) << max(value) << sum << endl;
      |                               ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

int main()
{
	int a[10000];
	int n;
	int max = -20000000;
	int min = 20000000;
	long long int sum = 0;
	std::cin >> n;
	int i;
	for (i = 0; i < n; i++){
		std::cin >> a[i];
		if (max < a[i])
			max = a[i];
		if (min > a[i])
			min = a[i];
		sum += a[i];
	}
	printf("%d %d %lld\n", min, max, sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'cin' is not a member of 'std'
    8 |         std::cin >> n;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:11:22: error: 'cin' is not a member of 'std'
   11 |                 std::cin >> a[i];
      |                      ^~~
a.cc:11:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:9: error: 'printf' was not declared in this scope
   18 |         printf("%d %d %lld\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()
Language: C++

#include <cstdio>
int main()
{
 long M,m,sum,d;
 int n;
 sum=0;
 scanf("%d",&n);
 M=-1000000;
 m=1000000;
 for(i=0;i<n;i++){
  scanf("%ld",&d);
  M=(M<d)?d:M;
  m=(m<d)?m:d;
  sum += d;
 }
 printf("%d %d %d\n",m,M,sum);
 return 0;
};

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

n=int(input())
a=[0]*n
sum=0
for i in range(n):
 a[i]= int(input())
 sum=sum+a[i]
a.sort()

print'a[0],a[n-1],sum'

Compiler output:
a.cc:9:6: warning: multi-character literal with 15 characters exceeds 'int' size of 4 bytes
    9 | print'a[0],a[n-1],sum'
      |      ^~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: cannot convert 'long int*' to 'int*' in initialization
    7 |     int *a = new long int[n];
      |                            ^
      |                            |
      |                            long int*
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before '<' token
   12 |         for(int i=1,i<n,i++){
      |                      ^
      |                      ;
a.cc:12:22: error: expected primary-expression before '<' token
a.cc:12:28: error: expected ';' before ')' token
   12 |         for(int i=1,i<n,i++){
      |                            ^
      |                            ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before '<' token
   12 |         for(int i=0,i<n,i++){
      |                      ^
      |                      ;
a.cc:12:22: error: expected primary-expression before '<' token
a.cc:12:28: error: expected ';' before ')' token
   12 |         for(int i=0,i<n,i++){
      |                            ^
      |                            ;
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
#define nMAX 10000
#define aMAX 1000000


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

  do{
    cin >> n;
  while(n >= 0 || n > nMAX);
  for(int i = 0;i < n;i++){
    cin >> a[i];
  }

  max = -1 * aMAX;
  min = a[0];
 
  for(int i = 1;i < n;i++){
    max = max(max,a[i]);
    min = min(min,a[i]);
    sum += a[i];
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: 'max' cannot be used as a function
   24 |     max = max(max,a[i]);
      |           ~~~^~~~~~~~~~
a.cc:25:14: error: 'min' cannot be used as a function
   25 |     min = min(min,a[i]);
      |           ~~~^~~~~~~~~~
a.cc:32:2: error: expected 'while' at end of input
   32 | }
      |  ^
a.cc:32:2: error: expected '(' at end of input
   32 | }
      |  ^
      |  (
a.cc:32:2: error: expected primary-expression at end of input
a.cc:32:2: error: expected ')' at end of input
   32 | }
      |  ^
      |  )
a.cc:32:2: error: expected ';' at end of input
   32 | }
      |  ^
      |  ;
a.cc:32:2: error: expected '}' at end of input
a.cc:10:1: note: to match this '{'
   10 | {
      | ^
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
#define nMAX 10000
#define aMAX 1000000


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

  do{
    cin >> n;
  }while(n >= 0 || n > nMAX);
  for(int i = 0;i < n;i++){
    cin >> a[i];
  }

  max = -1 * aMAX;
  min = a[0];
 
  for(int i = 1;i < n;i++){
    max = max(max,a[i]);
    min = min(min,a[i]);
    sum += a[i];
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: 'max' cannot be used as a function
   24 |     max = max(max,a[i]);
      |           ~~~^~~~~~~~~~
a.cc:25:14: error: 'min' cannot be used as a function
   25 |     min = min(min,a[i]);
      |           ~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
#define nMAX 10000
#define aMAX 1000000


int main(void)
{
  int n,a[aMAX],minv,maxv,sum;

  do{
    cin >> n;
  }while(n >= 0 || n > nMAX);
  for(int i = 0;i < n;i++){
    cin >> a[i];
  }

  max = -1 * aMAX;
  min = a[0];
 
  for(int i = 1;i < n;i++){
    maxv = max(maxv,a[i]);
    minv = min(minv,a[i]);
    sum += a[i];
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: overloaded function with no contextual type information
    6 | #define aMAX 1000000
      |              ^~~~~~~
a.cc:20:14: note: in expansion of macro 'aMAX'
   20 |   max = -1 * aMAX;
      |              ^~~~
a.cc:21:12: error: overloaded function with no contextual type information
   21 |   min = a[0];
      |            ^
a.cc:29:9: error: overloaded function with no contextual type information
   29 |   printf("%d %d %d\n",min,max,sum);
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
#define nMAX 10000
#define aMAX 1000000


int main(void)
{
  int n,a[aMAX],minv,maxv,sum;

  do{
    cin >> n;
  }while(n >= 0 || n > nMAX);
  for(int i = 0;i < n;i++){
    cin >> a[i];
  }

  maxv = -1 * aMAX;
  minv = a[0];
 
  for(int i = 1;i < n;i++){
    maxv = max(maxv,a[i]);
    minv = min(minv,a[i]);
    sum += a[i];
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: overloaded function with no contextual type information
   29 |   printf("%d %d %d\n",min,max,sum);
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm)
#define nMAX 10000
#define aMAX 1000000
using namespace std;

int main(void)
{
  int n,a[nMAX];
  long maxv,minv,sum;

  do{
    cin >> n;
  }while(n <= 0 || n > nMAX);

  while(1){
    int flag = 1;
    for(int i = 0;i < n;i++){
      cin >> a[i];
      if(a[i] > aMAX || a[i] < -1 * aMAX) flag = 0;
    }
    if( flag == 1) break;
  }
  
  maxv = -1 * aMAX;
  minv = a[0];

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

  printf("%ld %ld %ld\n",maxv,minv,sum);
  
  return 0;
} 
    

Compiler output:
a.cc:3:20: error: missing terminating > character
    3 | #include<algorithm)
      |                    ^
a.cc:3:9: fatal error: algorithm): No such file or directory
    3 | #include<algorithm)
      |         ^
compilation terminated.