Problem party_noi
User R9q5P8
Submission Time 2026-01-16 13:22:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

party_noi.cpp: In function ‘int main()’:
party_noi.cpp:19:6: error: ‘class std::vector<long long int>’ has no member named ‘sort’
19 | hpv.sort(hpv.begin(), hpv.end());
| ^~~~
party_noi.cpp:22:43: error: no matching function for call to ‘min(long long int&, std::vector<long long int>::size_type)’
22 | for (int i = 0; i < min(count, hpv.size()); ++i)
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from party_noi.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
198 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: template argument deduction/s