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

#include <stdio.h>
int main(void){
  int n;
  int min;
  int max;
  int sum;

  scanf("%d\n",&n);
  int num[n];

  for(int i; i<n ; i++){
    scanf("%d ",&num[i]);
  }

  min = num[0];
  max = num[0];

  for(int j; j<i ; j++){
    if(num[j] < min){
      min = num[j];
    }
    if(num[j] > max){
      max = num[j];
    }
    sum = sum + num[j];
  }

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

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:16: error: 'i' undeclared (first use in this function)
   18 |   for(int j; j<i ; j++){
      |                ^
main.c:18:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdlib.h>

//メイン関数
int main(void){
  int n, a;
  int min, max, sum;
  scanf("%d", &n);

  sum =  0;
  min =  1000000;
  max = -1000000;
  for(int i=0; i<n; i++){
    scanf("%d", &a)
    sum = sum + a;
    if(min > a) min = a;
    if(max < a) max = a;
  }

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



Compiler output:
main.c: In function 'main':
main.c:14:20: error: expected ';' before 'sum'
   14 |     scanf("%d", &a)
      |                    ^
      |                    ;
   15 |     sum = sum + a;
      |     ~~~
Language: C

#include<stdio.h>
int main(void)
{
	int max = -1000000;
	int min = 1000000;
	int i,sum,n = 0;
	int arr[10000];
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&A[i]);
	for(i=0,i<n,i++){
		if(A[i]>max) max=A[i];
		if(A[i]<min) min=A[i];
		sum = sum + A[i];
		}
			
	printf("%d %d %d\n",min,max,sum);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:38: error: 'A' undeclared (first use in this function)
    9 |         for(i=0;i<n;i++) scanf("%d",&A[i]);
      |                                      ^
main.c:9:38: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:24: error: expected ';' before ')' token
   10 |         for(i=0,i<n,i++){
      |                        ^
      |                        ;
main.c:10:24: error: expected expression before ')' token
Language: C

#include<stdio.h>
int main(void)
{
	int max = -1000000;
	int min = 1000000;
	int i,sum,n = 0;
	int arr[10000];
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&A[i]);
	for(i=0;i<n;i++){
		if(A[i]>max) max=A[i];
		if(A[i]<min) min=A[i];
		sum = sum + A[i];
		}		
	printf("%d %d %d\n",min,max,sum);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:38: error: 'A' undeclared (first use in this function)
    9 |         for(i=0;i<n;i++) scanf("%d",&A[i]);
      |                                      ^
main.c:9:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
	long int max = -1000000;
	long int min = 1000000;
	int i,sum,n = 0;
	int arr[10000];
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&A[i]);
	for(i=0;i<n;i++){
		if(A[i]>max) max=A[i];
		if(A[i]<min) min=A[i];
		sum = sum + A[i];
		}		
	printf("%d %d %d\n",min,max,sum);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:38: error: 'A' undeclared (first use in this function)
    9 |         for(i=0;i<n;i++) scanf("%d",&A[i]);
      |                                      ^
main.c:9:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
	int max = -1000000;
	int min = 1000000;
	int i,n = 0;
	long ong int sum = 0;
	int arr[10000];
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&A[i]);
	for(i=0;i<n;i++){
		if(A[i]>max) max=A[i];
		if(A[i]<min) min=A[i];
		sum = sum + A[i];
		}		
	printf("%d %d %lld\n",min,max,sum);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:17: error: expected ';' before 'int'
    7 |         long ong int sum = 0;
      |                 ^~~~
      |                 ;
main.c:10:38: error: 'A' undeclared (first use in this function)
   10 |         for(i=0;i<n;i++) scanf("%d",&A[i]);
      |                                      ^
main.c:10:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
	int max = -1000000;
	int min = 1000000;
	int i,n = 0;
	long long int sum = 0;
	int arr[10000];
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&A[i]);
	for(i=0;i<n;i++){
		if(A[i]>max) max=A[i];
		if(A[i]<min) min=A[i];
		sum = sum + A[i];
		}		
	printf("%d %d %lld\n",min,max,sum);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:38: error: 'A' undeclared (first use in this function)
   10 |         for(i=0;i<n;i++) scanf("%d",&A[i]);
      |                                      ^
main.c:10:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:15: error: 'A' undeclared (first use in this function)
   10 |         max = A[0];
      |               ^
main.c:10:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void)
{
	int n, i, num, min, max,sum;
	long int sum;

	scanf("%d", &n);

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

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:18: error: conflicting types for 'sum'; have 'long int'
    5 |         long int sum;
      |                  ^~~
main.c:4:33: note: previous declaration of 'sum' with type 'int'
    4 |         int n, i, num, min, max,sum;
      |                                 ^~~
Language: C

#include<stdio.h>

int main(void){
      int n;
      scanf("%d", &n);
          int max = -1000000;
          int min = 1000000;
          long long sum = 0;
          for (int i = 0; i < n; i++) {
              scanf("%d", &n);
              if(max < num) max = n;
              if(min > num) min = n;
              sum += n;
          }
        printf("%d %d %d",min,max,sum); 
      
  
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:24: error: 'num' undeclared (first use in this function); did you mean 'sum'?
   11 |               if(max < num) max = n;
      |                        ^~~
      |                        sum
main.c:11:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int min(int *a,n){
	int min = a[1];
	int i;
	for(i=1;i<=n;i++){
		if(a[i] < min)
		min = a[i];
		}
	return min;
}

int max(int *a,n){
	int max = a[1];
	int i;
	for(i=1;i<=n;i++){
		if(a[i] > max)
		max = a[i];
		}
	return max;
}

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

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


Compiler output:
main.c:2:16: error: unknown type name 'n'
    2 | int min(int *a,n){
      |                ^
main.c:12:16: error: unknown type name 'n'
   12 | int max(int *a,n){
      |                ^
main.c:22:16: error: unknown type name 'n'
   22 | int sum(int *a,n){
      |                ^
main.c: In function 'main':
main.c:36:29: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   36 |         printf("%d %d %d\n",min(a,n),max(a,n),sum(a,n));
      |                             ^~~
      |                             main
main.c:36:38: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   36 |         printf("%d %d %d\n",min(a,n),max(a,n),sum(a,n));
      |                                      ^~~
main.c:36:47: error: implicit declaration of function 'sum' [-Wimplicit-function-declaration]
   36 |         printf("%d %d %d\n",min(a,n),max(a,n),sum(a,n));
      |                                               ^~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(void){
int a;
int c;
int i;
int max;
int min;
int sum=0;

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


Compiler output:
main.c: In function 'main':
main.c:26:1: error: expected declaration or statement at end of input
   26 | return 0;}
      | ^~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(void){
int a;
int c;
int i;
int max;
int min;
lomg long sum=0;

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


Compiler output:
main.c: In function 'main':
main.c:11:1: error: 'lomg' undeclared (first use in this function); did you mean 'log'?
   11 | lomg long sum=0;
      | ^~~~
      | log
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: expected ';' before 'long'
   11 | lomg long sum=0;
      |     ^~~~~
      |     ;
main.c:23:3: error: 'sum' undeclared (first use in this function)
   23 |   sum=sum+a;
      |   ^~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(void){
int a;
int c;
int i;
int max;
int min;
lomg long sum;

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


Compiler output:
main.c: In function 'main':
main.c:11:1: error: 'lomg' undeclared (first use in this function); did you mean 'log'?
   11 | lomg long sum;
      | ^~~~
      | log
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: expected ';' before 'long'
   11 | lomg long sum;
      |     ^~~~~
      |     ;
main.c:23:3: error: 'sum' undeclared (first use in this function)
   23 |   sum=+a;
      |   ^~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(void){
int a;
int c;
int i;
int max;
int min;
lomg long sum;

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


Compiler output:
main.c: In function 'main':
main.c:11:1: error: 'lomg' undeclared (first use in this function); did you mean 'log'?
   11 | lomg long sum;
      | ^~~~
      | log
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: expected ';' before 'long'
   11 | lomg long sum;
      |     ^~~~~
      |     ;
main.c:23:3: error: 'sum' undeclared (first use in this function)
   23 |   sum =+ a;
      |   ^~~
Language: C

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

int a[100010];
int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	int minans = 1000000, maxans = -1000000, sumans = 0;
	for(int i = 0; i < n; i++){
		minans = min(minans, a[i]);
		maxans = max(maxans, a[i]);
		sumans += a[i];
	}
	cout << minans << " " << maxans << " " << sumans << endl;
}



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

#include <stdio.h>
int main(void)
{
	int a;
	int b;
	int max=0
	int low=0
	int sum=0;

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

		if (b > max) {
			max = b;
		}

		if (b < low) {
			low = b;
		}

		sum += b;
	}

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


Compiler output:
main.c: In function 'main':
main.c:7:9: error: expected ',' or ';' before 'int'
    7 |         int low=0
      |         ^~~
main.c:18:25: error: 'low' undeclared (first use in this function)
   18 |                 if (b < low) {
      |                         ^~~
main.c:18:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:17: error: 'sum' undeclared (first use in this function)
   22 |                 sum += b;
      |                 ^~~
Language: C

#include <iostream>
using namespace std;
int main(){

  int n,num,sum=0,max=0,min=0,i;
  cin>>n;

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

    cin>>num;
    if(i==0)max=min=sum=num;
    else sum+=num;
    if(num>max)max=num;
    if(num<min)min=num;

  }

  cout<<min<<" "<<max<<" "<<sum<<"\n";

}

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

#include<stdio.h>

int main(){

int n,input,sum=0,max,min;

scanf("%d",&n);

for(i=0;i<n;i++){
 scanf("%d",&input);
 if(i==0){
  min = input;
  max = input;
  sum = input;
 }else{
  if(max < input)max=input;
  if(input < min)min=input;
  sum += input;
 }
}

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

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: 'i' undeclared (first use in this function)
    9 | for(i=0;i<n;i++){
      |     ^
main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<iostream>
#include<math.h>

#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

using namespace std;

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

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int min, max, sum. a, b;
	cin >> b >> min >> max;
	if (min > max)
		swap(min, max);
	sum = min + max;
	for (int i = 3; i <= b; i++) {
		cin >> a;
		if (a < min)
			min = a;
		if (a > max)
			max = a;
		sum += a;
	}
	cout << min << " " << max << " " << sum << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: expected initializer before '.' token
    5 |         int min, max, sum. a, b;
      |                          ^
a.cc:6:16: error: 'b' was not declared in this scope
    6 |         cin >> b >> min >> max;
      |                ^
a.cc:9:9: error: 'sum' was not declared in this scope
    9 |         sum = min + max;
      |         ^~~
a.cc:11:24: error: 'a' was not declared in this scope
   11 |                 cin >> a;
      |                        ^
Language: C++

#include <iostream>

using namespace std;

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


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

#include <iostream>
#include <ioomanip>
#include <cmath>
int main(){
	int n , x , min , max , sum;
	sum=0;
	min=1000001;
	max=-10000001;
	cin >> n ;
	
	for (int i = 1 ; i<= n ; i++){
		cin>> x;
		if( min > x ) {
			min=x;
			
		}if( max < x){
			max=x;	
			}
			sum+=x
	}
	
}


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

#include <iostream>
#include <iomanip>
#include <cmath>
int main(){
	int n , x , min , max , sum;
	sum=0;
	min=1000001;
	max=-10000001;
	cin >> n ;
	
	for (int i = 1 ; i<= n ; i++){
		cin>> x;
		if( min > x ) {
			min=x;
			
		}if( max < x){
			max=x;	
			}
			sum+=x
	}
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |         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:31: error: expected ';' before '}' token
   19 |                         sum+=x
      |                               ^
      |                               ;
   20 |         }
      |         ~
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
int main(){
	int n , x , min , max , sum;
	sum=0;
	min=1000001;
	max=-10000001;
	cin >> n ;
	
	for (int i = 1 ; i<= n ; i++){
		cin>> x;
		if( min > x ) {
			min=x;
			
		}if( max < x){
			max=x;	
			}
			sum+=x
	
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |         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:31: error: expected ';' before '}' token
   19 |                         sum+=x
      |                               ^
      |                               ;
......
   22 | }
      | ~                              
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: expected ';' before '}' token
   19 |     return 0
      |             ^
      |             ;
   20 | }
      | ~
Language: C++

#include <iostream>
int main(){
	int n , x , min , max;
	long long sum = 0;
	min = 10000001;
	max = -10000001;
	
	cin >> n;
	
	for (int i = 1 ; i <= n ; i++){
		cin >> x;
		if(min > x) {
			min=x;
			
		}if(max < x){
			max = x;	
			}
		sum += x;
	}
	cout << min << " " << max << " " << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         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:20:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |         cout << min << " " << max << " " << sum << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:52: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |         cout << min << " " << max << " " << sum << endl;
      |                                                    ^~~~
      |                                                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int min1=2e9,max1=-2e9;
    long long sum=0,n,x;
    cin>>n;
    while(n--){
        cin>>x;
        min1 = min(min1,x);
        max1 = max(max1,x);
        sum += x;
    }
    cout<<min1<<" "<<max1<<" "<<sum<<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: no matching function for call to 'min(int&, long long int&)'
   11 |         min1 = min(min1,x);
      |                ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:11:19: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   11 |         min1 = min(min1,x);
      |                ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
a.cc:12:19: error: no matching function for call to 'max(int&, long long int&)'
   12 |         max1 = max(max1,x);
      |                ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:19: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   12 |         max1 = max(max1,x);
      |                ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int a[10010];

int main() {
    int n;
    cin >> n;
    int sum = 0, ma = -INT_MAX, mi = INT_MAX;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
        mi = min(mi, a[i]);
        ma = max(ma, a[i]);
    }
    cout << mi << ' ' << ma << ' ' << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: 'INT_MAX' was not declared in this scope
   12 |     int sum = 0, ma = -INT_MAX, mi = INT_MAX;
      |                        ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 | 
a.cc:16:9: error: 'mi' was not declared in this scope; did you mean 'i'?
   16 |         mi = min(mi, a[i]);
      |         ^~
      |         i
a.cc:19:13: error: 'mi' was not declared in this scope; did you mean 'ma'?
   19 |     cout << mi << ' ' << ma << ' ' << sum << endl;
      |             ^~
      |             ma
Language: C++

int n=5;
   int a[5]={10,1,5,17,4};
   int sum=0,min=a[0],max=a[0];
  for(int i=0;i<n;i++)
{
    sum+=a[i];
      if(a[i]<min)
      {
          min=a[i];
      }
      if(a[i]>max)
     {
       max=a[i];
     }
 }
cout<<min<<" "<<max<<" "<<sum;
return 0;


Compiler output:
a.cc:4:3: error: expected unqualified-id before 'for'
    4 |   for(int i=0;i<n;i++)
      |   ^~~
a.cc:4:15: error: 'i' does not name a type
    4 |   for(int i=0;i<n;i++)
      |               ^
a.cc:4:19: error: 'i' does not name a type
    4 |   for(int i=0;i<n;i++)
      |                   ^
a.cc:16:1: error: 'cout' does not name a type
   16 | cout<<min<<" "<<max<<" "<<sum;
      | ^~~~
a.cc:17:1: error: expected unqualified-id before 'return'
   17 | return 0;
      | ^~~~~~
Language: C++

int n=5;
   int a[5]={10,5,1,17,4};
   int sum=0;
  int min=a[0];
  int max=a[0];
  for(int i=0;i<n;i++)
{
    sum+=a[i];
      if(a[i]<min)
      {
          min=a[i];
      }
      if(a[i]>max)
     {
       max=a[i];
     }
 }
cout<<min<<" "<<max<<" "<<sum;
return 0;


Compiler output:
a.cc:6:3: error: expected unqualified-id before 'for'
    6 |   for(int i=0;i<n;i++)
      |   ^~~
a.cc:6:15: error: 'i' does not name a type
    6 |   for(int i=0;i<n;i++)
      |               ^
a.cc:6:19: error: 'i' does not name a type
    6 |   for(int i=0;i<n;i++)
      |                   ^
a.cc:18:1: error: 'cout' does not name a type
   18 | cout<<min<<" "<<max<<" "<<sum;
      | ^~~~
a.cc:19:1: error: expected unqualified-id before 'return'
   19 | return 0;
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;

#define for_(i,a,b) for(int i = (a);i < (b);i++)
#define rfor_(i,a,b) for(int i = (b)-1;i >= (a);i--)
#define rep(i,n) for_(i,0,(n))
#define rrep(i,n) rfor_(i,0,(n))

int n;
int a[100001];

int main(){
	cin.tie(0);
	
	cin>>n;
	rep(i, n)cin>>a[i];
	
	sort(a, a+n);
	
	cout<<a[0]<<' '<<a[n-1]<<' ';
	
	int s = 0;
	rep(i, n)s += a[i];
	
	cout<<s<<endl;
	
	return 0;
}



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

#include<stdio.h>
int main() {
	int Max(int *p, int N);
	int Min(int *p, int N);
	int Sum(int *p, int N);
	int data[10000], n, i, j = 0;
	int ans_max, ans_min, ans_sum;

	do {
		scanf_s("%d", &n);
		for (i = 0; i < n; i++) {
			scanf_s("%d", &data[i]);
		}
		j++;
	} while (j > n);
	ans_max = Max(data,n);
	ans_min = Min(data,n);
	ans_sum = Sum(data,n);

	printf("%d %d %d",ans_min ,ans_max ,ans_sum);

	return 0;
}

int Max(int *p,int N) {
    int i, j, tmp;
    for (i = 0; i < N - 1; i++) {
	for (j = i + 1; j < N; j++) {
	    if (p[j] > p[i]) {
		tmp = p[i];
		p[i] = p[j];
		p[j] = tmp;
	    }
        }
    }
    return p[0];
}

int Min(int *p,int N) {
	int i, j, tmp;
	for (i = 0; i < N - 1; i++) {
		for (j = i + 1; j < N; j++) {
			if (p[j] > p[i]) {
				tmp = p[i];
				p[i] = p[j];
				p[j] = tmp;
			}
		}
	}
	return p[N - 1];
}

int Sum(int *p, int N){
	int i, ans = 0;
	for (i = 0; i < N; i++) {
		ans = ans + p[i];
	}
	return ans;
}


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

#include<stdio.h>
int main() {
	int Max(int *p, int N);
	int Min(int *p, int N);
	int Sum(int *p, int N);
	int data[10000], m, n, i = 0;
	int ans_max, ans_min, ans_sum;

	scanf_s("%d", &n);
	do {
		scanf_s("%d", &m);
		data[i] = m;
		i++;
	} while (i < n);


	ans_max = Max(data,n);
	ans_min = Min(data,n);
	ans_sum = Sum(data,n);

	printf("%d %d %d\n",ans_min ,ans_max ,ans_sum);

	return 0;
}

int Max(int *p,int N) {
	int i, j, tmp;
	for (i = 0; i < N - 1; i++) {
		for (j = i + 1; j < N; j++) {
			if (p[j] > p[i]) {
				tmp = p[i];
				p[i] = p[j];
				p[j] = tmp;
			}
		}
	}
	return p[0];
}

int Min(int *p,int N) {
	int i, j, tmp;
	for (i = 0; i < N - 1; i++) {
		for (j = i + 1; j < N; j++) {
			if (p[j] > p[i]) {
				tmp = p[i];
				p[i] = p[j];
				p[j] = tmp;
			}
		}
	}
	return p[N - 1];
}

int Sum(int *p, int N){
	int i, ans = 0;
	for (i = 0; i < N; i++) {
		ans = ans + p[i];
	}
	return ans;
}


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

#include<stdio.h>
int main() {
    int Max(int *p, int N);
    int Min(int *p, int N);
    int Sum(int *p, int N);
    int data[10000], m, n, i = 0;
    int ans_max, ans_min, ans_sum;

    scanf_s("%d", &n);
    do {
	scanf_s("%d", &m);
	data[i] = m;
	i++;
    } while (i < n);

    ans_max = Max(data,n);
    ans_min = Min(data,n);
    ans_sum = Sum(data,n);

    printf("%d %d %d\n",ans_min ,ans_max ,ans_sum);

    return 0;
}

int Max(int *p,int N) {
    int i, j, tmp;
    for (i = 0; i < N - 1; i++) {
	for (j = i + 1; j < N; j++) {
	    if (p[j] > p[i]) {
		tmp = p[i];
		p[i] = p[j];
		p[j] = tmp;
	    }
	}
    }
    return p[0];
}

int Min(int *p,int N) {
    int i, j, tmp;
    for (i = 0; i < N - 1; i++) {
	for (j = i + 1; j < N; j++) {
	    if (p[j] > p[i]) {
		tmp = p[i];
		p[i] = p[j];
		p[j] = tmp;
	    }
	}
    }
    return p[N - 1];
}

int Sum(int *p, int N){
    int i, ans = 0;
    for (i = 0; i < N; i++) {
	 ans = ans + p[i];
    }
    return ans;
}


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

#include<stdio.h>
int main() {
	long int Max(long int *p, long int N);
	long int Min(long int *p, long int N);
	long int Sum(long int *p, long int N);
	long int data[10000], m;
	long int ans_max, ans_min, ans_sum;
	int i = 0, n;

	scanf_s("%d", &n);
	do {
		scanf_s("%d", &m);
		data[i] = m;
		i++;
	} while (i < n);


	ans_max = Max(data,n);
	ans_min = Min(data,n);
	ans_sum = Sum(data,n);

	printf("%d %d %d\n",ans_min ,ans_max ,ans_sum);

	return 0;
}

long int Max(long int *p, long int N) {
	int i, j, tmp;
	for (i = 0; i < N - 1; i++) {
		for (j = i + 1; j < N; j++) {
			if (p[j] > p[i]) {
				tmp = p[i];
				p[i] = p[j];
				p[j] = tmp;
			}
		}
	}
	return p[0];
}

long int Min(long int *p, long int N) {
	int i, j, tmp;
	for (i = 0; i < N - 1; i++) {
		for (j = i + 1; j < N; j++) {
			if (p[j] > p[i]) {
				tmp = p[i];
				p[i] = p[j];
				p[j] = tmp;
			}
		}
	}
	return p[N - 1];
}

long int Sum(long int *p, long int N){
	int i, ans = 0;
	for (i = 0; i < N; i++) {
		ans = ans + p[i];
	}
	return ans;
}


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

#include <iostream>
using namespace std;

int main()
{
    int n; cin >> n;
    int amin = INT_MAX, amax = INT_MIN;
    long sum = 0;
    
    while(n--) {
        int x; cin >> x;
        amin = (x<amin) ? x : amin;
        amax = (x>amax) ? x : amax;
        sum += x;
    }
    
    cout << amin << ' ' << amax << ' ' << sum << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'INT_MAX' was not declared in this scope
    7 |     int amin = INT_MAX, amax = INT_MIN;
      |                ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:13:9: error: 'amax' was not declared in this scope
   13 |         amax = (x>amax) ? x : amax;
      |         ^~~~
a.cc:17:28: error: 'amax' was not declared in this scope
   17 |     cout << amin << ' ' << amax << ' ' << sum << endl;
      |                            ^~~~
Language: C++

#include<iostream>
using namespace std;

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: unable to find string literal operator 'operator""ma' with 'const char [2]', 'long unsigned int' arguments
   17 |         cout<<mi<<" "ma<<" "su<<endl;
      |                   ^~~~~
a.cc:17:26: error: unable to find string literal operator 'operator""su' with 'const char [2]', 'long unsigned int' arguments
   17 |         cout<<mi<<" "ma<<" "su<<endl;
      |                          ^~~~~
Language: C++

#include <iostream>
using namespace std;

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

	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> a;
		if (a < minValue) minValue = a;
		if (a > maxValue) maxValue = a;
		sum += s;
	}

	cout << minValue << maxValue << sum << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: 's' was not declared in this scope
   17 |                 sum += s;
      |                        ^
Language: C++

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

int main(){
    int n;
    cin >> n;
    vector<int> a(N);
    for(int i=0; i<n; i++) cin >> a.at(i);
    
    int mi = a.at(0), ma = a.at(0), su = a.at(0);
    for(int i=1; i<n; i++){
        mi = min(mi, a.at(i));
        ma = max(ma, a.at(i));
        su += a.at(i);
    }
    cout << mi << " " << ma << " " << su << endl;
    return 0;
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'N' was not declared in this scope
   10 |     vector<int> a(N);
      |                   ^
Language: C++

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

int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i=0; i<n; i++) cin >> a.at(i);
    
    ll mi = a.at(0), ma = a.at(0), su = a.at(0);
    for(int i=1; i<n; i++){
        mi = min(mi, a.at(i));
        ma = max(ma, a.at(i));
        su += a.at(i);
    }
    cout << mi << " " << ma << " " << su << endl;
    return 0;
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'll' was not declared in this scope
   13 |     ll mi = a.at(0), ma = a.at(0), su = a.at(0);
      |     ^~
a.cc:15:9: error: 'mi' was not declared in this scope; did you mean 'i'?
   15 |         mi = min(mi, a.at(i));
      |         ^~
      |         i
a.cc:16:9: error: 'ma' was not declared in this scope; did you mean 'a'?
   16 |         ma = max(ma, a.at(i));
      |         ^~
      |         a
a.cc:17:9: error: 'su' was not declared in this scope
   17 |         su += a.at(i);
      |         ^~
a.cc:19:13: error: 'mi' was not declared in this scope
   19 |     cout << mi << " " << ma << " " << su << endl;
      |             ^~
a.cc:19:26: error: 'ma' was not declared in this scope; did you mean 'a'?
   19 |     cout << mi << " " << ma << " " << su << endl;
      |                          ^~
      |                          a
a.cc:19:39: error: 'su' was not declared in this scope
   19 |     cout << mi << " " << ma << " " << su << endl;
      |                                       ^~
Language: C++

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

int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i=0; i<n; i++) cin >> a.at(i);
    
    long longmi = a.at(0), ma = a.at(0), su = a.at(0);
    for(int i=1; i<n; i++){
        mi = min(mi, a.at(i));
        ma = max(ma, a.at(i));
        su += a.at(i);
    }
    cout << mi << " " << ma << " " << su << endl;
    return 0;
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'mi' was not declared in this scope; did you mean 'i'?
   15 |         mi = min(mi, a.at(i));
      |         ^~
      |         i
a.cc:16:17: error: no matching function for call to 'max(long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   16 |         ma = max(ma, a.at(i));
      |              ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:16:17: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   16 |         ma = max(ma, a.at(i));
      |              ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:16:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   16 |         ma = max(ma, a.at(i));
      |              ~~~^~~~~~~~~~~~~
a.cc:19:13: error: 'mi' was not declared in this scope; did you mean 'ma'?
   19 |     cout << mi << " " << ma << " " << su << endl;
      |             ^~
      |             ma
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

int main() {
    int _a ;
    std::vector< int > v ;
    while( std::cin >> _a ) {
        v.push_back( _a )
    }
    std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before '}' token
   10 |         v.push_back( _a )
      |                          ^
      |                          ;
   11 |     }
      |     ~                     
a.cc:12:38: error: 'class std::vector<int>' has no member named 'first'
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                      ^~~~~
a.cc:12:50: error: 'class std::vector<int>' has no member named 'last'; did you mean 'at'?
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                  ^~~~
      |                                                  at
a.cc:12:82: error: 'class std::vector<int>' has no member named 'first'
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                                                  ^~~~~
a.cc:12:94: error: 'class std::vector<int>' has no member named 'last'; did you mean 'at'?
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                                                              ^~~~
      |                                                                                              at
a.cc:12:125: error: 'class std::vector<int>' has no member named 'first'
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                                                                                             ^~~~~
a.cc:12:137: error: 'class std::vector<int>' has no member named 'last'; did you mean 'at'?
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                                                                                                         ^~~~
      |                                                                                                                                         at
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

int main() {
    int _a ;
    std::vector< int > v ;
    while( std::cin >> _a ) {
        v.push_back( _a ) ;
    }
    std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: 'class std::vector<int>' has no member named 'first'
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                      ^~~~~
a.cc:12:50: error: 'class std::vector<int>' has no member named 'last'; did you mean 'at'?
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                  ^~~~
      |                                                  at
a.cc:12:82: error: 'class std::vector<int>' has no member named 'first'
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                                                  ^~~~~
a.cc:12:94: error: 'class std::vector<int>' has no member named 'last'; did you mean 'at'?
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                                                              ^~~~
      |                                                                                              at
a.cc:12:125: error: 'class std::vector<int>' has no member named 'first'
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                                                                                             ^~~~~
a.cc:12:137: error: 'class std::vector<int>' has no member named 'last'; did you mean 'at'?
   12 |     std::cout << std::min_element( v.first() , v.last() ) << std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() ) ;
      |                                                                                                                                         ^~~~
      |                                                                                                                                         at
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

int main() {
    int n ;
    std::vector< int > a ;
    std::cin >> n ;
    
    for( int i = 0 ; i < n ; i++ ) {
        int ii ;
        std::cin >> ii ;
        v.push_back( ii ) ;
    }
    std::cout << *std::min_element( v.first() , v.last() ) << *std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() , 0 ) ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'v' was not declared in this scope
   14 |         v.push_back( ii ) ;
      |         ^
a.cc:16:37: error: 'v' was not declared in this scope
   16 |     std::cout << *std::min_element( v.first() , v.last() ) << *std::max_element( v.first() , v.last() ) << std::accumulate( v.first() , v.last() , 0 ) ;
      |                                     ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

int main() {
    int n ;
    std::vector< int > a ;
    std::cin >> n ;
    
    for( int i = 0 ; i < n ; i++ ) {
        int ii ;
        std::cin >> ii ;
        v.push_back( ii ) ;
    }
    std::cout << *std::min_element( a.begin() , a.end() ) << *std::max_element( a.begin() , a.end() ) << std::accumulate( a.begin() , a.end() , 0 ) ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'v' was not declared in this scope
   14 |         v.push_back( ii ) ;
      |         ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

int main() {
    int n , _a ;
    std::vector< int > a ;
    while( std::cin >> _a ) {
        a.push_back( _a )
    }
    std::cout << *std::min_element(a.begin() , a.end()) << *std::max_element(a.begin() , a.end()) << std::accumulate(a.begin() , a.end()) ;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before '}' token
   10 |         a.push_back( _a )
      |                          ^
      |                          ;
   11 |     }
      |     ~                     
a.cc:12:117: error: no matching function for call to 'accumulate(std::vector<int>::iterator, std::vector<int>::iterator)'
   12 |     std::cout << *std::min_element(a.begin() , a.end()) << *std::max_element(a.begin() , a.end()) << std::accumulate(a.begin() , a.end()) ;
      |                                                                                                      ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/numeric:62,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
  134 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:134:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
  161 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:161:5: note:   candidate expects 4 arguments, 2 provided
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

int main() {
    int n , _a ;
    std::vector< int > a ;
    while( std::cin >> _a ) {
        a.push_back( _a )
    }
    std::cout << *std::min_element(a.begin() , a.end()) << *std::max_element(a.begin() , a.end()) << std::accumulate(a.begin() , a.end() , 0LL) ;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before '}' token
   10 |         a.push_back( _a )
      |                          ^
      |                          ;
   11 |     }
      |     ~