God,save me!

P1111 修复公路

[请参考本蒟蒻的题解](https://www.luogu.org/blog/80049/solution-p1111)
by Hexarhy @ 2019-03-09 15:40:58


@[HyyypRtf06](/space/show?uid=80049) EMM……我用的是并查集
by Ticzone @ 2019-03-09 15:42:18


$Kruskal$的看题解吧。 我就会$Prim$……
by Hexarhy @ 2019-03-09 15:43:14


@[HyyypRtf06](/space/show?uid=80049) WA, $\mathcal Kruskal$是什么?
by Ticzone @ 2019-03-09 15:45:48


@[佚_名](/space/show?uid=101484) 我觉得你得学学最小生成树的两种算法。欢迎您出门右转百度……
by Hexarhy @ 2019-03-09 15:46:54


@[佚_名](/space/show?uid=101484) 你就每用一条边,就把tot++,tot到n-1的时候就输出就行了
by mzgwty @ 2019-03-09 15:47:13


@[HyyypRtf06](/space/show?uid=80049) 好吧,我才学会并查集没多久…… 谢谢$\mathcal dalao$!
by Ticzone @ 2019-03-09 15:48:03


|