foo.cc: In member function 'data per_linetree::query(int, int, int, int, int)':
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;
~~~~~^~~~~~~
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;
^~
foo.cc:32:63: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if(mid<dr)ret=ret+query(s[p][1],mid,r,max(dl,mid),dr);return ret;
^~~~~~
foo.cc: In function 'int query1(int, int)':
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
^~
foo.cc:72:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//暴力找lca
^~~
foo.cc: In function 'll query2(int, int)':
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
^~
foo.cc:89:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if(dep[u]>dep[v])swap(u,v);int lc=u;int lc1=v;//还是暴力找lca
^~~
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);//弯路径的长链贡献,主席树查一发即可
^~
foo.cc:95:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if(lc==u)return ret;data tr=plt.cquery(lc,v,-1,dep[lc]-1);//弯路径的长链贡献,主席树查一发即可
^~~~
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找第一次出现的点
^~~
foo.cc:102:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for(;dep[pre[pr]]>=dep[lc];pr=pre[pr]);if(dep[pr]==dep[lc])continue;//跳pre找第一次出现的点
^~
foo.cc: In function 'void Maker::gen()':
foo.cc:112:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%u%u%u",&n,&p,&SA,&SB,&SC);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:125:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int main(){scanf("%d",&T);for(int z=1;z<=T;z++){solve();clear();}return 0;}
~~~~~^~~~~~~~~
foo.cc: In function 'void solve()':
foo.cc:120:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
Maker::gen();scanf("%d",&m);dep[1]=1;dfs(1,0);
~~~~~^~~~~~~~~
foo.cc:122:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
{scanf("%d%d%d",&t,&l,&r);printf("%lld\n",(t==1)?query1(l,r):query2(l,r));}
~~~~~^~~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务