실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018ll calculate_min_fatigue(const std::vector<int>&, const std::vector<long long int>&, int, int)\u2019:\nMain.cpp:22:21: error: invalid operands of types \u2018std::ios_base&(std::ios_base&)\u2019 and \u2018std::ios_base&(std::ios_base&)\u2019 to binary \u2018operator+\u2019\n 22 | int mid = (left + right) / 2;\n | ~~~~ ^ ~~~~~\n | | |\n | | std::ios_base&(std::ios_base&)\n | std::ios_base&(std::ios_base&)\nMain.cpp:23:19: error: invalid operands of types \u2018int\u2019 and \u2018std::ios_base&(std::ios_base&)\u2019 to binary \u2018operator-\u2019\n 23 | ll foo = (mid - left + 1) * position[right] - (position_prefix_sum[mid] - position_prefix_sum[left - 1]);\n | ~~~ ^ ~~~~\n | | |\n | int std::ios_base&(std::ios_base&)\nMain.cpp:23:42: error: invalid conversion from \u2018std::ios_base& (*)(std::ios_base&)\u2019 to \u2018std::vector<int>::size_type\u2019 {aka \u2018long unsigned int\u2019} [-fpermissive]\n 23 | ll foo = (mid - left + 1) * position[right] - (position_prefix_sum[mid] - position_prefix_sum[left - 1]);\n | ^~~~~\n | |\n | std::ios_base& (*)(std::ios_base&)\nIn file included from /usr/include/c++/11/vector:67,\n from Main.cpp:2:\n/usr/include/c++/11/bits/stl_vector.h:1061:28: note: initializing argument 1 of \u2018std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]\u2019\n 1061 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT\n | ~~~~~~~~~~^~~\nMain.cpp:23:104: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 23 | ll foo = (mid - left + 1) * position[right] - (position_prefix_sum[mid] - position_prefix_sum[left - 1]);\n | ~~~~~^~~\nMain.cpp:23:104: error: invalid conversion from \u2018std::ios_base& (*)(std::ios_base&)\u2019 to \u2018std::vector<long long int>::size_type\u2019 {aka \u2018long unsigned int\u2019} [-fpermissive]\n 23 | ll foo = (mid - left + 1) * position[right] - (position_prefix_sum[mid] - position_prefix_sum[left - 1]);\n | ~~~~~^~~\n | |\n | std::ios_base& (*)(std::ios_base&)\nIn file included from /usr/include/c++/11/vector:67,\n from Main.cpp:2:\n/usr/include/c++/11/bits/stl_vector.h:1061:28: note: initializing argument 1 of \u2018std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::const_reference = const long long int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]\u2019\n 1061 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT\n | ~~~~~~~~~~^~~\nMain.cpp:24:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 24 | ll bar = (right - mid + 1) * position[left] - (position_prefix_sum[right] - position_prefix_sum[mid - 1]);\n | ~~~~~~^~~~~\nMain.cpp:24:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]\n 24 | ll bar = (right - mid + 1) * position[l(...truncated, total 6698 characters, 1 lines)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.