foo.cc: In function 'void build(int, int, int)':
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:35:10: note: in expansion of macro 'mid'
35 | build(l,mid,lson);
| ^~~
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:36:8: note: in expansion of macro 'mid'
36 | build(mid+1,r,rson);
| ^~~
foo.cc: In function 'void update(int, int, int, int, int, int)':
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:46:10: note: in expansion of macro 'mid'
46 | if(L <= mid) update(L,R,tag,l,mid,lson);
| ^~~
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:46:32: note: in expansion of macro 'mid'
46 | if(L <= mid) update(L,R,tag,l,mid,lson);
| ^~~
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:47:9: note: in expansion of macro 'mid'
47 | if(R > mid) update(L,R,tag,mid+1,r,rson);
| ^~~
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:47:29: note: in expansion of macro 'mid'
47 | if(R > mid) update(L,R,tag,mid+1,r,rson);
| ^~~
foo.cc: In function 'int query(int, int, int, int)':
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:54:40: note: in expansion of macro 'mid'
54 | if(sum(lson)>=len) return query(len,l,mid,lson);
| ^~~
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:55:40: note: in expansion of macro 'mid'
55 | if(rmax(lson)+lmax(rson)>=len) return mid-rmax(lson)+1;
| ^~~
foo.cc:8:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | #define mid (l+r>>1)
| ~^~
foo.cc:56:19: note: in expansion of macro 'mid'
56 | return query(len,mid+1,r,rson);
| ^~~
foo.cc: In function 'int main()':
foo.cc:61:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
61 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:65:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
65 | scanf("%d",&opt);
| ~~~~~^~~~~~~~~~~
foo.cc:67:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
67 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
foo.cc:76:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
76 | scanf("%d%d",&l,&x);
| ~~~~~^~~~~~~~~~~~~~
正在同步测试数据,请稍后
Found 10 testcases.
[Hydro](https://hydro.ac)提供评测服务