실행 실패 (제출 코드 컴파일 에러)
{"success": false, "stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:21:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | sel[i][j] = min(select[i-1][(j+2)%3],sel[i-1][(j+1)%3]) + price[i][j];\n | ^\ncc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]\nMain.cpp:21:48: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 21 | sel[i][j] = min(select[i-1][(j+2)%3],sel[i-1][(j+1)%3]) + price[i][j];\n | ^\nMain.cpp:21:28: error: no matching function for call to \u2018min(int (&)(int, fd_set*, fd_set*, fd_set*, timeval*), int&)\u2019\n 21 | sel[i][j] = min(select[i-1][(j+2)%3],sel[i-1][(j+1)%3]) + price[i][j];\n | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIn file included from /usr/include/c++/11/bits/specfun.h:45,\n from /usr/include/c++/11/cmath:1935,\n from /usr/include/aarch64-linux-gnu/c++/11/bits/stdc++.h:41,\n from Main.cpp:1:\n/usr/include/c++/11/bits/stl_algobase.h:230:5: note: candidate: \u2018template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)\u2019\n 230 | min(const _Tp& __a, const _Tp& __b)\n | ^~~\n/usr/include/c++/11/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:\nMain.cpp:21:28: note: deduced conflicting types for parameter \u2018const _Tp\u2019 (\u2018int(int, fd_set*, fd_set*, fd_set*, timeval*)\u2019 and \u2018int\u2019)\n 21 | sel[i][j] = min(select[i-1][(j+2)%3],sel[i-1][(j+1)%3]) + price[i][j];\n | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIn file included from /usr/include/c++/11/bits/specfun.h:45,\n from /usr/include/c++/11/cmath:1935,\n from /usr/include/aarch64-linux-gnu/c++/11/bits/stdc++.h:41,\n from Main.cpp:1:\n/usr/include/c++/11/bits/stl_algobase.h:278:5: note: candidate: \u2018template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)\u2019\n 278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)\n | ^~~\n/usr/include/c++/11/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:\nMain.cpp:21:28: note: deduced conflicting types for parameter \u2018const _Tp\u2019 (\u2018int(int, fd_set*, fd_set*, fd_set*, timeval*)\u2019 and \u2018int\u2019)\n 21 | sel[i][j] = min(select[i-1][(j+2)%3],sel[i-1][(j+1)%3]) + price[i][j];\n | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIn file included from /usr/include/c++/11/string:52,\n from /usr/include/c++/11/bits/locale_classes.h:40,\n from /usr/include/c++/11/bits/ios_base.h:41,\n from /usr/include/c++/11/ios:42,\n from /usr/include/c++/11/istream:38,\n from /usr/include/c++/11/sstream:38,\n from /usr/include/c++/11/complex:45,\n from /usr/include/c++/11/ccomplex:39,\n from /usr/include/aarch64-linux-gnu/c++/11/bits/stdc++.h:54,\n from Main.cpp:1:\n/usr/include/c++/11/bits/stl_algo.h:3449:5: note: candidate: \u2018template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)\u2019\n 3449 | min(initializer_list<_Tp> __l)\n | ^~~\n/usr/include/c++/11/bits/stl_algo.h:3449:5: note: template argument deduction/substitution failed:\nMain.cpp:21:28: note: mismatched types \u2018std::initializer_list<_Tp>\u2019 and \u2018int (*)(int, fd_set*, fd_set*, fd_set*, timeval*)\u2019\n 21 | sel[i][j] = min(select[i-1][(j+2)%3],sel[i-1][(j+1)%3]) + price[i][j];\n | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIn file included from /usr/include/c++/11/string:52,\n from /usr/include/c++/11/bits/locale_classes.h:40,\n from /usr/include/c++/11/bits/ios_base.h:41,\n from /usr/include/c++/11/ios:42,\n from /usr/include/c++/11/istream:38,\n from /usr/include/c++/11/sstream:38,\n from /usr/include/c++/11/complex:45,\n from /usr/include/c++/11/ccomplex:39,\n from /usr/include/aarch64-linux-gnu/c++/11/bits/stdc++.h:54,\n from Main.cpp:1:\n/usr/include/c++/11/bits/stl_algo.h:3455:5: note: candidate: \u2018template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)\u2019\n 3455 | min(initializer_list<_Tp> __l, _Compare __comp)\n | ^~~\n/usr/include/c++/11/bits/stl_algo.h:3455:5: note: template argument deduction/substitution failed:\nMain.cpp:21:28: note: mismatched types \u2018std::initializer_list<_Tp>\u2019 and \u2018int (*)(int, fd_set*, fd_set*, fd_set*, timeval*)\u2019
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.