실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘void dijkstra(int)’: Main.cpp:16:24: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘first’ 16 | pq.push({ v[0].first , v[0].second }); | ^~~~~ Main.cpp:16:37: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘second’ 16 | pq.push({ v[0].first , v[0].second }); | ^~~~~~ Main.cpp:16:16: error: no matching function for call to ‘std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)’ 16 | pq.push({ v[0].first , v[0].second }); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/queue:64, from Main.cpp:4: /usr/include/c++/11/bits/stl_queue.h:640:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]’ 640 | push(const value_type& __x) | ^~~~ /usr/include/c++/11/bits/stl_queue.h:640:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type&’ {aka ‘const std::pair<int, int>&’} 640 | push(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/11/bits/stl_queue.h:648:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]’ 648 | push(value_type&& __x) | ^~~~ /usr/include/c++/11/bits/stl_queue.h:648:25: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::value_type&&’ {aka ‘std::pair<int, int>&&’} 648 | push(value_type&& __x) | ~~~~~~~~~~~~~^~~ Main.cpp:29:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::pair<int, int> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 29 | for (int i = 0; i < v[node2].size(); i++) | ~~^~~~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.