Confusion in piyush and magic park problem

sir /mam
what i understood was that at the time of escaping the park the energy should be>=k
it is nowhere written that if during walking in the park if his energy becomes <k he will not be able to make it
like i saw explanation of someone with this example
. . . .
. # . .


  • * *

they said answer should be no
because energy becomes k so i felt the answer should be yes

then i made the change in my code and i added this condition of breaking the loop whenever energy becomes <k and i got that first test case right which was wrong earlier but i didn’t got satisfied with the answer
plzz suggest me somethingg
moreover in this ques earlier there were many confusions regarding its starting and escaping positions and after encountering # what will happen exactly
the language isn’t very clear for this quess
plzz suggest me something for that energy thing i asked above

@yatin hey yatin go through this link it will help you to understand the problem.
link.

sir i have already read this
i have doubt in this
what i understood was that at the time of escaping the park the energy should be>=k
it is nowhere written that if during walking in the park if his energy becomes <k he will not be able to make it

@jaiskid yeah the maximum strength is greater than and equal to the minimum strength
and In the question the minimum strength =k
and maximum strength = s
so that s>=k if this satisfies Piyush can escape else not