Piyush and magical park problem

if row is blocked then i have to go back to row or just jump the next ;
and pls tell is we have to move from a[0][0] to a[n][n];
pls check the code;
https://ide.codingblocks.com/s/55189

Hi Ankush, if a row is blocked, then you have to jump to the next row. And yes, you have to check if Piyush can move from a[0][0] to a[n-1][m-1].
Also, in line number 6, the order of input should be r,c,k,s and not r,c,s,k.
I’ve corrected your code and you can refer to it here:
https://ide.codingblocks.com/s/56943

How can we move forward if road is blocked. The output should be NO as the last road is blocked.Please help

Sample input

4 4 5 20
. . * .
. # . .

    • . .
      . # * *

Sample Output

Yes
13

yes our test case is correct and i am also having same doubt
like in last row if test case is
#**.
answer must be no but coming yes

Mam can you please explain my test case

The solution you had attached it not valid for test case 1 and 4