# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
301608 | Namnamseo | Connecting Supertrees (IOI20_supertrees) | C++17 | 302 ms | 22264 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 <vector>
#include <numeric>
using namespace std;
#define rep(i, n) for(int i=0; i<n; ++i)
#define pb push_back
int n;
namespace unf {
int par[1010];
void init() {
iota(par, par+n, 0);
}
int r(int x) { return (x==par[x]) ? x : (par[x]=r(par[x])); }
void join(int a, int b) {
a = r(a); b = r(b);
if (a == b) return;
par[a] = b;
}
bool same(int a, int b) { return r(a) == r(b); }
};
using namespace unf;
vector<int> g[1010];
int ans[1010][1010];
vector<int> go[1010];
int work(int gi, auto &p) {
auto &v = g[gi];
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... |