从起点 S 走到终点 T,每走一步层数加一。求最早到达终点的是第几层。
S
T
输入迷宫。
输出最早到达终点的层数。
1≤n,m≤301\le n,m\le 301≤n,m≤30
3 3 S.. .#. ..T
4
使用您的 www.mathcoding.online 通用账户