#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
20 ms |
940 KB |
Used too many wrong interactions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
43 ms |
1080 KB |
Output is correct |
2 |
Correct |
45 ms |
684 KB |
Output is correct |
3 |
Correct |
43 ms |
1004 KB |
Output is correct |
4 |
Correct |
43 ms |
944 KB |
Output is correct |
5 |
Correct |
49 ms |
1328 KB |
Output is correct |
6 |
Correct |
32 ms |
844 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |