Problem lostones
User G
Submission Time 2024-12-21 10:49:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lostones.cpp: In function ‘int main()’:
lostones.cpp:14:3: error: ‘a’ was not declared in this scope
14 | a=pq.top();
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from lostones.cpp:1:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Value = std::pair<long long int, long long int>; _Compare = std::greater<long long int>]’:
/usr/include/c++/9/bits/stl_heap.h:133:48: required from ‘void std::__push_heap(_RandomAccessIterator, _Distance, _Dis