spoj.pl/problems/MAZE/
I am getting consistently wa.
My approach is simple -for every cell I have 4 states that represent which direction you reach this cell from & based on type of cell , I decide which all states are neighbours of any state. I then do a simple bfs.
Could anyone point out the mistake in the approach or give some test cases ?
Thanks.