실행 실패 (제출 코드 컴파일 에러)
Main.c: In function ‘compare’: Main.c:5:8: error: ‘a’ redeclared as different kind of symbol 5 | int a = *(const int*)a; | ^ Main.c:4:25: note: previous definition of ‘a’ with type ‘const void *’ 4 | int compare(const void *a, const void *b) { | ~~~~~~~~~~~~^ Main.c:5:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 5 | int a = *(const int*)a; | ^ Main.c:6:8: error: ‘b’ redeclared as different kind of symbol 6 | int b = *(const int*)b; | ^ Main.c:4:40: note: previous definition of ‘b’ with type ‘const void *’ 4 | int compare(const void *a, const void *b) { | ~~~~~~~~~~~~^ Main.c:6:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 6 | int b = *(const int*)b; | ^ Main.c: In function ‘main’: Main.c:18:4: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | scanf("%d", &N); | ^~~~~~~~~~~~~~~ Main.c:21:7: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 21 | scanf("%d", &A[i]); | ^~~~~~~~~~~~~~~~~~ Main.c:26:4: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 26 | scanf("%d", &M); | ^~~~~~~~~~~~~~~ Main.c:29:7: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 29 | scanf("%d", &k); | ^~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.