Piyush and magical park

after iterating through both the loops we should check for success and if s>=k right? if there is a case such that the s becomes less than k at the last box then it fails.

yes @Jaiganesh-Jaiganesh-2448799961886280
you are right