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

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

int main(){

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

  int mn = a[0], mx = a[0];
  long long sun = 0;
  for(int i=0;i<n;i++){
    mn = min(mn, a[i]);



Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected '}' at end of input
   14 |     mn = min(mn, a[i]);
      |                        ^
a.cc:13:23: note: to match this '{'
   13 |   for(int i=0;i<n;i++){
      |                       ^
a.cc:14:24: error: expected '}' at end of input
   14 |     mn = min(mn, a[i]);
      |                        ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected '}' at end of input
   14 |     mn = min(mn, a[i]);
      |                        ^
a.cc:13:23: note: to match this '{'
   13 |   for(int i=0;i<n;i++){
      |                       ^
a.cc:14:24: error: expected '}' at end of input
   14 |     mn = min(mn, a[i]);
      |                        ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

  int main(){

int n;
cin>>n;

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


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


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

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: expected ')' before ';' token
   17 | mx = max(mx, a[i];
      |         ~        ^
      |                  )
Language: C++

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

  int main(){

int n;
cin>>n;

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


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


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

re


Compiler output:
a.cc: In function 'int main()':
a.cc:24:1: error: 're' was not declared in this scope
   24 | re
      | ^~
a.cc:24:3: error: expected '}' at end of input
   24 | re
      |   ^
a.cc:4:13: note: to match this '{'
    4 |   int main(){
      |             ^
Language: C++

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

int main() {
	int a, b = -1000000, c = 1000000, n, i, sum = 0;
	do {	
		cin >> n;
	}whlie(n < 0 && n <= 10000);
	for(i = 1; i <= n; i++) {
		do {	
			cin >> a;
		}whlie(n <= -1000000 && a <= 1000000);
		if (a >= b) {
			b = a;
		}
		if (a <= c) {
			c = a;
		}
		sum = sum + a;
	}
	cout << c << " " << b << " " << sum <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected 'while' before 'whlie'
    8 |         }whlie(n < 0 && n <= 10000);
      |          ^~~~~
a.cc:8:10: error: expected '(' before 'whlie'
    8 |         }whlie(n < 0 && n <= 10000);
      |          ^~~~~
      |          (
a.cc:8:10: error: 'whlie' was not declared in this scope
    8 |         }whlie(n < 0 && n <= 10000);
      |          ^~~~~
a.cc:8:36: error: expected ')' before ';' token
    8 |         }whlie(n < 0 && n <= 10000);
      |          ~~~~~                     ^
      |                                    )
a.cc:12:18: error: expected 'while' before 'whlie'
   12 |                 }whlie(n <= -1000000 && a <= 1000000);
      |                  ^~~~~
a.cc:12:18: error: expected '(' before 'whlie'
   12 |                 }whlie(n <= -1000000 && a <= 1000000);
      |                  ^~~~~
      |                  (
a.cc:12:54: error: expected ')' before ';' token
   12 |                 }whlie(n <= -1000000 && a <= 1000000);
      |                  ~~~~~                               ^
      |                                                      )
Language: C++

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: expected ';' before ')' token
   16 |     for(int i=0;i<n,i++){
      |                        ^
      |                        ;
Language: C++

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: expected ';' before ')' token
   16 |     for(int i=0;i<n,i++){
      |                        ^
      |                        ;
Language: C++

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

int main(){
  int n;
  cin>>n;
  int a[10000];

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

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

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

  return 0;
}



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:14:10: error: 'min' was not declared in this scope; did you mean 'mn'?
   14 |     mn = min(mn, a[i]);
      |          ^~~
      |          mn
a.cc:15:10: error: 'max' was not declared in this scope; did you mean 'mx'?
   15 |     mx = max(mx, a[i]);
      |          ^~~
      |          mx
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |   ^~~~
a.cc:19:32: error: 'endl' was not declared in this scope
   19 |   cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                                ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
long long a,min=1000000,max=-1000000,sum=0;
cin>>n;
for(i=0;i<n;i++){
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:7:5: error: 'i' was not declared in this scope
    7 | for(i=0;i<n;i++){
      |     ^
a.cc:10:7: error: expected ';' before '}' token
   10 | sum+=a}
      |       ^
      |       ;
a.cc:12:9: error: expected ';' before '}' token
   12 | return 0}
      |         ^
      |         ;
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
long long a,min=1000000,max=-1000000,sum=0;
cin>>n;
for(i=0;i<n;i++){
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:7:5: error: 'i' was not declared in this scope
    7 | for(i=0;i<n;i++){
      |     ^
a.cc:10:7: error: expected ';' before '}' token
   10 | sum+=a};
      |       ^
      |       ;
a.cc:12:9: error: expected ';' before '}' token
   12 | return 0}
      |         ^
      |         ;
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
long long a,min=1000000,max=-1000000,sum=0;
cin>>n;
for(i=0;i<n;i++){
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:7:5: error: 'i' was not declared in this scope
    7 | for(i=0;i<n;i++){
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
long long a,min=1000000,max=-1000000,sum=0;
cin>>n;
for(int i=0;i<n;i++){
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:10:7: error: expected ';' before '}' token
   10 | sum+=a}
      |       ^
      |       ;
a.cc:12:9: error: expected ';' before '}' token
   12 | return 0}
      |         ^
      |         ;
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
long long a,min=1000000,max=-1000000,sum=0;
cin>>n;
for(int i=0;i<n;i++){
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:10:7: error: expected ';' before '}' token
   10 | sum+=a};
      |       ^
      |       ;
a.cc:12:9: error: expected ';' before '}' token
   12 | return 0}
      |         ^
      |         ;
Language: C++

#include<iostream>
using namespace std;
int main(){
int n,i,max=0,min=0,sum=0;
cin >>n;
int a[n];
for(i=0;i<=n;i++){
cin>>a[i];
if(a[i]<=min){
min=a[i];
}
if(a[i]>=max){
max=a[i];
}
sum=sum+a[i]
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ';' before '}' token
   15 | sum=sum+a[i]
      |             ^
      |             ;
   16 | }
      | ~            
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int n,i,max=0,min=0,sum=0;
cin >>n;
int a[n];
for(i=0;i<=n;i++){
cin>>a[i];
if(a[i]<=min){
min=a[i];
}
if(a[i]>=max){
max=a[i];
}
sum=sum+a[i]
}
}


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

#include <iostream>
using namespace std;

int main()
{
	a[100] = {null};

	cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'a' was not declared in this scope
    6 |         a[100] = {null};
      |         ^
a.cc:6:19: error: 'null' was not declared in this scope
    6 |         a[100] = {null};
      |                   ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int a[100] = {null};

	cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: 'null' was not declared in this scope
    6 |         int a[100] = {null};
      |                       ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int count;
	cin >> count;
	
	int min;
	int max;
	int average;

	for(int i = 0; i < count; i++)
	{
	  int input;
		cin >> input;
		
		avarage += input;
		if(min > input) min = input;
		if(max < input) max = input;
	}
	avarage /= count;
	
	cout << min << max << avarage;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'avarage' was not declared in this scope; did you mean 'average'?
   18 |                 avarage += input;
      |                 ^~~~~~~
      |                 average
a.cc:22:9: error: 'avarage' was not declared in this scope; did you mean 'average'?
   22 |         avarage /= count;
      |         ^~~~~~~
      |         average
Language: C++

#include <stdio.h>

int main()
{

int a[10000], min, max, n, i;
scanf("%d", &n);//1以上が入力されるものとします
for(i = 0; i < n; i++){
scanf("%d", &a[i]);
sum += a[i];
}
max = min = a[0];//とりあえず最初の要素をセットしておく
for(i = 1; i < n; i++){//2番目以降の要素と比較
if(a[i] > max)max = a[i];
if(a[i] < min)min = a[i];
}
printf("%d %d %lld\n", min, max, sum);

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'sum' was not declared in this scope
   10 | sum += a[i];
      | ^~~
a.cc:17:34: error: 'sum' was not declared in this scope
   17 | printf("%d %d %lld\n", min, max, sum);
      |                                  ^~~
Language: C++

#include<iostream>
using namespace std;

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

    return 0;
}

#include "stdafx.h"
#include<iostream>
using namespace std;

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

    return 0;
}




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

#include{bits/stdc++.h}
using namespace std;

int main(){
    
    int n;
    cin>>n;
    int a[10000];
    for(int i=0;i++) cin>>a[i];

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

    return 0;
}


Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include{bits/stdc++.h}
      |         ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include{bits/stdc++.h}
a.cc:9:20: error: expected ';' before ')' token
    9 |     for(int i=0;i++) cin>>a[i];
      |                    ^
      |                    ;
a.cc:14:14: error: 'min' was not declared in this scope; did you mean 'mn'?
   14 |         mn = min(mn,a[i]);
      |              ^~~
      |              mn
a.cc:15:14: error: 'max' was not declared in this scope; did you mean 'mx'?
   15 |         mx = max(mx,a[i]);
      |              ^~~
      |              mx
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout<<" "<<mx<<" "<<sum<<endl;
      |     ^~~~
a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:30: error: 'endl' was not declared in this scope
   18 |     cout<<" "<<mx<<" "<<sum<<endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include{bits/stdc++.h}
Language: C++

#include <bits/stdc++.h>
using namespace std;
    
int main() {
  int N, G;
  cin >> N;
  vector<int> K(N)

   for (int i = 0; i < N; i++) {
    cin >> K.at(i);
    G += K.at(i)
  }
   sort(K.begin(), K.end());

   cout << K.at(0) << " " << K.at(4) << " " << G << endl;
   
   return 0;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: expected ',' or ';' before 'for'
    9 |    for (int i = 0; i < N; i++) {
      |    ^~~
a.cc:9:20: error: 'i' was not declared in this scope
    9 |    for (int i = 0; i < N; i++) {
      |                    ^
Language: C++

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

int main(){
           int n;
           cin>>n;
           int a[100];
           for(int x=0;x<n;x++) cin>>a[x];
           int mn = a[0];
           int mx = a[0];
           long long sum = 0;
           for(int x=0;x<n;x++){
                mn = min(mn,a[x]);
                mx = max(mx,a[x]);
                sum += a[x];
           }
        
           cout<<mn<<“ “<<mx<<“ “<<sum<<endl;
     return 0;
}


Compiler output:
a.cc:18:22: error: extended character “ is not valid in an identifier
   18 |            cout<<mn<<“ “<<mx<<“ “<<sum<<endl;
      |                      ^
a.cc:18:24: error: extended character “ is not valid in an identifier
   18 |            cout<<mn<<“ “<<mx<<“ “<<sum<<endl;
      |                        ^
a.cc:18:31: error: extended character “ is not valid in an identifier
   18 |            cout<<mn<<“ “<<mx<<“ “<<sum<<endl;
      |                               ^
a.cc:18:33: error: extended character “ is not valid in an identifier
   18 |            cout<<mn<<“ “<<mx<<“ “<<sum<<endl;
      |                                 ^
a.cc: In function 'int main()':
a.cc:18:22: error: '\U0000201c' was not declared in this scope
   18 |            cout<<mn<<“ “<<mx<<“ “<<sum<<endl;
      |                      ^
Language: C++

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

int main(){
           int n;
           cin>>n;
           int a[100];
           for(int x=0;x<n;x++){ 
           cin>>a[x];
           int mn = a[0];
           int mx = a[0];
           long long sum = 0;
                mn = min(mn,a[x]);
                mx = max(mx,a[x]);
                sum += a[x];
           }
    cout<<mn<<" "<<mx<<" "<<sum<<endl;
     return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'mn' was not declared in this scope; did you mean 'n'?
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |           ^~
      |           n
a.cc:17:20: error: 'mx' was not declared in this scope
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                    ^~
a.cc:17:29: error: 'sum' was not declared in this scope
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                             ^~~
Language: C++

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

int main(){
           int n;
           cin>>n;
           int a[100];
           for(int x=0;x<n;x++){ 
           cin>>a[x];
           int mn = a[0];
           int mx = a[0];
           long long sum = 0;
            mn = min(mn,a[x]);
            mx = max(mx,a[x]);
            sum += a[x];
           }
    cout<<mn<<" "<<mx<<" "<<sum<<endl;
     return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'mn' was not declared in this scope; did you mean 'n'?
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |           ^~
      |           n
a.cc:17:20: error: 'mx' was not declared in this scope
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                    ^~
a.cc:17:29: error: 'sum' was not declared in this scope
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                             ^~~
Language: C++

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

int main(){
           int n;
           cin>>n;
           int a[100];
           for(int x=0;x<n;x++){ 
           cin>>a[x];
           int mn = a[0];
           int mx = a[0];
            mn = min(mn,a[x]);
            mx = max(mx,a[x]);
           long long sum = 0;
            sum += a[x];
           }
    cout<<mn<<" "<<mx<<" "<<sum<<endl;
     return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'mn' was not declared in this scope; did you mean 'n'?
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |           ^~
      |           n
a.cc:17:20: error: 'mx' was not declared in this scope
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                    ^~
a.cc:17:29: error: 'sum' was not declared in this scope
   17 |     cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                             ^~~
Language: C++

#include<stdio.h>
int main(void) {
	int i,n,x,max,min;
	long long int sum;
	sum = 0;
	min = -1000000;
	max = 1000000;
	scanf_s("%d", &n);

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

	return 0;
}


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

#include<stdio.h>
int main() {
	int i,n,x,max,min;
	long long int sum;
	sum = 0;
	min = -1000000;
	max = 1000000;
	scanf("%d", &n);

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

	return 0;
}


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

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

int main(){
  long n,min,max,sum,x;
  sum = 0;
  min = 1000001;
  max = −1000001;
  cin >> n;
  for(int i=0; i < n; i++ ){
    cin >> x;
    max = max(x,max);
    min = min(x,min);
    sum += x;
  }
  cout << min << ' ' << max << ' ' << sum << endl;
  return 0;
}



Compiler output:
a.cc:9:9: error: extended character − is not valid in an identifier
    9 |   max = −1000001;
      |         ^
a.cc: In function 'int main()':
a.cc:9:9: error: '\U000022121000001' was not declared in this scope
    9 |   max = −1000001;
      |         ^~~~~~~~
a.cc:13:14: error: 'max' cannot be used as a function
   13 |     max = max(x,max);
      |           ~~~^~~~~~~
a.cc:14:14: error: 'min' cannot be used as a function
   14 |     min = min(x,min);
      |           ~~~^~~~~~~
Language: C++

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


int main(){
	int n ,sum =0, max= 0, min =20000000;
	cin >>n;
	int test[n];
	for (int i =1; i<n+1;i++){
		cin >>test[i];
		sum +=test[i];
		if(max < test[i]){
			max =test[i];
		}
		if(min >test[i]){
			min = test[i];
		}

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

}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: expected primary-expression before ',' token
   23 |         cout <<min ,," "<<max<<" " <<sum;
      |                     ^
a.cc:23:25: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator<<'
   23 |         cout <<min ,," "<<max<<" " <<sum;
      |                      ~~~^~~~~
      |                      |    |
      |                      |    int
      |                      const char [2]
Language: C++

#include <cstdio>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected ';' before '}' token
    8 |             scanf("%d\n", &a[i])
      |                                 ^
      |                                 ;
    9 |         }else scanf("%d ", &a[i]);
      |         ~
Language: C++

#include <cstdio>
#include <iostream>

using namespace std;

int main(){
    int n, a;
    int maxa, mina;
    long long sum;
    max = -1000001;
    min = 1000001;
    sum = 0;
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a;
        if(maxa < a){
            maxa = a;
        }
        if(mina > a){
            mina = a;
        }
        sum += a;
    }
    printf("%d %d %lld\n", mina, maxa, sum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: overloaded function with no contextual type information
   10 |     max = -1000001;
      |            ^~~~~~~
a.cc:11:11: error: overloaded function with no contextual type information
   11 |     min = 1000001;
      |           ^~~~~~~
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			long sum = 0;
			int min = 1000000;
			int max = 0;
			
			for(int i = 0; i < N; i++) {
				int number = sc.nextInt();
					if(min > number) {
						min = number;
					}
					if(max < number) {
						max = number;
					}
				sum += number;
			}

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

}



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

#include<iostream>
using namespace std;

int main(){
	int n, x, Min = 1000000, Max = -1000000;
	long long sum = 0;

	for(int i = 0; i < n; i++){
		cin >> x;

		if(x < Min) Min = x;
		if(x > Max) Max = x;
		sum += x;
	}

	cout << Min << " " << Max << " " << Sum << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:45: error: 'Sum' was not declared in this scope; did you mean 'sum'?
   16 |         cout << Min << " " << Max << " " << Sum << endl;
      |                                             ^~~
      |                                             sum
Language: C++


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int min = 200000000,max = -200000000;
    	long sum=0;
    	int n = sc.nextInt();
    	int a[]= new int[n+1];
    	for(int i=0;i<n;i++) {
    		a[i]=sc.nextInt();
    		min = Math.min(min, a[i]);
    		max = Math.max(max, a[i]);
    		sum += a[i];
    	}
    	System.out.printf("%d %d %d\n",min,max,sum);
    	
    }
}


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

import java.util.Scanner;

public class Main {
    public static void Main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int min = 200000000,max = -200000000;
    	long sum=0;
    	int n = sc.nextInt();
    	int a[]= new int[n+1];
    	for(int i=0;i<n;i++) {
    		a[i]=sc.nextInt();
    		min = Math.min(min, a[i]);
    		max = Math.max(max, a[i]);
    		sum += a[i];
    	}
    	System.out.printf("%d %d %d\n",min,max,sum);
    	
    }
}


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

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


Compiler output:
a.cc:1:21: warning: extra tokens at end of #include directive
    1 | #include <iostream> using namespace std; int main(){ int n; int min=1000000, max=-1000000; long sum=0; cin >> n; for(int i=0; i<n; i++){ int in; cin >> in; if(in<min) min = in; if(in>max) max = in; sum += in; } cout << min << " " << max << " " << sum << endl; }
      |                     ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
using namespace std;
int main(){
	long long int n, a[10000],x=-1000000,y=1000000;
	long long int sum = 0;
	cin >> n;
	for (i = 0; i < n; i++){
		cin >> a[i];
		sum += a[i];
	}
	for (i = 0; i < n; i++){
		if (y>a[1])y = a[i];
		if (x<a[1])x = a[i];
	}
	printf("%lld %lld %lld \n", y, x, sum);
	return 0;

}


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


#include<iostream>

using namespace std;

int main()

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

 int d,e,f;
 for(int i=0;i<n-1;i++){
 if(a[i]<a[i+1])
 d=a[i+1]
 }
for(int i=0;i<n-1;i++){
 if(a[i]>a[i+1])
 e=a[i+1]
 }
for(int i=0;i<n;i++){
 f+=a[i]
}
cout<<d<<" "<<e<<" "<<f<<endl;
return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: expected ';' before '}' token
   18 |  d=a[i+1]
      |          ^
      |          ;
   19 |  }
      |  ~        
a.cc:22:10: error: expected ';' before '}' token
   22 |  e=a[i+1]
      |          ^
      |          ;
   23 |  }
      |  ~        
a.cc:25:9: error: expected ';' before '}' token
   25 |  f+=a[i]
      |         ^
      |         ;
   26 | }
      | ~
Language: C++


#include<iostream>

using namespace std;

int main()

{
  int n;
  int w,x,y
  cin >> n;
  int a[n];
  for(int i=0;i<n;i++)
  cin >> a[i];

 int d,e,f;
 while(w<n-1){
 if(a[w]<a[w+1])
 d=a[w+1];
w++;
 }
while(x<n-1){
 if(a[x]>a[x+1])
 e=a[x+1];
 x++;
 }
while(y<n){
 f+=a[y];
 y++;
}
cout<<d<<" "<<e<<" "<<f<<endl;
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected initializer before 'cin'
   11 |   cin >> n;
      |   ^~~
a.cc:27:7: error: 'y' was not declared in this scope
   27 | while(y<n){
      |       ^
Language: C++


#include<iostream>

using namespace std;

int main()

{
  int n;
  int i=0;
  int w=0;
  int x=0;
  int y=0;
  cin >> n;
  int a[n];
  while(i<n-1){
  cin >> a[i];
  i++}

 int d,e,f;
 while(w<n-1){
 if(a[w]<a[w+1]){
 d=a[w+1];}

w++;
 }
while(x<n-1){
 if(a[x]>a[x+1]){
 e=a[x+1];}

 x++;
 }
while(y<n){
 f+=a[y];
 y++;
}
cout<<d<<" "<<e<<" "<<f<<endl;
return 0;
}



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

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

using namespace std;

int main()

{
  int n;
  
  int w=0;
  int x=0;
  int y=0;
  cin >> n;
  int a[n];
  gets(a)

 int d,e,f;
 while(w<n-1){
 if(a[w]<a[w+1]){
 d=a[w+1];}

w++;
 }
while(x<n-1){
 if(a[x]>a[x+1]){
 e=a[x+1];}

 x++;
 }
while(y<n){
 f+=a[y];
 y++;
}
cout<<d<<" "<<e<<" "<<f<<endl;
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
   16 |   gets(a)
      |   ^~~~
      |   getw
a.cc:21:2: error: 'd' was not declared in this scope
   21 |  d=a[w+1];}
      |  ^
a.cc:27:2: error: 'e' was not declared in this scope
   27 |  e=a[x+1];}
      |  ^
a.cc:32:2: error: 'f' was not declared in this scope
   32 |  f+=a[y];
      |  ^
a.cc:35:7: error: 'd' was not declared in this scope
   35 | cout<<d<<" "<<e<<" "<<f<<endl;
      |       ^
a.cc:35:15: error: 'e' was not declared in this scope
   35 | cout<<d<<" "<<e<<" "<<f<<endl;
      |               ^
a.cc:35:23: error: 'f' was not declared in this scope
   35 | cout<<d<<" "<<e<<" "<<f<<endl;
      |                       ^
Language: C++

#include<iostream>
using namespace std;

__int64 max(__int64 k,__int64 *b);
__int64 min(__int64 l,__int64 *c);
__int64 sum(__int64 p,__int64 *d);

__int64 main(){
    __int64 i, n;
    __int64 M[3];

    cin >> n;

    __int64 a[n];

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

    M[0]=min(n,a);
    M[1]=max(n,a);
    M[2]=sum(n,a);

    cout<<M[0]<<" "<<M[1]<<" "<<M[2]<<endl;
}

__int64 min(__int64 l,__int64 *c){
    __int64 min=c[0];

    for(__int64 i=0; i<l; i++){
        if(c[i]<min){
            min=c[i];
        }
    }

    return min;
}

//関数セット
__int64 max(__int64 k,__int64 *b){
    __int64 max=b[0];

    for(__int64 i=0; i<k; i++){
        if(b[i]>max){
            max=b[i];
        }
    }

    return max;
}

__int64 sum(__int64 p,__int64 *d){
    __int64 sum=0;

    for(__int64 i=0; i<p; i++){
        sum=sum+d[i];
    }

    return sum;
}


Compiler output:
a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    4 | __int64 max(__int64 k,__int64 *b);
      | ^~~~~~~
      | __int64_t
a.cc:5:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 | __int64 min(__int64 l,__int64 *c);
      | ^~~~~~~
      | __int64_t
a.cc:6:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    6 | __int64 sum(__int64 p,__int64 *d);
      | ^~~~~~~
      | __int64_t
a.cc:8:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    8 | __int64 main(){
      | ^~~~~~~
      | __int64_t
a.cc:27:1: error: '__int64' does not name a type; did you mean '__int64_t'?
   27 | __int64 min(__int64 l,__int64 *c){
      | ^~~~~~~
      | __int64_t
a.cc:40:1: error: '__int64' does not name a type; did you mean '__int64_t'?
   40 | __int64 max(__int64 k,__int64 *b){
      | ^~~~~~~
      | __int64_t
a.cc:52:1: error: '__int64' does not name a type; did you mean '__int64_t'?
   52 | __int64 sum(__int64 p,__int64 *d){
      | ^~~~~~~
      | __int64_t
Language: C++

#include<iostream>
using namespace std;

int max(int k,int *b);
int min(int l,int *c);
int sum(int p,int *d);

int main(){
    int i, n;
    __int64 M[3];

    cin >> n;

    int a[n];

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

    M[0]=min(n,a);
    M[1]=max(n,a);
    M[2]=sum(n,a);

    cout<<M[0]<<" "<<M[1]<<" "<<M[2]<<endl;
}

int min(int l,int *c){
    int min=c[0];

    for(int i=0; i<l; i++){
        if(c[i]<min){
            min=c[i];
        }
    }

    return min;
}

//関数セット
int max(int k,int *b){
    int max=b[0];

    for(int i=0; i<k; i++){
        if(b[i]>max){
            max=b[i];
        }
    }

    return max;
}

int sum(int p,int *d){
    int sum=0;

    for(int i=0; i<p; i++){
        sum=sum+d[i];
    }

    return sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   10 |     __int64 M[3];
      |     ^~~~~~~
      |     __int64_t
a.cc:20:5: error: 'M' was not declared in this scope
   20 |     M[0]=min(n,a);
      |     ^
Language: C++

#include<iostream>
using namespace std;

int max(int k,int *b);
int min(int l,int *c);
int sum(int p,int *d);

int main(){
    __int64 i, n;
    __int64 M[3];

    cin >> n;

    __int64 a[n];

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

    M[0]=min(n,a);
    M[1]=max(n,a);
    M[2]=sum(n,a);

    cout<<M[0]<<" "<<M[1]<<" "<<M[2]<<endl;
}

int min(int l,int *c){
    int min=c[0];

    for(int i=0; i<l; i++){
        if(c[i]<min){
            min=c[i];
        }
    }

    return min;
}

//関数セット
int max(int k,int *b){
    int max=b[0];

    for(int i=0; i<k; i++){
        if(b[i]>max){
            max=b[i];
        }
    }

    return max;
}

int sum(int p,int *d){
    int sum=0;

    for(int i=0; i<p; i++){
        sum=sum+d[i];
    }

    return sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    9 |     __int64 i, n;
      |     ^~~~~~~
      |     __int64_t
a.cc:10:12: error: expected ';' before 'M'
   10 |     __int64 M[3];
      |            ^~
      |            ;
a.cc:12:12: error: 'n' was not declared in this scope
   12 |     cin >> n;
      |            ^
a.cc:14:12: error: expected ';' before 'a'
   14 |     __int64 a[n];
      |            ^~
      |            ;
a.cc:16:9: error: 'i' was not declared in this scope
   16 |     for(i=0; i<n; i++){
      |         ^
a.cc:17:14: error: 'a' was not declared in this scope
   17 |         cin>>a[i];
      |              ^
a.cc:20:5: error: 'M' was not declared in this scope
   20 |     M[0]=min(n,a);
      |     ^
a.cc:20:16: error: 'a' was not declared in this scope
   20 |     M[0]=min(n,a);
      |                ^
Language: C++

#include<iostream>
using namespace std;

int max(int k,int *b);
int min(int l,int *c);
__int64 sum(int p,int *d);

int main(){
    int i, n;
    int M[2];
    __int64 SUM;

    cin >> n;

    int a[n];

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

    M[0]=min(n,a);
    M[1]=max(n,a);
    SUM=sum(n,a);

    cout<<M[0]<<" "<<M[1]<<" "<<SUM<<endl;
}

int min(int l,int *c){
    int min=c[0];

    for(int i=0; i<l; i++){
        if(c[i]<min){
            min=c[i];
        }
    }

    return min;
}

//関数セット
int max(int k,int *b){
    int max=b[0];

    for(int i=0; i<k; i++){
        if(b[i]>max){
            max=b[i];
        }
    }

    return max;
}

__int64 sum(int p,int *d){
    int sum=0;

    for(int i=0; i<p; i++){
        sum=sum+d[i];
    }

    return sum;
}


Compiler output:
a.cc:6:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    6 | __int64 sum(int p,int *d);
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:11:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   11 |     __int64 SUM;
      |     ^~~~~~~
      |     __int64_t
a.cc:23:5: error: 'SUM' was not declared in this scope
   23 |     SUM=sum(n,a);
      |     ^~~
a.cc:23:9: error: 'sum' was not declared in this scope
   23 |     SUM=sum(n,a);
      |         ^~~
a.cc: At global scope:
a.cc:53:1: error: '__int64' does not name a type; did you mean '__int64_t'?
   53 | __int64 sum(int p,int *d){
      | ^~~~~~~
      | __int64_t
Language: C++

#include<iostream>                    
using namespace std;
int main(){
 
  int n,a[10000],i,s(100001),b(-100001),w(0);
  long long w=0;
  cin>>n;
  for(int i=0;i<n; i++)
  {
         cin>>a[i];
 
           w+=a[i];
		   
         if(s>a[i])
         {
	       s=a[i];
         }
        if(b<a[i])
         {      

	         b=a[i];

		}
  
  }
  cout<<s<<" "<<b<<" "<<w<<endl;


  return 0;
  }  


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: conflicting declaration 'long long int w'
    6 |   long long w=0;
      |             ^
a.cc:5:41: note: previous declaration as 'int w'
    5 |   int n,a[10000],i,s(100001),b(-100001),w(0);
      |                                         ^
Language: C++

#include<iostream>

using namespace std;

int main
{
  int n,a,b,c;
  cin>>n;
  int num[n];

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

  a=num[0];b=num[0];c=0;

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

   for(int i=0;i<n;i++){
    if(b>num[i])
      b=num[i];}

  for(int i=0;i<n;i++)
    c+=num[i];

  cout<<a<<" "<<b<<" "<<c<<endl;
  return 0;
}

  


Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main
      |     ^~~~
a.cc:7:3: error: expected primary-expression before 'int'
    7 |   int n,a,b,c;
      |   ^~~
a.cc:7:3: error: expected '}' before 'int'
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin>>n;
      |   ^~~
a.cc:9:11: error: 'n' was not declared in this scope
    9 |   int num[n];
      |           ^
a.cc:11:3: error: expected unqualified-id before 'for'
   11 |   for(int i=0;i<n;i++)
      |   ^~~
a.cc:11:15: error: 'i' does not name a type
   11 |   for(int i=0;i<n;i++)
      |               ^
a.cc:11:19: error: 'i' does not name a type
   11 |   for(int i=0;i<n;i++)
      |                   ^
a.cc:14:3: error: 'a' does not name a type
   14 |   a=num[0];b=num[0];c=0;
      |   ^
a.cc:14:12: error: 'b' does not name a type
   14 |   a=num[0];b=num[0];c=0;
      |            ^
a.cc:14:21: error: 'c' does not name a type
   14 |   a=num[0];b=num[0];c=0;
      |                     ^
a.cc:16:3: error: expected unqualified-id before 'for'
   16 |   for(int i=0;i<n;i++){
      |   ^~~
a.cc:16:15: error: 'i' does not name a type
   16 |   for(int i=0;i<n;i++){
      |               ^
a.cc:16:19: error: 'i' does not name a type
   16 |   for(int i=0;i<n;i++){
      |                   ^
a.cc:20:4: error: expected unqualified-id before 'for'
   20 |    for(int i=0;i<n;i++){
      |    ^~~
a.cc:20:16: error: 'i' does not name a type
   20 |    for(int i=0;i<n;i++){
      |                ^
a.cc:20:20: error: 'i' does not name a type
   20 |    for(int i=0;i<n;i++){
      |                    ^
a.cc:24:3: error: expected unqualified-id before 'for'
   24 |   for(int i=0;i<n;i++)
      |   ^~~
a.cc:24:15: error: 'i' does not name a type
   24 |   for(int i=0;i<n;i++)
      |               ^
a.cc:24:19: error: 'i' does not name a type
   24 |   for(int i=0;i<n;i++)
      |                   ^
a.cc:27:3: error: 'cout' does not name a type
   27 |   cout<<a<<" "<<b<<" "<<c<<endl;
      |   ^~~~
a.cc:28:3: error: expected unqualified-id before 'return'
   28 |   return 0;
      |   ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

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


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

#include<iostream>
using namespace std;

int main(){
	int A,B,N;
	char X[N];
	cin>>A>>B>>N;
	cin>>X[N];
	for(int i=-1;i<N;i++){
		if(X[i]='S'){
			if(A!=0){A=A-1;}
			}
			else if(X[i]='C'){
				if(B!=0){B=B-1;}
			}
			else if(X[i]='E'){
				if(A<B){B=B-1;}
				 else if(A>B||A=B){A=A-1;}
			 }
		 }
		 cout<<A<<endl;
		 cout<<B<<endl;
	 }


Compiler output:
a.cc: In function 'int main()':
a.cc:18:45: error: lvalue required as left operand of assignment
   18 |                                  else if(A>B||A=B){A=A-1;}
      |                                          ~~~^~~
Language: C++

#include<iostream>
using namespace std;

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

cin >> n;

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

cout << minValue << " " << sum << endl;

return 0;
}


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

#include<iostream>
using namespace std;

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

cin >> n;

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

cout << minValue << " " << sum << endl;

return 0;
}


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

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>

using namespace std;
int main(){
    int sums,max,min,n;
    max = -1000000;
    min = 1000000;
    sums = 0
    cin >> n ;
    for (int i = 0; i < n ; i++){
        int c;
        cin >> c;
        sums += c;
        if (max < c){
            max = c;
        }
        if (min > c){
            min = c;
        }
    }
    cout << min << " " << max << " " << sums << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected ';' before 'cin'
   25 |     sums = 0
      |             ^
      |             ;
   26 |     cin >> n ;
      |     ~~~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
int main(){
    double max,min,n;

    double sums;
    sums = 0;
    cin >> n ;
    for (int i = 0; i < n ; i++){
        double c;
        cin >> c;
        sums += c;
        if (i == 0){
            min = c;
            max = c;
        } else  (i > 0){
            if (max < c){
                max = c;
            }
            if (min > c){
                min = c;
            }
        }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:33:24: error: expected ';' before '{' token
   33 |         } else  (i > 0){
      |                        ^
      |                        ;
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
int main(){
    int max,min;
    int n;
    min=10000000;
    max=-10000000;
    double sums;
    sums = 0;
    cin >> n ;
    for (int i = 0; i < n ; i++){
        int c;
        cin >> c;
        sums = sums + c;
        min = min(min,c);
        max = max(max,c);
    }
    cout << min << " " << max << " " << sums << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: 'min' cannot be used as a function
   32 |         min = min(min,c);
      |               ~~~^~~~~~~
a.cc:33:18: error: 'max' cannot be used as a function
   33 |         max = max(max,c);
      |               ~~~^~~~~~~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;
int main(){
    int max,min;
    int n;
    min=10000000;
    max=-10000000;
    double sums;
    sums = 0;
    cin >> n ;
    for (int i = 0; i < n ; i++){
        int c;
        cin >> c;
        sums = sums + c;
        min = min(min,c);
        max = max(max,c);
    }
    cout << min << " " << max << " " << sums << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:18: error: 'min' cannot be used as a function
   33 |         min = min(min,c);
      |               ~~~^~~~~~~
a.cc:34:18: error: 'max' cannot be used as a function
   34 |         max = max(max,c);
      |               ~~~^~~~~~~
Language: C++

#include <stdio.h>

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


Compiler output:
a.cc:5:13: error: extended character − is not valid in an identifier
    5 |   int max = −1000000;
      |             ^
a.cc: In function 'int main()':
a.cc:5:13: error: '\U000022121000000' was not declared in this scope
    5 |   int max = −1000000;
      |             ^~~~~~~~
Language: C++

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

int main(void){
  int a;
  String str;
  int max = −1000000;
  int min = 1000000;
  int sum = 0;
  scanf("%d", a);
  int x[a];
  scanf("%s", str);
  String[] num = str.split(" ", 0);
  for(int i=0; i<a; i++){
    x[i]=atoi(num[i]);
    if(max<x[i]){
      max=x[i];
    }
    if(min>x[i]){
      min=x[i];
    }
    sum=sum+x[i];
  }
  printf("%d %d %d\n", min, max, sum);
}



Compiler output:
a.cc:7:13: error: extended character − is not valid in an identifier
    7 |   int max = −1000000;
      |             ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'String' was not declared in this scope
    6 |   String str;
      |   ^~~~~~
a.cc:7:13: error: '\U000022121000000' was not declared in this scope
    7 |   int max = −1000000;
      |             ^~~~~~~~
a.cc:12:15: error: 'str' was not declared in this scope; did you mean 'std'?
   12 |   scanf("%s", str);
      |               ^~~
      |               std
a.cc:13:10: error: expected primary-expression before ']' token
   13 |   String[] num = str.split(" ", 0);
      |          ^
a.cc:15:15: error: 'num' was not declared in this scope; did you mean 'sum'?
   15 |     x[i]=atoi(num[i]);
      |               ^~~
      |               sum