# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1066678 |
2024-08-20T04:51:29 Z |
김은성(#11121) |
Speedrun (RMI21_speedrun) |
C++17 |
|
27 ms |
1016 KB |
#include "speedrun.h"
void assignHints(int subtask, int N, int A[], int B[]) { /* your solution here */
setHintLen(N);
int i;
for(i=1; i<N; i++){
setHint(A[i], B[i], 1);
setHint(B[i], A[i], 1);
}
}
int n;
bool ch[1009];
void dfs(int v){
ch[v] = 1;
int i;
for(i=1; i<=n; i++){
if(getHint(i)){
if(ch[i])
continue;
goTo(i);
dfs(i);
goTo(v);
}
}
}
void speedrun(int subtask, int N, int start) { /* your solution here */
n = N;
dfs(start);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
876 KB |
Output is correct |
2 |
Correct |
27 ms |
1012 KB |
Output is correct |
3 |
Correct |
23 ms |
892 KB |
Output is correct |
4 |
Correct |
21 ms |
1016 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
The length is too large |
2 |
Halted |
0 ms |
0 KB |
- |