Compiler output
prog.cpp: In function 'int64_t query(int64_t, int64_t, int64_t)':
prog.cpp:46:14: error: no matching function for call to 'max(int64_t&, int)'
l = max(l, 1);
^
prog.cpp:46:14: note: candidates are:
In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
from /usr/include/c++/4.9/ios:40,
from /usr/include/c++/4.9/istream:38,
from /usr/include/c++/4.9/sstream:38,
from /usr/include/c++/4.9/complex:45,
from /usr/include/c++/4.9/ccomplex:38,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:52,
from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note: template argument deduction/substitution failed:
prog.cpp:46:14: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
l = max(l, 1);
^
In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
from /usr/include/c++/4.9/ios:40,
from /usr/include/c++/4.9/istream:38,
from /usr/include/c++/4.9/sstream:38,
from /usr/include/c++/4.9/complex:45,
from /usr/include/c++/4.9/ccomplex:38,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:52,
from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algobase.h:261:5: note: 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++/4.9/bits/stl_algobase.h:261:5: note: template argument deduction/substitution failed:
prog.cpp:46:14: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
l = max(l, 1);
^
In file included from /usr/include/c++/4.9/algorithm:62:0,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:64,
from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algo.h:3449:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^
/usr/include/c++/4.9/bits/stl_algo.h:3449:5: note: template argument deduction/substitution failed:
prog.cpp:46:14: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
l = max(l, 1);
^
In file included from /usr/include/c++/4.9/algorithm:62:0,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:64,
from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algo.h:3454:5: note: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^
/usr/include/c++/4.9/bits/stl_algo.h:3454:5: note: template argument deduction/substitution failed:
prog.cpp:46:14: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
l = max(l, 1);
^