/in/foo.cc:39:56: error: wrong number of template arguments (0, should be 1)
template<class T> using sset = tree<T, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update>;
^
In file included from /usr/include/c++/6/string:48:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_function.h:381:12: note: provided for 'template<class _Tp> struct std::less'
struct less : public binary_function<_Tp, _Tp, bool>
^~~~
/in/foo.cc:39:105: error: template argument 3 is invalid
template<class T> using sset = tree<T, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update>;
^
/in/foo.cc: In function 'void build(int, int, int)':
/in/foo.cc:207:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = l + r >> 1;
~~^~~
/in/foo.cc: In function 'int query(int, int, int)':
/in/foo.cc:218:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = tr[u].l + tr[u].r >> 1;
~~~~~~~~^~~~~~~~~