摘要: 1 /*堆排序*/ 2 //根节点元素自顶向下移动到合适的位置以构成最大堆 3 void downToMaxHeap(vector<int> &arr, int bgn, int end) 4 { 5 int child; 6 int parent = bgn; 7 8 /*假根节点向下移动至合适的 阅读全文
posted @ 2019-10-13 21:41 ljy3268 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 using namespace std; 5 int a[120],tmpa[120]; //记录节点 6 int tong[20],poi[20]; //表示桶和每个位数是i 阅读全文
posted @ 2019-10-13 21:18 ljy3268 阅读(88) 评论(0) 推荐(0) 编辑