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

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

  bool colors[8] = {false};
  int free = 0;
  
  for (int i = 0: i < N; i++) {
    int a;
    cin >> a;
    if (a <= 399) colors[0] = true;
    else if (a <= 799) colors[1] = true;
    else if (a <= 1199) colors[2] = true;
    else if (a <= 1599) colors[3] = true;
    else if (a <= 1999) colors[4] = true;
    else if (a <= 2399) colors[5] = true;
    else if (a <= 2799) colors[6] = true;
    else if (a <= 3199) colors[7] = true;
    else free++;
  }
  
  int ans_min = 0;
  for (int i = 0; i < 8 i++) {
    if (colors[i]) ans_min++;
  }
  if (ans_min==0) ans_min = 1;
  
  int ans_max = ans_min + free;
  if (ans_max > 8) ans_max = 8;
  
  cout << ans_min << " " << ans_max << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'itn' was not declared in this scope; did you mean 'int'?
    5 |   itn N;
      |   ^~~
      |   int
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N;
      |          ^
a.cc:11:14: error: initializer in range-based 'for' loop
   11 |   for (int i = 0: i < N; i++) {
      |              ^
a.cc:11:24: error: expected ')' before ';' token
   11 |   for (int i = 0: i < N; i++) {
      |       ~                ^
      |                        )
a.cc:11:26: error: 'i' was not declared in this scope
   11 |   for (int i = 0: i < N; i++) {
      |                          ^
a.cc:26:24: error: expected ';' before 'i'
   26 |   for (int i = 0; i < 8 i++) {
      |                        ^~
      |                        ;
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repo(i,n) for(int i = 1; i < (int)(n); i++)
#define pb push_back
#define np next_permutation
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define mod 1000000007
#define pi acos(-1.0)
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
//cout << fixed << setprecision (20);   小数点以下2０桁まで
//intの最大値2147483647 ≒ 2×10^9
//long longの最大値9223372036854775807 ≒ 9×10^18
//'0'+=16;        で大文字に
//'大文字'+=32;    で小文字に
//s[i]-'0'でchar文字→int数に;
//string s = to_string(int数);
//int n = stoi(string文字列)
//実行時間制約2秒では２×10^8回くらいまで計算できる


int main() {
  int n;
  cin >> n;
  
  int pro=0;
  vector<int> q(8,0);
  vector<int> p(n);
  rep(i,n){
  cin>>p[i];
    if(p[i]<=399)q[0]++;
    else if(p[i]<=799)q[1]++;
    else if(p[i]<=1199)q[2]++;
    else if(p[i]<=1599)q[3]++;
    else if(p[i]<=1999)q[4]++;
    else if(p[i]<=2399)q[5]++;
    else if(p[i]<=2799)q[6]++;
    else if(p[i]<=3199)q[7]++;
    else pro++;    
  }
  
  int ans=0;
  rep(i,8){
    if(q[i]!=0)ans++;
  }
  
  if(ans==0){
  ans++;
  pro==;
  }
  
  cout << ans << " " << ans+pro << endl;
}


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

#include <bits/stdc++.h>

using namespace std;
#define all(a)a.begin(),a.end()
using ll=long long;
const int INF = 1<<30;
const ll INFll =1LL<<62;
const int mod = int(1e9)+7;
using V = vector<ll>;
using P = pair<ll,ll>;

int main(){
    ll n;cin >>n;
    vector<ll>cnt(9,0);
    for (int i = 0; i < n; ++i) {
        ll a;cin >>a;
        cnt[a/400]++;
    }
    ll mint=0,mx=0;
    for (int j = 0; j < 9; ++j) {
        if(j<8){
            if(cnt[j]>0)mint++;
        }
        else {
            if(cnt[j]>0)mx+=cnt[j];
        }
    }
    cout <<max(mint,1)<<" "<<mint+mx<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:15: error: no matching function for call to 'max(ll&, int)'
   28 |     cout <<max(mint,1)<<" "<<mint+mx<<endl;
      |            ~~~^~~~~~~~
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: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:28:15: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   28 |     cout <<max(mint,1)<<" "<<mint+mx<<endl;
      |            ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:28:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   28 |     cout <<max(mint,1)<<" "<<mint+mx<<endl;
      |            ~~~^~~~~~~~
Language: C++

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


int main() {
    int N; cin >> N;
    vector<int> V(N);
    for(int i=0;i<N;i++){
        cin >> V.at(i);
        V.at(i)/=400;
    }
    vector<int> Clr(9,0);
    for(int i=0;i<N;i++){
        int x=V.at(i);
        Clr.at(x)++;      
    }
    int min=0;
    for(int j=0;j<8;j++){
        int y=Clr.at(j);
        if(y>0){
            min++;
        }
    }
    cout << min;
    int Max=0;
    if(min==0){
        Max=1;
    }
    int Max = min + Clr.at(8);

    cout << " " << Max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: redeclaration of 'int Max'
   29 |     int Max = min + Clr.at(8);
      |         ^~~
a.cc:25:9: note: 'int Max' previously declared here
   25 |     int Max=0;
      |         ^~~
Language: C++

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

int main() {
	int n,a,o=0;
	cin >> n;
	set<int> b;
	for(int i = 0;i < n;i++)
	{
		cin >> a;
		if(a / 400 > 7)
		{
			o++;
		}
		else
		{
			b.insert(a / 400);
		}
	}
	int mn = max(1,b.size());
    cout << mn << ' ' << b.size() + o << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: no matching function for call to 'max(int, std::set<int>::size_type)'
   20 |         int mn = max(1,b.size());
      |                  ~~~^~~~~~~~~~~~
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: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:20:21: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::set<int>::size_type' {aka 'long unsigned int'})
   20 |         int mn = max(1,b.size());
      |                  ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:20:21: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |         int mn = max(1,b.size());
      |                  ~~~^~~~~~~~~~~~
Language: C++

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

int main() {
	int n,a,o=0;
	cin >> n;
	set<int> b;
	for(int i = 0;i < n;i++)
	{
		cin >> a;
		if(a / 400 > 7)
		{
			o++;
		}
		else
		{
			s.insert(a / 400);
		}
	}
	int mn = max(1,s.size());
    cout << mn << ' ' << s.size() + o << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 's' was not declared in this scope
   17 |                         s.insert(a / 400);
      |                         ^
a.cc:20:24: error: 's' was not declared in this scope
   20 |         int mn = max(1,s.size());
      |                        ^
Language: C++

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


  
int main(){
  
  int n;
  cin>>n;
  vector<int> data(n);
  for (int i=0;i<n;i++){
    cin>>data.at(i);
  }
  
  
  int c,r;
  
  c=0;
  r=0;
  
  for (int k=0;k<=7;k++){
    for (int i=0;i<n;i++){
      if (400*k<=data.at(i) and data.at(i)<400*(k+1)){
        c++;
        break;
      }
    }
  }
  
  for (int i=0;i<n;i++){
    if (data.at(i)>=3200){
      r++;
    }
  }
  
  int max,min;
  
  max=c+r;
  
  min=max(1,c);
  
  cout<<min<<" "<<max<<endl;
  
  
  
  
  

  

}
  















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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int,int> P;
 
int main(){
  int n;
  cin >> n;
  map<int,int> mp;
  int free = 0;
  rep(i,n) {
    int a;
    cin >> a;
    if (a < 400) mp[0] = 1;
    else if (a < 800) mp[1] = 1;
    else if (a < 1200) mp[2] = 1;
    else if (a < 1600) mp[3] = 1;
    else if (a < 2000) mp[4] = 1;
    else if (a < 2400) mp[5] = 1;
    else if (a < 2800) mp[6] = 1;
    else if (a < 3200) mp[7] = 1;
    else free++; 
  }
  cout << (!mp.empty() ? mp.size() : 1) << " " << mp.size() + free << endl;
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:27:12: error: expected '}' at end of input
   27 |   return 0;
      |            ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include<iostream>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip>//setprecision
#include<math.h>
#include <functional>
#include<climits>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main(){ 
  int a,b,e,d=0;cin>>a;
  vector<int>c(9);
  rep(i,9)c[i]=0;
  rep(i,a){
cin>>b;
e=b/400;
if(e!<10)c[8]++;
else c[e]++;
  }
  rep(i,8){
    if(c[i]!=0)d++;
  }
  if(d==0)d++;
  cout<<d<<" "<<d+c[8];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: expected ')' before '!' token
   31 | if(e!<10)c[8]++;
      |   ~ ^
      |     )
Language: C++

#include<iostream>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip>//setprecision
#include<math.h>
#include <functional>
#include<climits>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main(){ 
  int a,b,e,d=0;cin>>a;
  vector<int>c(9);
  rep(i,9)c[i]=0;
  rep(i,a){
cin>>b;
e=b/400;
if(e!<10)c[9]++;
else c[e]++;
  }
  rep(i,8){
    if(c[i]!=0)d++;
  }
  if(d==0)d++;
  cout<<d<<" "<<d+c[8];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: expected ')' before '!' token
   31 | if(e!<10)c[9]++;
      |   ~ ^
      |     )
Language: C++

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()



int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i, n) cin >> a[i];
  vector<int> color(8, 0);
  int m = 0;
  rep(i, n) {
    if (a[i] >= 3200) {
      m++;
      continue;
    } else {
      color[a[i]/400]++;
    }
  }
  int mn = 0;
  for (int i = 0; i < 8; i++) {
    if (color[i] > 0) {
      mn++;
    }
  }
  
  cout << max(min, 1) << endl << mn+m << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: no matching function for call to 'max(<unresolved overloaded function type>, int)'
   33 |   cout << max(min, 1) << endl << mn+m << endl;
      |           ~~~^~~~~~~~
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:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:20: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const int&'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |         ~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:33:14: note:   couldn't deduce template parameter '_Tp'
   33 |   cout << max(min, 1) << endl << mn+m << endl;
      |           ~~~^~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
#include<map>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<iomanip>
using namespace std;
using ll =long long;
const int MOD = 1000000007;

int main() {
	ll N;
	vector<ll>a;
	cin >> N;
	ll c;
	map<ll,ll > value;
	ll joker = 0;
	ll color = 0;
	for (ll i = 0; i < N; i++) {

		cin >> c;
		a.push_back(c);

	}
	for (ll i =0; i<N;i++) {
		if (a[i] / 400 >= 8) {
			joker++;

		}
		else {
			value[a[i]/400]++;
		}

	}
	for (ll i = 0; i <= 7; i++) {
		if (value[i] != 0) {

			color++;

		}
		
	}
	if (color == 0) {

		cout << 1<<" ";
		
	}
	else {
		cout << color<<" ";
	}
	color += joker;
	if (color >= 9) {

		color = 8;
	}
	cout << color;



Compiler output:
a.cc: In function 'int main()':
a.cc:60:23: error: expected '}' at end of input
   60 |         cout << color;
      |                       ^
a.cc:15:12: note: to match this '{'
   15 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define bg begin()
#define ed end()
#define all(x) x.bg,x.ed
#define pb push_back
#define pf push_front
#define eb emplace_back
using namespace std;
typedef long long ll;
template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}
template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;
using pi=pair<int,int>;
using vi=vc<int>;
void yes(){ cout << "Yes" << endl; }
void no(){ cout << "No" << endl; }
int SIZE(string s){return (int)s.size();}
const long long INF = 1LL << 60;

int main(){
    cout << fixed << setprecision(20);
    int n; cin >> n;
    vc<bool> ch(8,false);
    int cnt = 0;
    rep(i,n){
        int x; cin >> x;
        if(x >= 3200) cnt++;
        else ch[x/400] = true;
    }
    int ans = accumulate(all(ch), 0);
    cout << max(ans, 1) << " " << min(ans+cnt) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:38: error: no matching function for call to 'min(int)'
   37 |     cout << max(ans, 1) << " " << min(ans+cnt) << endl;
      |                                   ~~~^~~~~~~~~
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:   candidate expects 2 arguments, 1 provided
/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, 1 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:   template argument deduction/substitution failed:
a.cc:37:38: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   37 |     cout << max(ans, 1) << " " << min(ans+cnt) << endl;
      |                                   ~~~^~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  set<int>S;
  int a=0;
  for(int i=0;i<N;i++){
  int x;
    cin>>x;
    if(1<=x && x<=399)
      S.insert(1);
    else if(x<=799)
    S.insert(2);
    else if(x<=1199)
      S.insert(3);
    else if(x<=1599)
      S.insert(4);
    else if(x<=1999)
      S.insert(5);
    else if(x<=2399)
      S.insert(6);
    else if(x<=2799)
      S.insert(7);
    else if(x<=3199)
      S.insert(8);
    else 
      a++;
  
  
  } int Min=min(S.size(),1);
  int n=S.size();
  int Max=min(n+a,8);
  cout<<Min<<" "<<Max<<endl;
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:16: error: no matching function for call to 'min(std::set<int>::size_type, int)'
   31 |   } int Min=min(S.size(),1);
      |             ~~~^~~~~~~~~~~~
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:31:16: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'int')
   31 |   } int Min=min(S.size(),1);
      |             ~~~^~~~~~~~~~~~
/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:31:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
   31 |   } int Min=min(S.size(),1);
      |             ~~~^~~~~~~~~~~~
Language: C++

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

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

  int a[110];
  int b[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
  for (int i=0; i<n; i++){
    cin >> a[i];
    b[a[i]/400]++;
  }

  int max = 0, min = 0;
  for (int i=0; i<13; i++){
    if (b[i]>0 && i<8){
      max++;
      min++;
    }
    if (b[i]>0 && i>=8){
      max += b[i];
    }
  }

  if (c==0){
    c = 1;
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:27:7: error: 'c' was not declared in this scope
   27 |   if (c==0){
      |       ^
Language: C++

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

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

  int a[110];
  int b[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
  for (int i=0; i<n; i++){
    cin >> a[i];
    b[a[i]/400]++;
  }

  int max = 0, min = 0;
  for (int i=0; i<13; i++){
    if (b[i]>0 && i<8){
      max++;
      min++;
    }
    if (b[i]>0 && i>=8){
      max += b[i];
    }
  }

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:43: error: too many initializers for 'int [13]'
   10 |   int b[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
      |                                           ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 1e9
#define ALL(v) v.begin(), v.end()

using namespace std;
typedef long long ll;

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

    vector<int>a(n, 0);
    vector<int>ct(8, 0);
    REP(i, n) cin >> a[i];

    int redct = 0;
    REP(i, n){
        if (a[i] >= 3200){
            redct++;
            continue;
        }
        ct[a[i] / 400]++;
    }

    int minct = 0;

    REP(i, 8){
        if (ct[i] > 0) minct++;
    }
    cout << max(minct, 1) << " " << min(minct + redct, n) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:40: error: no matching function for call to 'min(int, ll&)'
   33 |     cout << max(minct, 1) << " " << min(minct + redct, n) << endl;
      |                                     ~~~^~~~~~~~~~~~~~~~~~
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:33:40: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   33 |     cout << max(minct, 1) << " " << min(minct + redct, n) << endl;
      |                                     ~~~^~~~~~~~~~~~~~~~~~
/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:33:40: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   33 |     cout << max(minct, 1) << " " << min(minct + redct, n) << endl;
      |                                     ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0; i<(n); i++)
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
int main(){
    vector<ll> color(9);
    ll n; cin>>n;
    rep(i,n){
        ll a; cin>>a;
        chmin(a, 3599);
        color[a/400]++;
    }
    ll res=0;
    rep(i,8){
        if(color[i]>0) res++;
    }
    cout<<res<<' '<<res+color[8]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: no matching function for call to 'chmin(ll&, int)'
   12 |         chmin(a, 3599);
      |         ~~~~~^~~~~~~~~
a.cc:5:31: note: candidate: 'template<class T> bool chmin(T&, T)'
    5 | template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
      |                               ^~~~~
a.cc:5:31: note:   template argument deduction/substitution failed:
a.cc:12:14: note:   deduced conflicting types for parameter 'T' ('long long int' and 'int')
   12 |         chmin(a, 3599);
      |         ~~~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
using ll = long long;
using P = pair<ll,ll>;

int main(){
  int n;cin>>n;
  vector<int> v(n);
  rep(i,n){
    cin>>v.at(i);
  }
  vector<int> color(8,0);
  int other=0;
  rep(i,n){
    if (0<=v.at(i) && v.at(i) <= 399){
      color.at(0)++;
    }
    else if (400<=v.at(i) && v.at(i)<=799){
      color.at(1)++;
    }
    else if (800<=v.at(i) && v.at(i)<=1199){
      color.at(2)++;
    }
    else if (1200<=v.at(i) && v.at(i)<=1599){
      color.at(3)++;
    }
    else if (1600<=v.at(i) && v.at(i)<=1999){
      color.at(4)++;
    }
    else if (2000<=v.at(i) && v.at(i)<=2399){
      color.at(5)++;
    }
    else if (2400<=v.at(i) && v.at(i)<=2799){
      color.at(6)++;
    }
    else if (2800<=v.at(i) && v.at(i)<=3199){
      color.at(7)++;
    }
    else if (3200<=v.at(i)){
      other++;
    }
  }
  int sum=0;
  rep(i,8){
    if (color.at(i) > 0){
      sum++;
    }
  }
  if (sum<=other){
    if (sum==0 || sum == 1){
      cout << 1 << " " << sum + other << endl;
    }
    else{
      cout << sum << " " << sum + other << endl;
  }
  else {
    cout << sum << " " << sum + other << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:3: error: expected '}' before 'else'
   57 |   else {
      |   ^~~~
a.cc:50:18: note: to match this '{'
   50 |   if (sum<=other){
      |                  ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<deque>
#include<cctype>
#include<math.h>
using namespace std;
#define ll long long
int main(){
    ll N;
    cin >> N;
    ll i,a;
    ll color[8],t1=0,t2=0;
    for(i=0;i<8;i++){
        color[i]=0;
    }
    for(i=0;i<N;i++){
        cin >>a;
        if(a<3200)color[a/400]=1;else t2++;
    }
     for(i=0;i<8;i++){
        t1+=color[i];
    }
    cout << max(t1,1) <<" "<< t1+t2 <<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:16: error: no matching function for call to 'max(long long int&, int)'
   30 |     cout << max(t1,1) <<" "<< t1+t2 <<endl;
      |             ~~~^~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:30:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   30 |     cout << max(t1,1) <<" "<< t1+t2 <<endl;
      |             ~~~^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:30:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   30 |     cout << max(t1,1) <<" "<< t1+t2 <<endl;
      |             ~~~^~~~~~
Language: C++

n = int(input())
a = list(map(int,input().split()))
 
color_n = [0 for i in range(9)]
 
for i in a:
    if 1 <= i <= 399:
        color_n[0] += 1
    
    elif 400 <= i <= 799:
        color_n[1] += 1
    
    elif 800 <= i <= 1199:
        color_n[2] += 1
    
    elif 1200 <= i <= 1599:
        color_n[3] += 1
    
    elif 1600 <= i <= 1999:
        color_n[4] += 1
    
    elif 2000 <= i <= 2399:
        color_n[5] += 1
    
    elif 2400 <= i <= 2799:
        color_n[6] += 1
    
    elif 2800 <= i <= 3199:
        color_n[7] += 1
    
    else:
        color_n[8] += 1
 
print(max(8-color_n[:-1].count(0), 1),8-color_n[:-1].count(0)+color_n[-1])
    
n = int(input())
a = list(map(int,input().split()))

color_n = [0 for i in range(9)]

for i in a:
    if 1 <= i <= 399:
        color_n[0] += 1
    
    elif 400 <= i <= 799:
        color_n[1] += 1
    
    elif 800 <= i <= 1199:
        color_n[2] += 1
    
    elif 1200 <= i <= 1599:
        color_n[3] += 1
    
    elif 1600 <= i <= 1999:
        color_n[4] += 1
    
    elif 2000 <= i <= 2399:
        color_n[5] += 1
    
    elif 2400 <= i <= 2799:
        color_n[6] += 1
    
    elif 2800 <= i <= 3199:
        color_n[7] += 1
    
    else:
        color_n[8] += 1

print(max(8-color_n[:-1].count(0), 1),8-color_n[:-1].count(0)+color_n[-1])
    


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C

#include<stdio.h>
int main(){
  int i,N;
  int a[4801];
  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  int r[100]={0};
  int num=0;
  for(i=0;i<N;i++){
    if(a[i]<400){
      r[i]=1;
    }
    else if(a[i]>=400&&a[i]<800){
      r[i]=2;
    }
    else if(a[i]>=800&&a[i]<1200){
      r[i]=3;
    }
    else if(a[i]>=1200&&a[i]<1600){
      r[i]=4;
    }
    else if(a[i]>=1600&&a[i]<2000){
      r[i]=5;
    }
    else if(a[i]>=2000&&a[i]<2400){
      r[i]=6;
    }
    else if(a[i]>=2400&&a[i]<2800){
      r[i]=7;
    }
    else if(a[i]>=2800&&a[i]<3200){
      r[i]=8;
    }
    else{
      num++;
    }
  }
  int j,tmp;
  for(i=0;i<N;i++){
    for(j=i+1;j<N;j++){
      if(r[i]<r[j]){
        tmp=r[i];
        r[i]=r[j];
        r[j]=tmp;
      }
    }
  }
  int count =1;
  for(i=1;i<=N;i++){
    //printf("%d",r[i-1]);
    if(r[i]==0){
    }
    else if(r[i]<r[i-1]){
      count++;
    }
  }
  if(r[N]==0){
    printf("\n%d %d",count,num);
  }
  else if{
    printf("\n%d %d",count,count+num);
  }
}
 

Compiler output:
main.c: In function 'main':
main.c:62:10: error: expected '(' before '{' token
   62 |   else if{
      |          ^
      |          (
Language: C++

#include<bits/stdc++.h> 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using ull = unsigned long long;

int main(){
  ll n;
  cin >> n;
  vector<ll> a(n);
  rep(i,n) cin >> a.at(i);
  vector<ll> f(8);
  ll x = 0;
  for(int i=0;i<n;i++){
    if(a.at(i) < 400 ) f.at(0) = 1;
    else if( a.at(i) < 800 ) f.at(1) = 1;
    else if( a.at(i) < 1200 ) f.at(2) = 1;
    else if( a.at(i) < 1600 ) f.at(3) = 1;
    else if( a.at(i) < 2000 ) f.at(4) = 1;
    else if( a.at(i) < 2400 ) f.at(5) = 1;
    else if( a.at(i) < 2800 ) f.at(6) = 1;
    else if( a.at(i) < 3200 ) f.at(7) = 1;
    else x++;
  }
  ll ans = 0;
  rep(i,8) ans += f.at(i);
  cout << max(ans,1) << " " << ans+x << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: no matching function for call to 'max(ll&, int)'
   27 |   cout << max(ans,1) << " " << ans+x << endl;
      |           ~~~^~~~~~~
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: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:27:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   27 |   cout << max(ans,1) << " " << ans+x << endl;
      |           ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:27:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   27 |   cout << max(ans,1) << " " << ans+x << endl;
      |           ~~~^~~~~~~
Language: C++

#include <iostream>
#include <vector>
int main(){
  int n,ans,a,tmp;
  cin >> n;
  vector<int> col(9);
  for(int i=0;i < n;i++){
    cin >> tmp;
    col[tmp / 400] += 1;
  }
  for(int i = 0;i < 9;i++){
  	if (i != 8) ans += col[i]
    cout << ans << " ";
    if (i == 8) ans += col[i]
      cout << ans << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> col(9);
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> col(9);
      |          ^~~
a.cc:9:5: error: 'col' was not declared in this scope
    9 |     col[tmp / 400] += 1;
      |     ^~~
a.cc:12:28: error: 'col' was not declared in this scope
   12 |         if (i != 8) ans += col[i]
      |                            ^~~
a.cc:14:24: error: 'col' was not declared in this scope
   14 |     if (i == 8) ans += col[i]
      |                        ^~~
Language: C++

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

int main(int argc, char **argv)
{
	int n; cin >> n;

	set<int> s;
	int over_num{0};
	for (int i = 0; i < n; ++i)
	{
		int a; cin >> a;
		if (a >= 3200)
			++over_num;
		else
		{
			s.insert(a/400);
		}
	}

	int max{0}, min{0};

	max = static_cast<int>(s.size()) + over_num;
	if (s.size() == 0) min = 1;
	else
		min = static_cast<int>s.size();

	std::cout << min << " " << max << std::endl;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:27:39: error: expected '(' before 's'
   27 |                 min = static_cast<int>s.size();
      |                                       ^
      |                                       (
a.cc:27:47: error: expected ')' before ';' token
   27 |                 min = static_cast<int>s.size();
      |                                               ^
      |                                               )
Language: C++


#include <bits/stdc++.h>
using namespace std;
//#define rep(i,n) for (int i=0;i<(n);++i)

int main(){
//srandom((unsigned long)time(NULL));

int n;
cin>>n;
//vector<int> a;
vector<int> cont;
for(int i=0;i<9;i++){
    cont.emplace_back(0);
}
for(int i=0;i<n;i++){
    int x;
    cin>>x;
    if(x<400)cont[0]++;
    if(400<=x && x<800)cont[1]++;
    if(800<=x && x<1200)cont[2]++;
    if(1200<=x && x<1600)cont[3]++;
    if(1600<=x && x<2000)cont[4]++;
    if(2000<=x && x<2400)cont[5]++;
    if(2400<=x && x<2800)cont[6]++;
    if(2800<=x && x<3200)cont[7]++;
    if(3200<=x)cont[8]++;
}
int ans=0;
for(int i=0;i<8;i++){
    if(cont[i]!=0)ans++;
}
int mx=0;

mx=ans+cnt[8];
if(ans==0)ans=1;
cout<<ans<<" "<<mx<<endl;



return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:8: error: 'cnt' was not declared in this scope; did you mean 'cont'?
   35 | mx=ans+cnt[8];
      |        ^~~
      |        cont
Language: C++

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

int main() {
  int N, b = 0;
  cin >> N;
  vector<int> a(8, 0);
  for (int i = 0; i < N; i++) {
    int c, check = 0;
    cin >> c;
    for (int j = 0; j < 8; j++) {
      if (c < 400*(j + 1) && check == 0) {
        a.at(j) = 1;
        check = 1;
      }
    }
    if (c >= 3200) {
      b++;
    }
  }
  int ans = 0;
  for (int i = 0; i < 8; i++) {
    ans += a.at(i);
  }
  cout << max(ans, 1) << " " << min(ans + b) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:36: error: no matching function for call to 'min(int)'
   25 |   cout << max(ans, 1) << " " << min(ans + b) << endl;
      |                                 ~~~^~~~~~~~~
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:   candidate expects 2 arguments, 1 provided
/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, 1 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:   template argument deduction/substitution failed:
a.cc:25:36: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   25 |   cout << max(ans, 1) << " " << min(ans + b) << endl;
      |                                 ~~~^~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: C++

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

int main(){
  int rate[9];
  for(int i = 0; i < 9; i++){
    rate[i] = 0;
  }
  int n;
  cin >> n;
  for(int i = 0; i < n; i++){
    int a;
    cin >> a;
    if(a/400 < 9){
       rate[a/400]++;
    }
    else{
      rare[8]++;
    }
  }
  int min_num = 0;
  for(int i = 0; i < 8; i++){
    if(rate[i] != 0){
      min_num++;
    }
  }
  int max_num = min_num + rate[8];
  if(min_num == 0){
    min_num = 1;
  }
  cout << min_num <<' ' << max_num;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: 'rare' was not declared in this scope; did you mean 'rate'?
   18 |       rare[8]++;
      |       ^~~~
      |       rate
Language: C++

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

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

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

  map<int, int> p;
  int m = 0;

  for (int i = 0; i < n; i++) {
    if (a[i] >= 1 && a[i] <= 399) p[0]++;
    if (a[i] >= 400 && a[i] <= 799) p[1]++;
    if (a[i] >= 800 && a[i] <= 1199) p[2]++;
    if (a[i] >= 1200 && a[i] <= 1599) p[3]++;
    if (a[i] >= 1600 && a[i] <= 1999) p[4]++;
    if (a[i] >= 2000 && a[i] <= 2399) p[5]++;
    if (a[i] >= 2400 && a[i] <= 2799) p[6]++;
    if (a[i] >= 2800 && a[i] <= 3199) p[7]++;
    if (a[i] >= 3200) m++;
  }

  cout << max(1, p.size()) << " " << p.size() + m << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:14: error: no matching function for call to 'max(int, std::map<int, int>::size_type)'
   26 |   cout << max(1, p.size()) << " " << p.size() + m << endl;
      |           ~~~^~~~~~~~~~~~~
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: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:26:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::map<int, int>::size_type' {aka 'long unsigned int'})
   26 |   cout << max(1, p.size()) << " " << p.size() + m << endl;
      |           ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:26:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   26 |   cout << max(1, p.size()) << " " << p.size() + m << endl;
      |           ~~~^~~~~~~~~~~~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define dunk(n) cout << n << endl
#define all(a) (a).begin(),(a).end()
int main() {
    int n;
    cin >> n;
    vector<int> rate(n),color = {0,0,0,0,0,0,0,0};
    rep(i,n) cin >> rate[i];
    sort(all(rate));
    int count = 0,free = 0;
    rep(i,n){
        if(rate[i] < 400) color[0]++;
        else if(rate[i] < 800) color[1]++;
        else if(rate[i] < 1200) color[2]++;
        else if(rate[i] < 1600) color[3]++;
        else if(rate[i] < 2000) color[4]++;
        else if(rate[i] < 2400) color[5]++;
        else if(rate[i] < 2800) color[6]++;
        else if(rate[i] < 3200) color[7]++;
        else free++;
    }
    rep(i,8){
        if(color[i] != 0) count++;
    }
    if(count != 0) cout << count << " " << min(8,count+free) << endl;
    else cout << 1 << " " << min(8,count+free) << endl;
}
}

Compiler output:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^