priority_queue大小根堆
时间: 2023-10-19 15:26:12 浏览: 104
STL_quene.rar_crowd7oc_优先队列 堆_大根堆_大根对 c++_小根堆
priority_queue是一个容器适配器,它定义了一个元素有序排列的队列。默认情况下,它使用大根堆来实现,也就是队列头部的元素优先级最高。可以使用成员函数size()来获取priority_queue中存储元素的个数。所以,priority_queue的大小就是它中存储元素的个数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [堆——神奇的优先队列 大根堆小根堆详解,附小根堆C++代码实现与STL相关](https://blog.csdn.net/q2453303961/article/details/123935789)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文