# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
891707 | ind1v | Putovanje (COCI20_putovanje) | C++11 | 85 ms | 48212 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;
#define int long long
const int N = 2e5 + 4;
const int LG = 20;
int par[N][LG];
int a[N], b[N], d[N], lz[N];
array<int, 2> c[N];
array<int, 2> up[N];
vector<array<int, 3>> adj[N];
int n, ans;
void dfs(int u, int v, int depth) {
d[u] = depth;
par[u][0] = v;
for (int i = 0; i < (int)adj[u].size(); i++) {
int s = adj[u][i][0];
int c1 = adj[u][i][1], c2 = adj[u][i][2];
if (s != v) {
array<int, 2> nx;
nx[0] = c1;
nx[1] = c2;
up[s] = nx;
dfs(s, u, depth + 1);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |