-->
当前位置:首页 > 题库

PROGRAMMING:Save xiaoyugan

Luz5年前 (2021-05-10)题库406
One day, the pickled fish went to the maze alone. But the little fish with a bad sense of direction soon got lost. The salted fish cherishing her hair immediately went to rescue her helpless friend. Of course, salted fish come prepared. They have made clear the map of the labyrinth. Now salted fish need to save Jiyou as soon as possible. Can you help him?
###Input format:
The first line has two numbers n, M. N is the row of the maze and M is the column of the maze. The next n rows and m columns are mazes, with 0 for open space and 1 for obstacles. There are four numbers in the last row, and the first two numbers are the X and Y coordinates of the entrance to the maze. The last two are the X and Y coordinates of xiaoha.
###Output format:
Output the shortest number of steps
###Input example:
Here is a set of inputs. For example:
```in
5 4
0 0 1 0
0 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1
1 1 4 3
```
###Output example:
The corresponding output is given here. For example:
```out
seven
```







answer:If there is no answer, please comment