摘要: #include #include using namespace std;#define N 1000001int a[N],n;void headjust(int i,int size){ int left = i * 2,right = left + 1; int max = i; if(i a[max]) max = left; if(right a[max]) max = right; if(max != i) { swap(a[i],a[max]); ... 阅读全文
posted @ 2013-07-23 15:12 fly_lovelove 阅读(192) 评论(0) 推荐(0) 编辑