cf/mirror

Drunken Maze

CF
2041D1700· expert2s1024 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
7 12
############
#S........T#
#.########.#
#..........#
#..........#
#..#..#....#
############
Output
15
Sample 2of 3
Input
5 8
########
#......#
#.####.#
#...T#S#
########
Output
14
Sample 3of 3
Input
5 8
########
#.#S...#
#.####.#
#...T#.#
########
Output
-1
2041D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…