My code for this problem keeps getting WA. I really can’t find the bug that is causing the issue. I would really appreciate it if someone could take a look at my code and point me towards the error.
Thanks.
Here is the link to my code:
https://www.codechef.com/viewsolution/31968645