Problem | ghostrule |
---|---|
User | gelastropod |
Submission Time | 2023-12-30 17:19:45 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
ghostrule.cpp:8:5: error: ‘vi’ does not name a type
8 | vi p, rank, setSize;
| ^~
ghostrule.cpp: In constructor ‘UnionFind::UnionFind(long long int)’:
ghostrule.cpp:12:9: error: ‘p’ was not declared in this scope
12 | p.assign(N, 0); for (int i = 0; i < N; ++i) p[i] = i;
| ^
ghostrule.cpp:13:13: error: expected unqualified-id before ‘.’ token
13 | rank.assign(N, 0);
| ^
ghostrule.cpp:14:9: error: ‘setSize’ was not declared in this scope
14 | setSize.assign(N, 1);
| ^~~~~~~
ghostrule.cpp: In member function ‘long long int UnionFind::findSet(long long int)’:
ghostrule.cpp:17:34: error: ‘p’ was not declared in this scope
17 | int findSet(int i) { return (p[i] == i) ? i : (p[i] = findSet(p[i])); }
| ^
ghostrule.cpp: In member function ‘void UnionFind::unionSet(long long int, long long int)’:
g