HDU 1280 第M大数 堆的应用
摘要:
#include <iostream>#include<cstdlib>#include<cstdio>using namespace std;int N;int M;int sequence[3000];int order[3000];class Minheap{private: int* heap; int currentSize; int MaxHeapSize; void FilterDown(int start,int endOfheap) { int i=start; int j=2*i+1; int temp=heap[i]; while(j& 阅读全文
posted @ 2011-06-30 12:22 lonelycatcher 阅读(272) 评论(0) 推荐(0) 编辑