Problem | medianheap |
---|---|
User | JhoCyber |
Submission Time | 2025-01-30 12:18:50 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
medianheap.cpp: In function ‘int32_t main()’:
medianheap.cpp:38:37: error: invalid use of non-static member function ‘std::priority_queue<_Tp, _Sequence, _Compare>::const_reference std::priority_queue<_Tp, _Sequence, _Compare>::top() const [with _Tp = long long int; _Sequence = std::vector<long long int, std::allocator<long long int> >; _Compare = std::greater<long long int>; std::priority_queue<_Tp, _Sequence, _Compare>::const_reference = const long long int&]’
38 | left.push(right.top);
| ~~~~~~^~~
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from medianheap.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:612:7: note: declared here
612 | top() const
| ^~~
medianheap.cpp:45:17: error: cannot convert ‘std::priority_queue<long long int>::empty’ f