PPTEST Polo the Penguin and the Test

http://www.codechef.com/viewsolution/4106938 My code gives correct solution for the same test case. I used greedy approach. But the submission got failed telling ‘Wrong Answer’ . what is the problem with my code?

//