为什么只有54?

P2860 [USACO06JAN] Redundant Paths G

+1
by 文刀日天文 @ 2018-02-08 19:07:34


+2
by _JC_ @ 2018-06-12 21:46:07


+3
by Rye_Catcher @ 2018-07-09 22:06:05


@[JC06](/space/show?uid=55988) @[文刀日天文](/space/show?uid=47722) @[Klaus](/space/show?uid=708) 我找出我为什么54的错误了 ``` for(ri i=1;i<=n;i++){ x=in_block[i]; for(ri j=h[i];j;j=edge[j].ne){ y=in_block[edge[j].to];//这里 g[x][y]=g[y][x]=1; } } ``` 这段缩点后重构图的代码中的第二个for循环里,$edge[j].to$写成了$edge[i].to$
by Rye_Catcher @ 2018-07-09 22:38:06


也许你们可以参考一下
by Rye_Catcher @ 2018-07-09 22:38:27


|