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 "speedrun.h"
// #include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
void assignHints(int subtask, int n, int A[], int B[]) {
setHintLen(n);
for(int i = 1 ; i < n ; i++) {
int u = A[i], v = B[i];
setHint(u, v, true);
setHint(v, u, true);
}
}
void solve(int node, int par, int &n) {
for(int i = 1 ; i <= n ; i++) {
if(i == par) continue;
if(getHint(i)) {
goTo(i);
solve(i, node, n);
}
}
goTo(par);
}
void speedrun(int subtask, int N, int start) {
solve(start, start, N);
}
# | 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... |