2015年10月7日
摘要: #include using namespace std;void Maxheap(int *a,int i,int heapSize)//最大数调整{ int left=i*2+1;//i的左节点 int right=i*2+2; int largest;//中间变量 if... 阅读全文
posted @ 2015-10-07 17:09 Oneface 阅读(236) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int maxbit(int *a,int n){ int d=1;//一位 int p=10;//十进制 for(int i=0;i=p) { p*=10; ++d... 阅读全文
posted @ 2015-10-07 15:58 Oneface 阅读(198) 评论(0) 推荐(0) 编辑
摘要: #include #include//引入mallocusing namespace std;void Merge(int *a,int p,int q,int r)//p为起始,q为中,r为末{ int *left=NULL; int *right=NULL; int n1=q-... 阅读全文
posted @ 2015-10-07 10:19 Oneface 阅读(229) 评论(0) 推荐(0) 编辑