NZEC Runtime Error Java

This is my first attempt to solve problem at codechef. I am getting NZEC Runtime error.I tried everything i could to get rid of the error but i am unable to understand why the error exists. Please if you could help me solve the problem.

Here is my code.

code deleted