题目来源:http://bailian.openjudge.cn/practice/2299/
2299:Ultra-QuickSort
总时间限制: 7000ms 内存限制: 65536kB
描述
In this problem, you have to analyze a particular sortingalgorithm. The algorithm processes a sequence of n distinct integers byswapping two adjacent sequence elements until the sequence is sorted inascending order. For the input sequence
9 1 0 5 4 ,
Ultra-QuickSort produces the output
0 1

该博客分析了一种特殊的排序算法——Ultra-QuickSort,要求计算其对给定序列进行排序所需的最小交换操作次数。给出了输入输出示例,并提到解题思路是通过归并排序来同时计算逆序对的数量。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



