Dijkstros algoritmas

Taškai: 0

Compile: FAIL

dijkstra.cpp: In function ‘int main()’: dijkstra.cpp:20:11: error: no matching function for call to ‘std::priority_queue<std::pair<long long int, int> >::push(int)’ 20 | q.push(0); | ~~~~~~^~~ In file included from /usr/include/c++/11/queue:64, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86, from dijkstra.cpp:1: /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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int>, std::allocator<std::pair<long long int, int> > >; _Compare = std::less<std::pair<long long int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<long long 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 ‘int’ to ‘const value_type&’ {aka ‘const std::pair<long long 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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int>, std::allocator<std::pair<long long int, int> > >; _Compare = std::less<std::pair<long long int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<long long 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 ‘int’ to ‘std::priority_queue<std::pair<long long int, int> >::value_type&&’ {aka ‘std::pair<long long int, int>&&’} 648 | push(value_type&& __x) | ~~~~~~~~~~~~~^~~

nr.resulttimemessage