sequence blank 空白页
Removed additional blank activities and sequence.
移除额外的空活动和序列。
Then print a single line containing the minimal number of swaps of adjacent numbers that are necessary to sort the given sequence. Terminate the output for the scenario with a blank line.
还有一种方法是求数列的逆序数,因为根据题目所给条件,逆序数就是交换次数,代码一并贴出。
应用推荐