# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
983802 | phoenix0423 | Connecting Supertrees (IOI20_supertrees) | C++17 | 166 ms | 24452 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>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
#define pb push_back
#define eb emplace_back
#include "supertrees.h"
struct DSU{
vector<int> par, siz;
int n;
DSU(int _n) : n(_n){
par.resize(n);
siz.resize(n, 1);
iota(par.begin(), par.end(), 0);
}
int root(int x){ return x == par[x] ? x : par[x] = root(par[x]);}
bool same(int x, int y){ return root(x) == root(y);}
void unite(int x, int y){
x = root(x), y = root(y);
if(x == y) return;
if(siz[x] > siz[y]) swap(x, y);
siz[y] += siz[x];
par[x] = y;
}
};
int construct(std::vector<std::vector<int>> p) {
int n = p.size();
vector<vector<int>> ans(n, vector<int>(n));
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... |