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

#include <stdio.h>
  
int main(){
   int i, n, max, min, sum;
   c=0;
   scanf("%d",&n);
   int a[10000];
   for(i=0;i < n;i++){
       scanf("%d",&a[i]);
   }
   max=a[0];
   min=a[0];
   sum=0;
   for(i=0;i < n;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:5:4: error: 'c' was not declared in this scope
    5 |    c=0;
      |    ^
Language: C++

#include<stdio.h>

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

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

#include<stdio.h>

int main(){

int i, n;
long int max, min, sum;
int a[10000]=0;

scanf("%d", &n);

for(i=0;i<n;i++){
scanf("%d", &a[]);
max=a[0];
min=a[0];

if(a[i]>max)
max=a[i];

if(a[i]<min)
min=a[i];

sum+=a[i];
}
printf("%d %d %d", min, max, sum);

returm 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: array must be initialized with a brace-enclosed initializer
    7 | int a[10000]=0;
      |              ^
a.cc:12:16: error: expected primary-expression before ']' token
   12 | scanf("%d", &a[]);
      |                ^
a.cc:26:1: error: 'returm' was not declared in this scope
   26 | returm 0;
      | ^~~~~~
Language: C++

#include <stdio.h>

int main(){
  int n, max, min, sum = 0, a, box[30];
  scanf("%d\n",&n);
  for("a = 1; a <= n; a++){
    scanf("%d\n",&box[a]);
    if("box[a] >= box[a-1])
      max = box[a];
    else
      min = box[a-1];
    
    sum = sum + box[a];
  }

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

return 0;
}

Compiler output:
a.cc:6:7: warning: missing terminating " character
    6 |   for("a = 1; a <= n; a++){
      |       ^
a.cc:6:7: error: missing terminating " character
    6 |   for("a = 1; a <= n; a++){
      |       ^~~~~~~~~~~~~~~~~~~~~
a.cc:8:8: warning: missing terminating " character
    8 |     if("box[a] >= box[a-1])
      |        ^
a.cc:8:8: error: missing terminating " character
    8 |     if("box[a] >= box[a-1])
      |        ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: expected primary-expression before 'if'
    8 |     if("box[a] >= box[a-1])
      |     ^~
a.cc:7:27: error: expected ';' before 'if'
    7 |     scanf("%d\n",&box[a]);
      |                           ^
      |                           ;
    8 |     if("box[a] >= box[a-1])
      |     ~~                     
a.cc:8:5: error: expected primary-expression before 'if'
    8 |     if("box[a] >= box[a-1])
      |     ^~
a.cc:7:27: error: expected ')' before 'if'
    7 |     scanf("%d\n",&box[a]);
      |                           ^
      |                           )
    8 |     if("box[a] >= box[a-1])
      |     ~~                     
a.cc:6:6: note: to match this '('
    6 |   for("a = 1; a <= n; a++){
      |      ^
a.cc:10:5: error: expected primary-expression before 'else'
   10 |     else
      |     ^~~~
a.cc:9:20: error: expected ')' before 'else'
    9 |       max = box[a];
      |                    ^
      |                    )
   10 |     else
      |     ~~~~            
a.cc:8:7: note: to match this '('
    8 |     if("box[a] >= box[a-1])
      |       ^
a.cc: At global scope:
a.cc:16:9: error: expected constructor, destructor, or type conversion before '(' token
   16 |   printf("%d %d %d\n", min, max, sum);
      |         ^
a.cc:18:1: error: expected unqualified-id before 'return'
   18 | return 0;
      | ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<stdio.h>

int main(){

int i, n;
long int max, min, sum;
int a[10000];

scanf("%d", &n);

for(i=0;i<n;i++){
scanf("%d", &a[]);
max=a[0];
min=a[0];

if(a[i]>max)
max=a[i];

if(a[i]<min)
min=a[i];

sum+=a[i];
}
printf("%d %d %d", min, max, sum);

returm 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected primary-expression before ']' token
   12 | scanf("%d", &a[]);
      |                ^
a.cc:26:1: error: 'returm' was not declared in this scope
   26 | returm 0;
      | ^~~~~~
Language: C++

#include<stdio.h>

int main(void){

int i, n;
long int max, min, sum;
int a[10000];

scanf("%d", &n);

for(i=0;i<n;i++){
scanf("%d", &a[]);
max=a[0];
min=a[0];

if(a[i]>max)
max=a[i];

if(a[i]<min)
min=a[i];

sum+=a[i];
}
printf("%d %d %d", min, max, sum);

returm 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected primary-expression before ']' token
   12 | scanf("%d", &a[]);
      |                ^
a.cc:26:1: error: 'returm' was not declared in this scope
   26 | returm 0;
      | ^~~~~~
Language: C++

#include<stdio.h>

int main(){

int i, n;
long int max, min, sum;
int a[10000];

scanf("%d", &n);

for(i=0;i<n;i++){
scanf("%d", &a[i]);
max=a[0];
min=a[0];

if(a[i]>max)
max=a[i];

if(a[i]<min)
min=a[i];

sum+=a[i];
}
printf("%d %d %d", min, max, sum);

returm 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:1: error: 'returm' was not declared in this scope
   26 | returm 0;
      | ^~~~~~
Language: C++

#include<stdio.h>

int main(){

int i, n;
long int max, min, sum;
int a[10000]=0;

scanf("%d", &n);

for(i=0;i<n;i++){
scanf("%d", &a[i]);
max=a[0];
min=a[0];

if(a[i]>max)
max=a[i];

if(a[i]<min)
min=a[i];

sum+=a[i];
}
printf("%d %d %d", min, max, sum);

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: array must be initialized with a brace-enclosed initializer
    7 | int a[10000]=0;
      |              ^
Language: C++

#include <stdio.h>

int main(){
  int n, max, min, sum = 0, a, box[30] = 0;
  scanf("%d\n",&n);
  for("a = 1; a <= n; a++){
    scanf("%d\n",&box[a]);
    if("box[a] >= box[a-1])
      max = box[a];
    else
      min = box[a-1];
    
    sum = sum + box[a];
  }

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

return 0;
}

Compiler output:
a.cc:6:7: warning: missing terminating " character
    6 |   for("a = 1; a <= n; a++){
      |       ^
a.cc:6:7: error: missing terminating " character
    6 |   for("a = 1; a <= n; a++){
      |       ^~~~~~~~~~~~~~~~~~~~~
a.cc:8:8: warning: missing terminating " character
    8 |     if("box[a] >= box[a-1])
      |        ^
a.cc:8:8: error: missing terminating " character
    8 |     if("box[a] >= box[a-1])
      |        ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:4:42: error: array must be initialized with a brace-enclosed initializer
    4 |   int n, max, min, sum = 0, a, box[30] = 0;
      |                                          ^
a.cc:8:5: error: expected primary-expression before 'if'
    8 |     if("box[a] >= box[a-1])
      |     ^~
a.cc:7:27: error: expected ';' before 'if'
    7 |     scanf("%d\n",&box[a]);
      |                           ^
      |                           ;
    8 |     if("box[a] >= box[a-1])
      |     ~~                     
a.cc:8:5: error: expected primary-expression before 'if'
    8 |     if("box[a] >= box[a-1])
      |     ^~
a.cc:7:27: error: expected ')' before 'if'
    7 |     scanf("%d\n",&box[a]);
      |                           ^
      |                           )
    8 |     if("box[a] >= box[a-1])
      |     ~~                     
a.cc:6:6: note: to match this '('
    6 |   for("a = 1; a <= n; a++){
      |      ^
a.cc:10:5: error: expected primary-expression before 'else'
   10 |     else
      |     ^~~~
a.cc:9:20: error: expected ')' before 'else'
    9 |       max = box[a];
      |                    ^
      |                    )
   10 |     else
      |     ~~~~            
a.cc:8:7: note: to match this '('
    8 |     if("box[a] >= box[a-1])
      |       ^
a.cc: At global scope:
a.cc:16:9: error: expected constructor, destructor, or type conversion before '(' token
   16 |   printf("%d %d %d\n", min, max, sum);
      |         ^
a.cc:18:1: error: expected unqualified-id before 'return'
   18 | return 0;
      | ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <stdio.h>

int main(){
  int n, max, min, sum = 0, a, box[30] = 0;
  scanf("%d\n",&n);
  for(a = 1; a <= n; a++){
    scanf("%d\n",&box[a]);
    if(box[a] >= box[a-1])
      max = box[a];
    else
      min = box[a-1];
    
    sum = sum + box[a];
  }

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

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:42: error: array must be initialized with a brace-enclosed initializer
    4 |   int n, max, min, sum = 0, a, box[30] = 0;
      |                                          ^
Language: C++

#include<stdio.h>

int main(){

int i, n, min, max;
long int sum;
int a[10000];

scanf("%d", &n);

for(i=0;i<n;i++)
scanf("%d", &a[i]);

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

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

return 0;
}

Compiler output:
a.cc:25:8: warning: missing terminating " character
   25 | printf("%d %d %d\n min, max, sum);
      |        ^
a.cc:25:8: error: missing terminating " character
   25 | printf("%d %d %d\n min, max, sum);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:27:1: error: expected primary-expression before 'return'
   27 | return 0;
      | ^~~~~~
Language: C++

#include<stdio.h>

int main(){

int i, n, min, max;
long int sum;
int a[10000];

scanf("%d", &n);

for(i=0;i<n;i++)
scanf("%d", &a[i]);

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

for(i=1;i<n;i++){
if(a[i]>max)
max=a[i];
if(a[i]<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:25:20: error: expected ')' before 'min'
   25 | printf("%d %d %d\n" min, max, sum);
      |       ~            ^~~~
      |                    )
Language: C++

#include <stdio.h>

int main(){
  int n, max = 0, min = 0, sum = 0, a, box[30] = 0;
  scanf("%d\n",&n);
  for(a = 0; a < n; a++){
    scanf("%d\n",&box[a]);
    if(box[a] > max)
      max = box[a];

    if(box[a] < min)
      min = box[a];
    
    sum = sum + box[a];
  }

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

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:50: error: array must be initialized with a brace-enclosed initializer
    4 |   int n, max = 0, min = 0, sum = 0, a, box[30] = 0;
      |                                                  ^
Language: C++

#include <iostream>

int main() {
    int min = INT_MAX;
    int max = -INT_MAX;
    int sum = 0;
    int n;

    std::cin >> n;
    for (int i = 0; i < n; i++) {
        int d;
        std::cin >> d;
        if (min > d) min = d;
        if (max < d) max = d;
        sum += d;
    }

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: 'INT_MAX' was not declared in this scope
    4 |     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 |
Language: C++

#include <iostream>

#define _INT_MAX = 10000000

int main() {
    int min = _INT_MAX;
    int max = -_INT_MAX;
    int sum = 0;
    int n;

    std::cin >> n;
    for (int i = 0; i < n; i++) {
        int d;
        std::cin >> d;
        if (min > d) min = d;
        if (max < d) max = d;
        sum += d;
    }

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:18: error: expected primary-expression before '=' token
    3 | #define _INT_MAX = 10000000
      |                  ^
a.cc:6:15: note: in expansion of macro '_INT_MAX'
    6 |     int min = _INT_MAX;
      |               ^~~~~~~~
a.cc:3:18: error: expected primary-expression before '=' token
    3 | #define _INT_MAX = 10000000
      |                  ^
a.cc:7:16: note: in expansion of macro '_INT_MAX'
    7 |     int max = -_INT_MAX;
      |                ^~~~~~~~
Language: C++

#include <stdio.h>
 
int main(){
 
   int box[10000];
   int i, n, max, min;
   long int max = 0;
 
   scanf("%d", &n);
   for (i = 0; i < n; i++){
      scanf("%d", &box[i]);
      max = max + box[i];
   }
 
   max = box[0];
   min = box[0];
 
   for (i = 0; i < n; i++){
      if (max < box[i])
        max = box[i];
      if (min > box[i])
        min = box[i];
   }
 
   printf("%d %d %ld\n", min, max, box);
 
   return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: conflicting declaration 'long int max'
    7 |    long int max = 0;
      |             ^~~
a.cc:6:14: note: previous declaration as 'int max'
    6 |    int i, n, max, min;
      |              ^~~
Language: C++

#include <iostream>
using namespace std;

const long long LINF = 0x3f3f3f3f3f3f3f3f;

int main() {
  int n, a;
  long long ma = -INF, mi = INF, sum = 0;
  cin >> n;
  for (int i=0; i<n; i++) {
    cin >> a;
    ma = (ma < a) ? a : ma;
    mi = (mi > a) ? a : mi;
    sum += a;
  }
  cout << mi << " " << ma << " " << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'INF' was not declared in this scope; did you mean 'LINF'?
    8 |   long long ma = -INF, mi = INF, sum = 0;
      |                   ^~~
      |                   LINF
a.cc:13:5: error: 'mi' was not declared in this scope; did you mean 'i'?
   13 |     mi = (mi > a) ? a : mi;
      |     ^~
      |     i
a.cc:14:5: error: 'sum' was not declared in this scope
   14 |     sum += a;
      |     ^~~
a.cc:16:11: error: 'mi' was not declared in this scope; did you mean 'ma'?
   16 |   cout << mi << " " << ma << " " << sum << endl;
      |           ^~
      |           ma
a.cc:16:37: error: 'sum' was not declared in this scope
   16 |   cout << mi << " " << ma << " " << sum << endl;
      |                                     ^~~
Language: C++

#include<iostream>
#include<string>
#include <vector>
#include<algorithm>
#include<numeric>
using namespace std;

long main()
{
	long a,x,sum,count;
	cin >> a;
	count = 0;
	vector<int> num(a);
	
	for (long i = 0; i < num.size();i++) {
		cin >> x;
		num[i]=x;
		count++;
		if (count == a)break;
	}
	sort(num.begin(), num.end());
	sum = accumulate(num.begin(), num.end(), 0);
	cout << num.front() <<" "<<num.back()<<" "<<sum<< endl;
	return 0;
}

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

#include"stdafx.h"
#include<iostream>
#include<string>
#include <vector>
#include<algorithm>
#include<numeric>
using namespace std;

int main()
{
	long a,x,sum,i;
	cin >> a;
	vector<long> num(a);
	
	for (i = 0; i < num.size();i++) {
		cin >> x;
		num[i]=x;
		if (i == a)break;
	}
	sort(num.begin(), num.end());
	sum = accumulate(num.begin(), num.end(), 0);
	cout << num.front() <<" "<<num.back()<<" "<<sum<< endl;
	return 0;
}

Compiler output:
a.cc:1:9: fatal error: stdafx.h: No such file or directory
    1 | #include"stdafx.h"
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h> int main(void) {

int i,n;

int number;

long long int sum=0;

int min=0;

int max=0;

scanf("%d",&n);

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

{

scanf("%d",&number);

if(i==0)

{

min = number;

max = number;

}

if(number<min) min = number;

if(number>max)max = number;

sum += number;

}

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

return 0;

}

Compiler output:
a.cc:1:19: warning: extra tokens at end of #include directive
    1 | #include<stdio.h> int main(void) {
      |                   ^~~
a.cc:13:6: error: expected constructor, destructor, or type conversion before '(' token
   13 | scanf("%d",&n);
      |      ^
a.cc:15:1: error: expected unqualified-id before 'for'
   15 | for(i=0;i<n;i++)
      | ^~~
a.cc:15:9: error: 'i' does not name a type
   15 | for(i=0;i<n;i++)
      |         ^
a.cc:15:13: error: 'i' does not name a type
   15 | for(i=0;i<n;i++)
      |             ^
a.cc:39:7: error: expected constructor, destructor, or type conversion before '(' token
   39 | printf("%d %d %lld\n",min,max,sum);
      |       ^
a.cc:41:1: error: expected unqualified-id before 'return'
   41 | return 0;
      | ^~~~~~
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
Language: C++

#include <iostream>
#include <utility>
#include <cstdio>
#include <cmath>
using namespace std;




//---- Min, Max and Sum
//????°????????????§??????????¨????????????????????????§????????????????????????????????????
int main(){
    int n, a, min=INT_MAX, max=INT_MIN, sum=0;
    scanf("%d", &n);
    for(int i=0; i<n; i++){
        scanf("%d", &a);
        if(a<min){
            min=a;
        }
        if(a>max){
            max=a;
        }
        sum = sum+a;
    }
    printf("%d %d %d\n", min, max, sum);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'INT_MAX' was not declared in this scope
   13 |     int n, a, min=INT_MAX, max=INT_MIN, sum=0;
      |                   ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <cmath>
  +++ |+#include <climits>
    5 | using namespace std;
a.cc:20:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>'
   20 |         if(a>max){
      |            ~^~~~
a.cc:21:17: error: overloaded function with no contextual type information
   21 |             max=a;
      |                 ^
a.cc:23:9: error: 'sum' was not declared in this scope
   23 |         sum = sum+a;
      |         ^~~
a.cc:25:36: error: 'sum' was not declared in this scope
   25 |     printf("%d %d %d\n", min, max, sum);
      |                                    ^~~
Language: C++

#include <bits/stdc++.c>

using namespace std;

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

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

#include <bits/stdc++.c>

using namespace std;

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

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

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |                 if(max < num) max = num[i];
      |                    ~~~~^~~~~
a.cc:16:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                 if(min > num) min = num[i];
      |                    ~~~~^~~~~
Language: C++

#include<stdio.h>

int main(void)


{


   long long int a[10000],min=1000000,max=-1000000,sum=0;


   int n,i;


   scanf("%d",&n);


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


      scanf("%||d",&a[i]);


      if(a[i]>=max){


         max=a[i];


      }


      if(a[i]<=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:18:19: error: expected ';' before ')' token
   18 |    for(i=0;i<n,i++){
      |                   ^
      |                   ;
Language: C++

#include <iostream>
#include <algorithm>

int main(int argc, char **argv){
	int n = 0;
	int min = INT_MAX;
	int max = 0;
	int sum = 0;
	
	std::cin >> n;

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

		std::cin >> c;

		sum += c;
		min = std::min(c, min);
		max = std::max(c, max);
	}

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

	return 0;

}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:6:19: error: 'INT_MAX' was not declared in this scope
    6 |         int 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 |
Language: C++

#include <iostream>
using namespace std;
int main(){
	cin >> N
	int m = 1000000;
	int M = -1000000;
	int s = 0;
	for(int i = 0; i < N; i++){
		cin >> t;
		m = min(m,t);
		M = min(M,t);
		s += t
	}
	cout << m << M << s << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: 'N' was not declared in this scope
    4 |         cin >> N
      |                ^
a.cc:9:24: error: 't' was not declared in this scope
    9 |                 cin >> t;
      |                        ^
a.cc:10:17: error: 'm' was not declared in this scope
   10 |                 m = min(m,t);
      |                 ^
a.cc:14:17: error: 'm' was not declared in this scope
   14 |         cout << m << M << s << endl;
      |                 ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int N, m, M, s;
	cin >> N
	m = 1000000;
	M = -1000000;
	s = 0
	for(int i = 0; i < N; i++){
		cin >> t;
		m = min(m,t);
		M = min(M,t);
		s += t
	}
	cout << m << M << s << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected ';' before 'm'
    6 |         cin >> N
      |                 ^
      |                 ;
    7 |         m = 1000000;
      |         ~        
a.cc:9:14: error: expected ';' before 'for'
    9 |         s = 0
      |              ^
      |              ;
   10 |         for(int i = 0; i < N; i++){
      |         ~~~   
a.cc:10:24: error: 'i' was not declared in this scope
   10 |         for(int i = 0; i < N; i++){
      |                        ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int N, m, M, s;
	cin >> N;
	m = 1000000;
	M = -1000000;
	s = 0;
	for(int i = 0; i < N; i++){
		cin >> t;
		m = min(m,t);
		M = min(M,t);
		s += t;
	}
	cout << m << M << s << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 't' was not declared in this scope
   11 |                 cin >> t;
      |                        ^
Language: C++

#include <iostream>
#include <vector>
#include <numeric>
using namespace std;

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

	vector<int> numbers(n);
	for (int i=0; i<n; i++) {
	    cin >> numbers[i];
	}
	cout << *std::min_element(numbers.begin(), numbers.end()) << " " << *std::max_element(numbers.begin(), numbers.end()) << " " << std::accumulate(numbers.begin(), numbers.end(), 0) << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: 'min_element' is not a member of 'std'; did you mean 'tuple_element'?
   14 |         cout << *std::min_element(numbers.begin(), numbers.end()) << " " << *std::max_element(numbers.begin(), numbers.end()) << " " << std::accumulate(numbers.begin(), numbers.end(), 0) << endl;
      |                       ^~~~~~~~~~~
      |                       tuple_element
a.cc:14:83: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   14 |         cout << *std::min_element(numbers.begin(), numbers.end()) << " " << *std::max_element(numbers.begin(), numbers.end()) << " " << std::accumulate(numbers.begin(), numbers.end(), 0) << endl;
      |                                                                                   ^~~~~~~~~~~
      |                                                                                   tuple_element
Language: C++

#include <iostream>
#include <cassert>
#include <algorithm>
#include <vector>
#include <numeric>
using namespace std;

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

	vector<long int> numbers(n);
	for (int i=0; i<n; i++) {
	    cin >> numbers[i];
	}

	long int min = *std::min_element(numbers.begin(), numbers.end());
	long int max = *std::max_element(numbers.begin(), numbers.end());
	long int sum = std::accumulate(numbers.begin(), numbers.end(), 0);
	printf("%d %d %d", min, max, sum )

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:43: error: expected ';' before 'return'
   20 |         printf("%d %d %d", min, max, sum )
      |                                           ^
      |                                           ;
   21 | 
   22 |         return 0;
      |         ~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main() {
	int datas, max, min,  data;
	_int64 sum;
	cin >> datas;
	cin>>data;
	max = min = sum = data;
	for (int i = 1; i < datas; i++) {
		cin >> data;
		if (data > max)max = data;
		if (data < min)min = data;
		sum += data;
	}
	cout << min << " " << max << " " << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: '_int64' was not declared in this scope
    5 |         _int64 sum;
      |         ^~~~~~
a.cc:8:21: error: 'sum' was not declared in this scope
    8 |         max = min = sum = data;
      |                     ^~~
Language: C++

#include<stdio.h>
int main(void){
	int a,counta,n[10000],sum,p,o,t,min,max;
	scanf("%d", &a);
	for (counta = 1; counta <= a; counta++){
		scanf_s("%d", &n[counta]);
	}
	//min
	for (t = 0; a - t > 1; t++){
		if (n[a - (t + 1)] > n[a - t]){
			o = n[a - (t + 1)];
			p = n[a - t];
			n[a - (t + 1)] = p;
			n[a - t] = o;
		}
	}
	min = n[1];
	//max
	for (t = 0; a - t > 1; t++){
		if (n[a - (t + 1)] < n[a - t]){
			o = n[a - (t + 1)];
			p = n[a - t];
			n[a - (t + 1)] = p;
			n[a - t] = o;
		}
	}
	max = n[1];
	//sum
	counta = 0;
	sum = 0;
	for (counta = 1; counta <= a; counta++){
		sum = sum + n[counta];
	}
	printf("%d %d %d\n", min,max,sum);
return 0;
}

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

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    vector<long> r;
    long n;
    long c = 0;
    cin >> n;
    long sum = 0;
    long i;
    while(c < n && cin >> i){
        r.push_back(i);
        sum += i;
        ++c;
    }

    long max = *std::max_element(r.begin(), r.end());
    long min = *std::min_element(r.begin(), r.end());

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   21 |     long max = *std::max_element(r.begin(), r.end());
      |                      ^~~~~~~~~~~
      |                      tuple_element
a.cc:22:22: error: 'min_element' is not a member of 'std'; did you mean 'tuple_element'?
   22 |     long min = *std::min_element(r.begin(), r.end());
      |                      ^~~~~~~~~~~
      |                      tuple_element
Language: C++

#include<stdio.h>
int main(void){
int i,n;
int number;
long long int sum=0;
int min=0;
int max=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&number);
if(i==0){
??
min=number;
max=number;
}
if(number<min)min=number;
if(number>max)max=number;
sum+=number;
}
printf("%d %d %lld\n",min,max,sum);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: expected primary-expression before '?' token
   12 | ??
      | ^
a.cc:12:2: error: expected primary-expression before '?' token
   12 | ??
      |  ^
a.cc:13:11: error: expected ':' before ';' token
   13 | min=number;
      |           ^
      |           :
a.cc:13:11: error: expected primary-expression before ';' token
a.cc:13:11: error: expected ':' before ';' token
   13 | min=number;
      |           ^
      |           :
a.cc:13:11: error: expected primary-expression before ';' token
Language: C++

using System;

class P
{
public static void Main()
{
            //???????????????
            int n = Int32.Parse(Console.ReadLine());
            //???????????????
            var a = Console.ReadLine().Split(' ');
            


            //????°???????a[0]
            //?????§??????a[n - 1]

            //????´????????¨?
            int Sum = 0;
            int[] b = new [] {n};
            int i = 0;

            for (i = 0; i < n; i++)
            {
                b[i] = Int32.Parse(a[i]);
                Sum = Sum + b[i];
            }


            //??????????????????
            Array.Sort(b);

            //??????
            Console.WriteLine("{0} {1} {2}", b[0], b[n - 1], Sum);
}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:5:7: error: expected ':' before 'static'
    5 | public static void Main()
      |       ^~~~~~~
      |       :
a.cc:35:2: error: expected ';' after class definition
   35 | }
      |  ^
      |  ;
a.cc: In static member function 'static void P::Main()':
a.cc:8:21: error: 'Int32' was not declared in this scope
    8 |             int n = Int32.Parse(Console.ReadLine());
      |                     ^~~~~
a.cc:8:33: error: 'Console' was not declared in this scope
    8 |             int n = Int32.Parse(Console.ReadLine());
      |                                 ^~~~~~~
a.cc:10:13: error: 'var' was not declared in this scope
   10 |             var a = Console.ReadLine().Split(' ');
      |             ^~~
a.cc:19:16: error: structured binding declaration cannot have type 'int'
   19 |             int[] b = new [] {n};
      |                ^~
a.cc:19:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:19:16: error: empty structured binding declaration
a.cc:19:19: error: expected initializer before 'b'
   19 |             int[] b = new [] {n};
      |                   ^
a.cc:24:17: error: 'b' was not declared in this scope
   24 |                 b[i] = Int32.Parse(a[i]);
      |                 ^
a.cc:24:36: error: 'a' was not declared in this scope
   24 |                 b[i] = Int32.Parse(a[i]);
      |                                    ^
a.cc:30:13: error: 'Array' was not declared in this scope
   30 |             Array.Sort(b);
      |             ^~~~~
a.cc:30:24: error: 'b' was not declared in this scope
   30 |             Array.Sort(b);
      |                        ^
Language: C++

using System;

class P
{
public static void Main()
{
            //???????????????
            int n = Int32.Parse(Console.ReadLine());
            //???????????????
            var a = Console.ReadLine().Split(' ');
            


            //????°???????a[0]
            //?????§??????a[n - 1]

            //????´????????¨?
            int Sum = 0;
            int[] b = new int [n];
            int i = 0;

            for (i = 0; i <=  n - 1; i++)
            {
                b[i] = Int32.Parse(a[i]);
                Sum = Sum + b[i];
            }


            //??????????????????
            Array.Sort(b);

            //??????
            Console.WriteLine("{0} {1} {2}", b[0], b[n - 1], Sum);
}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:5:7: error: expected ':' before 'static'
    5 | public static void Main()
      |       ^~~~~~~
      |       :
a.cc:35:2: error: expected ';' after class definition
   35 | }
      |  ^
      |  ;
a.cc: In static member function 'static void P::Main()':
a.cc:8:21: error: 'Int32' was not declared in this scope
    8 |             int n = Int32.Parse(Console.ReadLine());
      |                     ^~~~~
a.cc:8:33: error: 'Console' was not declared in this scope
    8 |             int n = Int32.Parse(Console.ReadLine());
      |                                 ^~~~~~~
a.cc:10:13: error: 'var' was not declared in this scope
   10 |             var a = Console.ReadLine().Split(' ');
      |             ^~~
a.cc:19:16: error: structured binding declaration cannot have type 'int'
   19 |             int[] b = new int [n];
      |                ^~
a.cc:19:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:19:16: error: empty structured binding declaration
a.cc:19:19: error: expected initializer before 'b'
   19 |             int[] b = new int [n];
      |                   ^
a.cc:24:17: error: 'b' was not declared in this scope
   24 |                 b[i] = Int32.Parse(a[i]);
      |                 ^
a.cc:24:36: error: 'a' was not declared in this scope
   24 |                 b[i] = Int32.Parse(a[i]);
      |                                    ^
a.cc:30:13: error: 'Array' was not declared in this scope
   30 |             Array.Sort(b);
      |             ^~~~~
a.cc:30:24: error: 'b' was not declared in this scope
   30 |             Array.Sort(b);
      |                        ^
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    int num;
    cin >> num;
    
    int buf;
    vector<int> hoge;
    for (int a = 0; a < num; ++a) {
        cin >> buf;
        hoge.push_back(buf);
    }
	
    sort(hoge.begin(),hoge.end(),greater<int>());
    
    long long int sum;
    for(auto k : hoge){
        sum += k;
    }
	
    cout << k << " " << hoge.at(0) << hoge.at(num - 1) << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'k' was not declared in this scope
   28 |     cout << k << " " << hoge.at(0) << hoge.at(num - 1) << endl;
      |             ^
Language: C++

import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
Scanner kb=new Scanner(System.in);
int n=kb.nextInt();
int a[]=new int[20000];
int nowMax=0,nowMin=0;
long sum=0;
for(int i=0;i<n;i++){
if(kb.hasNextInt()){
	a[i]=kb.nextInt();
}else{
	break;
}

}
nowMax=a[0];
nowMin=a[0];
for(int i=0;i<n;i++){
if(nowMax<a[i]){
	nowMax=a[i];
}if(nowMin>a[i]){
	nowMin=a[i];
}
System.out.println(a[i]);
sum+=(long)a[i];
}

System.out.printf("%d %d %ld\n",nowMin,nowMax,sum);
	}

}

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:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
Scanner kb=new Scanner(System.in);
int n=kb.nextInt();
long a[]=new long[20000];
long nowMax=0,nowMin=0;
long sum=0;
for(int i=0;i<n;i++){
if(kb.hasNextInt()){
	a[i]=kb.nextLong();
}else{
	break;
}

}
nowMax=a[0];
nowMin=a[0];
for(int i=0;i<n;i++){
if(nowMax<a[i]){
	nowMax=a[i];
}if(nowMin>a[i]){
	nowMin=a[i];
}
System.out.println(a[i]);
sum+=(long)a[i];
}

System.out.printf("%d %d %ld\n",nowMin,nowMax,sum);
	}

}

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:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
 int min=1000000,max=-1000000;

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

return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:17:36: error: 'j' was not declared in this scope
   17 | cout << min <<" " << max << " " << j << endl;
      |                                    ^
Language: C++

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

int main(){
    int n;
    cin >> n;
    long long a[n];
    for(int i = 0; i < n; i++) cin >> a[i];
    cout << *min_element(a, a + n) << ' ' << *max_element(a, a + n) << ' ' << accumulate(a, a + n, 0ll) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:79: error: 'accumulate' was not declared in this scope
   10 |     cout << *min_element(a, a + n) << ' ' << *max_element(a, a + n) << ' ' << accumulate(a, a + n, 0ll) << endl;
      |                                                                               ^~~~~~~~~~
Language: C++

#include<stdio.h>
int main(){
    int n;
    int a[10000];
    int min, max, sum;
    scanf("%d", &n);
    for(i=0; i<n; i++){
        scanf("%d ", $a[i]);
        if(a[i] < a[i-1 || i>=1]){
            min = a[i]
        }
        if(a[i]>a[i-1] && i>=1){
            max = a[i];
        }
        s += a[i];
    }
    printf("%d %d %d\n", &min, &max, &s);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'i' was not declared in this scope
    7 |     for(i=0; i<n; i++){
      |         ^
a.cc:8:22: error: '$a' was not declared in this scope; did you mean 'a'?
    8 |         scanf("%d ", $a[i]);
      |                      ^~
      |                      a
a.cc:15:9: error: 's' was not declared in this scope
   15 |         s += a[i];
      |         ^
a.cc:17:39: error: 's' was not declared in this scope
   17 |     printf("%d %d %d\n", &min, &max, &s);
      |                                       ^
Language: C++

#include<stdio.h>
int main(){
    int i;
    int n;
    int a[10000];
    int min, max, sum;
    scanf("%d", &n);
    for(i=0; i<n; i++){
        scanf("%d ", $a[i]);
        if(a[i] < a[i-1 || i>=1]){
            min = a[i]
        }
        if(a[i]>a[i-1] && i>=1){
            max = a[i];
        }
        s += a[i];
    }
    printf("%d %d %d\n", &min, &max, &s);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: '$a' was not declared in this scope; did you mean 'a'?
    9 |         scanf("%d ", $a[i]);
      |                      ^~
      |                      a
a.cc:11:23: error: expected ';' before '}' token
   11 |             min = a[i]
      |                       ^
      |                       ;
   12 |         }
      |         ~              
a.cc:16:9: error: 's' was not declared in this scope
   16 |         s += a[i];
      |         ^
a.cc:18:39: error: 's' was not declared in this scope
   18 |     printf("%d %d %d\n", &min, &max, &s);
      |                                       ^
Language: C++

#include<stdio.h>
int main(){
    int i;
    int n;
    int a[10000];
    int min, max, sum=0;
    scanf("%d", &n);
    for(i=0; i<n; i++){
        scanf("%d ", $a[i]);
        if(a[i] < a[i-1] && i>=1){
            min = a[i]
        }
        if(a[i]>a[i-1] && i>=1){
            max = 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:9:22: error: '$a' was not declared in this scope; did you mean 'a'?
    9 |         scanf("%d ", $a[i]);
      |                      ^~
      |                      a
a.cc:11:23: error: expected ';' before '}' token
   11 |             min = a[i]
      |                       ^
      |                       ;
   12 |         }
      |         ~
Language: C++

#include<stdio.h>
int main(){
    int i;
    int n;
    int a[10000];
    int min, max;
    int sum=0;
    scanf("%d", &n);
    for(i=0; i<n; i++){
        scanf("%d ", &a[i]);
        if(a[i] < a[i-1] && i>=1){
            min = a[i]
        }
        if(a[i]>a[i-1] && i>=1){
            max = 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:12:23: error: expected ';' before '}' token
   12 |             min = a[i]
      |                       ^
      |                       ;
   13 |         }
      |         ~
Language: C++

#include "bits/stdc++.h"

#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),(v).end()
#define PB(a) push_back(a)
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define DUMP(v) REP(i, (v).size()) { cout << v[i]; if (i != v.size() - 1)cout << " "; else cout << endl; }
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

const int dx[8] = { 1,1,0,-1,-1,-1,0,1 };
const int dy[8] = { 0,1,1,1,0,-1,-1,-1 };


using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll max(ll a, int b) { return max(a, ll(b)); }
ll max(int a, ll b) { return max(ll(a), b); }
///(?´????????`)(?´????????`)(?´????????`)(?´????????`)(?´????????`)(?´????????`)///
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	int cmin = INF, cmax = -1, sum = 0;
	REP(i, n) {
		int a;
		cin >> a[i];
		cmin = min(cmin, a);
		cmax = max(cmax, a);
		sum += a;
	}
	cout << cmin << " " << cmax << " " << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:25: error: invalid types 'int[ll {aka long long int}]' for array subscript
   38 |                 cin >> a[i];
      |                         ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int t;
int min=n;
int max=n;
int sum=0;
int n;
cin>>n;
for(int i=0;i<n;;i++){
cin>>t;
if(min > t) min = t;
if(max < t) max = t;
sum = sum + t;
cout<<min<<" "<<max<<" "<<sum<<endl;
}
return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
int t;
int min=n;
int max=n;
int sum=0;
int n;
cin>>n;
for(int i=0;i<n;i++){
cin>>t;
if(min > t) min = t;
if(max < t) max = t;
sum = sum + t;
cout<<min<<" "<<max<<" "<<sum<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'n' was not declared in this scope
    6 | int min=n;
      |         ^
Language: C++

int main() {
	int n,a,num,max,min;
	long total=0;
	a=1;
	max=-1000001;
	min=1000001;
	std::cin >> n;
	while (a<=n){
		std::cin >> num;
		if(max<num){
			max=num;
		}
		if(min>num){
			min=num;
		}
		total=total+num;
		a++;
	}
	if (a>n){
		std::cout << min << " " << max << " " << total << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'cin' is not a member of 'std'
    7 |         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:9:22: error: 'cin' is not a member of 'std'
    9 |                 std::cin >> num;
      |                      ^~~
a.cc:9:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:22: error: 'cout' is not a member of 'std'
   20 |                 std::cout << min << " " << max << " " << total << std::endl;
      |                      ^~~~
a.cc:20:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:72: error: 'endl' is not a member of 'std'
   20 |                 std::cout << min << " " << max << " " << total << std::endl;
      |                                                                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main() {
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     for(i = n,i > 0,i--){
      |         ^
a.cc:18:5: error: expected primary-expression before 'return'
   18 |     return 0;
      |     ^~~~~~
a.cc:17:52: error: expected ')' before 'return'
   17 |     cout << min << " " << max << " " << sum<< endl;
      |                                                    ^
      |                                                    )
   18 |     return 0;
      |     ~~~~~~                                          
a.cc:9:8: note: to match this '('
    9 |     for(i = n,i > 0,i--){
      |        ^
Language: C++

#include <iostream>
using namespace std;

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

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

#include <iostream>
int main()
{
	int n;
	cin>>n;
	int i =0;
	int x;
	int min = 1000000, max = -100000 , s;
	while (i < n)
	{
		cin>>x;
		if (x < min)
			min = x;
		if (max < x )
			max = x;
		i++;
	}
	cout<<min<<" "<<max<<" "<<s<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>n;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |         cout<<min<<" "<<max<<" "<<s<<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:18:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |         cout<<min<<" "<<max<<" "<<s<<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)
      |     ^~~~