# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
217531 | extraterrestrial | 별자리 3 (JOI20_constellation3) | C++14 | 688 ms | 50424 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define SZ(x) (int)(x).size()
#define int ll
const int N = 2e5 + 10;
int p[N], l[N], r[N], sz[N];
void init(int n) {
for (int i = 1; i <= n; i++) {
p[i] = l[i] = r[i] = i;
sz[i] = 1;
}
}
int find(int v) {
return p[v] == v ? v : p[v] = find(p[v]);
}
void merge(int a, int b) {
a = find(a), b = find(b);
if (a == b) {
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |