Problem | books |
---|---|
User | PlayVoltz |
Submission Time | 2024-07-10 00:10:06 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
books.cpp: In function ‘long long int minimum_walk(std::vector<int>, int)’:
books.cpp:33:24: error: no matching function for call to ‘max(long long int, int)’
33 | res+=max(r[i].fi-c, 0)*2;
| ^
In file included from /usr/include/c++/9/vector:60,
from books.h:1,
from books.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:
books.cpp:33:24: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’)
33 | res+=max(r[i].fi-c, 0)*2;
| ^
In file included from /usr/include/c++/9/vector:60,
from books.h:1,
from books