摘要: View Code 1 /** 2 * 大根堆。从STL中获得。 3 */ 4 5 #include <iostream> 6 #include <ctime> 7 #include <cmath> 8 #include <cstdlib> 9 10 using namespace std; 11 12 void _push_heap(int *start, int holeIndex, int topIndex, int value) 13 { 14 int parent = (holeIndex - 1) / 2; 15 while (hol 阅读全文
posted @ 2013-04-10 21:31 life91 阅读(153) 评论(0) 推荐(0) 编辑