/ Vijos /

记录详情

Runtime Error

/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]
   30 |         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]
   32 |         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 were guarded by the 'if'
   32 |         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]
   72 |     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 were guarded by the 'if'
   72 |     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]
   89 |     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 were guarded by the 'if'
   89 |     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]
   95 |     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 were guarded by the 'if'
   95 |     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]
  102 |         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 were guarded by the 'for'
  102 |         for(;dep[pre[pr]]>=dep[lc];pr=pre[pr]);if(dep[pr]==dep[lc])continue;//跳pre找第一次出现的点
      |                                                ^~
# 状态 耗时 内存占用
#1 Accepted 2237ms 173.422 MiB
#2 Runtime Error 240ms 164.824 MiB
#3 Accepted 2528ms 167.844 MiB

信息

递交者
类型
递交
题目
P2048 原题识别
语言
C++
递交时间
2025-06-07 00:33:04
评测时间
2025-06-07 00:33:04
评测机
分数
70
总耗时
5005ms
峰值内存
173.422 MiB