Problem sightseeing
User justin271828
Submission Time 2024-10-04 19:12:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sightseeing.cpp: In function ‘int main()’:
sightseeing.cpp:26:11: error: no matching function for call to ‘std::priority_queue<int>::push(std::pair<int, int>&)’
26 | pq.push(p);
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from sightseeing.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 = int; _Sequence = std::vector<int>; _Compare = std::less<int>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = int]’
627 | push(const value_type& __x)
| ^~~~
/usr/include/c++/9/bits/stl_queue.h:627:30: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘const value_type&’ {aka ‘const int&’}
627 | push(const value_type& __x)
|