思考题 for nobody
You are given a graph of N*M grids. Each grid can be a wall 'X',a path'.' or unknown '?'
One grid is the start point 'S' and one grid is the end point 'E'
Now we change the '?' randomly to 'X' or '.' and run shortest path from S to E. (4 directions walking)
What's the expected length of route from S to E if we ignore the unreachable situation.
If impossible, print -1.
Could be -
Subtask 1(90%) 1<=n,m<=4
Subtask 2(10%) 1<=n,m<=1000
Orange boy come and get AC quickly. Although this looks like an impossible problem