# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
218430 | GioChkhaidze | 수도 (JOI20_capital_city) | C++14 | 876 ms | 35056 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
const int N=2e5+5;
int n,k,ans=1e9;
bool f[N],fix[N],lvl[N];
int c[N],P[N],Cf[N];
vector < int > v[N],s[N],h;
int Dfs(int x,int p,int sz,int ¢er) {
int tot=1;
Cf[c[x]]++;
h.pb(x);
for (int i=0; i<v[x].size(); i++) {
int to=v[x][i];
if (!lvl[to] && to!=p)
tot+=Dfs(to,x,sz,center);
}
if (center==-1 && (2*tot>=sz || !p)) center=x;
return tot;
}
void Go(int x,int p) {
P[x]=p;
for (int i=0; i<v[x].size(); i++) {
int to=v[x][i];
if (!lvl[to] && to!=p) Go(to,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... |