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>
using namespace std;
#define pb push_back
void dfs(int x,int p){
for (int i=1;i<=250;i++){
if (!getHint(i)) continue;
for (int j=(i-1)*4+1;j<=i*4;j++){
if (j==p || j==x) continue;
if (goTo(j)) dfs(j,x);
}
}if (p) goTo(p);
return;
}
void assignHints(int subtask, int n, int A[], int B[]) {
setHintLen(250);
for (int i=1;i<n;i++){
setHint(A[i],(B[i]/4)+bool(B[i]%4),1);
setHint(B[i],(A[i]/4)+bool(A[i]%4),1);
}return;
}
void speedrun(int subtask, int n, int start) {
dfs(start,0);
return;
}
# | 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... |