/ Vijos /

记录详情

Accepted

/in/foo.cc: In function 'int main()':
/in/foo.cc:57:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(re int i=1,x,y;i<=m;++i)x=read(),y=read(),add1(x,y),add1(y,x);cnt=0;
   ^~~
/in/foo.cc:57:69: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
   for(re int i=1,x,y;i<=m;++i)x=read(),y=read(),add1(x,y),add1(y,x);cnt=0;
                                                                     ^~~
/in/foo.cc:64:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    if(lca(p[1],p[s])<=n)ans+=2;ans-=s*2;printf("%lld\n",ans>>1);
    ^~
/in/foo.cc:64:32: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    if(lca(p[1],p[s])<=n)ans+=2;ans-=s*2;printf("%lld\n",ans>>1);
                                ^~~
/in/foo.cc:41:25: warning: array subscript is below array bounds [-Warray-bounds]
  fa[x][0]=y;dep[x]=dep[y]+1;dis[x]=dis[y]+(x<=n);dfn[x]=++tim;
                    ~~~~~^
/in/foo.cc:41:41: warning: array subscript is below array bounds [-Warray-bounds]
  fa[x][0]=y;dep[x]=dep[y]+1;dis[x]=dis[y]+(x<=n);dfn[x]=++tim;
                                    ~~~~~^
# 状态 耗时 内存占用
#1 Accepted 750ms 51.969 MiB
#2 Accepted 2054ms 51.234 MiB
#3 Accepted 1727ms 46.266 MiB

信息

递交者
类型
递交
题目
P2045 战略游戏
语言
C++
递交时间
2020-05-10 12:09:28
评测时间
2020-05-10 12:09:28
评测机
分数
100
总耗时
4532ms
峰值内存
51.969 MiB