#include "speedrun.h"
#include <bits/stdc++.h>
//#define int long long
#define pii pair<int, int>
#define ti3 tuple<int, int, int>
#define ti4 tuple<int, int, int, int>
// This is like my secret account; yes it's like that ~ Baek Jiheon, Feel Good (Secret Code)
using namespace std;
void assignHints(int subtask, int N, int A[], int B[]) { /* your solution here */
setHintLen(N);
for (int i = 1; i < N; i++){
setHint(A[i], B[i], 1);
setHint(B[i], A[i], 1);
}
}
bool vis[1001];
int N;
void dfs(int x){
if (vis[x]) return;
vis[x] = true;
for (int i = 1; i <= N; i++){
if (getHint(i)){
goTo(i);
dfs(i);
goTo(x);
}
}
}
void speedrun(int subtask, int N, int start) { /* your solution here */
::N = N;
int l = getLength();
dfs(start);
}
Compilation message
speedrun.cpp: In function 'void speedrun(int, int, int)':
speedrun.cpp:33:9: warning: unused variable 'l' [-Wunused-variable]
33 | int l = getLength();
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
864 KB |
Output is correct |
2 |
Correct |
55 ms |
768 KB |
Output is correct |
3 |
Correct |
55 ms |
828 KB |
Output is correct |
4 |
Correct |
57 ms |
804 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |