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 |
Re:有用C写过的没??怎么写不超时啊???我写的超时,郁闷,牛子指点下In Reply To:有用C写过的没??怎么写不超时啊???我写的超时,郁闷,牛子指点下 Posted by:bootshl at 2008-07-26 13:23:25 用优先队列是正解,你的算法关键是找最大最小时冗余太多,每次都要调用qsort函数,用优先队列比较一次就能判断是否符合要求 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator