Piyush and Magical Park

Can you please explain the test case

@17uec133 https://ide.codingblocks.com/s/70457
Refer this to understand the sample test case.

why we are subtracting 1 from (1, 0) position? we are not shifting right in this case

We move one step ahead to (1,1) which will cost 1 and then encounter a #. This is why we subtract 1.