shortcut.cpp: In function 'bool ok(ll)':
shortcut.cpp:59:77: error: no matching function for call to 'max(long int, int)'
int idx = max(lower_bound(ps,ps+n,max(a.first-ps[i],b.first+ps[i]))-ps,i+1);
^
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> 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:59:77: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
int idx = max(lower_bound(ps,ps+n,max(a.first-ps[i],b.first+ps[i]))-ps,i+1);
^
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> 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:59:77: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
int idx = max(lower_bound(ps,ps+n,max(a.first-ps[i],b.first+ps[i]))-ps,i+1);
^
shortcut.cpp:56:5: warning: unused variable 'maxi' [-Wunused-variable]
ll maxi, mini;
^
shortcut.cpp:56:11: warning: unused variable 'mini' [-Wunused-variable]
ll maxi, mini;
^