실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.c: In function \u2018enqueue\u2019:\nMain.c:46:38: error: expected \u2018;\u2019 before \u2018return\u2019\n 46 | error(\"\ud050\uac00 \ud3ec\ud654\uc0c1\ud0dc\uc785\ub2c8\ub2e4.\")\n | ^\n | ;\n 47 | return;\n | ~~~~~~ \nMain.c: In function \u2018main\u2019:\nMain.c:65:16: warning: passing argument 1 of \u2018init_queue\u2019 from incompatible pointer type [-Wincompatible-pointer-types]\n 65 | init_queue(&q);\n | ^~\n | |\n | QueueType **\nMain.c:19:28: note: expected \u2018QueueType *\u2019 but argument is of type \u2018QueueType **\u2019\n 19 | void init_queue(QueueType *q) {\n | ~~~~~~~~~~~^\nMain.c:75:21: warning: format \u2018%d\u2019 expects argument of type \u2018int *\u2019, but argument 2 has type \u2018int\u2019 [-Wformat=]\n 75 | scanf(\"%d\", x);\n | ~^ ~\n | | |\n | | int\n | int *\nMain.c:76:21: warning: passing argument 1 of \u2018enqueue\u2019 from incompatible pointer type [-Wincompatible-pointer-types]\n 76 | enqueue(&q,x);\n | ^~\n | |\n | QueueType **\nMain.c:44:25: note: expected \u2018QueueType *\u2019 but argument is of type \u2018QueueType **\u2019\n 44 | void enqueue(QueueType *q, int item) {\n | ~~~~~~~~~~~^\nMain.c:80:36: warning: passing argument 1 of \u2018dequeue\u2019 from incompatible pointer type [-Wincompatible-pointer-types]\n 80 | printf(\"%d\\n\", dequeue(&q));\n | ^~\n | |\n | QueueType **\nMain.c:55:24: note: expected \u2018QueueType *\u2019 but argument is of type \u2018QueueType **\u2019\n 55 | int dequeue(QueueType *q) {\n | ~~~~~~~~~~~^\nMain.c:84:29: error: \u2018q\u2019 is a pointer; did you mean to use \u2018->\u2019?\n 84 | printf(\"%d\\n\", q.rear-q.front);\n | ^\n | ->\nMain.c:84:36: error: \u2018q\u2019 is a pointer; did you mean to use \u2018->\u2019?\n 84 | printf(\"%d\\n\", q.rear-q.front);\n | ^\n | ->\nMain.c:88:37: warning: passing argument 1 of \u2018is_empty\u2019 from incompatible pointer type [-Wincompatible-pointer-types]\n 88 | printf(\"%d\\n\", is_empty(&q));\n | ^~\n | |\n | QueueType **\nMain.c:34:26: note: expected \u2018QueueType *\u2019 but argument is of type \u2018QueueType **\u2019\n 34 | int is_empty (QueueType *q) {\n | ~~~~~~~~~~~^\nMain.c:92:27: error: \u2018s\u2019 undeclared (first use in this function)\n 92 | if (is_empty(&s)) {\n | ^\nMain.c:92:27: note: each undeclared identifier is reported only once for each function it appears in\nMain.c:96:34: error: \u2018q\u2019 is a pointer; did you mean to use \u2018->\u2019?\n 96 | else printf(\"%d\\n\", q.data[q.front+1]);\n | ^\n | ->\nMain.c:96:41: error: \u2018q\u2019 is a pointer; did you mean to use \u2018->\u2019?\n 96 | else printf(\"%d\\n\", q.data[q.front+1]);\n | ^\n | ->\nMain.c:104:34: error: \u2018q\u2019 is a pointer; did you mean to use \u2018->\u2019?\n 104 | else printf(\"%d\\n\", q.data[q.rear]);\n (...truncated, total 4962 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.