books.cpp: In function 'll minimum_walk(std::vector<int>, int)':
books.cpp:50:36: error: no matching function for call to 'max(int, ll)'
return x + 2 * (max(0 , mx-R[s]) + max(0 , L[s] - mn));
^
In file included from /usr/include/c++/5/algorithm:61:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from books.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
books.cpp:50:36: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll {aka long long int}')
return x + 2 * (max(0 , mx-R[s]) + max(0 , L[s] - mn));
^
In file included from /usr/include/c++/5/algorithm:61:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from books.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
books.cpp:50:36: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll {aka long long int}')
return x + 2 * (max(0 , mx-R[s]) + max(0 , L[s] - mn));
^
books.cpp:50:57: error: no matching function for call to 'max(int, ll)'
return x + 2 * (max(0 , mx-R[s]) + max(0 , L[s] - mn));
^
In file included from /usr/include/c++/5/algorithm:61:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from books.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
books.cpp:50:57: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll {aka long long int}')
return x + 2 * (max(0 , mx-R[s]) + max(0 , L[s] - mn));
^
In file included from /usr/include/c++/5/algorithm:61:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from books.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
books.cpp:50:57: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll {aka long long int}')
return x + 2 * (max(0 , mx-R[s]) + max(0 , L[s] - mn));
^