criyle/codenet-compile-errors huggingface dataset:
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(8) = {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) coler[4]++;
        else if(rate[i] < 2400) coler[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++
    }
    cout << max(count,free) << " " << min(8,count+free) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:34: error: expected ',' or ';' before '=' token
   10 |     vector<int> rate(n),color(8) = {0,0,0,0,0,0,0,0};
      |                                  ^
a.cc:19:33: error: 'coler' was not declared in this scope; did you mean 'color'?
   19 |         else if(rate[i] < 2000) coler[4]++;
      |                                 ^~~~~
      |                                 color
a.cc:20:33: error: 'coler' was not declared in this scope; did you mean 'color'?
   20 |         else if(rate[i] < 2400) coler[5]++;
      |                                 ^~~~~
      |                                 color
a.cc:26:34: error: expected ';' before '}' token
   26 |         if(color[i] != 0) count++
      |                                  ^
      |                                  ;
   27 |     }
      |     ~
Language: C++

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

const (
	A = iota
	B
	C
	D
	E
	F
	G
	H
	I
)

func operate(x int) int {
	if x < 400 {
		return A
	} else if x < 800 {
		return B
	} else if x < 1200 {
		return C
	} else if x < 1600 {
		return D
	} else if x < 2000 {
		return E
	} else if x < 2400 {
		return F
	} else if x < 2800 {
		return G
	} else if x < 3200 {
		return H
	} else {
		return I
	}
}

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	a := make([]int, n)
	for i := range a {
		sc.Scan()
		a[i], _ = strconv.Atoi(sc.Text())
	}
	sort.Ints(a)

	aggregate := make(map[int]int)
	for i := range a {
		aggregate[operate(a[i])] = aggregate[operate(a[i])] + 1
	}

	min := len(aggregate)
	for k := range aggregate {
		if k == I {
			min = min - 1
			break
		}
	}
	if min < 1 {
		min = 1
	}

	max := len(aggregate)
	for k := range aggregate {
		if k == I {
			max = max + 1
		}
	}
	if max > 8 {
		max = 8
	}

	fmt.Printf("%d %d\n", min, max)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:45:1: error: 'func' does not name a type
   45 | func main() {
      | ^~~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<int> A(N);
  vector<int> B(9, 0);
  rep(i, N){
    cin >> A[i];
    if (A[i] <= 399) B[0] = 1;
    else if (A[i] <= 799) B[1] = 1;
    else if (A[i] <= 1199) B[2] = 1;
    else if (A[i] <= 1599) B[3] = 1;
    else if (A[i] <= 1999) B[4] = 1;
    else if (A[i] <= 2399) B[5] = 1;
    else if (A[i] <= 2799) B[6] = 1;
    else if (A[i] <= 3199) B[7] = 1;
    else B[8]++;
  }
  
  int sum = 0;
  rep(i, 8){
    sum += B[i];
  }
  int min_sum;
  if (sum >= 1) min_sum = sum;
  else min_sum = 1;
  sum += B[8];
  cout << min_sum << " " << sum << endl;
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:33:41: error: expected '}' at end of input
   33 |   cout << min_sum << " " << sum << endl;
      |                                         ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

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

int main(){
    int n; cin >> n;
    map<string,int> mp;
    int others=0;
    for(int i=0;i<n;++i){
        int a; cin >> a;
        if(1<= a && a<= 399) mp[gray]++;
        else if(400<= a && a <= 799) mp[brown]++;
        else if(800<= a && a <= 1199) mp[green]++;
        else if(1200<= a && a <= 1599) mp[skyblue]++;
        else if(1600<= a && a <= 1999) mp[blue]++;
        else if(2000<= a && a <= 2399) mp[yellow]++;
        else if(2400<= a && a <= 2799) mp[orange]++;
        else if(2800<= a && a <= 3199) mp[red]++;
        else others++;
    }
    int count=0;
    for(auto itr : mp){
        count++;
    }
    int min,max = 0;
    min = count;
    if(others<=8) max = count + others;
    else max = count + 8;
    cout << min << ' ' << max << endl;
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'gray' was not declared in this scope
   10 |         if(1<= a && a<= 399) mp[gray]++;
      |                                 ^~~~
a.cc:11:41: error: 'brown' was not declared in this scope
   11 |         else if(400<= a && a <= 799) mp[brown]++;
      |                                         ^~~~~
a.cc:12:42: error: 'green' was not declared in this scope
   12 |         else if(800<= a && a <= 1199) mp[green]++;
      |                                          ^~~~~
a.cc:13:43: error: 'skyblue' was not declared in this scope
   13 |         else if(1200<= a && a <= 1599) mp[skyblue]++;
      |                                           ^~~~~~~
a.cc:14:43: error: 'blue' was not declared in this scope
   14 |         else if(1600<= a && a <= 1999) mp[blue]++;
      |                                           ^~~~
a.cc:15:43: error: 'yellow' was not declared in this scope
   15 |         else if(2000<= a && a <= 2399) mp[yellow]++;
      |                                           ^~~~~~
a.cc:16:43: error: 'orange' was not declared in this scope
   16 |         else if(2400<= a && a <= 2799) mp[orange]++;
      |                                           ^~~~~~
a.cc:17:43: error: 'red' was not declared in this scope; did you mean 'read'?
   17 |         else if(2800<= a && a <= 3199) mp[red]++;
      |                                           ^~~
      |                                           read
Language: C++

#include <bits/stdc++.h>

using namespace std;

int		main(void)
{
	int N;

	cin >> N;
	bitset<8> C;
	int O = 0;
	
	for (int i = 0; i < N; i++)
	{
		int score;

		cin >> score;
		if (score < 400)
			C.set(0);
		else if (score < 800)
			C.set(1);
		else if (score < 1200)
			C.set(2);
		else if (score < 1600)
			C.set(3);
		else if (score < 2000)
			C.set(4);
		else if (score < 2400)
			C.set(5);
		else if (score < 2800)
			C.set(6);
		else if (score < 3200)
			C.set(7);
		else
			O++;
	}
	int mn = max(1, C.count());

	printf("%d %d\n", mn, mn + O);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:37:21: error: no matching function for call to 'max(int, std::size_t)'
   37 |         int mn = max(1, C.count());
      |                  ~~~^~~~~~~~~~~~~~
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:37:21: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::size_t' {aka 'long unsigned int'})
   37 |         int mn = max(1, C.count());
      |                  ~~~^~~~~~~~~~~~~~
/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:37:21: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   37 |         int mn = max(1, C.count());
      |                  ~~~^~~~~~~~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
int main(void){
    int num_attendance;
    int *rate;
    int kinds_color=0;
    int class[9]={0};

    scanf("%d",&num_attendance);
    rate=(int *)malloc(sizeof(int)*num_attendance);
    int i;
    for(i=0;i<num_attendance;i++){
        scanf("%d",&rate[i]);
        if(rate[i]<=399){
            class[0]++;
        }
        else if(rate[i]<=799){
            class[1]++;
        }
        else if(rate[i]<=1199){
            class[2]++;
        }
        else if(rate[i]<=1599){
            class[3]++;
        }
        else if(rate[i]<=1999){
            class[4]++;
        }
        else if(rate[i]<=2399){
            class[5]++;
        }
        else if(rate[i]<=2799){
            class[6]++;
        }
        else if(rate[i]<=3199){
            class[7]++;
        }
        else if(3200<=rate[i]{
            class[8]++;
        }
    }
    for(i=0;i<8;i++){
        if(class[i]!=0){
            kinds_color++;
        }
    }
    printf("%d ",kinds_color);
    kinds_color+=class[8];
    printf("%d",kinds_color);
    return 0;
    
}

Compiler output:
main.c: In function 'main':
main.c:40:30: error: expected ')' before '{' token
   40 |         else if(3200<=rate[i]{
      |                ~             ^
      |                              )
main.c:43:5: error: expected expression before '}' token
   43 |     }
      |     ^
Language: C++

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

using ll = long long;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:31:20: error: expected primary-expression before '<<' token
   31 |   cout<<max(ans,1);<<" "<<ans+free<<endl;
      |                    ^~
Language: C++

//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
int main(){
  ll n;cin>>n;
  vl a(n);
  rep(i,n)cin>>a[i];
  set<ll>S;
  ll count=0;
  rep(i,n){
    if(a[i]>=3200){
      count++;
      continue;
    }
    S.insert(a[i]/400);
  }
  ll k=S.size();
  cout<<S.size()<<" "<<min(8,k+count)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:27: error: no matching function for call to 'min(int, ll)'
   28 |   cout<<S.size()<<" "<<min(8,k+count)<<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:3:
/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:28:27: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   28 |   cout<<S.size()<<" "<<min(8,k+count)<<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:28:27: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   28 |   cout<<S.size()<<" "<<min(8,k+count)<<endl;
      |                        ~~~^~~~~~~~~~~
Language: C++

//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
int main(){
  ll n;cin>>n;
  vl a(n);
  rep(i,n)cin>>a[i];
  set<ll>S;
  ll count=0;
  rep(i,n){
    if(a[i]>=3200){
      count++;
      continue;
    }
    S.insert(a[i]/400);
  }
  cout<<S.size()<<" "<<min(8,S.size()+count)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:27: error: no matching function for call to 'min(int, long long unsigned int)'
   27 |   cout<<S.size()<<" "<<min(8,S.size()+count)<<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:3:
/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:27:27: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long unsigned int')
   27 |   cout<<S.size()<<" "<<min(8,S.size()+count)<<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:27:27: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   27 |   cout<<S.size()<<" "<<min(8,S.size()+count)<<endl;
      |                        ~~~^~~~~~~~~~~~~~~~~~
Language: Java

あimport java.util.Scanner;

public class Main {
    static int n;
    static int[] dp;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        dp = new int[8]; //0:灰色～7:赤
        int over = 0;
        int ans = 0;

        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num >= 3200) {
                over++;
            } else {
                dp[num/400]++;
            }
        }
        for (int i = 0; i < 8; i++) {
            if (dp[i] != 0) {
                ans++;
            }
        }
        System.out.println(Math.max(1, ans));
        System.out.println(Math.min(8, ans + over));
    }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
?import java.util.Scanner;
^
1 error
Language: C++

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

int main(){
    int n;
    cin >> n;
    vector<int> r(n);
    for(int i = 0; i < n; i++){
        cin >> r.at(i);
    }
    vector<int> c(9);
    for(int i = 0; i < n; i++){
        if(r.at(i) <= 3199){
            c.at(r.at(i)/400) = c.at(r.at(i)/400)+1;
        } else {
            c.at(8) = c.at(8)+1;
        }
    }
    int count = 0;
    for(int i = 0; i < 8; i++){
        if(c.at(i) >= 1){
            count++;
        }
    }
    cout << max(count,c.at(8)) << " " << count+c.at(8));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:55: error: expected ';' before ')' token
   26 |     cout << max(count,c.at(8)) << " " << count+c.at(8));
      |                                                       ^
      |                                                       ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  ll a = b = c = d = e = f = g = h = k = n = m = 0;
  in(n);
  rep(i, n){
    in(m);
    if(m < 400)
      a = 1;
    else if(m < 800)
      b = 1;
    else if(m < 1200)
      c = 1;
    else if(m < 1600)
      d = 1;
    else if(m < 2000)
      e = 1;
    else if(m < 2400)
      f = 1;
    else if(m < 2800)
      g = 1;
    else if(m < 3200)
      h = 1;
    else
      k = 1;
  }
  if(k == 1)
    out(8);
  else
    out(a + b + c + d + e + f + g + h);
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'b' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |          ^
a.cc:18:14: error: 'c' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |              ^
a.cc:18:18: error: 'd' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |                  ^
a.cc:18:22: error: 'e' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |                      ^
a.cc:18:26: error: 'f' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |                          ^
a.cc:18:30: error: 'g' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |                              ^
a.cc:18:34: error: 'h' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |                                  ^
a.cc:18:38: error: 'k' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |                                      ^
a.cc:18:42: error: 'n' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |                                          ^
a.cc:18:46: error: 'm' was not declared in this scope
   18 |   ll a = b = c = d = e = f = g = h = k = n = m = 0;
      |                                              ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,m,n) for(int i=m;i<n;i++)
#define fix(n) cout<<fixed<<setprecision(n)
#define co(n) cout<<n<<endl
#define all(n) (n).begin(),(n).end()
using namespace std;
typedef long long ll;
const ll mod=1000000007;
double pi=3.1415926535;

int main(){
  int n;
  cin>>n;
  int a,b,c=0,ans=0,x[8]={};
  rep(i,0,n){
    cin>>a;
    if(a<3200) x[a/400]++;
    else c++;
  }
  rep(i,0,8) if(x[i]>0) ans++;
  if(ams>0) cout<<ans<<" ";
  else cout<<1<<" ";
  if(ans+c>8) co(8);
  else co(ans+c);
  
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:6: error: 'ams' was not declared in this scope; did you mean 'ans'?
   21 |   if(ams>0) cout<<ans<<" ";
      |      ^~~
      |      ans
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,P,G=0;cin>>N;
  vector<bool>C(8,false);
  for(int i=0;i<N;i++){
    cin>>P;
    if(P<400)C.at(0)=true;
    else if(P<800)C.at(1)=true;
    else if(P<1200)C.at(2)=true;
    else if(P<1600)C.at(3)=true;
    else if(P<2000)C.at(4)=true;
    else if(P<2400)C.at(5)=true;
    else if(P<2800)C.at(6)=true;
    else if(P<3200)C.at(7)=true;
    else G++;
  }
  cout<<min(count(C.begin(),C.end(),true)+G,8)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: no matching function for call to 'min(std::__iterator_traits<std::_Bit_iterator, void>::difference_type, int)'
   18 |   cout<<min(count(C.begin(),C.end(),true)+G,8)<<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:18:12: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   18 |   cout<<min(count(C.begin(),C.end(),true)+G,8)<<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:18:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   18 |   cout<<min(count(C.begin(),C.end(),true)+G,8)<<endl;
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)   FOR(i,0,n)
#define MOD 1000000007

typedef long long int ll;

const ll INF=(ll)1e18;
//const int INF=(1<<30);


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

  map<int,int> mp;

  int cnt=0;
  REP(i,N){
    int a;
    cin >> a;
    if(a/400 < 8){
      mp[a/400]++; 
    }else{
      cnt++;
    }
  }

  cout << min(1,mp.size()) << " " << min((int)mp.size()+cnt, 8) << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:31:14: error: no matching function for call to 'min(int, std::map<int, int>::size_type)'
   31 |   cout << min(1,mp.size()) << " " << min((int)mp.size()+cnt, 8) << 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:31:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::map<int, int>::size_type' {aka 'long unsigned int'})
   31 |   cout << min(1,mp.size()) << " " << min((int)mp.size()+cnt, 8) << 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:31:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   31 |   cout << min(1,mp.size()) << " " << min((int)mp.size()+cnt, 8) << endl;
      |           ~~~^~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>

#define all(v) v.begin(), v.end()
#define mp make_pair
#define EPS (int)1e-9
#define PI acos(-1)
#define endl '\n'
#define pb push_back
#define fi first
#define se second

using namespace std;
using ld = long double;
using ll = long long;
using vi = vector<int>;
using pii = pair<int, int>;

const int mod = 1000000007;


int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	int n, x;
	cin >> n;

	vector<bool> color(8, false);
	int diff = 0, legends = 0;

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

		if(inRange(x, 1, 399) and !color[0])
		{
			color[0] = true;
			diff++;
		}

		if(inRange(x, 400, 799) and !color[1])
		{
			color[1] = true;
			diff++;
		}

		if(inRange(x, 800, 1199) and !color[2])
		{
			color[2] = true;
			diff++;
		}

		if(inRange(x, 1200, 1599) and !color[3])
		{
			color[3] = true;
			diff++;
		}

		if(inRange(x, 1600, 1999) and !color[4])
		{
			color[4] = true;
			diff++;
		}

		if(inRange(x, 2000, 2399) and !color[5])
		{
			color[5] = true;
			diff++;
		}

		if(inRange(x, 2400, 2799) and !color[6])
		{
			color[6] = true;
			diff++;
		}

		if(inRange(x, 2800, 3199) and !color[7])
		{
			color[7] = true;
			diff++;
		}

		if(x >= 3200)
			legends++;
	}

	if(diff == 8)
	{
		cout << 8 << " " << 8 << endl;
		return 0;
	}

	cout << diff << " " << diff+legends%(8-diff) << endl;
	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:20: error: 'inRange' was not declared in this scope
   34 |                 if(inRange(x, 1, 399) and !color[0])
      |                    ^~~~~~~
a.cc:40:20: error: 'inRange' was not declared in this scope
   40 |                 if(inRange(x, 400, 799) and !color[1])
      |                    ^~~~~~~
a.cc:46:20: error: 'inRange' was not declared in this scope
   46 |                 if(inRange(x, 800, 1199) and !color[2])
      |                    ^~~~~~~
a.cc:52:20: error: 'inRange' was not declared in this scope
   52 |                 if(inRange(x, 1200, 1599) and !color[3])
      |                    ^~~~~~~
a.cc:58:20: error: 'inRange' was not declared in this scope
   58 |                 if(inRange(x, 1600, 1999) and !color[4])
      |                    ^~~~~~~
a.cc:64:20: error: 'inRange' was not declared in this scope
   64 |                 if(inRange(x, 2000, 2399) and !color[5])
      |                    ^~~~~~~
a.cc:70:20: error: 'inRange' was not declared in this scope
   70 |                 if(inRange(x, 2400, 2799) and !color[6])
      |                    ^~~~~~~
a.cc:76:20: error: 'inRange' was not declared in this scope
   76 |                 if(inRange(x, 2800, 3199) and !color[7])
      |                    ^~~~~~~
Language: C++

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanWords)

	N := getInt()
	rate := make([]int, 9)
	for i := 0; i < N; i++ {
		a := getInt()
		switch {
		case a >= 1 && a <= 399:
			rate[0]++
		case a >= 400 && a <= 799:
			rate[1]++
		case a >= 800 && a <= 1199:
			rate[2]++
		case a >= 1200 && a <= 1599:
			rate[3]++
		case a >= 1600 && a <= 1999:
			rate[4]++
		case a >= 2000 && a <= 2399:
			rate[5]++
		case a >= 2400 && a <= 2799:
			rate[6]++
		case a >= 2800 && a <= 3199:
			rate[7]++
		case a >= 3200:
			rate[8]++
		}
	}

	ans := 0
	for i := 0; i < 8; i++ {
		if rate[i] != 0 {
			ans++
		}
	}
	min := ans
	if ans == 0 {
		min = 1
	}
	max := ans + rate[8]
	out(min, max)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:10:26: error: expected unqualified-id before ')' token
   10 | func out(x ...interface{}) {
      |                          ^
a.cc:14:1: error: 'var' does not name a type
   14 | var sc = bufio.NewScanner(os.Stdin)
      | ^~~
a.cc:25:1: error: 'func' does not name a type
   25 | func getString() string {
      | ^~~~
a.cc:30:1: error: 'func' does not name a type
   30 | func main() {
      | ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
typedef long long ll;
const ll MOD=1000000007;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T>auto MAX(const T& a) { return *max_element(a.begin(),a.end()); }
template<class T>auto MIN(const T& a) { return *min_element(a.begin(),a.end()); }
template<class T, class U>U SUM(const T& a, const U& v) { return accumulate(a.begin(),a.end(), v); }
template<class T, class U>U COUNT(const T& a, const U& v) { return count(a.begin(),a.end(), v); }
template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }

int main(void){
    // Your code here!
    int n;cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    map<int,int>mp;
    int kanst = 0;
    int counter = 0;
    rep(i,n){
        rep(j,8){
            if (400*j<= a[i] && a[i] <= 400*(j+1)-1){
                mp[j]=1;
            }
            else if (a[i]>=3200) {
                kanst++;
                break;
            }
        }
    }
    for (auto &x :mp){
        if( x.second == 1) counter++;
    }
    if (counter >0)cout << counter << " ";
    else cout << 1 << endl;
    counter+=kanst;
    else  cout << counter << " ";
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:5: error: 'else' without a previous 'if'
   44 |     else  cout << counter << " ";
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,a;
  int free=0,color=0;
  map<int,bool> m;
  cin>>N;
  for(int i=0;i<N;i++){
    cin>>a;
    a<3200?m[a/400]=true:m[3200]=true;
    if(a/400>=8){
      free++;
    }
  }
  for(auto itr=m.begin();itr!=m.end();itr++)color++;
  if(free!=0)color--;
  color==0?cout<<"1"<<" ":cout<<color<<" ";
  ((color+free>8)?cout<<"8"<<endl;:cout<<color+free<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:34: error: expected ':' before ';' token
   19 |   ((color+free>8)?cout<<"8"<<endl;:cout<<color+free<<endl;
      |                                  ^
      |                                  :
a.cc:19:34: error: expected primary-expression before ';' token
a.cc:19:34: error: expected ')' before ';' token
   19 |   ((color+free>8)?cout<<"8"<<endl;:cout<<color+free<<endl;
      |   ~                              ^
      |                                  )
a.cc:19:35: error: expected primary-expression before ':' token
   19 |   ((color+free>8)?cout<<"8"<<endl;:cout<<color+free<<endl;
      |                                   ^
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <utility>
#include <map>
#include <algorithm>
#include <queue>
#include <cmath>
#include <numeric>
#include <set>

using namespace std;
struct aaa{aaa(){cin.tie(nullptr); ios::sync_with_stdio(false); cout<<fixed<<setprecision(20);};}aaa;
template <class T>ostream &operator<<(ostream &o,const vector<T>&v){o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}
#define debug(v) {cerr<<"\033[1;36m[debug]\033[m "<<#v<<" : "<<v<<endl;}

using int64 = long long;

int main() {
    int n;
    cin >> n;
    map<int,int> mp;
    for (int i=0; i<n; i++) {
        int a;
        cin >> a;
        mp[a/400]++;
    }
    
    int mpn = mp.size();
    int mina = mpn;
    if (mpn > 1 && mp[8] > 0) mina--;

    int maxa = mpn
    if (mp[8]) maxa = min(7, mpn + mp[8] - 1);

    // for (auto p : mp) {
    //     cout << p.first << " " << p.second << endl;
    // }
    // cout << endl;

    cout << mina << " " << maxa << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: expected ',' or ';' before 'if'
   34 |     if (mp[8]) maxa = min(7, mpn + mp[8] - 1);
      |     ^~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>

using namespace std;

int main()
{
	int N;
	cin >> N;
	vector<int> a(N);
	for (auto& x : a) {
		cin >> x;
	}

	set<int> s;
	int t = 0;
	for (auto x : a) {
		if (x < 3200) {
			s.insert(x / 400);
		}
		else {
			++t;
		}
	}

	cout << max(1u, s.size()) << " " << s.size() + t << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:20: error: no matching function for call to 'max(unsigned int, std::set<int>::size_type)'
   28 |         cout << max(1u, s.size()) << " " << s.size() + t << 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:28:20: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned int' and 'std::set<int>::size_type' {aka 'long unsigned int'})
   28 |         cout << max(1u, s.size()) << " " << s.size() + t << 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:3:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:28:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'unsigned int'
   28 |         cout << max(1u, s.size()) << " " << s.size() + t << endl;
      |                 ~~~^~~~~~~~~~~~~~
Language: C++

#include <iostream> // cout, endl, cin
#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 <stdlib.h>
#include <stdio.h>

using namespace std;

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 my_abs_A(int num) {
    if (num > 0)
        return num;
    else
        return -num;
}

int my_abs_B(long long num,long long numb) {
    if (num - numb >= 0)
        return num - numb;
    else
        return -1 * (num - numb);
}

long long gcd(long long a, long long b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}

long long lcm(long long a, long long b) {
    return a * b / gcd(a, b);
}

int main() {
    int N;
    cin >> N;
    vector<int> rate(N);
    for (int i = 0; i < N; i++) {
        cin >> rate.at(i);
    }
    vector<int> color(9);
    for (int j = 0; j < N; j++) {
        if (color.at(rate.at(j) / 400) <= 8) {
            (color.at(rate.at(j) / 400)++;
        }
        else {
            color.at(8)++;
        }
    }
    int ansM = 0;
    int ansS = 0;
    for (int k = 0; k < 9; k++) {
        if (k == 8) {
            if (color.at(k) > ansM && color.at(8) > ansM) {
                ansS = ansS + (color.at(8) - ansM);
            }
            ansM = ansM + color.at(8);
            break;
            
        }
        if (color.at(k) > 0) {
            ansM++;
            ansS++;
        }
    }
    cout << ansS << " " << ansM << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:42: error: expected ')' before ';' token
   59 |             (color.at(rate.at(j) / 400)++;
      |             ~                            ^
      |                                          )
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  int i;
  int count,count_all=0,0;
  vector<int> b(8);
  for(i=0;i<8;i++){
    b[i] = 0;
  }
  for(i=0;i<n;i++){
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  for(i=0;i<n;i++){
    if(a[i]<=399&&b[0]==0){
      count++;
      b[0]=1;
      if(a[i]<=799&&b[1]==0){
        count++;
        b[1]=1;
        if(a[i]<=1199&&b[2]==0){
          count++;
          b[2]=1;
          if(a[i]<=1599&&b[3]==0){
            count++;
            b[3]=1;
            if(a[i]<=1999&&b[4]==0){
              count++;
              b[4]=1;
              if(a[i]<=2399&&b[5]==0){
                count++;
                b[5]=1;
                if(a[i]<=2799&&b[6]==0){
                  count++;
                  b[6]=1;
                  if(a[i]<=3199){
                    count++;
                    b[7]=1;
                  }else if(count_all<=8-count){
                    count_all++;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  cout << count + count_all;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected unqualified-id before numeric constant
    9 |   int count,count_all=0,0;
      |                         ^
Language: C++

#include <iostream>
#include <vector>

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

    std::vector<int> list(9, 0);
    for(int i = 0; i < n; ++i){
        int val;
        std::cin >> val;
        if(val / 400 < 8){
            ++list.at(val / 400);
        }else{
            ++list.at(8;
        }
    }

    int min = std::count_if(list.begin(), list.begin() + 8, [](auto i){
            return 0 < i;
            });

    std::cout << min << " " << min + list.at(8) << std::endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: expected ')' before ';' token
   15 |             ++list.at(8;
      |                      ~ ^
      |                        )
a.cc:19:20: error: 'count_if' is not a member of 'std'
   19 |     int min = std::count_if(list.begin(), list.begin() + 8, [](auto i){
      |                    ^~~~~~~~
Language: C++

#include <iostream>
#include <set>
#include <queue>
#include <vector>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <string>
#include <climits>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
#include <tuple>
#include <numeric>
#include <functional>
#include <unordered_map>

using namespace std;

/*-----------------------------------------------------------------------------
　定義
 -------------------------------------------------------------------------------*/
#define ALL(a)			(a).begin(),(a).end()
#define REP(i, n)		for (int (i) = 0 ; (i) < (int)(n) ; ++(i))
#define REPN(i, m, n)	for (int (i) = m ; (i) < (int)(n) ; ++(i))
#define INF				(1000 * 1000 * 1000 * 2)
#define MOD				(1000 * 1000 * 1000 + 7)
#define Ceil(x, n)		(((((x))+((n)-1))/n))		/* Nの倍数に切り上げ割り算 */
#define CeilN(x, n)		(((((x))+((n)-1))/n)*n)		/* Nの倍数に切り上げ */
#define FloorN(x, n)	((x)-(x)%(n))				/* Nの倍数に切り下げ */
#define IsOdd(x)		(((x)&0x01UL) == 0x01UL)			
#define IsEven(x)		(!IsOdd((x)))						
#define M_PI			3.14159265358979323846
typedef long long		ll;
typedef pair<int, int>	P;

/*-----------------------------------------------------------------------------
　処理
 -------------------------------------------------------------------------------*/
// メイン
int main()
{
	int N;
	cin >> N;
	vector<ll> A(N);
	REP(i, N) {
		cin >> A[i];
	};

	vector<int> col(9, 0);
	REP(i, N) {
		if (3200 <= A[i]) {
			col[8]++;
		} else {
			col[A[i] / 400]++;
		}
	}

	int ans = 0;
	REP(i, 8) {
		if (0 < col[i]) {
			ans++;
		}
	}
	int ansMax = ans + col[8];
	int ansMax = min(ansMax, 8);
	cout << ans << " " << ansMax << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:13: error: redeclaration of 'int ansMax'
   67 |         int ansMax = min(ansMax, 8);
      |             ^~~~~~
a.cc:66:13: note: 'int ansMax' previously declared here
   66 |         int ansMax = ans + col[8];
      |             ^~~~~~
Language: C++

//  Created by conan1024hao in 2019.
//  Copyright © 2019 conan1024hao. All rights reserved.
//  専用ライブラリです、自由にコピーして構いません。
//  感谢看我的代码！Wechat:conan1024hao QQ:810396815
#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define INF 10e16
#define MOD 1000000007
#define  mod 1000000007
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
using namespace std;
//using Int=int_fast64_t;
typedef long long int ll;
typedef pair<ll,ll>Pll;
typedef pair<int,int>Pin;
long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }
long long LCM(long long a, long long b)  {return a/GCD(a,b)*b;}
int dx[8]={-1,0,1,0,1,1,-1,-1};
int dy[8]={0,-1,0,1,1,-1,1,-1};
char dir[4]={'u','l','d','r'};
ll cmp1(pair<ll,string>a,pair<ll,string> b){
        if(a.fi!=b.fi)
        return a.fi<b.fi;
        else
        return a.se<b.se;
}
//--------------------------------------------------------------------------


//---------------------------------------------------------------------------
int main(){//問題をちゃんと見ろ!!!!!!!!!!!!!!!!!      llか??????????        memset()!!!!!!!!!!!!       ペナを減らせ!!!!!!!!!!!!!
    cin.tie(0);
    ios::sync_with_stdio(false);
    //-------------------------------
    int n;cin>>n;
    vector<int>a(n);
    for(int i=0;i<n;i++)cin>>a[i];
    map<int,int>m;int cc=0;
    for(int i=0;i<n;i++){
        if(a[i]<=399&&m[1]==0)
            m[1]=1;
        else if(a[i]<=799&&a[i]>=400&&m[2]==0)
            m[2]=1;
        else if(a[i]<=1199&&a[i]>=800&&m[3]==0)
        m[3]=1;
        else if(a[i]<=1599&&a[i]>=1200&&m[4]==0)
        m[4]=1;
        else if(a[i]<=1999&&a[i]>=1600&&m[5]==0)
        m[5]=1;
        else if(a[i]<=2399&&a[i]>=2000&&m[6]==0)
        m[6]=1;
        else if(a[i]<=2799&&a[i]>=2400&&m[7]==0)
        m[7]=1;
        else if(a[i]<=3199&&a[i]>=2800&&m[8]==0)
        m[8]=1;
        else if(a[i]>=3200)
            cc++;
    }
    if(cc==n){
        cout<<1<<" "<<c<<endl;
        return 0;
    }
    int cnt=0;
    for(int i=1;i<=8;i++)
        if(m[i]>0)cnt++;
    cout<<cnt<<" "<<cnt+cc<<endl;
    //-------------------------------
    return 0;
}
//---------------------------------------------------------------------------






Compiler output:
a.cc: In function 'int main()':
a.cc:93:23: error: 'c' was not declared in this scope; did you mean 'cc'?
   93 |         cout<<1<<" "<<c<<endl;
      |                       ^
      |                       cc