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

#include<iostream>
#include<algorithm>
using namespace std;
 
int main(){
  long long n, a[10000];
  cin >> n;
  for(int i = 0; i < n; i++){
    cin >> a[i];
  }
  cout << *min_element( a, a + n) << " "
       << *max_element( a, a + n) << " "
       << accumulate( a, a + n, 0LL) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'accumulate' was not declared in this scope
   13 |        << accumulate( a, a + n, 0LL) << endl;
      |           ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
 
int main(){
  long n, a[10000];
  cin >> n;
  for(int i = 0; i < n; i++){
    cin >> a[i];
  }
  cout << *min_element( a, a + n) << " "
       << *max_element( a, a + n) << " "
       << accumulate( a, a + n, 0LL) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'accumulate' was not declared in this scope
   13 |        << accumulate( a, a + n, 0LL) << endl;
      |           ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
 
int main(){
  long long n, a[10000];
  cin >> n;
  for(int i = 0; i < n; i++){
    cin >> a[i];
  }
  cout << *min_element( a, a + n) << " "
       << *max_element( a, a + n) << " "
       << accumulate( a, a + n) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'accumulate' was not declared in this scope
   13 |        << accumulate( a, a + n) << endl;
      |           ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<nueric>
using namespace std;
 
int main(){
  long long n, a[10000];
  cin >> n;
  for(int i = 0; i < n; i++){
    cin >> a[i];
  }
  cout << *min_element( a, a + n) << " "
       << *max_element( a, a + n) << " "
       << accumulate( a, a + n, 0LL) << endl;
}


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

#include <iostream>

using namespace std;

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

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

    int min_n = 1000000, max_n = -1000000;
    long long total = 0;
    if (a < min_n) {
      min_n = a;
    }
    if (a > max_n) {
      max_n = a;
    }
    total += a;
  }

  cout << min_n << " " << max_n << " " << total << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: 'min_n' was not declared in this scope
   24 |   cout << min_n << " " << max_n << " " << total << endl;
      |           ^~~~~
a.cc:24:27: error: 'max_n' was not declared in this scope
   24 |   cout << min_n << " " << max_n << " " << total << endl;
      |                           ^~~~~
a.cc:24:43: error: 'total' was not declared in this scope
   24 |   cout << min_n << " " << max_n << " " << total << endl;
      |                                           ^~~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
#include<math.h>
#include<utility>
#include<map>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll,ll> P;
typedef vector<P> vp;
#define REP(i,n) for(ll i=0;i<n;i++)
#define FOR(i,m,n) for(ll i=m;i<n;i++)
#define REPR(i,n) for(ll i=n-1;i>=0;i--)
#define FORR(i,n,m) for(ll i=n-1;i>=m;i--)
#define all(in) in.begin(),in.end()
#define ALL(in,K) in,in+K
#define INF 100000000
#define MOD 100000007
#define SIZE 100005
#define pi 	3.14159265358979323846

int main(){
  ll n,a;
  ll Max=0,Min=0,Sum=0;
  cin >> n;
  REP(i,n){
    if(i==0){min=a;}
    cin >> a;
    Max = max(a,Max);
    Min = min(a,Min);
    Sum += a;
  }
  cout << Min <<" "<< Max <<" "<<Sum<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:18: error: overloaded function with no contextual type information
   33 |     if(i==0){min=a;}
      |                  ^
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
#include<math.h>
#include<utility>
#include<map>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll,ll> P;
typedef vector<P> vp;
#define REP(i,n) for(ll i=0;i<n;i++)
#define FOR(i,m,n) for(ll i=m;i<n;i++)
#define REPR(i,n) for(ll i=n-1;i>=0;i--)
#define FORR(i,n,m) for(ll i=n-1;i>=m;i--)
#define all(in) in.begin(),in.end()
#define ALL(in,K) in,in+K
#define INF 100000000
#define MOD 100000007
#define SIZE 100005
#define pi 	3.14159265358979323846

int main(){
  ll n,a;
  ll Max=0,Min=0,Sum=0;
  cin >> n;
  REP(i,n){
    cin >> a;
    if(i==0){Min=a;Max=a;a}
    Max = (ll)max(a,Max);
    Min = (ll)min(a,Min);
    Sum += a;
  }
  cout << Min <<" "<< Max <<" "<<Sum<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:27: error: expected ';' before '}' token
   34 |     if(i==0){Min=a;Max=a;a}
      |                           ^
      |                           ;
Language: C++

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: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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:13:10: error: 'min' was not declared in this scope; did you mean 'mn'?
   13 |     mn = min(mn, a[i]);
      |          ^~~
      |          mn
a.cc:14:10: error: 'max' was not declared in this scope; did you mean 'mx'?
   14 |     mx = max(mx, a[i]);
      |          ^~~
      |          mx
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:32: error: 'endl' was not declared in this scope
   18 |   cout<<mn<<" "<<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 | using namespace std;
Language: C++

#include <bits/stdc++.h>
sing 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:2:1: error: 'sing' does not name a type
    2 | sing namespace std;
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:10: error: 'min' was not declared in this scope; did you mean 'std::min'?
   14 |     mn = min(mn, a[i]);
      |          ^~~
      |          std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/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:15:10: error: 'max' was not declared in this scope; did you mean 'std::max'?
   15 |     mx = max(mx, a[i]);
      |          ^~~
      |          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:19:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |   cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |   cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                                ^~~~
      |                                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected '(' before '{' token
    8 |     for{int i = 0; i < n; i++){
      |        ^
      |        (
a.cc:8:8: error: expected primary-expression before '{' token
a.cc:16:2: error: expected primary-expression at end of input
   16 | }
      |  ^
a.cc:16:2: error: expected ';' at end of input
   16 | }
      |  ^
      |  ;
a.cc:16:2: error: expected primary-expression at end of input
a.cc:16:2: error: expected ')' at end of input
   16 | }
      |  ^
      |  )
a.cc:8:8: note: to match this '('
    8 |     for{int i = 0; i < n; i++){
      |        ^
a.cc:16:2: error: expected statement at end of input
   16 | }
      |  ^
a.cc:16:2: error: expected '}' at end of input
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '}' token
   12 |         sum += c
      |                 ^
      |                 ;
   13 |     }
      |     ~            
a.cc:15:5: error: 'returm' was not declared in this scope
   15 |     returm 0;
      |     ^~~~~~
Language: C++

#include <iostream>
using namespace std;

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


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

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

int main(){
  int n;
  cin >> n;
  int a[1000];
  for(int i =0;i < n;i++) cin >> a[i];
  int mn = a[0],int 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:9:17: error: expected unqualified-id before 'int'
    9 |   int mn = a[0],int mx = a[0];
      |                 ^~~
a.cc:13:5: error: 'mx' was not declared in this scope; did you mean 'mn'?
   13 |     mx = max(mx,a[i]);
      |     ^~
      |     mn
a.cc:16:24: error: 'mx' was not declared in this scope; did you mean 'mn'?
   16 |   cout << mn << " " << mx << " " << sum << endl;
      |                        ^~
      |                        mn
Language: C++

#include <iostream>
using namespace std;

int main() {
	long a, h, l, s;
	cin >> a;
	h = a;
	l = a;
	s = 0;
	while (a != null){
		s = s + a;
		if (h < a){
			h = a;
		}else if (a < l){
			l = a;
		}
		cin >> a;
	}
	cout << l << " " << h << " " << s << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'null' was not declared in this scope
   10 |         while (a != null){
      |                     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	long int is, i, a, h, l, s;
	cin >> is >> a;
	h = a;
	l = a;
	s = 0;
	for (i = 0, i == is, i++){
		s += a;
		if (a > h){
			h = a
		}else if (a < l){
			l = a
		}
		cin >> a;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: expected ';' before ')' token
   10 |         for (i = 0, i == is, i++){
      |                                 ^
      |                                 ;
a.cc:19:9: error: expected primary-expression before 'return'
   19 |         return 0;
      |         ^~~~~~
a.cc:18:10: error: expected ';' before 'return'
   18 |         }
      |          ^
      |          ;
   19 |         return 0;
      |         ~~~~~~
a.cc:19:9: error: expected primary-expression before 'return'
   19 |         return 0;
      |         ^~~~~~
a.cc:18:10: error: expected ')' before 'return'
   18 |         }
      |          ^
      |          )
   19 |         return 0;
      |         ~~~~~~
a.cc:10:13: note: to match this '('
   10 |         for (i = 0, i == is, i++){
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	long int is, i, a, h, l, s;
	cin >> is >> a;
	h = a;
	l = a;
	s = 0;
	for (i = 0; i == is; i++){
		s += a;
		if (a > h){
			h = a
		}else if (a < l){
			l = a
		}
		cin >> a;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: expected ';' before '}' token
   13 |                         h = a
      |                              ^
      |                              ;
   14 |                 }else if (a < l){
      |                 ~             
a.cc:15:30: error: expected ';' before '}' token
   15 |                         l = a
      |                              ^
      |                              ;
   16 |                 }
      |                 ~
Language: C++

#include <iostream>
using namespace std;

int main() {
	long int is, i, a, h, l, s;
	cin >> is >> a;
	h = a;
	l = a;
	s = 0;
	for (i = 0; i == is; i++){
		s += a;
		if (a > h){
			h = a;
		}else if (a < l){
			l = ;
		}
		cin >> a;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: expected primary-expression before ';' token
   15 |                         l = ;
      |                             ^
Language: C++

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

int main(){
int n;
int l,s;
l=o;
s=0;
long long al=0;
cin>>n;
int a[10000];
for(int i=1;i<=n;i++){
cin>>a[i];
al+=a[i];
l=max(l,a[i]);
s=min(s,a[i]);
}
cout<<s<<" "<<l<<" "<<al<<endl;
return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'o' was not declared in this scope
    7 | l=o;
      |   ^
Language: C++

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

int main(){
int n,l;
l=0;
long long s;
s=1000000000000000000000000;
long long sum=0;
cin>>n;
int a[10000];
int i;

for(i=0;i<n;i++){
cin>>a[i];
sum+=a[i];
l=max(l,a[i]);
s=min(s,a[i]);
}

cout<<s<<" "<<l<<" "<<sum<<endl;
return 0;
}


Compiler output:
a.cc:8:3: warning: integer constant is too large for its type
    8 | s=1000000000000000000000000;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:18:6: error: no matching function for call to 'min(long long int&, int&)'
   18 | s=min(s,a[i]);
      |   ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:18:6: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   18 | s=min(s,a[i]);
      |   ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:18:6: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   18 | s=min(s,a[i]);
      |   ~~~^~~~~~~~
Language: C++

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

int main(){
int n,l;
l=0;
long long s;
s=1000000000000000;
long long sum=0;
cin>>n;
int a[10000];
int i;

for(i=0;i<n;i++){
cin>>a[i];
sum+=a[i];
l=max(l,a[i]);
s=min(s,a[i]);
}

cout<<s<<" "<<l<<" "<<sum<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:6: error: no matching function for call to 'min(long long int&, int&)'
   18 | s=min(s,a[i]);
      |   ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:18:6: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   18 | s=min(s,a[i]);
      |   ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:18:6: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   18 | s=min(s,a[i]);
      |   ~~~^~~~~~~~
Language: C++

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

int main(){
    int n;
    cin >> n;
    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;
    
}
        
        


Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: 'a' was not declared in this scope
    7 |     for (int i = 0;i<n;i++) cin >>a[i];
      |                                   ^
a.cc:9:14: error: 'a' was not declared in this scope
    9 |     int mn = a[0], mx = a[0];
      |              ^
a.cc:13:10: error: 'mx' was not declared in this scope; did you mean 'mn'?
   13 |          mx = max(mx,a[i]);
      |          ^~
      |          mn
a.cc:17:21: error: 'mx' was not declared in this scope; did you mean 'mn'?
   17 |     cout<<mn<<" " <<mx<<" "<<sum<<endl;
      |                     ^~
      |                     mn
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=[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:8:21: error: expected identifier before numeric constant
    8 |     int mn=a[0],mx=[0];
      |                     ^
a.cc: In lambda function:
a.cc:8:23: error: expected '{' before ';' token
    8 |     int mn=a[0],mx=[0];
      |                       ^
a.cc: In function 'int main()':
a.cc:8:20: error: invalid user-defined conversion from 'main()::<lambda()>' to 'int' [-fpermissive]
    8 |     int mn=a[0],mx=[0];
      |                    ^~~
a.cc:8:20: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
    8 |     int mn=a[0],mx=[0];
      |                    ^
a.cc:8:20: note:   no known conversion from 'void (*)()' to 'int'
Language: C++

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

int main()
{
  long long goukei = 0;
  int data[10000];
  
  cin >> n;

  for(int i = 0 ; i<n ; i++){
    cin >> data[k];
    goukei += data[k];
  }
  for(int k = 0;k < n;k++)
    {
      max = data[0];
      min = data[0];

      if(max < data[k]){
	max = data[k];
      }
      if(min > data[k]){
	 min = data[k];
      }
      /*
      if(max >= data[k])
	{
	  if(min >= data[k])
	    {
	      min = data[k];
	    }
	}
      
      else
	{
      */
	  
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |   cin >> n;
      |          ^
      |          yn
a.cc:12:17: error: 'k' was not declared in this scope
   12 |     cin >> data[k];
      |                 ^
a.cc:17:19: error: overloaded function with no contextual type information
   17 |       max = data[0];
      |                   ^
a.cc:18:19: error: overloaded function with no contextual type information
   18 |       min = data[0];
      |                   ^
a.cc:20:10: error: parse error in template argument list
   20 |       if(max < data[k]){
      |          ^~~~~~~~~~~~~
a.cc:20:23: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   20 |       if(max < data[k]){
      |                       ^
a.cc:21:21: error: overloaded function with no contextual type information
   21 |         max = data[k];
      |                     ^
a.cc:23:14: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
   23 |       if(min > data[k]){
      |          ~~~~^~~~~~~~~
a.cc:24:22: error: overloaded function with no contextual type information
   24 |          min = data[k];
      |                      ^
Language: C++

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

int main()
{
  long long int goukei = 0;
  int data[10000];
  
  cin >> n;

  for(int i = 0 ; i<n ; i++){
    cin >> data[k];
    goukei += data[k];
  }
  for(int k = 0;k < n;k++)
    {
      max = data[0];
      min = data[0];

      if(max < data[k]){
	max = data[k];
      }
      if(min > data[k]){
	 min = data[k];
      }
      /*
      if(max >= data[k])
	{
	  if(min >= data[k])
	    {
	      min = data[k];
	    }
	}
      
      else
	{
      */
	  
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |   cin >> n;
      |          ^
      |          yn
a.cc:12:17: error: 'k' was not declared in this scope
   12 |     cin >> data[k];
      |                 ^
a.cc:17:19: error: overloaded function with no contextual type information
   17 |       max = data[0];
      |                   ^
a.cc:18:19: error: overloaded function with no contextual type information
   18 |       min = data[0];
      |                   ^
a.cc:20:10: error: parse error in template argument list
   20 |       if(max < data[k]){
      |          ^~~~~~~~~~~~~
a.cc:20:23: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   20 |       if(max < data[k]){
      |                       ^
a.cc:21:21: error: overloaded function with no contextual type information
   21 |         max = data[k];
      |                     ^
a.cc:23:14: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
   23 |       if(min > data[k]){
      |          ~~~~^~~~~~~~~
a.cc:24:22: error: overloaded function with no contextual type information
   24 |          min = data[k];
      |                      ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: expected ',' or ';' before '}' token
   18 |         }
      |         ^
a.cc:19:44: error: 'sumA' was not declared in this scope; did you mean 'sum'?
   19 |         cout << mn << " " << mx << " "  << sumA << endl;
      |                                            ^~~~
      |                                            sum
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
using namespace std;

int main(void)
{
	int n;
	cin >> n;
	long long sum = 0;
	int min = 10000000;int max = -10000000;

	for (int i = 0, i < n; i++) {
		int x;
		cin >> x;
		sum += x;
		if (min > x) min = x;
		if (max < x)max = x;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before '<' token
   13 |         for (int i = 0, i < n; i++) {
      |                          ^~
      |                          ;
a.cc:13:27: error: expected primary-expression before '<' token
   13 |         for (int i = 0, i < n; i++) {
      |                           ^
Language: C++

int main(){
  int n,i;
  int  temp, max ,min;
  long int sum = 0;

  std::cin >> n;

  scanf("%d" ,&temp);
  max = min = temp;
  sum += temp;

  for (i = 0; i < n-1 ; i++ ) {
    /* code */
    scanf("%d" ,&temp);
    if(max< temp ){
      max = temp;
    }else if(min > temp){
      min = temp;
    }
    sum += temp;

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

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'cin' is not a member of 'std'
    6 |   std::cin >> n;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:8:3: error: 'scanf' was not declared in this scope
    8 |   scanf("%d" ,&temp);
      |   ^~~~~
a.cc:23:1: error: 'printf' was not declared in this scope
   23 | printf("%d %d %ld",min ,max ,sum );
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 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]);
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:23:10: error: expected '}' at end of input
   23 | return 0;
      |          ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

using std::cin;
using std::cout;
using std::endl;

using ll = long long;

int main() {
  int n;
  ll min = 1000001, max = -1000001, sum;
  std::vector<int> a;

  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    min = std::min(min, a[i]);
    max = std::max(max, a[i]);
  }

  sum = std::accumulate(a.begin(), a.end(), 0LL);

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

  return 0;
}


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

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

int main(){
  int n, a[n];
  scanf("%d",&n);
  for (int i = 0; i < n; i++){
    scanf("%d",&a[i]);
  }
  int min_a = -1000000;
  int max_a = 1000000;
  int sum_a = 0;
  for (int i = 0; i < n; i++){
    min_a = min(min_a, a[i]);
    max_a = max(max_a, a[i]);
    sum_a += a[i];
  }
  printf("%d %d %d\n",min_a, max_a, sum_a);
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'min' was not declared in this scope; did you mean 'std::min'?
   14 |     min_a = min(min_a, a[i]);
      |             ^~~
      |             std::min
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:15:13: error: 'max' was not declared in this scope; did you mean 'std::max'?
   15 |     max_a = max(max_a, a[i]);
      |             ^~~
      |             std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

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

#include <numeric>
#include <algorithm>

int main()
{
	int n;
	std::int64_t a[10000];
	std::cin >> n;
	for (int i = 0; i < n; i++)
	{
		std::cin >> a[i];
	}
	std::int64_t sum = 0;
	auto [min, max] = std::minmax(a + 0, a + n - 1);
	sum = std::accumulate(a + 0, a + n, 0);
	printf("%lld %lld %lld\n", *min, *max, sum);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'int64_t' is not a member of 'std'; did you mean 'int64_t'?
   10 |         std::int64_t a[10000];
      |              ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:155,
                 from /usr/include/stdlib.h:514,
                 from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   27 | typedef __int64_t int64_t;
      |                   ^~~~~~~
a.cc:14:29: error: 'a' was not declared in this scope
   14 |                 std::cin >> a[i];
      |                             ^
a.cc:16:14: error: 'int64_t' is not a member of 'std'; did you mean 'int64_t'?
   16 |         std::int64_t sum = 0;
      |              ^~~~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   27 | typedef __int64_t int64_t;
      |                   ^~~~~~~
a.cc:17:39: error: 'a' was not declared in this scope
   17 |         auto [min, max] = std::minmax(a + 0, a + n - 1);
      |                                       ^
a.cc:18:9: error: 'sum' was not declared in this scope
   18 |         sum = std::accumulate(a + 0, a + n, 0);
      |         ^~~
Language: C++

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

#include <numeric>
#include <algorithm>

int main()
{
	int n;
	std::int64_t a[10000];
	std::cin >> n;
	for (int i = 0; i < n; i++)
	{
		std::cin >> a[i];
	}
	std::int64_t sum = 0;
	auto minmax = std::minmax(a + 0, a + n - 1);
	sum = std::accumulate(a + 0, a + n, 0);
	printf("%lld %lld %lld\n", *minmax.first, *minmax.second, sum);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'int64_t' is not a member of 'std'; did you mean 'int64_t'?
   10 |         std::int64_t a[10000];
      |              ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:155,
                 from /usr/include/stdlib.h:514,
                 from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   27 | typedef __int64_t int64_t;
      |                   ^~~~~~~
a.cc:14:29: error: 'a' was not declared in this scope
   14 |                 std::cin >> a[i];
      |                             ^
a.cc:16:14: error: 'int64_t' is not a member of 'std'; did you mean 'int64_t'?
   16 |         std::int64_t sum = 0;
      |              ^~~~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   27 | typedef __int64_t int64_t;
      |                   ^~~~~~~
a.cc:17:35: error: 'a' was not declared in this scope
   17 |         auto minmax = std::minmax(a + 0, a + n - 1);
      |                                   ^
a.cc:18:9: error: 'sum' was not declared in this scope
   18 |         sum = std::accumulate(a + 0, a + n, 0);
      |         ^~~
Language: C++

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

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

int main()
{
	int n;
	std::vector<int64_t> a(10000);
	std::cin >> n;
	for (int i = 0; i < n; i++)
	{
		std::cin >> a[i];
	}
	std::int64_t sum = 0;
	/*auto [min, max]*/auto minmax = std::minmax_element(a.begin(), a.begin() + n);
	sum = std::accumulate(a.begin(), a.end(), (std::int64_t)0);
	printf("%lld %lld %lld\n", *minmax.first, *minmax.second, sum);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: 'int64_t' is not a member of 'std'; did you mean 'int64_t'?
   17 |         std::int64_t sum = 0;
      |              ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:155,
                 from /usr/include/stdlib.h:514,
                 from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   27 | typedef __int64_t int64_t;
      |                   ^~~~~~~
a.cc:19:9: error: 'sum' was not declared in this scope
   19 |         sum = std::accumulate(a.begin(), a.end(), (std::int64_t)0);
      |         ^~~
a.cc:19:57: error: 'int64_t' is not a member of 'std'; did you mean 'int64_t'?
   19 |         sum = std::accumulate(a.begin(), a.end(), (std::int64_t)0);
      |                                                         ^~~~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   27 | typedef __int64_t int64_t;
      |                   ^~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected initializer before 'long'
    6 | long c = 0;
      | ^~~~
a.cc:16:1: error: 'b' was not declared in this scope
   16 | b = a[j];
      | ^
a.cc:24:1: error: 'c' was not declared in this scope
   24 | c += a[i];
      | ^
a.cc:26:41: error: 'c' was not declared in this scope
   26 | cout << a[0] << " " << a[n-1] << " " << c << endl;
      |                                         ^
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: In function 'int main()':
a.cc:8:2: error: expected initializer before 'for'
    8 |  for(int i=0;i<n;i++) cin>>a[i];
      |  ^~~
a.cc:8:14: error: 'i' was not declared in this scope
    8 |  for(int i=0;i<n;i++) cin>>a[i];
      |              ^
a.cc:10:11: error: 'a' was not declared in this scope
   10 |  int mn = a[0],mx=a[0];
      |           ^
a.cc:14:2: error: 'mx' was not declared in this scope; did you mean 'mn'?
   14 |  mx=max(mx,a[i]);
      |  ^~
      |  mn
a.cc:18:17: error: 'mx' was not declared in this scope; did you mean 'mn'?
   18 |  cout<<mn<<" "<<mx<<" "<<sum<<endl;
      |                 ^~
      |                 mn
a.cc:21:12: error: expected '}' at end of input
   21 |   return 0;
      |            ^
a.cc:4:12: note: to match this '{'
    4 |  int main(){
      |            ^
Language: C++

#include <iostream>
 int main() {
  int n, m, s = 0, g = 0;
  long long int d;
  std::cin >> n;
   for (int i = 0; i <= n; i++) {
    std::cin >> n;
    d += n;
     if (n < s) {
      s = n;
     }
     if (n > g) {
      g = n;
    }
   std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


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

#include <iostream>
 int main() {
  int n, m,;
  int s = 0;
  int g = 0;
  long long int d;
  std::cin >> n;
   for (int i = 0; i <= n; i++) {
    std::cin >> n;
    d += n;
     if (n < s) {
      s = n;
     }
     if (n > g) {
      g = n;
    }
   std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: expected unqualified-id before ';' token
    3 |   int n, m,;
      |            ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:2:13: note: to match this '{'
    2 |  int main() {
      |             ^
Language: C++

#include <iostream>
 int main() {
  int n, m,;
  int s = 0;
  int g = 0;
  long d;
  std::cin >> n;
   for (int i = 0; i <= n; i++) {
    std::cin >> n;
    d += n;
     if (n < s) {
      s = n;
     }
     if (n > g) {
      g = n;
    }
   std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: expected unqualified-id before ';' token
    3 |   int n, m,;
      |            ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:2:13: note: to match this '{'
    2 |  int main() {
      |             ^
Language: C++

#include <iostream>
 int main() {
  int n, m,;
  int s = 0;
  int g = 0;
  long long int d;
  std::cin >> n;
   for (int i = 0; i =< n; i++) {
    std::cin >> n;
    d += n;
     if (n < s) {
      s = n;
     }
     if (n > g) {
      g = n;
    }
   std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: expected unqualified-id before ';' token
    3 |   int n, m,;
      |            ^
a.cc:8:23: error: expected primary-expression before '<' token
    8 |    for (int i = 0; i =< n; i++) {
      |                       ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:2:13: note: to match this '{'
    2 |  int main() {
      |             ^
Language: C++

#include <iostream>
 int main() {
  int n = 10;
  int m;
  int s = 0;
  int g = 0;
  long long int d;
   for (int i = 0; i <= n; i++) {
    std::cin >> n;
    d += n;
     if (n < s) {
      s = n;
     }
     if (n > g) {
      g = n;
    }
   std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


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

#include <iostream>
 int main() {
  int n = 10;
  int m;
  int s = 0;
  int g = 0;
  long long int d;
   for (int i = 0; i <= n; i++;) {
    std::cin >> n;
    d += n;
     if (n < s) {
      s = n;
     }
     if (n > g) {
      g = n;
    }
   std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: expected ')' before ';' token
    8 |    for (int i = 0; i <= n; i++;) {
      |        ~                      ^
      |                               )
a.cc:8:32: error: expected primary-expression before ')' token
    8 |    for (int i = 0; i <= n; i++;) {
      |                                ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:2:13: note: to match this '{'
    2 |  int main() {
      |             ^
Language: C++

#include <iostream>
 int main() {
  int n, m, s = 1000001, g = −1000001;
  long long int d;
  std::cin >> n;
   for (int i = 1; i <= n; i++) {
    std::cin >> m;
    d += m;
     if (m <= s) {
      s = m;
     }
     if (m >= g) {
      g = m;
    }
    }   
    std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


Compiler output:
a.cc:3:30: error: extended character − is not valid in an identifier
    3 |   int n, m, s = 1000001, g = −1000001;
      |                              ^
a.cc: In function 'int main()':
a.cc:3:30: error: '\U000022121000001' was not declared in this scope
    3 |   int n, m, s = 1000001, g = −1000001;
      |                              ^~~~~~~~
Language: C++

#include <iostream>
 int main() {
  int n, m;
  int  s = 1000001;
  int g = −1000001;
  long long int d;
  std::cin >> n;
   for (int i = 1; i <= n; i++) {
    std::cin >> m;
    d += m;
     if (m <= s) {
      s = m;
     }
     if (m >= g) {
      g = m;
    }
    }   
    std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


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

#include <iostream>
 int main() {
  int n, m;
  int s = 1000001;
  int g = −1000001;
  long long int d;
  std::cin >> n;
   for (int i = 1; i <= n; i++) {
    std::cin >> m;
    d += m;
     if (m <= s) {
      s = m;
     }
     if (m >= g) {
      g = m;
    }
    }   
    std::cout << s << " " << g << " " << d <<std::endl;



 return 0;


}
    
    


Compiler output:
a.cc:5:11: error: extended character − is not valid in an identifier
    5 |   int g = −1000001;
      |           ^
a.cc: In function 'int main()':
a.cc:5:11: error: '\U000022121000001' was not declared in this scope
    5 |   int g = −1000001;
      |           ^~~~~~~~
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[i];
  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:11:25: error: 'i' was not declared in this scope
   11 |   int mn = a[0], mx = a[i];
      |                         ^
a.cc:14:23: 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:23: error: expected '}' at end of input
   14 |     mn = min(mn,a[i]);
      |                       ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^