Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define rfor(i, a, b) for(int i = a; i < (int)b; i++)
#define all(ary) (ary).begin(), (ary).end()
#define debug(x) cerr << #x << ": " << x << '\n'
const long long INF = 1LL << 60;
const int MOD = 1000000007; // 1e9 + 7
using namespace std;
using vec = vector<int>;
using ll = long long;
template <class T = int> T in(){ T x; cin >> x; return (x);}
template <class T> inline bool chmin(T &a, T b) { if ( a > b ) { a = b; return 1; } return 0; }
template <class T> inline bool chmax(T &a, T b) { if ( a < b ) { a = b; return 1; } return 0; }
const int dy[4] = {-1, 0, 0, 1};
const int dx[4] = {0, -1, 1, 0};

int N;

int main(int argc, char *argv[]){
    cin >> N;
    vec A(N);
    rep(i, N) cin >> A[i];
    vec R(8);
    int cnt = 0;
    rep(i, N){
        if(A[i] < 400) R[0]++;
        else if(400  <= A[i] && A[i] < 800) R[1]++;
        else if(800  <= A[i] && A[i] < 1200) R[2]++;
        else if(1200 <= A[i] && A[i] < 1600) R[3]++;
        else if(1600 <= A[i] && A[i] < 2000) R[4]++;
        else if(2000 <= A[i] && A[i] < 2400) R[5]++;
        else if(2400 <= A[i] && A[i] < 2800) R[6]++;
        else if(2800 <= A[i] && A[i] < 3200) R[7]++;
        else cnt++;
    }
    ll Min = INF;
    ll Max = -1;
    int color = 0;
    rep(i, 8)
        if(R[i]) color++;

    Min = color;
    Max = color + cnt;
    // if(color == 8) Min = Max = 8;
    // else if(Max > 8) Max = 8;
    Min = max(Min, 1);
    cout << Min << " " << Max << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:46:14: error: no matching function for call to 'max(ll&, int)'
   46 |     Min = max(Min, 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: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:46:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   46 |     Min = max(Min, 1);
      |           ~~~^~~~~~~~
/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:46:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   46 |     Min = max(Min, 1);
      |           ~~~^~~~~~~~