
快排
my_acm
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 2388
Who's in the Middle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 31449 Accepted: 18269 Description FJ is surveying his herd to find the most average cow原创 2014-07-23 11:20:18 · 831 阅读 · 0 评论 -
log(n)时间内找出数组第i小的数字
参考算法导论9.2 R_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 · 1047 阅读 · 0 评论