### rgame27's blog

By rgame27, history, 3 years ago, ,

This is my attempt at the question:

http://codeforces.com/contest/793/submission/27930364

As I couldn't see the test case for which it is failing I was scrolling through other solutions and found 1 that is very similar, but that has passed. Any help with telling me why mine fails?

Similar solution that passes: http://codeforces.com/contest/793/submission/27902199

• -2

 » 3 years ago, # |   +3 Here is a test case your code fail: 3 4 S... ...* .*.T basically, you are checking whether a grid is visited or not, but not the direction in which it is travelling. So you will need 1 more dimension for the direction. (something like v[i][j][dir] instead)