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>
#include "speedrun.h"
using namespace std;
using ll = long long;
using vll = vector <ll>;
void assignHints (int subtask, int n, int u[], int v[]) {
setHintLen(n);
for (int i = 1; i <= n-1; i++) {
setHint(u[i], v[i], true);
setHint(v[i], u[i], true);
}
return;
}
const static void dfs (int u, int par, int n) {
for (int v = 1; v <= n; v++) {
if (v == u) continue;
if (v == par) continue;
if (getHint(v)) {
goTo(v);
dfs(v, u, n);
goTo(u);
}
}
return;
};
void speedrun (int subtask, int n, int at) {
dfs(at, at, n);
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |