提交 1c886a97 编辑于 作者: CDK6182CHR's avatar CDK6182CHR
浏览文件

2021.5.27 update UFSet::find()

上级 caed942d
......@@ -62,9 +62,9 @@ int UFSet::find(int x) const
int UFSet::find(int x)
{
int root = static_cast<const UFSet*>(this)->find(x);
while (data[x] >= 0) {
x = data[x];
while (x != root) {
data[x] = root;
x = data[x];
}
return root;
}
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册