/ WHOJ /

记录详情

Accepted

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)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 1.0 MiB
#2 Accepted 19ms 1.625 MiB
#3 Accepted 4ms 384.0 KiB
#4 Accepted 83ms 2.992 MiB
#5 Accepted 13ms 1.0 MiB
#6 Accepted 36ms 1.75 MiB
#7 Accepted 4ms 384.0 KiB
#8 Accepted 45ms 2.992 MiB
#9 Accepted 4ms 384.0 KiB
#10 Accepted 28ms 3.0 MiB

信息

递交者
类型
递交
题目
P1088 [USACO08FEB]Hotel G
题目数据
下载
语言
C++
递交时间
2022-03-12 22:39:59
评测时间
2022-05-14 21:24:46
评测机
分数
100
总耗时
245ms
峰值内存
3.0 MiB