# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
703906 | bebra | Connecting Supertrees (IOI20_supertrees) | C++17 | 202 ms | 22176 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 "supertrees.h"
#include <bits/stdc++.h>
using namespace std;
#define dbg(x) cerr << #x << ": " << x << endl;
struct DSU {
vector<int> parent;
vector<int> size;
int comps_n;
DSU(int n) {
parent.resize(n);
iota(parent.begin(), parent.end(), 0);
size.assign(n, 1);
comps_n = n;
}
int find(int v) {
if (parent[v] == v) {
return v;
} else {
return parent[v] = find(parent[v]);
}
}
void unite(int u, int v) {
u = find(u);
v = find(v);
# | 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... |