84分求助

P3366 【模板】最小生成树

@[zp20120123](/user/1333393) kruskal每加一条边就让 cnt++ 最后判断cnt是否等于n-1就可以了
by wa_wa_wa_wa @ 2024-07-27 13:48:41


求互关$qwq$
by wa_wa_wa_wa @ 2024-07-27 13:56:18


谢谢
by zp20120123 @ 2024-07-27 14:03:45


@[wa_wa_wa_wa](https://www.luogu.com.cn/user/1199324) 我已过关,thank you!
by zp20120123 @ 2024-07-27 15:30:19


只要判断cnt==n-1就OK了
by zhaoyonghao @ 2024-07-31 10:43:38


我就这样写的
by zhaoyonghao @ 2024-07-31 10:44:34


|