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 |
排序了确实快了一点,但还不知道还有什么可剪的,来看看我的剪法。In Reply To:你们暴搜就0MS,我暴搜就TLE,看来我搜得太暴了。 Posted by:ImLazy at 2005-10-28 21:39:02 我就是DFS的每一层中把每根还没取过的棍都取一遍(长度一样的不重复取),如果与以前取的加起来大于我要的长度,那么这一枝就剪掉;如果等于我要的长度,那么把以前取的长度清零,继续DFS;如果小于,也继续DFS。 还有哪里可以剪呢? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator