why wrong ans ...i tried all possible test case i can think

http://www.codechef.com/COOK47/problems/PNTNG
my solution is
http://www.codechef.com/viewsolution/4132102 plz help me…