PROGRAMMING:Solving the path of maze from entrance to exit
Solve the path of maze from entrance to exit. Enter a maze to find the feasible path from the entrance to the exit. In order to simplify the problem, the maze uses two-dimensional array int maze [10] [10] to store the distribution of obstacles, assuming that the size of the maze's transverse and longitudinal dimensions are the same, and read by the program. If the value of the read maze size is n (3 < n < = 10), then the maze's transverse and longitudinal dimensions are n, and the outermost circle of the maze is an obstacle, and the maze's entrance is maze [1] [1], The exit is maze [n-2] [n-2]. If maze [i] [J] = 1, it means that the position is an obstacle. If maze [i] [J] = 0, it means that the position is a walkable vacancy (0 < = I < = n-1, 0 < = J < = n-1). Find the path from the entrance maze [1] [1] to the exit maze [n-2] [n-2]. The maze is only allowed to walk in the horizontal or up and down four directions of the space, the position can not be repeated, the rules must be right, down, left, up in the order of forward search.
This is a maze

The corresponding two-dimensional array represents:
int maze[10][10]={
{1,1,1,1,1,1,1,1,1,1},
{1,0,0,1,0,0,0,1,0,1},
{1,0,0,1,0,0,0,1,0,1},
{1,0,0,0,0,1,1,0,0,1},
{1,0,1,1,1,0,0,0,1,1},
{1,0,0,0,1,0,0,0,1,1},
{1,0,1,0,0,0,1,0,0,1},
{1,1,1,1,0,1,1,0,1,1},
{1,0,0,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1,1,1}};
###Input format:
Enter the integer n of maze size, and a two-dimensional array of N rows and N columns (array element 1 represents obstacles and 0 represents vacancies).
###Output format:
The row and column subscripts (I, J) of each position of the feasible path from entrance to exit are output in turn, and each position is separated by ",". If there is no channel, output: No.
###Input sample 1:
```in
four
1 1 1 1
1 0 1 1
1 0 0 1
1 1 1 1
```
###Output sample 1:
```out
(1,1)(2,1)(2,2)
```
###Input sample 2:
```in
ten
1 1 1 1 1 1 1 1 1 1
1 0 0 1 0 0 0 1 0 1
1 0 0 1 0 0 0 1 0 1
1 0 0 0 0 1 1 0 0 1
1 0 1 1 1 0 0 0 0 1
1 0 0 0 1 0 0 0 0 1
1 0 1 0 0 0 1 0 0 1
1 0 1 1 1 0 1 1 0 1
1 1 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1
```
###Output sample 2:
```out
(1,1)(1,2)(2,2)(3,2)(3,1)(4,1)(5,1)(5,2)(5,3)(6,3)(6,4)(6,5)(7,5)(8,5)(8,6)(8,7)(8,8)
```
answer:If there is no answer, please comment
This is a maze

The corresponding two-dimensional array represents:
int maze[10][10]={
{1,1,1,1,1,1,1,1,1,1},
{1,0,0,1,0,0,0,1,0,1},
{1,0,0,1,0,0,0,1,0,1},
{1,0,0,0,0,1,1,0,0,1},
{1,0,1,1,1,0,0,0,1,1},
{1,0,0,0,1,0,0,0,1,1},
{1,0,1,0,0,0,1,0,0,1},
{1,1,1,1,0,1,1,0,1,1},
{1,0,0,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1,1,1}};
###Input format:
Enter the integer n of maze size, and a two-dimensional array of N rows and N columns (array element 1 represents obstacles and 0 represents vacancies).
###Output format:
The row and column subscripts (I, J) of each position of the feasible path from entrance to exit are output in turn, and each position is separated by ",". If there is no channel, output: No.
###Input sample 1:
```in
four
1 1 1 1
1 0 1 1
1 0 0 1
1 1 1 1
```
###Output sample 1:
```out
(1,1)(2,1)(2,2)
```
###Input sample 2:
```in
ten
1 1 1 1 1 1 1 1 1 1
1 0 0 1 0 0 0 1 0 1
1 0 0 1 0 0 0 1 0 1
1 0 0 0 0 1 1 0 0 1
1 0 1 1 1 0 0 0 0 1
1 0 0 0 1 0 0 0 0 1
1 0 1 0 0 0 1 0 0 1
1 0 1 1 1 0 1 1 0 1
1 1 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1
```
###Output sample 2:
```out
(1,1)(1,2)(2,2)(3,2)(3,1)(4,1)(5,1)(5,2)(5,3)(6,3)(6,4)(6,5)(7,5)(8,5)(8,6)(8,7)(8,8)
```
answer:If there is no answer, please comment