在网格中从 S 到 T,每次只能走上下左右,求最少步数。
S
T
输入迷宫。
输出最少步数。无法到达输出 −1-1−1。
1≤n,m≤501\le n,m\le 501≤n,m≤50
3 3 S.. .#. ..T
4
使用您的 www.mathcoding.online 通用账户