Problem dijkstra
User kxd
Submission Time 2024-09-06 23:18:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:34:16: error: no matching function for call to ‘std::vector<std::pair<long long int, long long int> >::emplace_back(<brace-enclosed initializer list>)’
34 | G[x].pb({y,d});
| ^
In file included from /usr/include/c++/9/vector:72,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from dijkstra.cpp:1:
/usr/include/c++/9/bits/vector.tcc:109:7: note: candidate: ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {}; _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::vector<_Tp, _Alloc>::refer