# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
535352 | 79brue | 수도 (JOI20_capital_city) | C++14 | 1036 ms | 194920 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, k;
int arr[200002], idx[200002];
vector<int> link[200002];
vector<int> vec[200002];
int in[200002], inCnt, sz[200002];
int top[200002], depth[200002], par[200002], LCADB[200002][20];
void dfs_sz(int x, int p=-1){
sz[x] = 1;
if(p!=-1) link[x].erase(find(link[x].begin(), link[x].end(), p));
for(auto &y: link[x]){
depth[y] = depth[x] + 1;
par[y] = LCADB[y][0] = x;
dfs_sz(y, x);
sz[x] += sz[y];
if(sz[y] > sz[link[x][0]]) swap(y, link[x][0]);
}
}
void dfs_hld(int x, int p=-1){
in[x] = ++inCnt;
idx[inCnt] = x;
for(auto y: link[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... |