실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.c: In function \u2018main\u2019:\nMain.c:31:20: error: expected \u2018)\u2019 before \u2018a\u2019\n 31 | int *a = (int *a)malloc(N * sizeof(int));\n | ~ ^\n | )\nMain.c:31:22: warning: implicit declaration of function \u2018malloc\u2019 [-Wimplicit-function-declaration]\n 31 | int *a = (int *a)malloc(N * sizeof(int));\n | ^~~~~~\nMain.c:3:1: note: include \u2018<stdlib.h>\u2019 or provide a declaration of \u2018malloc\u2019\n 2 | #include <math.h>\n +++ |+#include <stdlib.h>\n 3 | \nMain.c:31:22: warning: incompatible implicit declaration of built-in function \u2018malloc\u2019 [-Wbuiltin-declaration-mismatch]\n 31 | int *a = (int *a)malloc(N * sizeof(int));\n | ^~~~~~\nMain.c:31:22: note: include \u2018<stdlib.h>\u2019 or provide a declaration of \u2018malloc\u2019\nMain.c:32:24: error: expected \u2018)\u2019 before \u2018count\u2019\n 32 | int *count = (int *count)calloc(size,sizeof(int));\n | ~ ^~~~~\n | )\nMain.c:32:30: warning: implicit declaration of function \u2018calloc\u2019 [-Wimplicit-function-declaration]\n 32 | int *count = (int *count)calloc(size,sizeof(int));\n | ^~~~~~\nMain.c:32:30: note: include \u2018<stdlib.h>\u2019 or provide a declaration of \u2018calloc\u2019\nMain.c:32:30: warning: incompatible implicit declaration of built-in function \u2018calloc\u2019 [-Wbuiltin-declaration-mismatch]\nMain.c:32:30: note: include \u2018<stdlib.h>\u2019 or provide a declaration of \u2018calloc\u2019\nMain.c:33:20: error: expected \u2018)\u2019 before \u2018b\u2019\n 33 | int *b = (int *b)calloc(N * sizeof(int));\n | ~ ^\n | )\nMain.c:33:22: error: too few arguments to function \u2018calloc\u2019\n 33 | int *b = (int *b)calloc(N * sizeof(int));\n | ^~~~~~\nMain.c:38:20: error: \u2018offset\u2019 undeclared (first use in this function); did you mean \u2018offest\u2019?\n 38 | count[a[i]+offset]++;\n | ^~~~~~\n | offest\nMain.c:38:20: note: each undeclared identifier is reported only once for each function it appears in\nMain.c:41:31: warning: division \u2018sizeof (int *) / sizeof (int)\u2019 does not compute the number of array elements [-Wsizeof-pointer-div]\n 41 | int length = sizeof(count)/sizeof(count[0]);\n | ^\nMain.c:32:10: note: first \u2018sizeof\u2019 operand was declared here\n 32 | int *count = (int *count)calloc(size,sizeof(int));\n | ^~~~~\nMain.c:59:5: warning: implicit declaration of function \u2018qsort\u2019 [-Wimplicit-function-declaration]\n 59 | qsort(a,0,N-1);\n | ^~~~~\nMain.c:61:24: error: expected expression before \u2018float\u2019\n 61 | printf(\"%d\", round(float(sum)/N));\n | ^~~~~\nMain.c:64:34: warning: division \u2018sizeof (int *) / sizeof (int)\u2019 does not compute the number of array elements [-Wsizeof-pointer-div]\n 64 | for (int i=0; i<sizeof(b)/sizeof(b[0]); i++) {\n | ^\nMain.c:33:10: note: first \u2018sizeof\u2019 operand was declared here\n 33 | int *b = (int *b)calloc(N * sizeof(int));\n | ^\nMain.c:73:34: warning: division \u2018sizeof (int *) / sizeof (int)\u2019 does not compute the number of array elements [-Wsizeof-pointer-div]\n 73 | for (int i=0; i<sizeof(b)/sizeof(b[0]); i++) {\n | ^\nMain.c:33:10: note: first \u2018sizeof\u2019 operand was declared here\n 33 | int *b = (int *b)calloc(N * sizeof(int));\n | ^\nMain.c:85:5: warning: implicit declaration of function \u2018free\u2019 [-Wimplicit-function-declaration]\n 85 | free(a);\n | ^~~~(...truncated, total 4738 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.