I haev worked on the code and it is working on all the random cases i put in.
Still gives a WA.
Here is my solution:
https://www.codechef.com/viewsolution/30740438
I haev worked on the code and it is working on all the random cases i put in.
Still gives a WA.
Here is my solution:
https://www.codechef.com/viewsolution/30740438