Hello again, folks. I have been working on solving this problem.

with this code, http://www.codechef.com/viewsolution/4895180 I’ve been experiencing a WA. I even tried using a test case generator commented by another user, and the answers my code gave seemed to be correct,though i have no hard proof way of verifying that.

My code

Moreover, I also tested the time my code took for execution, and that’s just around 0m1.128s according to the time ./points < in.txt > out.txt command.