Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
不是这样的In Reply To:Re:按score排序,,依次向下枚举中位数,在中位数上下两段各找出[n/2]个aid加起来最小的。。就用堆吧。。STL表现不错。185ms Posted by:y07yangruilong at 2008-03-13 20:43:01 按照score从高到低排序(高的在左面),再用一个堆和一个类似链表的东西。用堆存左面的N div 2个aid最小的,链表按照aid从小到大存右面的所有的,中间留一个。然后每次从右面拿一个score最大的弄出来,把原来中间的那个放到左面,然后更新一下……大概就这意思…… Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator