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

我用的逻辑是每次开始拼新的,都一定要用掉当前最长的一根棍。

Posted by gongml at 2005-10-29 15:09:23 on Problem 1011
In Reply To:排序了确实快了一点,但还不知道还有什么可剪的,来看看我的剪法。 Posted by:ImLazy at 2005-10-29 11:50:15
> 我就是DFS的每一层中把每根还没取过的棍都取一遍(长度一样的不重复取),如果与以前取的加起来大于我要的长度,那么这一枝就剪掉;如果等于我要的长度,那么把以前取的长度清零,继续DFS;如果小于,也继续DFS。
> 还有哪里可以剪呢?

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