/ Vijos /

记录详情

Accepted

foo.cc: In function 'll calc(int, ll, ll)':
foo.cc:35:51: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   35 | inline ll calc(int u,ll s,ll h){return ch[u][1]?(s-h<<1):((a[u]<<1)>s?(s-a[u]<<1):s-1);}  //计算冲突值
      |                                                  ~^~
foo.cc:35:73: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   35 | inline ll calc(int u,ll s,ll h){return ch[u][1]?(s-h<<1):((a[u]<<1)>s?(s-a[u]<<1):s-1);}  //计算冲突值
      |                                                                        ~^~~~~
foo.cc: In function 'void rot(int)':
foo.cc:41:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   41 |     if(ch[fa][d]=ch[o][d^1])f[ch[fa][d]]=fa;
      |        ~~~~~~~~~^~~~~~~~~~~
foo.cc: In function 'void work(int)':
foo.cc:61:34: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   61 |     ans+=(maxn<<1)>sum[u]?(sum[u]-maxn<<1):sum[u]-1;
      |                            ~~~~~~^~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 5ms 412.0 KiB
#2 Accepted 187ms 13.941 MiB
#3 Accepted 226ms 13.895 MiB
#4 Accepted 70ms 11.145 MiB
#5 Accepted 65ms 11.199 MiB
#6 Accepted 179ms 14.973 MiB
#7 Accepted 211ms 15.051 MiB
#8 Accepted 115ms 15.02 MiB
#9 Accepted 722ms 32.996 MiB
#10 Accepted 641ms 32.867 MiB

信息

递交者
类型
递交
题目
P2043 历史
语言
C++
递交时间
2023-07-03 11:48:52
评测时间
2023-07-03 11:48:52
评测机
分数
100
总耗时
2425ms
峰值内存
32.996 MiB