Given a maze with N rows and M columns, where bijb_{ij}bij represents the cell on the i-row, j-th column. If bi,j="1"b_{i, j} = texttt{"1"}bi,j="1", it's a wall and can't not be passed. If you are on the cell bi,jb_{i, j}bi,j, you can go to b(i+1),jb_{(i+1), j}b(i+1),j, bi,b_{i, (j-1)}bi,, or bi,(j+1)b_{i, (j+1)}bi,(j+1) as long as it's not a wall. Sometime, a cell may be changed into wall, or vise versa. You need to find out the number of way to pass through the maze starting at some given cell and finishing at some given cell. If the starting cell or finishing cell is a wall, there's clearly no way to pass through the maze. Note that you can't go back to the cell you just from.
Given a maze with N rows and M columns, where bijb_{ij}bij represents the cell on the i-row, j-th column. If bi,j="1"b_{i, j} = texttt{"1"}bi,j="1", it's a wall and can't not be passed. If you are on the cell bi,jb_{i, j}bi,j, you can go to b(i+1),jb_{(i+1), j}b(i+1),j, bi,(j−1)b_{i, (j-1)}bi,(j−1), or bi,(j+1)b_{i, (j+1)}bi,(j+1) as long as it's not a wall. Sometime, a cell may be changed into wall, or vise versa. You need to find out the number of way to pass through the maze starting at some given cell and finishing at some given cell. If the starting cell or finishing cell is a wall, there's clearly no way to pass through the maze. Note that you can't go back to the cell you just from.