![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
快排
my_acm
这个作者很懒,什么都没留下…
展开
-
poj 2388
Who's in the MiddleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 31449 Accepted: 18269DescriptionFJ is surveying his herd to find the most average cow原创 2014-07-23 11:20:18 · 781 阅读 · 0 评论 -
log(n)时间内找出数组第i小的数字
参考算法导论9.2R_Select(int *a,int p,int r,int i){ if(p==r) return a[p]; int q=partition(a,p,r); int k=q-p; if(i==k) return a[q]; else if(i<k) return R_Select(a原创 2014-07-23 12:29:20 · 995 阅读 · 0 评论