I did this problem on CodeForces
Link-https://codeforces.com/contest/1422/problem/B
Code Link-https://ide.codingblocks.com/s/350460
My code is working fine for many test cases but also failing for some.It would be really nice if you could help me with this.I dry run my logic it was working fine and I have no idea why it’s failing.
