/ Vijos /

记录详情

Accepted

/in/foo.cc: In member function 'data per_linetree::query(int, int, int, int, int)':
/in/foo.cc:30:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
         if(p==0||dl==l&&dr==r){return v[p];}int mid=(l+r)/2;data ret;
                  ~~~~~^~~~~~~
/in/foo.cc:32:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
         if(mid<dr)ret=ret+query(s[p][1],mid,r,max(dl,mid),dr);return ret;
         ^~
/in/foo.cc:32:63: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
         if(mid<dr)ret=ret+query(s[p][1],mid,r,max(dl,mid),dr);return ret;
                                                               ^~~~~~
/in/foo.cc: In function 'int query1(int, int)':
/in/foo.cc:72:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//暴力找lca
     ^~
/in/foo.cc:72:32: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//暴力找lca
                                ^~~
/in/foo.cc: In function 'll query2(int, int)':
/in/foo.cc:89:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//还是暴力找lca
     ^~
/in/foo.cc:89:32: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//还是暴力找lca
                                ^~~
/in/foo.cc:95:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if(lc==u)return ret;data tr=plt.cquery(lc,v,-1,dep[lc]-1);//弯路径的长链贡献,主席树查一发即可
     ^~
/in/foo.cc:95:25: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(lc==u)return ret;data tr=plt.cquery(lc,v,-1,dep[lc]-1);//弯路径的长链贡献,主席树查一发即可
                         ^~~~
/in/foo.cc:102:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
         for(;dep[pre[pr]]>=dep[lc];pr=pre[pr]);if(dep[pr]==dep[lc])continue;//跳pre找第一次出现的点
         ^~~
/in/foo.cc:102:48: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
         for(;dep[pre[pr]]>=dep[lc];pr=pre[pr]);if(dep[pr]==dep[lc])continue;//跳pre找第一次出现的点
                                                ^~
# 状态 耗时 内存占用
#1 Accepted 1716ms 171.137 MiB
#2 Accepted 1340ms 170.562 MiB
#3 Accepted 1939ms 167.09 MiB

信息

递交者
类型
递交
题目
P2048 原题识别
语言
C++
递交时间
2022-01-13 18:46:38
评测时间
2022-01-13 18:47:02
评测机
分数
100
总耗时
4996ms
峰值内存
171.137 MiB