/ new_bzoj /

记录详情

Accepted

foo.cc: In function 'int find(int)':
foo.cc:10:58: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   10 | int find(int x){int l=1,r=2*m+n,pos;while(l<=r){int mid=l+r>>1;if(query(mid)>=x)pos=mid,r=mid-1;else l=mid+1;}return pos;}
      |                                                         ~^~
foo.cc:10:118: warning: 'pos' may be used uninitialized [-Wmaybe-uninitialized]
   10 | int find(int x){int l=1,r=2*m+n,pos;while(l<=r){int mid=l+r>>1;if(query(mid)>=x)pos=mid,r=mid-1;else l=mid+1;}return pos;}
      |                                                                                                                      ^~~
foo.cc:10:33: note: 'pos' was declared here
   10 | int find(int x){int l=1,r=2*m+n,pos;while(l<=r){int mid=l+r>>1;if(query(mid)>=x)pos=mid,r=mid-1;else l=mid+1;}return pos;}
      |                                 ^~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 2ms 284.0 KiB
#2 Accepted 222ms 1.645 MiB
#3 Accepted 211ms 1.52 MiB
#4 Accepted 1ms 324.0 KiB
#5 Accepted 5ms 284.0 KiB
#6 Accepted 80ms 760.0 KiB
#7 Accepted 240ms 1.242 MiB
#8 Accepted 244ms 1.207 MiB
#9 Accepted 189ms 1.43 MiB
#10 Accepted 219ms 1.574 MiB

信息

递交者
类型
递交
题目
Book 书架
语言
C++
递交时间
2023-05-18 19:59:31
评测时间
2023-05-18 19:59:31
评测机
分数
100
总耗时
1418ms
峰值内存
1.645 MiB