shortcut.cpp: In function 'long long int find_shortcut(int, std::vector<int>, std::vector<int>, int)':
shortcut.cpp:42:24: error: no matching function for call to 'max(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int> >::value_type&)'
mx = max(mx,d[last]);
^
In file included from /usr/include/c++/5/vector:60:0,
from shortcut.h:2,
from shortcut.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr 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:
shortcut.cpp:42:24: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}')
mx = max(mx,d[last]);
^
In file included from /usr/include/c++/5/vector:60:0,
from shortcut.h:2,
from shortcut.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr 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:
shortcut.cpp:42:24: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}')
mx = max(mx,d[last]);
^
In file included from /usr/include/c++/5/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from shortcut.cpp:2:
/usr/include/c++/5/bits/stl_algo.h:3457:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^
/usr/include/c++/5/bits/stl_algo.h:3457:5: note: template argument deduction/substitution failed:
shortcut.cpp:42:24: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
mx = max(mx,d[last]);
^
In file included from /usr/include/c++/5/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from shortcut.cpp:2:
/usr/include/c++/5/bits/stl_algo.h:3463:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^
/usr/include/c++/5/bits/stl_algo.h:3463:5: note: template argument deduction/substitution failed:
shortcut.cpp:42:24: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
mx = max(mx,d[last]);
^