![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
逆序数
文章平均质量分 65
limchiang
这个作者很懒,什么都没留下…
展开
-
逆序数对(nlogn)
http://poj.org/problem?id=2299 分析一个特定的排序算法。这一算法通过交换相邻的两个数来处理一个由不同整数组成的数列,直到数组升序排好序为止。 Your task is to determine how many swap operations it needs to perform in order to sort a given input sequen原创 2012-12-08 21:38:56 · 320 阅读 · 0 评论 -
逆序数对 (常规)
http://acm.hdu.edu.cn/showproblem.php?pid=1394 求下列数列中逆序数对最少的一个,并求出逆序数对数量?(n ) a1, a2, ..., an-1, an a2, a3, ..., an, a1 a3, a4, ..., an, a1, a2 ... an, a1, a2, ..., an-1 #pragma warning (d原创 2012-12-08 21:26:57 · 220 阅读 · 0 评论