#include "speedrun.h"
#include <bits/stdc++.h>
using namespace std;
const int sz = 2005;
int cnt = 0, used[sz];
vector<int> g[sz];
void dfs(int v, int p)
{
used[v] = 1;
for(int i : g[v])
{
if(!used[i])
{
goTo(i);
dfs(i, v);
}
}
if(p > 0 )
{
goTo(p);
}
}
void assignHints(int subtask, int N, int A[], int B[])
{
for(int i = 1; i <= N - 1; i++)
{
g[A[i]].push_back(B[i]);
g[B[i]].push_back(A[i]);
}
setHintLen(1);
}
void speedrun(int subtask, int N, int start)
{
dfs(start, -1);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
764 KB |
Solution didn't visit every node |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
768 KB |
Solution didn't visit every node |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
768 KB |
Solution didn't visit every node |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
768 KB |
Solution didn't visit every node |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
764 KB |
Solution didn't visit every node |
2 |
Halted |
0 ms |
0 KB |
- |