poj 3083 Children of the Candy Corn(bfs+dfs)

Input to this problem will begin with a line containing a single integer n indicating the number of mazes. Each maze will consist of one line with a width, w, and height, h (3 <= w, h <= 40), followed by h lines of w characters each that represent the maze layout. Walls are represented by hash marks (‘#’), empty space by periods (‘.’), the start by an ‘S’ and the exit by an ‘E’.Exactly one ‘S’ and one ‘E’ will be present in the maze, and they will always be located along one of the maze edges and never in a corner. The maze will be fully enclosed by walls (‘#’), with the only openings being the ‘S’ and ‘E’. The ‘S’ and ‘E’ will also be separated by at least one wall (‘#’). You may assume that the maze exit is always reachable from the start point.

,我们一路上兴致勃勃地参观,当夕阳西下时,才恋恋不舍地离开。

poj 3083 Children of the Candy Corn(bfs+dfs)

相关文章:

你感兴趣的文章:

标签云: