실행 실패 (제출 코드 컴파일 에러)
Main.c:5:26: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘=’ token 5 | int stack[10000] = { 0 }; | ^ Main.c: In function ‘push’: Main.c:18:13: error: ‘struct STACK’ has no member named ‘stack’ 18 | node.stack[++node.index] = node.cur; | ^ Main.c:18:26: error: ‘struct STACK’ has no member named ‘index’ 18 | node.stack[++node.index] = node.cur; | ^ Main.c:18:40: error: ‘struct STACK’ has no member named ‘cur’ 18 | node.stack[++node.index] = node.cur; | ^ Main.c:19:13: error: ‘struct STACK’ has no member named ‘top’ 19 | node.top++; | ^ Main.c:20:13: error: ‘struct STACK’ has no member named ‘cur’ 20 | node.cur++; | ^ Main.c: In function ‘pop’: Main.c:26:23: error: ‘struct STACK’ has no member named ‘stack’ 26 | int arg = node.stack[node.index]; | ^ Main.c:26:34: error: ‘struct STACK’ has no member named ‘index’ 26 | int arg = node.stack[node.index]; | ^ Main.c:27:13: error: ‘struct STACK’ has no member named ‘index’ 27 | node.index--; | ^ Main.c:28:13: error: ‘struct STACK’ has no member named ‘cur’ 28 | node.cur--; | ^ Main.c:26:13: warning: unused variable ‘arg’ [-Wunused-variable] 26 | int arg = node.stack[node.index]; | ^~~ Main.c: In function ‘cal’: Main.c:36:28: error: ‘struct STACK’ has no member named ‘cur’ 36 | while (node.cur != num) | ^ Main.c:38:34: error: ‘struct STACK’ has no member named ‘cur’ 38 | push(node.cur); | ^ Main.c:44:25: error: ‘struct STACK’ has no member named ‘cur’ 44 | if (node.cur < num) // 스택의 현재 값보다 num이 더 큰경우 num까지 푸쉬 | ^ Main.c:46:36: error: ‘struct STACK’ has no member named ‘top’ 46 | while (node.top < num || node.top == num) | ^ Main.c:46:54: error: ‘struct STACK’ has no member named ‘top’ 46 | while (node.top < num || node.top == num) | ^ Main.c:48:42: error: ‘struct STACK’ has no member named ‘top’ 48 | push(node.top); | ^ Main.c:50:29: error: ‘struct STACK’ has no member named ‘cur’ 50 | node.cur = node.top; | ^ Main.c:50:40: error: ‘struct STACK’ has no member named ‘top’ 50 | node.cur = node.top; | ^ Main.c:55:17: error: ‘struct STACK’ has no member named ‘max’ 55 | if (node.max != 0) | ^ Main.c:57:25: error: ‘struct STACK’ has no member named ‘bottom’ 57 | if (node.bottom > num) | ^ Main.c:60:29: error: ‘struct STACK’ has no member named ‘bool_false’ 60 | node.bool_false++; | ^ Main.c:66:17: error: ‘struct STACK’ has no member named ‘bottom’ 66 | if (node.bottom = num) | ^ Main.c:68:21: error: ‘struct STACK’ has no member named ‘cur’ 68 | node.cur = node.bottom; | ^ Main.c:68:32: error: ‘struct STACK’ has no member named ‘bottom’ 68 | node.cur = node.bottom; | ^ Main.c:72:17: error: ‘struct STACK’ has no member named ‘cur’ 72 | if (node.cur > num || node.cur == num) | ^ Main.c:72:35: error: ‘struct STACK’ has no member named ‘cur’ 72 | if (node.cur > num || node.cur == num) | ^ Main.c:74:25: error: ‘struct STACK’ has no member named ‘cur’ 74 | if (node.cur == num) | ^ Main.c:76:33: error: ‘struct STACK’ has no member named ‘cur’ 76 | pop(node.cur); | ^ Main.c:77:29: error: ‘struct STACK’ has no member named ‘bottom’ 77 | node.bottom = node.cur; | ^ Main.c:77:43: error: ‘struct STACK’ has no member named ‘cur’ 77 | node.bottom = node.cur; | ^ Main.c:80:28: error: ‘struct STACK’ has no member named ‘cur’ 80 | while (node.cur != num) | ^ Main.c:82:33: error: ‘struct STACK’ has no member named ‘cur’ 82 | pop(node.cur); | ^ Main.c: In function ‘main’: Main.c:100:29: error: ‘struct STACK’ has no member named ‘max’ 100 | node.max++; | ^ Main.c:104:25: error: ‘struct STACK’ has no member named ‘bool_false’ 104 | if (node.bool_false) | ^ Main.c:94:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 94 | scanf("%d", &size); | ^~~~~~~~~~~~~~~~~~ Main.c:97:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 97 | scanf("%d", &num); | ^~~~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.