#include "speedrun.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;
int lol,st;
void assignHints(int subtask, int n, int a[], int b[]) {
setHintLen(n);
// cout<<"HI"<<endl;
for(int i=1;i<n;i++)
{
setHint(a[i],b[i],1);
setHint(b[i],a[i],1);
}
lol=n;
}
void dfs(int node,int parent,int start,int n)
{
//cout<<node<<endl;
for(int i=1;i<=n;i++)
{
if(i==parent)continue;
if(getHint(i))
{
goTo(i);
dfs(i,node,start,n);
}
}
if(node!=start)
goTo(parent);
}
void speedrun(int subtask, int n, int start) { /* your solution here */
st=start;
dfs(st,0,st,n);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
20 ms |
1452 KB |
Output is correct |
2 |
Correct |
24 ms |
1412 KB |
Output is correct |
3 |
Correct |
20 ms |
1464 KB |
Output is correct |
4 |
Correct |
23 ms |
1648 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |