# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
386070 | cpp219 | 경주 (Race) (IOI11_race) | C++14 | 2 ms | 364 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll int
#define ld long double
#define fs first
#define sc second
using namespace std;
const ll N = 2e3 + 6;
const ll Log2 = 19;
const ll inf = 1e9 + 7;
typedef pair<ll,ll> LL;
vector<LL> g[N];
ll n,k,w[N],H[N][2],child[N],len[N],d[N],ans = inf,L[N];
bool Is_cent[N];
multiset<LL> All;
ll Find_cent(ll u,ll p,ll total){
for (auto i : g[u]){
ll v = i.fs,now = i.sc;
if (!Is_cent[v]&&v != p&&child[v]*2 >= total) return Find_cent(v,u,total);
}
Is_cent[u] = 1; return u;
}
void reDFS(ll u,ll p){
child[u] = 1;
for (auto i : g[u]){
ll v = i.fs,now = i.sc;
if (!Is_cent[v] && v != p){
len[v] = len[u] + now; d[v] = d[u] + 1;
reDFS(v,u); child[u] += child[v];
컴파일 시 표준 에러 (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... |