what is wrong with the code?

problem link:AMR16I Problem - CodeChef
solution link:CodeChef: Practical coding for everyone

Nothing wrong with the code try to debug it and find which error you have in code.According to cheap essay writing service some time we have those errors which we not found by debug try to check it manually.