We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 115bab3 commit 7444572Copy full SHA for 7444572
solutions/advanced/ys-PersistentUnionFind.mdx
@@ -38,7 +38,7 @@ struct DSU {
38
if (sz[a] < sz[b]) { swap(a, b); }
39
// add to history
40
past_parent.push_back({b, p[b]});
41
- past_size.push_back({a, p[a]});
+ past_size.push_back({a, sz[a]});
42
43
if (a != b) {
44
p[b] = a;
0 commit comments