# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
748229 | arthur_nascimento | Reconstruction Project (JOI22_reconstruction) | C++14 | 1760 ms | 29868 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
struct UnionFind {
int n;
std::vector<int> a;
UnionFind (int n) : n(n), a(n, -1) {}
int root(int i) { return a[i] < 0 ? i : a[i] = root(a[i]); }
bool unite(int x, int y) {
x = root(x);
y = root(y);
if (x == y) return false;
if (a[x] > a[y]) std::swap(x, y);
a[x] += a[y];
a[y] = x;
return true;
}
bool same(int x, int y) { return root(x) == root(y); }
};
int main() {
int n = ri();
int m = ri();
struct Hen {
int a;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |