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 |
如果你某个点走了多次还找到了这种带环的“最短路径”,只能说你dfs写错了In Reply To:DFS是不对的,因为DFS的话找到的一条路径每个点只能走一次,而可能找到最短路径的末个点会走多次,比如这组数据 Posted by:xiaolonghingis at 2006-08-11 14:22:22 dfs本身并没有错 回溯+剪枝,只是效率低,和正确性没有关系 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator