Problem car
User Usu
Submission Time 2026-02-17 23:04:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

car.cpp: In function ‘long long int dijkstra(long long int, long long int)’:
car.cpp:23:13: error: ‘mx’ was not declared in this scope
23 | mx=max(currmax,edge.second);
| ^~
car.cpp:26:41: 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>)’
26 | pq.push({mx, edge.first});
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from car.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:627:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<long long int, long l