Can anyone help me to identify where I am wrong for the problem : http://codeforces.me/contest/747/problem/C
here is my solution which fails on the test case 9. I am unable to identify the mistake.
http://codeforces.me/contest/747/submission/25716217
Thank you.