# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
864472 | truongdoan2012 | Putovanje (COCI20_putovanje) | C++17 | 76 ms | 35412 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>
using namespace std;
#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) 42
#endif
using i64 = long long;
const int N = 2e5 + 10;
int up[20][N], tin[N], tout[N], t;
struct edge {
int to = 0;
i64 c1 = 0, c2 = 0;
};
vector<edge> g[N];
void dfs(int u, int p) {
up[0][u] = p;
tin[u] = t++;
for (int i = 1; i < 20; i++) {
up[i][u] = up[i - 1][up[i - 1][u]];
}
for (const auto& v : g[u]) {
if (v.to == p) continue;
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... |