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<bits/stdc++.h>
#include "speedrun.h"
using namespace std;
void assignHints(int st, int n, int a[], int b[]){
int i;
setHintLen(n);
for(i=1;i<n;i++){
setHint(a[i],b[i],1);
setHint(b[i],a[i],1);
}
}
int n;
bool f[1001];
void rec(int k, int p){
int i;
f[k]=1;
for(i=1;i<=n;i++){
if(getHint(i) && !f[i]){
goTo(i);
rec(i,k);
}
}
if(p==0) return;
goTo(p);
}
void speedrun(int st, int N, int start){
n=N;
rec(start,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... |