#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 |
1 |
Correct |
24 ms |
944 KB |
Output is correct |
2 |
Correct |
23 ms |
928 KB |
Output is correct |
3 |
Correct |
25 ms |
944 KB |
Output is correct |
4 |
Correct |
23 ms |
1012 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |