Problem defense101
User PlayVoltz
Submission Time 2024-03-21 14:43:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

defense101.cpp: In function ‘int32_t main()’:
defense101.cpp:44:72: error: no matching function for call to ‘max(long long int, long long unsigned int)’
44 | for (int i=0; i<min(n, t); ++i)sum+=max(0ll, vect[i].fi*(vect[i].se-1));
| ^
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from defense101.cpp:4:
/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:
defense101.cpp:44:72: note: deduced conflicting types for parameter