# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
306345 | miello | Connecting Supertrees (IOI20_supertrees) | C++14 | 266 ms | 22392 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;
const int MXN = 1005;
vector<int> par_line(MXN, 0), par_comp(MXN, 0), line[MXN], cycle_vertex[MXN];
int root(int i, vector<int> &par) {
while(i != par[par[i]]) {
par[i] = par[par[i]];
i = par[par[i]];
}
return i;
}
void mergeset(int a, int b, vector<int> &par) {
par[root(a, par)] = root(b, par);
}
int construct(std::vector<std::vector<int>> p) {
int n = p.size();
std::vector<std::vector<int>> answer;
for (int i = 0; i < n; i++) {
std::vector<int> row;
row.resize(n);
answer.push_back(row);
par_line[i] = i;
par_comp[i] = i;
}
# | 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... |