Problem | monsters2 |
---|---|
User | hpesoj |
Submission Time | 2025-03-24 14:14:13 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
monsters2.cpp: In function ‘int main()’:
monsters2.cpp:32:62: error: no matching function for call to ‘max(long long int, long int)’
32 | l[i] = max(1ll, prev(lower_bound(x+1, x+k+1, ah[i].fi)) - x);
| ^
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 monsters2.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
222 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: template argument deduction/substitution failed:
monsters2.cpp:32:62: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘long int’)
32 | l[i] = max(1ll, prev(