Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:按score排序,,依次向下枚举中位数,在中位数上下两段各找出[n/2]个aid加起来最小的。。就用堆吧。。STL表现不错。185ms

Posted by y07yangruilong at 2008-03-13 20:43:01 on Problem 2010 and last updated at 2008-03-13 22:04:53
In Reply To:按score排序,,依次向下枚举中位数,在中位数上下两段各找出[n/2]个aid加起来最小的。。就用堆吧。。STL表现不错。185ms Posted by:hysramp at 2008-02-15 21:03:45
我写了,好像超时啊,每次都要提取(n-1)/2个最小值复杂度不是O(C*NlgN)吗??这样不会超时吗?

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator