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:有用C写过的没??怎么写不超时啊???我写的超时,郁闷,牛子指点下

Posted by o0Fancy0o at 2009-09-22 22:58:04 on Problem 2833
In Reply To:有用C写过的没??怎么写不超时啊???我写的超时,郁闷,牛子指点下 Posted by:bootshl at 2008-07-26 13:23:25
用优先队列是正解,你的算法关键是找最大最小时冗余太多,每次都要调用qsort函数,用优先队列比较一次就能判断是否符合要求

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