Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
#define INF 1e9

typedef long long ll;
typedef pair<ll,ll> ii;
typedef vector<int> vi;
typedef vector < pair<int, int> > vii;
typedef long double ld;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
typedef set<int>::iterator sit;
typedef map<int,int>::iterator mit;
typedef vector<int>::iterator vit;

ll n, a, ans;
ll used[9], level[9];

int main()
{
    cin >> n;
    level[0]=399;
    level[1]=799;
    level[2]=1199;
    level[3]=1599;
    level[4]=1999;
    level[5]=2399;
    level[6]=2799;
    level[7]=3199;
    level[8]=INF;
    for(int i =0; i < n; i++){
		cin >> a;
		for(int j = 0; j <= 8; j++){
			if(a<=level[j]){
				used[j]++;
				j=9;
			}
		}
	}
	for(int i = 0; i <= 7; i++){
		if(used[i]){
			ans++;
		}
	}
	if(ans){
		cout << ans << " " << ans+used[8] << endl;
	}
	else{
		cout << min(1,used[8]) << " " << used[8] << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:28: error: no matching function for call to 'min(int, ll&)'
   59 |                 cout << min(1,used[8]) << " " << used[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:59:28: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   59 |                 cout << min(1,used[8]) << " " << used[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:59:28: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   59 |                 cout << min(1,used[8]) << " " << used[8] << endl;
      |                         ~~~^~~~~~~~~~~