# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1057353 | juicy | 도로 건설 사업 (JOI13_construction) | C++17 | 350 ms | 45088 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;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif
const int N = 2e5 + 5;
int n, m, c, p;
int lab[N], cands[N];
long long pf[N];
array<int, 3> pt[N];
array<int, 4> rect[N];
vector<array<int, 3>> edges;
int find(int u) {
return lab[u] < 0 ? u : lab[u] = find(lab[u]);
}
bool mrg(int u, int v) {
if ((u = find(u)) == (v = find(v))) {
return 0;
}
if (lab[u] > lab[v]) {
swap(u, v);
}
# | 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... |