摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4941Magical ForestDescriptionThere is a forest can be seen as $N * M$ grid. In this forest, there is som... 阅读全文
posted @ 2015-07-04 18:24 GadyPu 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯了,否则她会晕倒的。我们假定给定的两个位置都是空地,初始时,gloria所面向的方向未定,她可以选择4个方向的任何一个出发,而不算成一次转弯。gloria能从一个位置走到另外一个位置吗? 阅读全文
posted @ 2015-07-04 14:07 GadyPu 阅读(164) 评论(0) 推荐(0) 编辑