Problem | dijkstra |
---|---|
User | r1r2r3r4 |
Submission Time | 2025-07-30 16:08:29 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:25:19: error: 2 names provided for structured binding
25 | for (auto [v, w] : a[u]) {
| ^~~~~~
dijkstra.cpp:25:19: note: while ‘std::vector<int>’ decomposes into 1 element
dijkstra.cpp:28:37: error: no matching function for call to ‘std::priority_queue<std::pair<long long int, long long int>, std::vector<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> > >::push(<brace-enclosed initializer list>)’
28 | pq.push({dist[v], v});
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from dijkstra.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:627:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(c