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

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
	int n;
	int i;
	int a;
	int ans1=0;
	vector<int> b;

	cin>>n;
	
	for(i=0;i<n;i++)
	{
		cin>>a;
		ans1+=a
		b.push_back(a);
	}
	
	sort(b.begin(),b.end());
	
	cout<<b[0]<<" "<<b[n-1]<<" "<<ans1<<endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected ';' before 'b'
   18 |                 ans1+=a
      |                        ^
      |                        ;
   19 |                 b.push_back(a);
      |                 ~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
	int n;
	int i;
	long a;
	int ans1=0;
	vector<long> b;

	cin>>n;
	
	for(i=0;i<n;i++)
	{
		cin>>a;
		ans1+=a
		b.push_back(a);
	}
	
	sort(b.begin(),b.end());
	
	cout<<b[0]<<" "<<b[n-1]<<" "<<ans1<<endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected ';' before 'b'
   18 |                 ans1+=a
      |                        ^
      |                        ;
   19 |                 b.push_back(a);
      |                 ~
Language: C++

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

int main(){
    int n,sum;
    scanf("%d",&n);
    vector<int> a(n);
    for (int i=0;i<n;i++) scanf("%d", a[i]);
    sort(a.begin(),a.end());
    sum=accumulate(a.begin(),a.end(),0);
    printf("%d %d %d\n",a[0],a[n-1],sum);
    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:5: error: 'scanf' was not declared in this scope
    6 |     scanf("%d",&n);
      |     ^~~~~
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int> a(n);
      |     ^~~~~~
a.cc:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> a(n);
      |            ^~~
a.cc:8:39: error: 'a' was not declared in this scope
    8 |     for (int i=0;i<n;i++) scanf("%d", a[i]);
      |                                       ^
a.cc:9:10: error: 'a' was not declared in this scope
    9 |     sort(a.begin(),a.end());
      |          ^
a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
a.cc:10:9: error: 'accumulate' was not declared in this scope
   10 |     sum=accumulate(a.begin(),a.end(),0);
      |         ^~~~~~~~~~
a.cc:11:5: error: 'printf' was not declared in this scope
   11 |     printf("%d %d %d\n",a[0],a[n-1],sum);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<bits/stdc++.h>
Language: C++

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'INT16_MAX' was not declared in this scope
    9 |         int a[INT16_MAX];
      |               ^~~~~~~~~
a.cc:3:1: note: 'INT16_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <algorithm>
  +++ |+#include <cstdint>
    3 | using namespace std;
a.cc:11:24: error: 'a' was not declared in this scope
   11 |                 cin >> a[i];
      |                        ^
a.cc:15:24: error: 'a' was not declared in this scope
   15 |                 sum += a[i];
      |                        ^
a.cc:17:14: error: 'a' was not declared in this scope
   17 |         sort(a, a + n);
      |              ^
Language: C++

#include<iostream>
using namespace std;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'int'
    6 |   int sum = 0;
      |   ^~~
a.cc:12:12: error: 'x' was not declared in this scope
   12 |     cin >> x;
      |            ^
a.cc:13:5: error: 'sum' was not declared in this scope
   13 |     sum = sum + x;
      |     ^~~
a.cc:18:39: error: 'sum' was not declared in this scope
   18 |   cout << min << " " << max << " " << sum << endl;
      |                                       ^~~
Language: C++

int main()
{
  int n;
  int tmp;
  int min, max, sum;
  min = 1000000;
  max = -1000000;
  sum = 0;

  cin >> n;

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope; did you mean 'min'?
   10 |   cin >> n;
      |   ^~~
      |   min
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << min << " " << max << " " << sum << endl;
      |   ^~~~
a.cc:19:46: error: 'endl' was not declared in this scope
   19 |   cout << min << " " << max << " " << sum << endl;
      |                                              ^~~~
Language: C++

include<iosream>
using namespace std;

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


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iosream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'min'?
    7 |     cin >> n;
      |     ^~~
      |     min
a.cc:9:15: error: expected ';' before '==' token
    9 |     for (int i==0 ; i<n ;i++){
      |               ^~
      |               ;
a.cc:9:15: error: expected primary-expression before '==' token
    9 |     for (int i==0 ; i<n ;i++){
      |               ^~
a.cc:9:24: error: expected ')' before ';' token
    9 |     for (int i==0 ; i<n ;i++){
      |         ~              ^~
      |                        )
a.cc:9:26: error: 'i' was not declared in this scope
    9 |     for (int i==0 ; i<n ;i++){
      |                          ^
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << min << " " << max << " " << sum << endl;
      |     ^~~~
a.cc:19:48: error: 'endl' was not declared in this scope
   19 |     cout << min << " " << max << " " << sum << endl;
      |                                                ^~~~
Language: C++

#include<iosream>
using namespace std;

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


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

#include<iosream>
using namespace std;

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


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

#include<iostream>
using namespace std;
int main(){
    int n,i,x,a,b,c;
    cin>>n;
    for(i=1;i<=n;i++){
        cin>>x;
        i=x
        c=i+c;
        if(i>i-1){
            a=i;
        }
        else if(i<i-1){
            b=i
        }
    }
    cout<<b<<<<" "<<a<<" "<<c<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'c'
    8 |         i=x
      |            ^
      |            ;
    9 |         c=i+c;
      |         ~   
a.cc:14:16: error: expected ';' before '}' token
   14 |             b=i
      |                ^
      |                ;
   15 |         }
      |         ~       
a.cc:17:14: error: expected primary-expression before '<<' token
   17 |     cout<<b<<<<" "<<a<<" "<<c<<endl;
      |              ^~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,i,x,a,b,c;
    cin>>n;
    for(i=1;i<=n;i++){
        cin>>x;
        i=x;
        c=i+c;
        if(i>i-1){
            a=i;
        }
        else if(i<i-1){
            b=i;
        }
    }
    cout<<b<<<<" "<<a<<" "<<c<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: expected primary-expression before '<<' token
   17 |     cout<<b<<<<" "<<a<<" "<<c<<endl;
      |              ^~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,i,x,a,b,c;
    cin>>n;
    for(i=0;i<=n;i++){
        cin>>x;
        i=x;
        
        if(i>i-1){
            a=i;
        }
        else if(i<i-1){
            b=i;
        }
        c=c+i
    }
    cout<<b<<" "<<a<<" "<<c<<endl;
    return 0;
}


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

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n,i,x,a,b,c;
    cin>>n;
    for(i=0;i<=n;i++){
        cin>>x;
        i=x;
        c=c+i
        cout<<min(i)<<" "<<max(i)<<" "<<c<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'cout'
   10 |         c=c+i
      |              ^
      |              ;
   11 |         cout<<min(i)<<" "<<max(i)<<" "<<c<<endl;
      |         ~~~~  
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n,i,x,a,b,c;
    cin>>n;
    for(i=0;i<=n;i++){
        cin>>x;
        i=x;
        c=c+i
        cout<<min(i)<<" "<<max(i)<<" "<<c<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'cout'
   10 |         c=c+i
      |              ^
      |              ;
   11 |         cout<<min(i)<<" "<<max(i)<<" "<<c<<endl;
      |         ~~~~
Language: C++

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


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

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'i' was not declared in this scope
    6 |     int a[i];
      |           ^
a.cc:9:14: error: 'a' was not declared in this scope
    9 |         cin>>a[i];
      |              ^
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   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 | using namespace std;
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout << min << " " << max << " " << sum << endl;
      |   ^~~~
a.cc:15:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:46: error: 'endl' was not declared in this scope
   15 |   cout << min << " " << max << " " << 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 | using namespace std;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'i' was not declared in this scope
    6 |     int a[i];
      |           ^
a.cc:9:14: error: 'a' was not declared in this scope
    9 |         cin>>a[i];
      |              ^
Language: C++

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


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

#include<stdio.h>
#include<limits>


int main(){
    int n,x;
    int min = INT_MIN,max = INT_MAX,sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        if(min > x) min = x;
        if(max < x) max = x;
        sum += x;
    }
    printf("%d %d %d\n",min,max,sum)
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'INT_MIN' was not declared in this scope
    7 |     int min = INT_MIN,max = INT_MAX,sum = 0;
      |               ^~~~~~~
a.cc:3:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<limits>
  +++ |+#include <climits>
    3 | 
a.cc:12:12: error: 'max' was not declared in this scope
   12 |         if(max < x) max = x;
      |            ^~~
a.cc:13:9: error: 'sum' was not declared in this scope
   13 |         sum += x;
      |         ^~~
a.cc:15:29: error: 'max' was not declared in this scope
   15 |     printf("%d %d %d\n",min,max,sum)
      |                             ^~~
a.cc:15:33: error: 'sum' was not declared in this scope
   15 |     printf("%d %d %d\n",min,max,sum)
      |                                 ^~~
Language: C++

#include<stdio.h>
#include<climits>


int main(){
    int n,x;
    int min = INT_MIN,max = INT_MAX,sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        if(min > x) min = x;
        if(max < x) max = x;
        sum += x;
    }
    printf("%d %d %d\n",min,max,sum)
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:37: error: expected ';' before 'return'
   15 |     printf("%d %d %d\n",min,max,sum)
      |                                     ^
      |                                     ;
   16 |     return 0;
      |     ~~~~~~
Language: C++

#include<stdio.h>
#include<climits>
#inckude<algorithm>


int main(){
    int n,x;
    int min = INT_MIN,max = INT_MAX,sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        min = min(min,x);
        max = max(max,x);
        sum += x;
    }
    printf("%d %d %d\n",min,max,sum);
    return 0;
}


Compiler output:
a.cc:3:2: error: invalid preprocessing directive #inckude; did you mean #include?
    3 | #inckude<algorithm>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:12:18: error: 'min' cannot be used as a function
   12 |         min = min(min,x);
      |               ~~~^~~~~~~
a.cc:13:18: error: 'max' cannot be used as a function
   13 |         max = max(max,x);
      |               ~~~^~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: conflicting declaration 'int a [i]'
    6 |     int a[i];
      |         ^
a.cc:4:21: note: previous declaration as 'int a'
    4 |     int n,i,max,min,a;
      |                     ^
a.cc:9:15: error: invalid types 'int[int]' for array subscript
    9 |         cin>>a[i];
      |               ^
a.cc:10:18: error: invalid types 'int[int]' for array subscript
   10 |         sum=sum+a[i];
      |                  ^
a.cc:12:18: error: invalid types 'int[int]' for array subscript
   12 |             max=a[i];
      |                  ^
a.cc:13:18: error: invalid types 'int[int]' for array subscript
   13 |             min=a[i];
      |                  ^
a.cc:16:21: error: invalid types 'int[int]' for array subscript
   16 |             if(max<a[i]){
      |                     ^
a.cc:17:22: error: invalid types 'int[int]' for array subscript
   17 |                 max=a[i];
      |                      ^
a.cc:19:21: error: invalid types 'int[int]' for array subscript
   19 |             if(min>a[i]){
      |                     ^
a.cc:20:22: error: invalid types 'int[int]' for array subscript
   20 |                 min=a[i];
      |                      ^
Language: C++

#include<stdio.h>
#include<climits>
#include<algorithm>


int main(){
    int n,x;
    int min = INT_MIN,max = INT_MAX,sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        min = min(min,x);
        max = max(max,x);
        sum += x;
    }
    printf("%d %d %d\n",min,max,sum);
    return 0;
}


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

#include<stdio.h>
#include<climits>
#include<algorithm>


int main(){
    int n,x;
    int min_num = INT_MIN,max_num = INT_MAX,sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        min_num = min(min_num,x);
        max_num = max(max_num,x);
        sum += x;
    }
    printf("%d %d %d\n",min,max,sum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'min' was not declared in this scope; did you mean 'std::min'?
   12 |         min_num = min(min_num,x);
      |                   ^~~
      |                   std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:13:19: error: 'max' was not declared in this scope; did you mean 'std::max'?
   13 |         max_num = max(max_num,x);
      |                   ^~~
      |                   std::max
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:16:25: error: 'min' was not declared in this scope; did you mean 'std::min'?
   16 |     printf("%d %d %d\n",min,max,sum);
      |                         ^~~
      |                         std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:16:29: error: 'max' was not declared in this scope; did you mean 'std::max'?
   16 |     printf("%d %d %d\n",min,max,sum);
      |                             ^~~
      |                             std::max
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include<stdio.h>
#include<climits>
#include<algorithm>


int main(){
    int n,x;
    int min_num = INT_MIN,max_num = INT_MAX,sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        min_num = std::min(min_num,x);
        max_num = std::max(max_num,x);
        sum += x;
    }
    printf("%d %d %d\n",min,max,sum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'min' was not declared in this scope; did you mean 'std::min'?
   16 |     printf("%d %d %d\n",min,max,sum);
      |                         ^~~
      |                         std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:16:29: error: 'max' was not declared in this scope; did you mean 'std::max'?
   16 |     printf("%d %d %d\n",min,max,sum);
      |                             ^~~
      |                             std::max
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include<stdio.h>
#include<climits>
#include<algorithm>

using namespace std;
int main(){
    int n,x;
    int min_num = INT_MIN,max_num = INT_MAX,sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        min_num = min(min_num,x);
        max_num = max(max_num,x);
        sum += x;
    }
    printf("%d %d %d\n",min,max,sum);
    return 0;
}


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

#include<stdio.h>
#include<climits>
#include<algorithm>

using namespace std;
int main(){
    int n,x;
    int min_num = 1000000,max_num = -1000000
    long long sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        min_num = min(min_num,x);
        max_num = max(max_num,x);
        sum += x;
    }
    printf("%d %d %lld\n",min_num,max_num,sum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'long'
    9 |     long long sum = 0;
      |     ^~~~
a.cc:15:9: error: 'sum' was not declared in this scope
   15 |         sum += x;
      |         ^~~
a.cc:17:43: error: 'sum' was not declared in this scope
   17 |     printf("%d %d %lld\n",min_num,max_num,sum);
      |                                           ^~~
Language: C++

#include<stdio.h>
#include<climits>
#include<algorithm>

using namespace std;
int main(){
    int n,x;
    int min_num = INT_MAXmax_num = INT_MIN;
    long long sum = 0;
    scanf("%d",&n);
    for(int i = 0;i < n;i++){
        scanf("%d",&x);
        min_num = min(min_num,x);
        max_num = max(max_num,x);
        sum += x;
    }
    printf("%d %d %lld\n",min_num,max_num,sum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'INT_MAXmax_num' was not declared in this scope
    8 |     int min_num = INT_MAXmax_num = INT_MIN;
      |                   ^~~~~~~~~~~~~~
a.cc:14:9: error: 'max_num' was not declared in this scope; did you mean 'min_num'?
   14 |         max_num = max(max_num,x);
      |         ^~~~~~~
      |         min_num
a.cc:17:35: error: 'max_num' was not declared in this scope; did you mean 'min_num'?
   17 |     printf("%d %d %lld\n",min_num,max_num,sum);
      |                                   ^~~~~~~
      |                                   min_num
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'i' was not declared in this scope
    7 |     for(i=0;i<n;i++){
      |         ^
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i=0;i<n;i++){
      |         ^
a.cc:17:9: error: 'total' was not declared in this scope
   17 |         total += number[i];
      |         ^~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'total' was not declared in this scope
   17 |         total += number[i];
      |         ^~~~~
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected ';' before 'min'
    5 |     sum = 0
      |            ^
      |            ;
    6 |     min = 1000000
      |     ~~~     
a.cc:10:5: error: expected initializer before 'for'
   10 |     for(int i=0;i<n;i++){
      |     ^~~
a.cc:10:17: error: 'i' was not declared in this scope
   10 |     for(int i=0;i<n;i++){
      |                 ^
a.cc:14:12: error: 'a' was not declared in this scope
   14 |         if(a[i]<min){
      |            ^
a.cc:17:12: error: 'a' was not declared in this scope
   17 |         if(a[i]>max){
      |            ^
a.cc:20:21: error: 'a' was not declared in this scope
   20 |         sum = sum + a[i];
      |                     ^
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: storage size of 'a' isn't known
    9 |     int a[];
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int count,max,min,sum,l;
    cin >> count;
    int info[];
    
    for(int i = 0;i < count,i++){
        cin >> l;
        info[i] = l;
    }
    
   
    
    for(int io = 0;io < i;io++){
        max = info[io];
        if(max < info[io + 1]){
            max = info[io + 1];
        }
    }
    for(int io = 0;io < i;io++){
        min = info[io];
        if(min > info[io + 1]){
            min = info[io + 1];
    }}
    
     
    for(int io = 0;io < i;io++){
        sum += info[io];
    }
    cout << min << " " << max << " " << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: storage size of 'info' isn't known
    7 |     int info[];
      |         ^~~~
a.cc:9:32: error: expected ';' before ')' token
    9 |     for(int i = 0;i < count,i++){
      |                                ^
      |                                ;
a.cc:16:25: error: 'i' was not declared in this scope; did you mean 'io'?
   16 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
a.cc:22:25: error: 'i' was not declared in this scope; did you mean 'io'?
   22 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
a.cc:29:25: error: 'i' was not declared in this scope; did you mean 'io'?
   29 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
Language: C++

#include<iostream>
using namespace std;

int main(){
    int count,max,min,sum,l;
    cin >> count;
    int info[10000];
    
    for(int i = 0;i < count,i++){
        cin >> l;
        info[i] = l;
    }
    
   
    
    for(int io = 0;io < i;io++){
        max = info[io];
        if(max < info[io + 1]){
            max = info[io + 1];
        }
    }
    for(int io = 0;io < i;io++){
        min = info[io];
        if(min > info[io + 1]){
            min = info[io + 1];
    }}
    
     
    for(int io = 0;io < i;io++){
        sum += info[io];
    }
    cout << min << " " << max << " " << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before ')' token
    9 |     for(int i = 0;i < count,i++){
      |                                ^
      |                                ;
a.cc:16:25: error: 'i' was not declared in this scope; did you mean 'io'?
   16 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
a.cc:22:25: error: 'i' was not declared in this scope; did you mean 'io'?
   22 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
a.cc:29:25: error: 'i' was not declared in this scope; did you mean 'io'?
   29 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
Language: C++

#include<iostream>
using namespace std;

int main(){
    int count,max,min,sum,l;
    cin >> count;
    int info[10000];
    
    for(int i = 0;i < count,i++){
        cin >> l;
        info[i] = l;
    }
    
    max = info[0];
    min = info[0];
    
    for(int io = 0;io < i;io++){
       
        if(max < info[io + 1]){
            max = info[io + 1];
        }
    }
    for(int io = 0;io < i;io++){
       
        if(min > info[io + 1]){
            min = info[io + 1];
    }}
    
     
    for(int io = 0;io < i;io++){
        sum += info[io];
    }
    cout << min << " " << max << " " << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before ')' token
    9 |     for(int i = 0;i < count,i++){
      |                                ^
      |                                ;
a.cc:17:25: error: 'i' was not declared in this scope; did you mean 'io'?
   17 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
a.cc:23:25: error: 'i' was not declared in this scope; did you mean 'io'?
   23 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
a.cc:30:25: error: 'i' was not declared in this scope; did you mean 'io'?
   30 |     for(int io = 0;io < i;io++){
      |                         ^
      |                         io
Language: C++

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        int a,b,i,total=0,max=0,min=0;

        a = sc.nextInt();
        for(i=0;i<a;i++){
        b = sc.nextInt();
        if(i==0){
            max=b;
            min=b;
        }
            if(max<b)max=b;
            if(min>b)min=b;
            total+=b;
        }
        System.out.println(min+" "+max+" "+total);
   }
}


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,max,min;
    long long sum;
    int max=-1000000;
    int min=1000000;
    cin>>n;
    for(int i =1;i<=n;i++){
        cin>>x;
        if(max<x){
            max=x;
        }
        if(min>x){
            min=x;
        }
        sum=sum+x
    }
    cout<<min<<" "<<MAX<<" "<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: redeclaration of 'int max'
    6 |     int max=-1000000;
      |         ^~~
a.cc:4:13: note: 'int max' previously declared here
    4 |     int n,x,max,min;
      |             ^~~
a.cc:7:9: error: redeclaration of 'int min'
    7 |     int min=1000000;
      |         ^~~
a.cc:4:17: note: 'int min' previously declared here
    4 |     int n,x,max,min;
      |                 ^~~
a.cc:17:18: error: expected ';' before '}' token
   17 |         sum=sum+x
      |                  ^
      |                  ;
   18 |     }
      |     ~             
a.cc:19:21: error: 'MAX' was not declared in this scope
   19 |     cout<<min<<" "<<MAX<<" "<<endl;
      |                     ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: redeclaration of 'int max'
    6 |     int max=-1000000;
      |         ^~~
a.cc:4:13: note: 'int max' previously declared here
    4 |     int n,x,max,min;
      |             ^~~
a.cc:7:9: error: redeclaration of 'int min'
    7 |     int min=1000000;
      |         ^~~
a.cc:4:17: note: 'int min' previously declared here
    4 |     int n,x,max,min;
      |                 ^~~
a.cc:19:21: error: 'MAX' was not declared in this scope
   19 |     cout<<min<<" "<<MAX<<" "<<endl;
      |                     ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: redeclaration of 'int max'
    6 |     int max=-1000000;
      |         ^~~
a.cc:4:13: note: 'int max' previously declared here
    4 |     int n,x,max,min;
      |             ^~~
a.cc:7:9: error: redeclaration of 'int min'
    7 |     int min=1000000;
      |         ^~~
a.cc:4:17: note: 'int min' previously declared here
    4 |     int n,x,max,min;
      |                 ^~~
Language: C++

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


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

#include<stdio.h>
int main(void)
{
 int n,i,x,y,z;
 scanf("%d,&n);
 
 int a[10000];
 for(i=0;i<n;i++)
 {scanf("%d",&a[i]);}
 
 z=0;
 y=-1000000;
 x=1000000;
 for(i=0;i<n;i++)
   { if(x>a[i])
    {x=a[i];}

   if(y<a[i])
    {y=a[i];}

    z=z+a[i]
   }return 0;
}


Compiler output:
a.cc:5:8: warning: missing terminating " character
    5 |  scanf("%d,&n);
      |        ^
a.cc:5:8: error: missing terminating " character
    5 |  scanf("%d,&n);
      |        ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:2: error: expected primary-expression before 'int'
    7 |  int a[10000];
      |  ^~~
a.cc:9:15: error: 'a' was not declared in this scope
    9 |  {scanf("%d",&a[i]);}
      |               ^
a.cc:15:11: error: 'a' was not declared in this scope
   15 |    { if(x>a[i])
      |           ^
a.cc:18:9: error: 'a' was not declared in this scope
   18 |    if(y<a[i])
      |         ^
a.cc:21:9: error: 'a' was not declared in this scope
   21 |     z=z+a[i]
      |         ^
Language: C++

#include<stdio.h>
int main(void)
{
 int n,i,x,y,z;
 scanf("%d,&n);
 
 int a[10000];
 for(i=0;i<n;i++)
 {scanf("%d",&a[i]);}
 
 z=0;
 y=-1000000;
 x=1000000;
 for(i=0;i<n;i++)
   { if(x>a[i])
    {x=a[i];}

   if(y<a[i])
    {y=a[i];}

    z=z+a[i];
   }
 print("%d %d %d\n",x,y,z);

return 0;
}


Compiler output:
a.cc:5:8: warning: missing terminating " character
    5 |  scanf("%d,&n);
      |        ^
a.cc:5:8: error: missing terminating " character
    5 |  scanf("%d,&n);
      |        ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:2: error: expected primary-expression before 'int'
    7 |  int a[10000];
      |  ^~~
a.cc:9:15: error: 'a' was not declared in this scope
    9 |  {scanf("%d",&a[i]);}
      |               ^
a.cc:15:11: error: 'a' was not declared in this scope
   15 |    { if(x>a[i])
      |           ^
a.cc:18:9: error: 'a' was not declared in this scope
   18 |    if(y<a[i])
      |         ^
a.cc:21:9: error: 'a' was not declared in this scope
   21 |     z=z+a[i];
      |         ^
a.cc:23:2: error: 'print' was not declared in this scope; did you mean 'printf'?
   23 |  print("%d %d %d\n",x,y,z);
      |  ^~~~~
      |  printf
Language: C++

#include<stdio.h>
int main(void)
{
 int n,i,x,y,z;
 scanf("%d,&n);
 
 int a[10000];
 for(i=0;i<n;i++)
 {scanf("%d",&a[i]);}
 
 z=0;
 y=-1000000;
 x=1000000;
 for(i=0;i<n;i++)
   { if(x>a[i])
    {x=a[i];}

   if(y<a[i])
    {y=a[i];}

    z=z+a[i];
   }
 printf("%d %d %d\n",x,y,z);

return 0;
}


Compiler output:
a.cc:5:8: warning: missing terminating " character
    5 |  scanf("%d,&n);
      |        ^
a.cc:5:8: error: missing terminating " character
    5 |  scanf("%d,&n);
      |        ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:2: error: expected primary-expression before 'int'
    7 |  int a[10000];
      |  ^~~
a.cc:9:15: error: 'a' was not declared in this scope
    9 |  {scanf("%d",&a[i]);}
      |               ^
a.cc:15:11: error: 'a' was not declared in this scope
   15 |    { if(x>a[i])
      |           ^
a.cc:18:9: error: 'a' was not declared in this scope
   18 |    if(y<a[i])
      |         ^
a.cc:21:9: error: 'a' was not declared in this scope
   21 |     z=z+a[i];
      |         ^
Language: C++

#include<stdio.h>
int main(void)
{
 int n,i,x,y;

　long z;

 scanf("%d",&n);
 
 int a[10000];
 for(i=0;i<n;i++)
 {scanf("%d",&a[i]);}
 
 z=0;
 y=-1000000;
 x=1000000;
 for(i=0;i<n;i++)
   { if(x>a[i])
    {x=a[i];}

   if(y<a[i])
    {y=a[i];}

    z=z+a[i];
   }
 printf("%d %d %ld\n",x,y,z);

return 0;
}


Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　long z;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000long' was not declared in this scope; did you mean 'long'?
    6 | 　long z;
      | ^~~~~~
      | long
a.cc:14:2: error: 'z' was not declared in this scope
   14 |  z=0;
      |  ^
Language: C++

#include<stdio.h>
int main(void)
{
 int n,i,x,y;

　longint z;

 scanf("%d",&n);
 
 int a[10000];
 for(i=0;i<n;i++)
 {scanf("%d",&a[i]);}
 
 z=0;
 y=-1000000;
 x=1000000;
 for(i=0;i<n;i++)
   { if(x>a[i])
    {x=a[i];}

   if(y<a[i])
    {y=a[i];}

    z=z+a[i];
   }
 printf("%d %d %ld\n",x,y,z);

return 0;
}


Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　longint z;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000longint' was not declared in this scope
    6 | 　longint z;
      | ^~~~~~~~~
a.cc:14:2: error: 'z' was not declared in this scope
   14 |  z=0;
      |  ^
Language: C++

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

int(){
    int n;
    cin>>n;
    
    vector(int) a[n];
    
    for(int i=0:i<n-1:i++){
        cin>>a[i];
    }
    
    int sum = 0;
    

    for(int i=0:i<n-1:i++){
        sum = sum + a[i]
    }
    
    cout<<a[0]<<" "<<a[n-1]<<" "<<sum<<endl;
}


Compiler output:
a.cc:6:5: error: expected unqualified-id before ')' token
    6 | int(){
      |     ^
Language: C++

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

int main(){
    int n;
    cin>>n;
    
    vector(int) a[n];
    
    for(int i=0:i<n-1:i++){
        cin>>a[i];
    }
    
    int sum = 0;
    

    for(int i=0:i<n-1:i++){
        sum = sum + a[i]
    }
    
    cout<<a[0]<<" "<<a[n-1]<<" "<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: missing template arguments before '(' token
   10 |     vector(int) a[n];
      |           ^
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector(int) a[n];
      |            ^~~
a.cc:12:14: error: initializer in range-based 'for' loop
   12 |     for(int i=0:i<n-1:i++){
      |              ^
a.cc:12:22: error: expected ')' before ':' token
   12 |     for(int i=0:i<n-1:i++){
      |        ~             ^
      |                      )
a.cc:12:22: error: expected primary-expression before ':' token
a.cc:19:14: error: initializer in range-based 'for' loop
   19 |     for(int i=0:i<n-1:i++){
      |              ^
a.cc:19:22: error: expected ')' before ':' token
   19 |     for(int i=0:i<n-1:i++){
      |        ~             ^
      |                      )
a.cc:19:22: error: expected primary-expression before ':' token
a.cc:23:11: error: 'a' was not declared in this scope
   23 |     cout<<a[0]<<" "<<a[n-1]<<" "<<sum<<endl;
      |           ^
Language: C++

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

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

    for(int i=0;i<n-1;i++){
        sum = sum + a[i]
    }
    
    cout<<a[0]<<" "<<a[n-1]<<" "<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: missing template arguments before '(' token
   10 |     vector(int) a[n];
      |           ^
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector(int) a[n];
      |            ^~~
a.cc:13:14: error: 'a' was not declared in this scope
   13 |         cin>>a[i];
      |              ^
a.cc:20:21: error: 'a' was not declared in this scope
   20 |         sum = sum + a[i]
      |                     ^
a.cc:23:11: error: 'a' was not declared in this scope
   23 |     cout<<a[0]<<" "<<a[n-1]<<" "<<sum<<endl;
      |           ^
Language: C++

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

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

    for(int i=0;i<n-1;i++){
        sum = sum + a[i];
    }
    
    cout<<a[0]<<" "<<a[n-1]<<" "<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: missing template arguments before '(' token
   10 |     vector(int) a[n];
      |           ^
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector(int) a[n];
      |            ^~~
a.cc:13:14: error: 'a' was not declared in this scope
   13 |         cin>>a[i];
      |              ^
a.cc:20:21: error: 'a' was not declared in this scope
   20 |         sum = sum + a[i];
      |                     ^
a.cc:23:11: error: 'a' was not declared in this scope
   23 |     cout<<a[0]<<" "<<a[n-1]<<" "<<sum<<endl;
      |           ^
Language: C++

#include<iostream>
using namespace std;

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

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

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: storage size of 'a' isn't known
    7 | int a[];
      |     ^
a.cc:15:25: error: expected primary-expression before ')' token
   15 | for(int i = 1; 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 min= a[0]; 
int max= a[0];
int sum= a[0];

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected primary-expression before ')' token
   16 | for(int i = 1; i < N; i+){
      |                         ^