摘要: #include #include #include #define N 100010 using namespace std; typedef long long LL; int a[N]; //原数组 int sorted[N]; //排序好的数组 //是一棵树,但把同一层的放在一个数组里。 int num[20][N]; //num[i] 表示i前面有多少个点进入左孩子 ... 阅读全文
posted @ 2018-04-02 19:41 楼主好菜啊 阅读(195) 评论(0) 推荐(1) 编辑
摘要: 推荐博客 : https://www.cnblogs.com/hchlqlz-oj-mrj/p/5744308.html 划分树,类似于线段树,是一个完全二叉树,主要可以用来求解区间第K大元素,时间复杂度为 logn, 快排也可以实现这个操作,但是会改变原序列,就需要每次操作后在复原。 下面给出一棵 阅读全文
posted @ 2018-04-02 19:40 楼主好菜啊 阅读(307) 评论(0) 推荐(1) 编辑