花费 35 ms
C++优先队列的重载(最小堆、最大堆)

C++优先队列默认是最大堆,所以如果我们要用到最小堆,就需要进行重载来使用。 priority_queue的头文件是<queue>. 1.less和greater,不利用struct进 ...

Thu Sep 06 22:22:00 CST 2018 0 869

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM