/ Vijos /

记录详情

Accepted

/in/foo.cc: In function 'void pd(int)':
/in/foo.cc:46:69: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   if(en[x]){gaien(c[x][0],all[x]);gaien(c[x][1],all[x]);en[x]=all[x]=0;}upt(x);
                                                               ~~~~~~^~
/in/foo.cc: In function 'void rotate(int)':
/in/foo.cc:52:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(z)c[z][c[z][1]==y]=x;fa[x]=z;
   ^~
/in/foo.cc:52:27: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
   if(z)c[z][c[z][1]==y]=x;fa[x]=z;
                           ^~
/in/foo.cc: In function 'void huishou(int)':
/in/foo.cc:74:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(c[x][0])huishou(c[x][0]);if(c[x][1])huishou(c[x][1]);
   ^~
/in/foo.cc:74:31: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
   if(c[x][0])huishou(c[x][0]);if(c[x][1])huishou(c[x][1]);
                               ^~
/in/foo.cc:75:70: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   c[x][0]=c[x][1]=sum[x]=lx[x]=rx[x]=mx[x]=en[x]=all[x]=tag[x]=sze[x]=fa[x]=v[x]=0;
                                                                ~~~~~~^~~~~~~~~~~~~
/in/foo.cc:75:56: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   c[x][0]=c[x][1]=sum[x]=lx[x]=rx[x]=mx[x]=en[x]=all[x]=tag[x]=sze[x]=fa[x]=v[x]=0;
                                                  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'int getmax(int)':
/in/foo.cc:109:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(!x)return -inf;pd(x);int tmp=v[x];if(!tmp)tmp=-inf;
   ^~
/in/foo.cc:109:21: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
   if(!x)return -inf;pd(x);int tmp=v[x];if(!tmp)tmp=-inf;
                     ^~
/in/foo.cc: In function 'void build(int, int, int&)':
/in/foo.cc:122:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   int mid=l+r>>1;
           ~^~
/in/foo.cc:123:59: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   sum[x]=v[x]=a[mid];sze[x]=1;c[x][0]=c[x][1]=en[x]=all[x]=tag[x]=0;
                                                     ~~~~~~^~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:133:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(int i=1;i<=n;i++)a[i]=read();a[0]=0;a[n+1]=0;build(0,n+1,root);
   ^~~
/in/foo.cc:133:36: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
   for(int i=1;i<=n;i++)a[i]=read();a[0]=0;a[n+1]=0;build(0,n+1,root);
                                    ^
# 状态 耗时 内存占用
#1 Accepted 1ms 508.0 KiB
#2 Accepted 2ms 512.0 KiB
#3 Accepted 203ms 1.273 MiB
#4 Accepted 32ms 1.188 MiB
#5 Accepted 102ms 1.812 MiB
#6 Accepted 251ms 3.793 MiB
#7 Accepted 590ms 4.031 MiB
#8 Accepted 547ms 17.98 MiB
#9 Accepted 383ms 19.105 MiB
#10 Accepted 398ms 19.641 MiB

信息

递交者
类型
递交
题目
P1835 维护数列
语言
C++
递交时间
2022-02-03 16:42:47
评测时间
2022-02-03 16:42:47
评测机
分数
100
总耗时
2514ms
峰值内存
19.641 MiB