실행 실패 (제출 코드 컴파일 에러)
Main.c: In function ‘compare2’: Main.c:11:5: error: unknown type name ‘data’ 11 | data d1 = *(data*)a; | ^~~~ Main.c:11:17: error: ‘data’ undeclared (first use in this function) 11 | data d1 = *(data*)a; | ^~~~ Main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in Main.c:11:22: error: expected expression before ‘)’ token 11 | data d1 = *(data*)a; | ^ Main.c:12:9: error: expected ‘;’ before ‘d2’ 12 | data d2 = *(data*)b; | ^~~ | ; Main.c:13:11: error: request for member ‘cnt’ in something not a structure or union 13 | if (d1.cnt != d2.cnt) return d2.cnt - d1.cnt; // 많이 등장한 순서로 | ^ Main.c:13:19: error: ‘d2’ undeclared (first use in this function); did you mean ‘d1’? 13 | if (d1.cnt != d2.cnt) return d2.cnt - d1.cnt; // 많이 등장한 순서로 | ^~ | d1 Main.c:13:45: error: request for member ‘cnt’ in something not a structure or union 13 | if (d1.cnt != d2.cnt) return d2.cnt - d1.cnt; // 많이 등장한 순서로 | ^ Main.c:14:14: error: request for member ‘idx’ in something not a structure or union 14 | return d1.idx - d2.idx; // 같으면 값이 작은 것 우선 | ^ Main.c:11:10: warning: variable ‘d1’ set but not used [-Wunused-but-set-variable] 11 | data d1 = *(data*)a; | ^~ Main.c:15:1: warning: control reaches end of non-void function [-Wreturn-type] 15 | } | ^ Main.c: In function ‘main’: Main.c:24:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | scanf("%d",&n); | ^~~~~~~~~~~~~~ Main.c:28:6: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 28 | scanf("%d",&arr[i]); | ^~~~~~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.