Test cases running on pc but codechef doesnt accept

http://www.codechef.com/viewsolution/5065745