# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
567836 | dantoh000 | Flights (JOI22_flights) | C++17 | 161 ms | 1436 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 "Ali.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int N;
vector<int> G[10005];
int d[10005];
}
void Init(int _N, std::vector<int> U, std::vector<int> V) {
N = _N;
for (int i = 0; i < N; i++) G[i].clear();
for (int i = 0; i < N-1; i++){
G[U[i]].push_back(V[i]);
G[V[i]].push_back(U[i]);
}
for (int i = 0; i < N; i++){
SetID(i, i);
}
}
void dfs(int u, int p){
for (auto v : G[u]){
if (v == p) continue;
d[v] = d[u]+1;
dfs(v,u);
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |