克鲁斯卡尔只得了20分求助QAQ

P3366 【模板】最小生成树

并查集挂了
by 世墨 @ 2020-10-05 09:56:33


``` int unionn(int x,int y) { return father[y]=x; } ``` 改成 ``` int unionn(int x,int y) { int xx=find(x),yy=find(y); if(xx==yy)return 114514; else { father[xx]=yy; } return 1919810; } ```
by cmll02 @ 2020-10-05 09:59:59


克鲁斯卡尔
by WanderingTrader @ 2020-10-05 10:00:33


@[shygo_cmll02](/user/171487) 谢大佬
by 拜____仁 @ 2020-10-05 10:08:31


|