堆排序的三种优先级设置方法——落谷P2085

堆排序时间复杂度为O(nlogn)与快速排序时间复杂度相同,且不会退化,快排会退化。 原题:https://www.luogu.org/problemnew/show/P2085 非堆排序解法: #include<bits/stdc++.h> using namespace std; int main() { int n,m,i,j,cmin,jmin; int A[10010],B[1001
相关文章
相关标签/搜索