# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
212482 | PeppaPig | Constellation 3 (JOI20_constellation3) | C++14 | 589 ms | 46728 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>
#define long long long
#define pii pair<long, long>
#define x first
#define y second
using namespace std;
#define var int p = 1, int l = 1, int r = n
#define mid ((l + r) >> 1)
#define lb p << 1, l, mid
#define rb p << 1 | 1, mid + 1, r
const int N = 1 << 18;
struct UnionFind {
int par[N], l[N], r[N];
UnionFind() {
iota(par, par + N, 0);
iota(l, r + N, 0);
iota(r, r + N, 0);
}
int find(int x) { return par[x] = x == par[x] ? x : find(par[x]); }
void unite(int a, int b) {
a = find(a), b = find(b);
if(a == b) return;
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... |