실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘std::pair<int, std::vector<std::vector<int> > > shortest(int, int, int, std::vector<std::vector<std::pair<int, int> > >)’: Main.cpp:31:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::pair<int, int> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 31 | for (int i=0; i<edges.at(current_node).size(); i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Main.cpp:39:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare] 39 | if (new_cost < costs[new_node]) | ~~~~~~~~~^~~~~~~~~~~~~~~~~ Main.cpp:45:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare] 45 | else if (new_cost == costs[new_node]) | ~~~~~~~~~^~~~~~~~~~~~~~~~~~ Main.cpp:54:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare] 54 | if (new_cost <= costs[new_node]) | ~~~~~~~~~^~~~~~~~~~~~~~~~~~ Main.cpp: In function ‘int main()’: Main.cpp:105:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 105 | for (int i=0; i<first.second.at(to).size(); i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~ Main.cpp:112:41: error: expected ‘;’ before ‘}’ token 112 | blocked[from][to] = true | ^ | ; ...... 124 | } | ~ In file included from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algobase.h: In instantiation of ‘constexpr typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = bool (*)[500]; _Tp = bool; typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type = void]’: /usr/include/c++/11/bits/stl_algobase.h:969:21: required from ‘constexpr void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = bool (*)[500]; _Tp = bool]’ /usr/include/c++/11/bits/stl_algobase.h:999:20: required from ‘constexpr void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = bool (*)[500]; _Tp = bool]’ Main.cpp:68:13: required from here /usr/include/c++/11/bits/stl_algobase.h:924:18: error: incompatible types in assignment of ‘const bool’ to ‘bool [500]’ 924 | *__first = __tmp; | ~~~~~~~~~^~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.