We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a4fdba commit ca76225Copy full SHA for ca76225
library/data_structures/dsu/dsu.hpp
@@ -7,6 +7,6 @@ struct dsu {
7
bool join(int a, int b) {
8
if ((a = go(a)) == (b = go(b))) return 0;
9
if (e[a] > e[b]) swap(a, b);
10
- return e[a] += e[b], e[b] = a, 1;
+ return e[a] += e[b], e[b] = a;
11
}
12
};
0 commit comments