Language: C++

/**
*    created: 07.07.2020 18:55:08
**/
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using bint = boost::multiprecision::cpp_int;
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pcnt(bit) __builtin_popcountll(bit)
template<class T> bool chmax(T &a, const T &b) {if (a < b) {a = b; return 1;} return 0;}
template<class T> bool chmin(T &a, const T &b) {if (b < a) {a = b; return 1;} return 0;}
const long double pi = acos(-1.0);
const int MAX = 1000010;
const int INF = 1LL << 60;
const int MOD = 1000000007;
// const int MOD = 998244353;

signed main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    
    int n; cin >> n;
    map<int,int> mp;
    rep(i,n) {
        int a; cin >> a;
        if (1 <= a and a < 400) mp[0]++;
        else if (400 <= a and a < 800) mp[1]++;
        else if (800 <= a and a < 1200) mp[2]++;
        else if (1200 <= a and a < 1600) mp[3]++;
        else if (1600 <= a and a < 2000) mp[4]++;
        else if (2000 <= a and a < 2400) mp[5]++;
        else if (2400 <= a and a < 2800) mp[6]++;
        else if (2800 <= a and a < 3200) mp[7]++;
        else mp[8]++;
    }
    
    if (!mp.count(8)) cout << mp.size() << " " << mp.size() << endl;
    else cout << max(mp.size()-1,1) << " " << min(8ll, (int)mp.size() - 1ll + mp[8]) << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:21: error: no matching function for call to 'max(std::__cxx1998::map<long long int, long long int, std::less<long long int>, std::allocator<std::pair<const long long int, long long int> > >::size_type, int)'
   45 |     else cout << max(mp.size()-1,1) << " " << min(8ll, (int)mp.size() - 1ll + mp[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:5:
/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:45:21: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'int')
   45 |     else cout << max(mp.size()-1,1) << " " << min(8ll, (int)mp.size() - 1ll + mp[8]) << 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:45:21: note:   mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
   45 |     else cout << max(mp.size()-1,1) << " " << min(8ll, (int)mp.size() - 1ll + mp[8]) << endl;
      |                  ~~~^~~~~~~~~~~~~~~