Problem | hackingscores |
---|---|
User | geometric |
Submission Time | 2024-06-29 21:39:55 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
hackingscores.cpp: In function ‘int main()’:
hackingscores.cpp:24:47: error: no matching function for call to ‘max(int, li)’
24 | totalScore += (std::max(0, s[j] - s[n - 1]) + k - 1) / k;
| ^
In file included from /usr/include/c++/9/algorithm:61,
from hackingscores.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:
hackingscores.cpp:24:47: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘li’ {aka ‘long long int’})
24 | totalScore += (std::max(0, s[j] - s[n - 1]) + k - 1) / k;
| ^
In file included from /usr/include/c++/9/algorithm