Problem archaeologist
User PlayVoltz
Submission Time 2024-02-28 14:43:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

archaeologist.cpp: In function ‘void archaeologist(int, int, int, std::vector<int>, int, std::vector<int>)’:
archaeologist.cpp:31:58: error: no matching function for call to ‘min(int&, long long int)’
31 | set_light(min(l, max({0ll, l-sum+1, l-leaf[c]+count+1})));
| ^
In file included from /usr/include/c++/9/vector:60,
from archaeologist.h:2,
from archaeologist.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/substitution failed:
archaeologist.cpp:31:58: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’)
31 | set_light(min(l, max({0ll, l-sum+1, l-leaf[c