# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1093571 | vjudge1 | Putovanje (COCI20_putovanje) | C++17 | 119 ms | 33224 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 <iostream>
#include <vector>
#include <array>
#include <map>
using namespace std;
using ll = long long;
using pii = array<int, 2>;
const int maxn = 200'001;
const int LOG = 19;
int n;
vector<int> tree[maxn];
int used[maxn],
seen[maxn],
depth[maxn],
ancestor[LOG][maxn];
pii cost[maxn];
map<pii, int> ident;
void dfs(int u, int p, int d){
ancestor[0][u] = p;
depth[u] = d;
for(int & v : tree[u])
if(v != p)
dfs(v, u, d + 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... |