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

看大牛的报告过的,原来我们采用的dfs是不同的,之前我的一直tle。

Posted by cug_fish2008 at 2010-05-05 15:22:14 on Problem 1419
应该是将顶点序号大小作为搜索顺序,
而我采用一般的按图的搜索进行。
这样的话就是n^n,因为每次都会扩展n个节点。
而顺序搜索则需扩展2个节点即可,2^n。
在加上剪枝,时间还是很客观的。

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