# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
981908 | vjudge1 | 자매 도시 (APIO20_swap) | C++17 | 418 ms | 32152 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "swap.h"
#include <bits/stdc++.h>
#include <vector>
using namespace std;
long long n, m, i, j, sz[200001], p[200001], d[200001], mx[200001], szm[200001], kek[200001];
multiset<pair<long long, long long>> ms;
int mxx;
bool st1, st2;
vector<pair<long long, long long>> g[200001];
vector<pair<long long, pair<long long, long long>>> gg;
long long get(long long x) {
return x == p[x] ? x : p[x] = get(p[x]);
}
void merge(long long xx, long long yy) {
long long x = get(xx), y = get(yy);
mx[x] = max({mx[x], d[x], d[xx]});
mx[y] = max({mx[y], d[y], d[yy]});
mx[x] = max(mx[x], mx[y]);
mx[y] = max(mx[y], mx[x]);
szm[x]++;
if (x == y) return;
if (sz[x] < sz[y]) swap(x, y);
p[y] = x;
sz[x] += sz[y];
szm[x] += szm[y];
mx[x] = max(mx[x], mx[y]);
mx[y] = max(mx[y], mx[x]);
}
컴파일 시 표준 에러 (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... |