Skip to content

Commit 47be752

Browse files
Update cf-468B.mdx
1 parent d804734 commit 47be752

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

solutions/gold/cf-468B.mdx

+1-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ We can treat each set as a graph with several connected components. For each $p_
3434
#include <bits/stdc++.h>
3535
using namespace std;
3636

37-
// BeginCodeSnip{DSU}
37+
// BeginCodeSnip{DSU (from the module)}
3838
class DSU {
3939
private:
4040
vector<int> parents;
@@ -45,12 +45,10 @@ class DSU {
4545
for (int i = 0; i < size; i++) { parents[i] = i; }
4646
}
4747

48-
/** @return the "representative" node in x's component */
4948
int get(int x) {
5049
return parents[x] == x ? x : (parents[x] = get(parents[x]));
5150
}
5251

53-
/** @return whether the merge changed connectivity */
5452
bool unite(int x, int y) {
5553
int x_root = find(x);
5654
int y_root = find(y);

0 commit comments

Comments
 (0)