Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e361edd

Browse files
Update 图论并查集理论基础.md
修正语病
1 parent 2da3afe commit e361edd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/图论并查集理论基础.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ void join(int u, int v) {
396396
if (rank[u] <= rank[v]) father[u] = v; // rank小的树合入到rank大的树
397397
else father[v] = u;
398398

399-
if (rank[u] == rank[v] && u != v) rank[v]++; // 如果两棵树高度相同,则v的高度+1因为,上面 if (rank[u] <= rank[v]) father[u] = v; 注意是 <=
399+
if (rank[u] == rank[v] && u != v) rank[v]++; // 如果两棵树高度相同,则v的高度+1,因为上面 if (rank[u] <= rank[v]) father[u] = v; 注意是 <=
400400
}
401401
```
402402

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /