# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
691869 | piOOE | Prize (CEOI22_prize) | C++17 | 2522 ms | 243396 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
struct Tree {
vector<int> tin, tout, par, depth, jump;
int logn;
void init(vector<vector<int>> adj, int root) {
int n = adj.size();
int T = 0;
tin.assign(n, -1), tout.resize(n), par.resize(n), depth.resize(n), jump.resize(n);
par[root] = jump[root] = root;
function<void(int)> dfs = [&](int v) {
tin[v] = T++;
for (int to : adj[v]) {
depth[to] = depth[v] + 1;
par[to] = v;
int p = jump[v];
int pp = jump[p];
if (depth[p] - depth[v] == depth[pp] - depth[p]) {
jump[to] = pp;
} else {
jump[to] = 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |