실행 실패 (제출 코드 컴파일 에러)
Main.c:1:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token 1 | include <stdio.h> | ^ Main.c: In function ‘bfs’: Main.c:7:5: error: ‘visited’ undeclared (first use in this function) 7 | visited[n] = 1; | ^~~~~~~ Main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in Main.c:8:5: error: ‘queue’ undeclared (first use in this function) 8 | queue[rear++] = n; | ^~~~~ Main.c:8:11: error: ‘rear’ undeclared (first use in this function) 8 | queue[rear++] = n; | ^~~~ Main.c:10:12: error: ‘front’ undeclared (first use in this function) 10 | while (front < rear) { | ^~~~~ Main.c:13:13: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 13 | printf("%d\n", visited[cur] - 1); | ^~~~~~ Main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ +++ |+#include <stdio.h> 1 | include <stdio.h> Main.c:13:13: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 13 | printf("%d\n", visited[cur] - 1); | ^~~~~~ Main.c:13:13: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ Main.c: In function ‘main’: Main.c:29:5: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 29 | scanf("%d %d", &n, &k); | ^~~~~ Main.c:29:5: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ Main.c:29:5: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] Main.c:29:5: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.