Print maze path d2

https://ide.codingblocks.com/s/37152

https://hack.codingblocks.com/contests/c/512/382

2 test cases are wrong i dont know why

In the question it is mentioned that

But the diagonal step is allowed only when the player is currently on one of the diagonals (there are two diagonals)

Please read question more carefully.

In your code, you have checked condition only for one of the diagonals, ie row==col

But there can be a second diagonal also.
You need to check condition for it as well.