记录详情

Compile Error

/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;
               ~~~~~~~~^~~~~~~~~

信息

递交者
类型
递交
题目
P1573 Problem 2E. 子树最大值查询
比赛
2024春 悬赏令第二周
语言
C++
递交时间
2024-04-27 13:43:06
评测时间
2024-04-27 23:01:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes