Problem | books |
---|---|
User | popperoni |
Submission Time | 2025-01-17 17:44:27 |
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:75:47: error: no matching function for call to ‘max(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)’
75 | macks[findpar(i)]=max(macks[findpar(i)],p[i]);
| ^
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:75:47: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘i