摘要: //by zxfx100//(sizeof a = n) && (heap = a[1..n]) && (a[0] is null) && (range is int)class MaxHeap{public:int a[32768], n;void build(){ n = 0;}void insert(int element){ a[++n] = element; int i = n; while(i > 1) { int j = i >> 1; if(a[i] > a[j]) swap(a[i], a[j])... 阅读全文
posted @ 2013-04-04 23:23 zxfx100 阅读(177) 评论(0) 推荐(0) 编辑