Now, when I submitted the same code: http://www.codechef.com/viewsolution/4393778 the result was AC with 100p. Can someone please explain why this happens and what is the right thing to do?
Your first submission was not WA. In your submissions page it shows Internal error, though dont know what is the actual reason behind this. (Also in your solution page the status is β??β )