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

因为同一个点要走4个方向

Posted by haqishen at 2015-01-11 14:22:37 and last updated at 2015-01-11 14:23:41
In Reply To:poj3009为什么撞到石头后,把1变成0,然后递归dfs,后又要把0还原成1? Posted by:184762651 at 2015-01-10 15:55:16
假设你先往上走,撞掉了正上方的一块石头。然后接下来是死路,你需要返回这个点从新选择方向。
但是走下面3个方向之前,没还原上面那块石头的话,就造成了你走其他3个方向也撞掉了正上方的石头的情况。自然得出的最终结果就可能是错误的了

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