kruskal全WA求助——

P3366 【模板】最小生成树

@[IcySugar](/user/190650) 让AFO选手看看嘤嘤嘤,等等嘤
by mushroom_knight @ 2020-11-06 23:54:14


az,写法似乎不太一样呢嘤。 如果不嫌弃可以看看我写的丑陋代码。 https://www.luogu.com.cn/paste/8phrbvry
by mushroom_knight @ 2020-11-06 23:56:02


对了,您的 `if(total==n-1) return;` 是什么意思嘤
by mushroom_knight @ 2020-11-06 23:58:35


@[Ace_Translator](/user/338786) 是想写当选入的总边数到达n-1(也就是刚好造出一棵树)以后就直接退出函数来着x
by IcySugar @ 2020-11-07 00:00:17


@[IcySugar](/user/190650) 啊这,那您的写法和我的真的不一样嘤嘤嘤。 很对不起qaq
by mushroom_knight @ 2020-11-07 00:02:59


@[Ace_Translator](/user/338786) 噗wwww谢谢你啦,你的代码我也好好参考了x
by IcySugar @ 2020-11-07 00:03:44


```cpp sort(g+1, g+n+1, cmp); ``` 改为 ```cpp sort(g+1, g+m+1, cmp); ```
by BootsH @ 2020-11-07 05:53:11


@[developer6hyx](/user/317805) 跟我一样的错...
by InfinityTian @ 2020-11-07 07:34:29


@[developer6hyx](/user/317805) 啊!!谢谢!!! 不过总是有这样的错……debug也找不出来wwww太可怕了x
by IcySugar @ 2020-11-07 10:02:29


|