Getting wrong ans in HELPLIRA ?

http://www.codechef.com/viewsolution/3150194
Please tell me which case or point am I missing.

Hello,

I would suggest you read the editorial careful and check for the basic things…

For instance, just by simple inspection, it seems that you are missing a new line when printing answers…

Good luck,

Bruno

//