Problem 1068 --广度优先搜索模板题(含参考答案)-回家

1068: 广度优先搜索模板题(含参考答案)-回家

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 18  Solved: 13
[Submit][Status][Web Board][Creator:]

Description

Input

Output

Sample Input

8 10
P.####.#P#
..#..#...#
..#T##.#.#
..........
..##.#####
..........
#####...##
###....S##

Sample Output

21

HINT









Source

[Submit][Status]