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 <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;
int lol,st;
void assignHints(int subtask, int n, int a[], int b[]) {
setHintLen(n);
for(int i=1;i<n;i++)
{
setHint(a[i],b[i],1);
setHint(b[i],a[i],1);
}
lol=0;
}
void dfs(int node,int parent)
{
for(int i=1;i<=lol;i++)
{
if(i==parent)continue;
if(getHint(i))
{
goTo(i);
dfs(i,node);
}
}
if(node!=st)
goTo(parent);
}
void speedrun(int subtask, int n, int start) { /* your solution here */
st=start;
dfs(st,0);
}
# | 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... |