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

Re:此题不需要判重同样可以ac~看了很多网上的题解,都判重,其实不需要,因为后面搜到的节点不可能变得更短,A*和bfs的区别就在这里~

Posted by xc19881023 at 2016-04-29 13:27:52 on Problem 3635
In Reply To:此题不需要判重同样可以ac~看了很多网上的题解,都判重,其实不需要,因为后面搜到的节点不可能变得更短,A*和bfs的区别就在这里~ Posted by:xc19881023 at 2016-04-29 13:23:15
如果不放心的话,可以采取A*的标准写法——判重,但是如果已经访问过了,看看能不能变得更短,如果能的话,重新召回优先队列~

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