/ 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 4ms 460.0 KiB
#2 Accepted 194ms 17.273 MiB
#3 Accepted 223ms 17.27 MiB
#4 Accepted 66ms 13.754 MiB
#5 Accepted 62ms 13.699 MiB
#6 Accepted 205ms 18.809 MiB
#7 Accepted 208ms 18.871 MiB
#8 Accepted 151ms 18.879 MiB
#9 Accepted 667ms 44.758 MiB
#10 Accepted 598ms 43.672 MiB

信息

递交者
类型
递交
题目
P2043 历史
语言
C++
递交时间
2023-08-02 09:25:50
评测时间
2023-08-02 09:25:50
评测机
分数
100
总耗时
2383ms
峰值内存
44.758 MiB