![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
排序
gravii
中二的高阶版
展开
-
Poj 2388 Who's in the Middle 寻找第k大数
FJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as much or more than the median; half give as much or less. G原创 2016-11-13 22:02:53 · 281 阅读 · 0 评论 -
P党独有的qsort
博客新人起步,先来一个随机化快排试试手吧。const maxn=1000000;var n,i:longint; a:array[1..maxn] of longint;procedure qsort(l,r:longint);var mid,x,i,j:longint;begin randomize; mid:=random(r-l+1)+l; x:=a[mi原创 2016-11-12 23:27:01 · 235 阅读 · 0 评论