第一次写Prim算法, RE on #8~10, 悬关

P3366 【模板】最小生成树

你的边数组开小,要开两倍
by szrgjxms @ 2024-08-22 19:07:54


```cpp struct Edge { int from, to, weight, next; Edge() {} Edge(int f, int t, int w, int n): from(f), to(t), weight(w), next(n) {} } edges[200010]; ``` 这里 200010 改成 400010
by szrgjxms @ 2024-08-22 19:08:52


@[Gcc_Gdb_7_8_1](/user/1058410)
by szrgjxms @ 2024-08-22 19:09:53


@[szrgjxms](/user/1147739) 谢谢,已关
by Gcc_Gdb_7_8_1 @ 2024-08-22 19:29:37


此贴结
by Gcc_Gdb_7_8_1 @ 2024-08-22 19:30:24


数据只需开到397043即可
by likunyuan @ 2024-09-07 21:39:05


@[szrgjxms](/user/1147739) 谢谢orz
by nineup @ 2024-10-04 16:21:30


|