摘要: 小根堆#include <iostream>#include <stdio.h>#define M 20002using namespace std;int A[M],len;void Min_Heap(int i){ int l=i<<1,r=l+1; int temp,least=i; if(l<=len&&A[l]<A[i]) { least=l; } if(r<=len&&A[r]<A[least]) { least=r; } if(least<=len&&least!=i 阅读全文
posted @ 2011-11-06 22:51 qijinbiao1 阅读(288) 评论(0) 推荐(0) 编辑