# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
878495 | LePhiPhat | Putovanje (COCI20_putovanje) | C++17 | 350 ms | 61376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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];
Compilation message (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... |