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 |
还能优化一点点,最后可以0msIn Reply To:Re:Time Limit Exceed 哪位高人给个好的算法 Posted by:wrong123 at 2006-01-06 21:35:19 降排序后计算remain时,一般都是倒序逐位相加,这里可以稍微优化。 因为题目有条件,不能>capacity, 这样一来使得remain减小,加强了剪枝。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator