
STL C++
文章平均质量分 80
Grady_Ne
这个作者很懒,什么都没留下…
展开
-
PAT 1060 Are They Equal
Are They Equal If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123*105 with simple chopping. Now given t原创 2017-08-14 20:51:34 · 270 阅读 · 0 评论 -
priority_queue用法详解
一 priority_queue常用函数实例解析(1) push() push(x) 令x入队,时间复杂度为O(log N), 其中 N 为当前优先队列中元素的个数(2) top() 获得队首元素(即堆顶元素),时间复杂度为O(1).(3) pop() 令队首元素(即堆顶元素)出队,时间复杂度为O(log N).(4) empty() 检测优先队列是否为空,返回 true则空,返原创 2017-09-13 20:00:10 · 2586 阅读 · 0 评论