# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
878495 | LePhiPhat | Putovanje (COCI20_putovanje) | C++17 | 350 ms | 61376 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#ifdef LOCAL
#include "debuge.cpp"
#else
#define debug(...) 42;
#endif
using namespace std;
using ii = pair<int, int>;
using ll = long long;
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
const int N = 200001;
vector<int> g[N];
ll dep[N], up[N][20], dp[N];
void dfs(int u, int p) {
up[u][0] = p;
for (int &v: g[u]) if (v != p) {
dep[v] = dep[u] + 1;
dfs(v, u);
}
}
void calc(int n) {
for (int i = 1; i < 20; i++) {
for (int j = 1; j <= n; j++) {
up[j][i] = up[up[j][i - 1]][i - 1];
컴파일 시 표준 에러 (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... |