/ 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]
   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:81:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   81 |     if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//暴力找lca
      |     ^~
/in/foo.cc:81:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   81 |     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:98:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   98 |     if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//还是暴力找lca
      |     ^~
/in/foo.cc:98:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   98 |     if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//还是暴力找lca
      |                                ^~~
/in/foo.cc:104:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  104 |     if(lc==u)return ret;data tr=plt.cquery(lc,v,-1,dep[lc]-1);//弯路径的长链贡献,主席树查一发即可
      |     ^~
/in/foo.cc:104:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  104 |     if(lc==u)return ret;data tr=plt.cquery(lc,v,-1,dep[lc]-1);//弯路径的长链贡献,主席树查一发即可
      |                         ^~~~
/in/foo.cc:111:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  111 |         for(;dep[pre[pr]]>=dep[lc];pr=pre[pr]);if(dep[pr]==dep[lc])continue;//跳pre找第一次出现的点
      |         ^~~
/in/foo.cc:111:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  111 |         for(;dep[pre[pr]]>=dep[lc];pr=pre[pr]);if(dep[pr]==dep[lc])continue;//跳pre找第一次出现的点
      |                                                ^~
# 状态 耗时 内存占用
#1 Accepted 1650ms 166.184 MiB
#2 Accepted 1247ms 164.055 MiB
#3 Accepted 1652ms 165.77 MiB

信息

递交者
类型
递交
题目
P2048 原题识别
语言
C++
递交时间
2026-10-28 22:34:36
评测时间
2026-10-28 22:34:37
评测机
分数
100
总耗时
4550ms
峰值内存
166.184 MiB