PriorityQueue(_InputIterator __first, _InputIterator __last, const _Compare& __comp = _Compare(), const _Sequence& __s = _Sequence(), const _Map& __m = _Map()) : c(__s), m(__m), comp(__comp) { c.insert(c.end(), __first, __last); make_heap(c.begin(), c.end(), comp); }
explicit PriorityQueue(const _Compare& __comp = _Compare(), const _Sequence& __s = _Sequence(), const _Map& __m = _Map()) : c(__s), m(__m), comp(__comp) { make_heap(c.begin(), c.end(), comp); }
iterator end() { return c.end(); }
const_iterator end() const { return c.end(); }
void make_heap() { std::make_heap(c.begin(), c.end(), static_cast<_Compare&>(*this)); }
void pop() { std::pop_heap(c.begin(), c.end(), static_cast<_Compare&>(*this)); c.pop_back(); }
void push(const value_type& x) { c.push_back(x); std::push_heap(c.begin(), c.end(), static_cast<_Compare&>(*this)); }
void pop() { pop_heap(c.begin(), c.end(), comp); c.pop_back(); }
void push(const value_type& __x) { c.push_back(__x); push_heap(c.begin(), c.end(), comp); }