We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d72fb3 commit 804fc85Copy full SHA for 804fc85
solutions/usaco-646.mdx
@@ -35,7 +35,7 @@ using namespace std;
35
//BeginCodeSnip{DSU}
36
struct DSU {
37
vector<int> e;
38
- DSU(int N) { e = vector<int>(N, -1); }
+ DSU(int N): e(N, -1) { }
39
40
// get representive component (uses path compression)
41
int get(int x) { return e[x] < 0 ? x : e[x] = get(e[x]); }
0 commit comments