# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
857689 | Vanio | Speedrun (RMI21_speedrun) | C++17 | 0 ms | 0 KiB |
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>
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);
}
}
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);
}
}
goTo(p);
}
void speedrun(int st, int n, int start){
rec(start,0);
}