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 CodeChef: Practical coding for everyone.
1 Like
Thanks bro! Silly meπ€¦ββοΈ