criyle/codenet-compile-errors huggingface dataset:
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++;
	}
	s = min + max;
	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:19:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |         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:19:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |         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)
      |     ^~~~
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
  
//Copyright by cthanh.brycen

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????

		int total = 0 ;
	
	
		
		BufferedReader br= new BufferedReader ( new InputStreamReader ( System.in));
		 String str = br.readLine();
		 int n = Integer.parseInt(str) ;
		 
		 
		 
	//	 System.out.print("\n");
		 String st = br.readLine();
		 String [] stAry = new String[n];
		   stAry = st.split( " ");
		 int[] hensu = new int[n];
		 for ( int i = 0; i<n; i++){
			 hensu[i]= Integer.parseInt(stAry[i]);
		 }
		
		 
		 
		 
		 
		for (int i= 0; i<n;i++){
			total +=hensu[i];
			
		}
			
		Arrays.sort(hensu);
		
		System.out.print(hensu[0] + " "+ hensu[n-1]+ " "+total);
		  
		  
		}
		 		 
	
		

}

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

#include <iostream>

int main(){
    int v,n;
    int a = 0;
    long min= 1000001;
    long max = -1000001
    long total;
    std::cin >>n;
    for( ;a<n;a++){
        std::cin >> v;
        if(v < min)min = v;
        if(v > max)max = v;
        total = total + v;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'long'
    8 |     long total;
      |     ^~~~
a.cc:14:9: error: 'total' was not declared in this scope
   14 |         total = total + v;
      |         ^~~~~
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

include <iostream>

int main(){
    int v,n;
    //int a = 0;
    long int min = 1000000;
    long int max = -1000000;
    long int total;
    std::cin >> n;
    for(int a=0 ;a<n;a++){
        std::cin >> v;
        if(v <= min)min = v;
        if(v >= max)max = v;
        total = total + v;
    }
    std::cout << min <<" "<< max <<" "<< total<<std::endl;
    return 0;

}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
Language: C++

#include<stdlib.h> 
int main(){
  int n,min=10000000,max=-10000000,sum=0,i;
  int *array;
  scanf("%d",&n);
  array=(int*)malloc(n*sizeof(int));

  for(i=0;i<n;i++){
    scanf("%d",&array[i]);
    if(min>array[i]){ min=array[i];}
     sum+=array[i];
    if(max<array[i]){ max=array[i];}
 }

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

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

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

int main() {
	long long  n,i,sum;
	int mi=INT_MAX,ma=INT_MIN,a;

	cin >> n;

	sum = 0;

	for (i = 0; i < n; i++) {
		cin >> a;
		sum = sum+a;

		ma = max(ma, a);
		mi = min(mi, a);
		}
	cout << mi << " " << ma << " " << sum << endl;
	}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'INT_MAX' was not declared in this scope
    7 |         int mi=INT_MAX,ma=INT_MIN,a;
      |                ^~~~~~~
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 | using namespace std;
a.cc:14:24: error: 'a' was not declared in this scope
   14 |                 cin >> a;
      |                        ^
a.cc:17:17: error: 'ma' was not declared in this scope; did you mean 'mi'?
   17 |                 ma = max(ma, a);
      |                 ^~
      |                 mi
a.cc:20:30: error: 'ma' was not declared in this scope; did you mean 'mi'?
   20 |         cout << mi << " " << ma << " " << sum << endl;
      |                              ^~
      |                              mi
Language: C++

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

int main() {
	long long  n,i,sum, mi,ma,a;
	mi = INT_MAX;
	ma = -INT_MAX;

	cin >> n;

	sum = 0;

	for (i = 0; i < n; i++) {
		cin >> a;
		sum += a;

		ma = max(ma, a);
		mi = min(mi, a);
		}
	cout << mi << " " << ma << " " << sum << endl;
	}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'INT_MAX' was not declared in this scope
    7 |         mi = 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 | using namespace std;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'num' was not declared in this scope; did you mean 'numb'?
   14 |     cin>>num;
      |          ^~~
      |          numb
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'num' was not declared in this scope; did you mean 'numb'?
   16 |     if(numb>max)max=num;
      |                     ^~~
      |                     numb
a.cc:17:21: error: 'num' was not declared in this scope; did you mean 'numb'?
   17 |     if(numb<min)min=num;
      |                     ^~~
      |                     numb
a.cc:18:10: error: 'num' was not declared in this scope; did you mean 'numb'?
   18 |     sum+=num;
      |          ^~~
      |          numb
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'num' was not declared in this scope; did you mean 'numb'?
   18 |     sum+=num;
      |          ^~~
      |          numb
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'num' was not declared in this scope; did you mean 'numb'?
   18 |     sum+=num;
      |          ^~~
      |          numb
Language: C++

#include <stdio.h>

int main(void)
{
	int a,b,c,d,e,f;
	
	scanf("%d",&a);
	d = 1000000;
	e = -1000000;
	(long)f = 0;
	
	for(b = 0;b < a;++b){
		scanf("%d",&c);
		if(d >= c){
			d = c;
		}
		if(e <= c){
			e = c;
		}
		(long)f += c;
	}
	
	printf("%d %d %d\n",d,e,(long)f);
	
	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: lvalue required as left operand of assignment
   10 |         (long)f = 0;
      |         ^~~~~~~
a.cc:20:17: error: lvalue required as left operand of assignment
   20 |                 (long)f += c;
      |                 ^~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n, a[11000],sum=0,ta=INT_MIN,ti=INT_MAX;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[i];
		sum += a[i];
	}
	for (int i = 0; i < n; i++){
		if (ti>a[i])ti = a[i];
		if (ta < a[i])ta = a[i];
	}
	printf("%d %d %d\n",ti,ta,sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:34: error: 'INT_MIN' was not declared in this scope
    5 |         int n, a[11000],sum=0,ta=INT_MIN,ti=INT_MAX;
      |                                  ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:12:21: error: 'ti' was not declared in this scope; did you mean 'i'?
   12 |                 if (ti>a[i])ti = a[i];
      |                     ^~
      |                     i
a.cc:15:29: error: 'ti' was not declared in this scope; did you mean 'ta'?
   15 |         printf("%d %d %d\n",ti,ta,sum);
      |                             ^~
      |                             ta
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
	int n, a[11000],sum=0,ta=INT_MIN,ti=INT_MAX;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[i];
		sum += a[i];
	}
	for (int i = 0; i < n; i++){
		if (ti>a[i])ti = a[i];
		if (ta < a[i])ta = a[i];
	}
	printf("%d %d %d\n",ti,ta,sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: 'INT_MIN' was not declared in this scope
    6 |         int n, a[11000],sum=0,ta=INT_MIN,ti=INT_MAX;
      |                                  ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | #include<stdio.h>
a.cc:13:21: error: 'ti' was not declared in this scope; did you mean 'i'?
   13 |                 if (ti>a[i])ti = a[i];
      |                     ^~
      |                     i
a.cc:16:29: error: 'ti' was not declared in this scope; did you mean 'ta'?
   16 |         printf("%d %d %d\n",ti,ta,sum);
      |                             ^~
      |                             ta
Language: C++

#include <stdio.h>

int main() {
  int n;
  scanf("%d", &n);

???long minv, maxv, sum;
  int x;
  int i == 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      |   ^
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:9:9: error: expected initializer before '==' token
    9 |   int i == 0;
      |         ^~
a.cc:10:3: error: 'sum' was not declared in this scope
   10 |   sum = 0;
      |   ^~~
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |   while(cin >> x) {
      |         ^~~
a.cc:12:8: error: 'i' was not declared in this scope
   12 |     if(i == 0) {
      |        ^
a.cc:13:7: error: 'minv' was not declared in this scope
   13 |       minv = x;
      |       ^~~~
a.cc:14:7: error: 'maxv' was not declared in this scope
   14 |       maxv = x;
      |       ^~~~
a.cc:17:12: error: 'minv' was not declared in this scope
   17 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:18:8: error: 'maxv' was not declared in this scope
   18 |     if(maxv < x) maxv = x;
      |        ^~~~
Language: C++

#include <stdio.h>

int main() {
  int n;
  scanf("%d", &n);

???long minv, maxv, sum;
  int x;
  int i = 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      |   ^
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:10:3: error: 'sum' was not declared in this scope
   10 |   sum = 0;
      |   ^~~
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |   while(cin >> x) {
      |         ^~~
a.cc:13:7: error: 'minv' was not declared in this scope
   13 |       minv = x;
      |       ^~~~
a.cc:14:7: error: 'maxv' was not declared in this scope
   14 |       maxv = x;
      |       ^~~~
a.cc:17:12: error: 'minv' was not declared in this scope
   17 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:18:8: error: 'maxv' was not declared in this scope
   18 |     if(maxv < x) maxv = x;
      |        ^~~~
a.cc:20:24: error: 'minv' was not declared in this scope
   20 |   printf("%d %d %d\n", minv, maxv, sum);
      |                        ^~~~
a.cc:20:30: error: 'maxv' was not declared in this scope
   20 |   printf("%d %d %d\n", minv, maxv, sum);
      |                              ^~~~
Language: C++

#include <stdio.h>

int main() {
  int n;
  scanf("%d", &n);

???long minv, maxv, sum;
  int x;
  int i = 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ???long minv, maxv, sum;
      |   ^
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:7:4: error: expected ':' before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:7:4: error: expected primary-expression before 'long'
    7 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:10:3: error: 'sum' was not declared in this scope
   10 |   sum = 0;
      |   ^~~
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |   while(cin >> x) {
      |         ^~~
a.cc:13:7: error: 'minv' was not declared in this scope
   13 |       minv = x;
      |       ^~~~
a.cc:14:7: error: 'maxv' was not declared in this scope
   14 |       maxv = x;
      |       ^~~~
a.cc:17:12: error: 'minv' was not declared in this scope
   17 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:18:8: error: 'maxv' was not declared in this scope
   18 |     if(maxv < x) maxv = x;
      |        ^~~~
a.cc:21:24: error: 'minv' was not declared in this scope
   21 |   printf("%d %d %d\n", minv, maxv, sum);
      |                        ^~~~
a.cc:21:30: error: 'maxv' was not declared in this scope
   21 |   printf("%d %d %d\n", minv, maxv, sum);
      |                              ^~~~
Language: C++

#include <stdio.h>
#include <stream.h>

int main() {
  int n;
  scanf("%d", &n);

???long minv, maxv, sum;
  int x;
  int i = 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

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

#include <stdio.h>
#include <stream>

int main() {
  int n;
  scanf("%d", &n);

???long minv, maxv, sum;
  int x;
  int i = 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

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

#include <stdio.h>
#include <iostream>

int main() {
  int n;
  scanf("%d", &n);

???long minv, maxv, sum;
  int x;
  int i = 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ???long minv, maxv, sum;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ???long minv, maxv, sum;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ???long minv, maxv, sum;
      |   ^
a.cc:8:4: error: expected primary-expression before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:8:4: error: expected ':' before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:8:4: error: expected ':' before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:8:4: error: expected ':' before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:11:3: error: 'sum' was not declared in this scope
   11 |   sum = 0;
      |   ^~~
a.cc:12:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   12 |   while(cin >> x) {
      |         ^~~
      |         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:14:7: error: 'minv' was not declared in this scope
   14 |       minv = x;
      |       ^~~~
a.cc:15:7: error: 'maxv' was not declared in this scope
   15 |       maxv = x;
      |       ^~~~
a.cc:18:12: error: 'minv' was not declared in this scope
   18 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:19:8: error: 'maxv' was not declared in this scope
   19 |     if(maxv < x) maxv = x;
      |        ^~~~
a.cc:22:24: error: 'minv' was not declared in this scope
   22 |   printf("%d %d %d\n", minv, maxv, sum);
      |                        ^~~~
a.cc:22:30: error: 'maxv' was not declared in this scope
   22 |   printf("%d %d %d\n", minv, maxv, sum);
      |                              ^~~~
Language: C++

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

???long minv, maxv, sum;
  int x;
  int i = 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ???long minv, maxv, sum;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ???long minv, maxv, sum;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ???long minv, maxv, sum;
      |   ^
a.cc:8:4: error: expected primary-expression before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:8:4: error: expected ':' before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:8:4: error: expected ':' before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:8:4: error: expected ':' before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'long'
    8 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:11:3: error: 'sum' was not declared in this scope
   11 |   sum = 0;
      |   ^~~
a.cc:14:7: error: 'minv' was not declared in this scope
   14 |       minv = x;
      |       ^~~~
a.cc:15:7: error: 'maxv' was not declared in this scope
   15 |       maxv = x;
      |       ^~~~
a.cc:18:12: error: 'minv' was not declared in this scope
   18 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:19:8: error: 'maxv' was not declared in this scope
   19 |     if(maxv < x) maxv = x;
      |        ^~~~
a.cc:22:24: error: 'minv' was not declared in this scope
   22 |   printf("%d %d %d\n", minv, maxv, sum);
      |                        ^~~~
a.cc:22:30: error: 'maxv' was not declared in this scope
   22 |   printf("%d %d %d\n", minv, maxv, sum);
      |                              ^~~~
Language: C++

#include <stdio.h>
#include <iostream>
using namespace std;

int main() {
  int n;
  scanf("%d", &n);

???long minv, maxv, sum;
  int x;
  int i = 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before '?' token
    9 | ???long minv, maxv, sum;
      | ^
a.cc:9:2: error: expected primary-expression before '?' token
    9 | ???long minv, maxv, sum;
      |  ^
a.cc:9:3: error: expected primary-expression before '?' token
    9 | ???long minv, maxv, sum;
      |   ^
a.cc:9:4: error: expected primary-expression before 'long'
    9 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:9:4: error: expected ':' before 'long'
    9 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:9:4: error: expected primary-expression before 'long'
    9 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:9:4: error: expected ':' before 'long'
    9 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:9:4: error: expected primary-expression before 'long'
    9 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:9:4: error: expected ':' before 'long'
    9 | ???long minv, maxv, sum;
      |    ^~~~
      |    :
a.cc:9:4: error: expected primary-expression before 'long'
    9 | ???long minv, maxv, sum;
      |    ^~~~
a.cc:12:3: error: 'sum' was not declared in this scope
   12 |   sum = 0;
      |   ^~~
a.cc:15:7: error: 'minv' was not declared in this scope
   15 |       minv = x;
      |       ^~~~
a.cc:16:7: error: 'maxv' was not declared in this scope
   16 |       maxv = x;
      |       ^~~~
a.cc:19:12: error: 'minv' was not declared in this scope
   19 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:20:8: error: 'maxv' was not declared in this scope
   20 |     if(maxv < x) maxv = x;
      |        ^~~~
a.cc:23:24: error: 'minv' was not declared in this scope
   23 |   printf("%d %d %d\n", minv, maxv, sum);
      |                        ^~~~
a.cc:23:30: error: 'maxv' was not declared in this scope
   23 |   printf("%d %d %d\n", minv, maxv, sum);
      |                              ^~~~
Language: C++

#include <stdio.h>
#include <iostream>
using namespace std;

int main() {
  int n;
  scanf("%d", &n);

???int minv, maxv, sum;
  int x;
  int i = 0;
  sum = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before '?' token
    9 | ???int minv, maxv, sum;
      | ^
a.cc:9:2: error: expected primary-expression before '?' token
    9 | ???int minv, maxv, sum;
      |  ^
a.cc:9:3: error: expected primary-expression before '?' token
    9 | ???int minv, maxv, sum;
      |   ^
a.cc:9:4: error: expected primary-expression before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
a.cc:9:4: error: expected ':' before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:9:4: error: expected primary-expression before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
a.cc:9:4: error: expected ':' before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:9:4: error: expected primary-expression before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
a.cc:9:4: error: expected ':' before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:9:4: error: expected primary-expression before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
a.cc:12:3: error: 'sum' was not declared in this scope
   12 |   sum = 0;
      |   ^~~
a.cc:15:7: error: 'minv' was not declared in this scope
   15 |       minv = x;
      |       ^~~~
a.cc:16:7: error: 'maxv' was not declared in this scope
   16 |       maxv = x;
      |       ^~~~
a.cc:19:12: error: 'minv' was not declared in this scope
   19 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:20:8: error: 'maxv' was not declared in this scope
   20 |     if(maxv < x) maxv = x;
      |        ^~~~
a.cc:23:24: error: 'minv' was not declared in this scope
   23 |   printf("%d %d %d\n", minv, maxv, sum);
      |                        ^~~~
a.cc:23:30: error: 'maxv' was not declared in this scope
   23 |   printf("%d %d %d\n", minv, maxv, sum);
      |                              ^~~~
Language: C++

#include <stdio.h>
#include <iostream>
using namespace std;

int main() {
  int n;
  scanf("%d", &n);

???int minv, maxv, sum;
  int x;
  int i;
  sum = 0;
  i = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before '?' token
    9 | ???int minv, maxv, sum;
      | ^
a.cc:9:2: error: expected primary-expression before '?' token
    9 | ???int minv, maxv, sum;
      |  ^
a.cc:9:3: error: expected primary-expression before '?' token
    9 | ???int minv, maxv, sum;
      |   ^
a.cc:9:4: error: expected primary-expression before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
a.cc:9:4: error: expected ':' before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:9:4: error: expected primary-expression before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
a.cc:9:4: error: expected ':' before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:9:4: error: expected primary-expression before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
a.cc:9:4: error: expected ':' before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:9:4: error: expected primary-expression before 'int'
    9 | ???int minv, maxv, sum;
      |    ^~~
a.cc:12:3: error: 'sum' was not declared in this scope
   12 |   sum = 0;
      |   ^~~
a.cc:16:7: error: 'minv' was not declared in this scope
   16 |       minv = x;
      |       ^~~~
a.cc:17:7: error: 'maxv' was not declared in this scope
   17 |       maxv = x;
      |       ^~~~
a.cc:20:12: error: 'minv' was not declared in this scope
   20 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:21:8: error: 'maxv' was not declared in this scope
   21 |     if(maxv < x) maxv = x;
      |        ^~~~
a.cc:24:24: error: 'minv' was not declared in this scope
   24 |   printf("%d %d %d\n", minv, maxv, sum);
      |                        ^~~~
a.cc:24:30: error: 'maxv' was not declared in this scope
   24 |   printf("%d %d %d\n", minv, maxv, sum);
      |                              ^~~~
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);

???int minv, maxv, sum;
  int x;
  int i;
  sum = 0;
  i = 0;
  while(cin >> x) {
    if(i == 0) {
      minv = x;
      maxv = x;
    }
    sum += x;
    if(x < minv) minv = x;
    if(maxv < x) maxv = x;
    i++;
  }
  //printf("%d %d %d\n", minv, maxv, sum);
  //return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      | ^
a.cc:10:2: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      |  ^
a.cc:10:3: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      |   ^
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:13:3: error: 'sum' was not declared in this scope
   13 |   sum = 0;
      |   ^~~
a.cc:17:7: error: 'minv' was not declared in this scope
   17 |       minv = x;
      |       ^~~~
a.cc:18:7: error: 'maxv' was not declared in this scope
   18 |       maxv = x;
      |       ^~~~
a.cc:21:12: error: 'minv' was not declared in this scope
   21 |     if(x < minv) minv = x;
      |            ^~~~
a.cc:22:8: error: 'maxv' was not declared in this scope
   22 |     if(maxv < x) maxv = x;
      |        ^~~~
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);

???int minv, maxv, sum;
  int x;
  int i;
  sum = 0;
  i = 0;
  while(cin >> x) {
    //if(i == 0) {
    //  minv = x;
    //  maxv = x;
    //}
    //sum += x;
    //if(x < minv) minv = x;
    //if(maxv < x) maxv = x;
    //i++;
  }
  //printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      | ^
a.cc:10:2: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      |  ^
a.cc:10:3: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      |   ^
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:13:3: error: 'sum' was not declared in this scope
   13 |   sum = 0;
      |   ^~~
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);

???int minv, maxv, sum;
  int x;
  int i;
  sum = 0;
  i = 0;
  //while(cin >> x) {
    //if(i == 0) {
    //  minv = x;
    //  maxv = x;
    //}
    //sum += x;
    //if(x < minv) minv = x;
    //if(maxv < x) maxv = x;
    //i++;
  //}
  //printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      | ^
a.cc:10:2: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      |  ^
a.cc:10:3: error: expected primary-expression before '?' token
   10 | ???int minv, maxv, sum;
      |   ^
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:10:4: error: expected ':' before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
      |    :
a.cc:10:4: error: expected primary-expression before 'int'
   10 | ???int minv, maxv, sum;
      |    ^~~
a.cc:13:3: error: 'sum' was not declared in this scope
   13 |   sum = 0;
      |   ^~~
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);

???//int minv, maxv, sum;
  //int x;
  //int i;
  //sum = 0;
  i = 0;
  //while(cin >> x) {
    //if(i == 0) {
    //  minv = x;
    //  maxv = x;
    //}
    //sum += x;
    //if(x < minv) minv = x;
    //if(maxv < x) maxv = x;
    //i++;
  //}
  //printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc:10:2: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   10 | ???//int minv, maxv, sum;
a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      | ^
a.cc:10:2: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      |  ^
a.cc:10:3: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      |   ^
a.cc:14:3: error: 'i' was not declared in this scope
   14 |   i = 0;
      |   ^
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
Language: C++

#include <stdio.h>
#include <iostream>

//using namespace std;

int main() {
  //int n;
  //scanf("%d", &n);

???//int minv, maxv, sum;
  //int x;
  //int i;
  //sum = 0;
  i = 0;
  //while(cin >> x) {
    //if(i == 0) {
    //  minv = x;
    //  maxv = x;
    //}
    //sum += x;
    //if(x < minv) minv = x;
    //if(maxv < x) maxv = x;
    //i++;
  //}
  //printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc:10:2: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   10 | ???//int minv, maxv, sum;
a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      | ^
a.cc:10:2: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      |  ^
a.cc:10:3: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      |   ^
a.cc:14:3: error: 'i' was not declared in this scope
   14 |   i = 0;
      |   ^
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
Language: C++

#include <stdio.h>
//#include <iostream>

//using namespace std;

int main() {
  //int n;
  //scanf("%d", &n);

???//int minv, maxv, sum;
  //int x;
  //int i;
  //sum = 0;
  i = 0;
  //while(cin >> x) {
    //if(i == 0) {
    //  minv = x;
    //  maxv = x;
    //}
    //sum += x;
    //if(x < minv) minv = x;
    //if(maxv < x) maxv = x;
    //i++;
  //}
  //printf("%d %d %d\n", minv, maxv, sum);
  return 0;
}

Compiler output:
a.cc:10:2: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   10 | ???//int minv, maxv, sum;
a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      | ^
a.cc:10:2: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      |  ^
a.cc:10:3: error: expected primary-expression before '?' token
   10 | ???//int minv, maxv, sum;
      |   ^
a.cc:14:3: error: 'i' was not declared in this scope
   14 |   i = 0;
      |   ^
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
a.cc:14:8: error: expected ':' before ';' token
   14 |   i = 0;
      |        ^
      |        :
a.cc:14:8: error: expected primary-expression before ';' token
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);

  longint min_v, max_v, sum;
  int x;
  int i;
  sum = 0;
  i = 0;
  while(cin >> x && i < n) {
    if(i == 0) {
      min_v = x;
      max_v = x;
    }
    if(x < min_v) min_v = x;
    if(max_v < x) max_v = x;
    sum += x;
    i++;
  }
  printf("%d %d %d\n", min_v, max_v, sum);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'longint' was not declared in this scope; did you mean 'long'?
   10 |   longint min_v, max_v, sum;
      |   ^~~~~~~
      |   long
a.cc:13:3: error: 'sum' was not declared in this scope
   13 |   sum = 0;
      |   ^~~
a.cc:17:7: error: 'min_v' was not declared in this scope
   17 |       min_v = x;
      |       ^~~~~
a.cc:18:7: error: 'max_v' was not declared in this scope
   18 |       max_v = x;
      |       ^~~~~
a.cc:20:12: error: 'min_v' was not declared in this scope
   20 |     if(x < min_v) min_v = x;
      |            ^~~~~
a.cc:21:8: error: 'max_v' was not declared in this scope
   21 |     if(max_v < x) max_v = x;
      |        ^~~~~
a.cc:25:24: error: 'min_v' was not declared in this scope
   25 |   printf("%d %d %d\n", min_v, max_v, sum);
      |                        ^~~~~
a.cc:25:31: error: 'max_v' was not declared in this scope
   25 |   printf("%d %d %d\n", min_v, max_v, sum);
      |                               ^~~~~
Language: C++

#include <isostream>
using namespace std;

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

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

n = int(input())
a = list(map(int, input().split()))
min, max, sum = 1000000, -1000000, 0
for i in range(n):
    if a[i] < min:
        min = a[i];
    if a[i] > max:
        max = a[i];
    sum += a[i];
print(min, max, sum)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
a.cc:7:5: error: expected unqualified-id before 'if'
    7 |     if a[i] > max:
      |     ^~
a.cc:9:5: error: 'sum' does not name a type
    9 |     sum += a[i];
      |     ^~~
a.cc:10:6: error: expected constructor, destructor, or type conversion before '(' token
   10 | print(min, max, sum)
      |      ^
Language: C++

#include <stdio.h>
#include <string.h>

#define MIN(a,b)	((a)>(b)? (b):(a))
#define MAX(a,b)	((a)<(b)? (b):(a))

int main(int argc, char* argv[])
{
	char* p;
	int num;
	int val;
	char val_s[8];
	char temp[2];
	char list[10000 * 6 + 10000];

	int min =  1000001;
	int max = -1000001;
	int sum = 0;

	fgets(list, sizeof(list), stdin);
	sscanf_s(list, "%d ", &num);
	fgets(list, sizeof(list), stdin);

	p =  list;
	while (num--) {
		sscanf_s(p, "%d", &val);

		min = MIN(min, val);
		max = MAX(max, val);
		sum += val;

		if (strchr(p, ' ')) p = strchr(p, ' ') + 1;
		else break;
	}

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

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:21:9: error: 'sscanf_s' was not declared in this scope; did you mean 'sscanf'?
   21 |         sscanf_s(list, "%d ", &num);
      |         ^~~~~~~~
      |         sscanf
Language: C++

#include <stdio.h>
#include <string.h>

#define MIN(a,b)	((a)>(b)? (b):(a))
#define MAX(a,b)	((a)<(b)? (b):(a))

int main(int argc, char* argv[])
{
	char* p;
	int num;
	int val;
	char val_s[8];
	char temp[2];
	char list[10000 * 6 + 10000];

	int min =  1000001;
	int max = -1000001;
	int sum = 0;

	fgets(list, sizeof(list), stdin);
	sscanf(list, "%d ", &num);
	fgets(list, sizeof(list), stdin);

	p =  list;
	while (num--) {
		sscanf_s(p, "%d", &val);

		min = MIN(min, val);
		max = MAX(max, val);
		sum += val;

		if (strchr(p, ' ')) p = strchr(p, ' ') + 1;
		else break;
	}

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

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:26:17: error: 'sscanf_s' was not declared in this scope; did you mean 'sscanf'?
   26 |                 sscanf_s(p, "%d", &val);
      |                 ^~~~~~~~
      |                 sscanf
Language: C++

// ConsoleApplication7.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include "stdafx.h"
#include <string.h>
#include <limits.h>

int main(int argc, char* argv[])
{
	int i;
	int num;
	int val;
	int min, max, sum;
	char temp[80000];
	char* p;

	fgets(temp, sizeof(temp), stdin);
	sscanf(temp, "%d", &num);
	fgets(temp, sizeof(temp), stdin);
		
	p = temp;
	min = INT_MAX;
	max = INT_MIN;
	sum = 0;
	for (i = 0; i < num;i++) {
		sscanf(p, "%d", &val);
		p = strchr(p, ' ') + 1;
		sum += val;
		if (min > val) min = val;
		if (max < val) max = val;
	}
	printf("%d %d %d\n", min, max, sum);
	
	return 0;
}

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

// ConsoleApplication7.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include <string.h>
#include <limits.h>

int main(int argc, char* argv[])
{
	int i;
	int num;
	int val;
	int min, max, sum;
	char temp[80000];
	char* p;

	fgets(temp, sizeof(temp), stdin);
	sscanf(temp, "%d", &num);
	fgets(temp, sizeof(temp), stdin);
		
	p = temp;
	min = INT_MAX;
	max = INT_MIN;
	sum = 0;
	for (i = 0; i < num;i++) {
		sscanf(p, "%d", &val);
		p = strchr(p, ' ') + 1;
		sum += val;
		if (min > val) min = val;
		if (max < val) max = val;
	}
	printf("%d %d %d\n", min, max, sum);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:16:35: error: 'stdin' was not declared in this scope
   16 |         fgets(temp, sizeof(temp), stdin);
      |                                   ^~~~~
a.cc:6:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    5 | #include <limits.h>
  +++ |+#include <cstdio>
    6 | 
a.cc:16:9: error: 'fgets' was not declared in this scope
   16 |         fgets(temp, sizeof(temp), stdin);
      |         ^~~~~
a.cc:17:9: error: 'sscanf' was not declared in this scope
   17 |         sscanf(temp, "%d", &num);
      |         ^~~~~~
a.cc:31:9: error: 'printf' was not declared in this scope
   31 |         printf("%d %d %d\n", min, max, sum);
      |         ^~~~~~
a.cc:31:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'