路径压缩并查集
查看原帖
路径压缩并查集
690243
houluyu楼主2023/11/5 10:44

不是

return f[x]==x?x:find(f[x]);

而是

return f[x]==x?x:f[x]=find(f[x]);
2023/11/5 10:44
加载中...