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+BFS+剪枝()In Reply To:问问:每次找到最近的然后依次递归下去是不是错的? 这是贪心是不对的吧?应该找整体最优解而不是每次局部最优解? Posted by:20091101579 at 2011-08-05 17:30:34 因为DFS要找连接所有结点最小的距离 如果 当前累加的距离 大于 前面已经计算好的最小的距离,那么就没有必要向后计算,直接放弃 即可 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator