salesman.cpp: In function 'int query(int, int, int)':
salesman.cpp:41:29: error: no matching function for call to 'max(int&, ll&)'
ans=max(ans,st[tree][l++]);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from salesman.cpp:3:
/usr/include/c++/7/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++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
salesman.cpp:41:29: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll {aka long long int}')
ans=max(ans,st[tree][l++]);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from salesman.cpp:3:
/usr/include/c++/7/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++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
salesman.cpp:41:29: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll {aka long long int}')
ans=max(ans,st[tree][l++]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from salesman.cpp:8:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
salesman.cpp:41:29: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
ans=max(ans,st[tree][l++]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from salesman.cpp:8:
/usr/include/c++/7/bits/stl_algo.h:3468: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++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
salesman.cpp:41:29: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
ans=max(ans,st[tree][l++]);
^
salesman.cpp:46:29: error: no matching function for call to 'max(int&, ll&)'
ans=max(ans,st[tree][r--]);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from salesman.cpp:3:
/usr/include/c++/7/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++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
salesman.cpp:46:29: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll {aka long long int}')
ans=max(ans,st[tree][r--]);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from salesman.cpp:3:
/usr/include/c++/7/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++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
salesman.cpp:46:29: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll {aka long long int}')
ans=max(ans,st[tree][r--]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from salesman.cpp:8:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
salesman.cpp:46:29: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
ans=max(ans,st[tree][r--]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from salesman.cpp:8:
/usr/include/c++/7/bits/stl_algo.h:3468: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++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
salesman.cpp:46:29: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
ans=max(ans,st[tree][r--]);
^
salesman.cpp: In function 'void update(int, int, int)':
salesman.cpp:60:41: error: no matching function for call to 'max(ll&, int&)'
st[tree][pos]=max(st[tree][pos],new_val);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from salesman.cpp:3:
/usr/include/c++/7/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++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
salesman.cpp:60:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
st[tree][pos]=max(st[tree][pos],new_val);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from salesman.cpp:3:
/usr/include/c++/7/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++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
salesman.cpp:60:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
st[tree][pos]=max(st[tree][pos],new_val);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from salesman.cpp:8:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
salesman.cpp:60:41: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
st[tree][pos]=max(st[tree][pos],new_val);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from salesman.cpp:8:
/usr/include/c++/7/bits/stl_algo.h:3468: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++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
salesman.cpp:60:41: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
st[tree][pos]=max(st[tree][pos],new_val);
^
salesman.cpp: In function 'int main()':
salesman.cpp:84:9: error: 'class std::vector<std::tuple<int, int, int> >' has no member named 'pb'
fairs.pb({t,l,m});
^~