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 |
因为同一个点要走4个方向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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator