# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
770368 | Plurm | Flights (JOI22_flights) | C++17 | 19 ms | 928 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 <string>
#include <vector>
using namespace std;
namespace {
const int MODX = 1024;
const int MODY = 1024;
int N;
vector<int> g[10005];
} // namespace
int dist(int u, int v, int p = -1) {
int mn = 1e9;
if (u == v)
return 0;
for (int w : g[u]) {
if (w == p)
continue;
mn = min(mn, dist(w, v, u) + 1);
}
return mn;
}
void Init(int N, std::vector<int> U, std::vector<int> V) {
::N = N;
for (int i = 0; i < N; i++)
SetID(i, i);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |