Submission #1066677

# Submission time Handle Problem Language Result Execution time Memory
1066677 2024-08-20T04:50:08 Z 김은성(#11121) Speedrun (RMI21_speedrun) C++17
0 / 100
9 ms 744 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 Incorrect 9 ms 744 KB Solution didn't visit every node
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 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 -