# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
941455 | Mike_Vu | 경주 (Race) (IOI11_race) | C++14 | 218 ms | 53324 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 5;
const int inf = 1e9;
int n, k, res = inf, sz[MAX], min_length[MAX];
bool deleted[MAX];
vector<int> undo_length;
vector<pair<int, int>> adj[MAX];
stack<pair<int, int>> updates;
int get_size(int u, int pre){
sz[u] = 1;
for(auto [v, w] : adj[u]) if(v != pre and !deleted[v]){
sz[u] += get_size(v, u);
}
return sz[u];
}
int find_centroid(int u, int pre, int target){
for(auto [v, w] : adj[u]) if(v != pre and !deleted[v] and sz[v] * 2 > target){
return find_centroid(v, u, target);
}
return u;
}
void compute(int u, int pre, int len, int sum){
if(sum > k) return;
컴파일 시 표준 에러 (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... |