Escape the Datacenter
250 points · 0 solved
The first line is R C (1 ≤ R, C ≤ 200). The next R lines are the map: . floor, # rack, S start, E exit (exactly one of each). Moving up, down, left or right costs one step. Print the fewest steps from S to E, or -1 if it's unreachable.
Example 1 input
3 4 S..# .#.. ...E
Expected output
5
main.py
Ctrl+Enter runs · Ctrl+Shift+Enter submits