실행 실패 (제출 코드 컴파일 에러)
{"success": false, "stderr": "Main.cpp:7:19: error: \u2018int select [1001][3]\u2019 redeclared as different kind of entity\n 7 | int select[1001][3];\n | ^\nIn file included from /usr/include/aarch64-linux-gnu/sys/types.h:179,\n from /usr/include/stdlib.h:395,\n from /usr/include/c++/11/bits/std_abs.h:38,\n from /usr/include/c++/11/cmath:47,\n from /usr/include/aarch64-linux-gnu/c++/11/bits/stdc++.h:41,\n from Main.cpp:1:\n/usr/include/aarch64-linux-gnu/sys/select.h:102:12: note: previous declaration \u2018int select(int, fd_set*, fd_set*, fd_set*, timeval*)\u2019\n 102 | extern int select (int __nfds, fd_set *__restrict __readfds,\n | ^~~~~~\nMain.cpp: In function \u2018int main()\u2019:\nMain.cpp:17:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 17 | select[0][i] = price[0][i];\n | ^\nMain.cpp:17:20: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 17 | select[0][i] = price[0][i];\n | ^\nMain.cpp:17:22: error: assignment of read-only location \u2018*(select + ((sizetype)i))\u2019\n 17 | select[0][i] = price[0][i];\n | ~~~~~~~~~~~~~^~~~~~~~~~~~~\nMain.cpp:21:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | select[i][j] = min(select[i-1][(j+2)%3],select[i-1][(j+1)%3]) + price[i][j];\n | ^\nMain.cpp:21:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | select[i][j] = min(select[i-1][(j+2)%3],select[i-1][(j+1)%3]) + price[i][j];\n | ^\nMain.cpp:21:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | select[i][j] = min(select[i-1][(j+2)%3],select[i-1][(j+1)%3]) + price[i][j];\n | ^\ncc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]\nMain.cpp:21:51: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | select[i][j] = min(select[i-1][(j+2)%3],select[i-1][(j+1)%3]) + price[i][j];\n | ^\nMain.cpp:21:63: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | select[i][j] = min(select[i-1][(j+2)%3],select[i-1][(j+1)%3]) + price[i][j];\n | ^\ncc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]\nMain.cpp:21:72: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | select[i][j] = min(select[i-1][(j+2)%3],select[i-1][(j+1)%3]) + price[i][j];\n | ^\nMain.cpp:21:75: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | select[i][j] = min(select[i-1][(j+2)%3],select[i-1][(j+1)%3]) + price[i][j];\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~\nMain.cpp:21:26: error: assignment of read-only location \u2018*(select + (((sizetype)i) + ((sizetype)j)))\u2019\n 21 | select[i][j] = min(select[i-1][(j+2)%3],select[i-1][(j+1)%3]) + price[i][j];\n | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nMain.cpp:24:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 24 | cout<<min({select[n-1][0],select[n-1][1],select[n-1][2]});\n | ^\ncc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]\nMain.cpp:24:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 24 | cout<<min({select[n-1][0],select[n-1][1],select[n-1][2]});\n | ^\nMain.cpp:24:41: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 24 | cout<<min({select[n-1][0],select[n-1][1],select[n-1][2]});\n | ^\ncc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]\nMain.cpp:24:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 24 | cout<<min({select[n-1][0],select[n-1][1],select[n-1][2]});\n | ^\nMain.cpp:24:56: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 24 | cout<<min({select[n-1][0],select[n-1][1],select[n-1][2]});\n | ^\ncc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]\nMain.cpp:24:59: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 24 | cout<<min({select[n-1][0],select[n-1][1],select[n-1][2]});\n | ^\n", "stdout
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.