# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
492425 | dxz05 | Fountain Parks (IOI21_parks) | C++17 | 425 ms | 36924 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 "parks.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 3e2;
#define all(x) (x).begin(), (x).end()
int p[N];
int find(int x){
return (x == p[x] ? x : p[x] = find(p[x]));
}
bool unite(int x, int y){
x = find(x);
y = find(y);
if (x == y) return false;
if (rand() & 1) swap(x, y);
p[x] = y;
return true;
}
int construct_roads(vector<int> x, vector<int> y) {
int n = x.size();
if (n == 1) {
build({}, {}, {}, {});
return 1;
}
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... |