Language: C++

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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;

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

    bool s[8];
    int cnt = 0, f = 0;
    rep(i, n)
    {
        int a;
        cin >> a;
        if (1 <= a && a <= 399 && !s[0])
        {
            s[0] = 1;
            cnt++;
        }
        if (400 <= a && a <= 799 && !s[1])
        {
            s[1] = 1;
            cnt++;
        }
        if (800 <= a && a <= 1199 && !s[2])
        {
            s[2] = 1;
            cnt++;
        }
        if (1200 <= a && a <= 1599 && !s[3])
        {
            s[3] = 1;
            cnt++;
        }
        if (1600 <= a && a <= 1999 && !s[4])
        {
            s[4] = 1;
            cnt++;
        }
        if (2000 <= a && a <= 2399 && !s[5])
        {
            s[5] = 1;
            cnt++;
        }
        if (2400 <= a && a <= 2799 && !s[6])
        {
            s[6] = 1;
            cnt++;
        }
        if (2800 <= a && a <= 3199 && !s[7])
        {
            s[7] = 1;
            cnt++;
        }
        if (a >= 3200)
            free++;
    }

    cout << cnt << " " << min(8, cnt + free) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:13: warning: ISO C++ forbids incrementing a pointer of type 'void (*)(void*) noexcept' [-Wpointer-arith]
   65 |             free++;
      |             ^~~~
a.cc:65:17: error: lvalue required as increment operand
   65 |             free++;
      |                 ^~
a.cc:68:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   68 |     cout << cnt << " " << min(8, cnt + free) << endl;
      |                                  ~~~~^~~~~~
a.cc:68:30: error: no matching function for call to 'min(int, void (*)(void*) noexcept)'
   68 |     cout << cnt << " " << min(8, cnt + free) << 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: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:68:30: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'void (*)(void*) noexcept')
   68 |     cout << cnt << " " << min(8, cnt + free) << 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:68:30: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   68 |     cout << cnt << " " << min(8, cnt + free) << endl;
      |                           ~~~^~~~~~~~~~~~~~~