Partially accepted solution (FROGS), Feb Long Challenge 2021

Hi all! Can anyone please help find the mistake in my code. I keep getting WA for subtask 2. I guess I am missing some boundary condition. Here is my submission
My submission

Line 30 of your solution should be pos[i]<=pos[i-1]. Fixing that your solution gives the correct answer Solution: 42849839 | CodeChef.

1 Like

Thanks bro! Silly meπŸ€¦β€β™‚οΈ