I am getting WA in the following code. I tried most of the possible test cases and it is giving the correct answers but getting WA still. Can someone help me, what I am missing ?
Thanks in advance
link to problem : http://www.codechef.com/problems/MAXPR
link to code : http://www.codechef.com/viewsolution/4149667