How do I solve an NZEC runtime error in C++?

I was writing a code on codechef and an NZEC error was coming. I googled NZEC and it said that its because of a missing return 0 statement but I have included a return statement in my code. Can anyone please help?
Code:
https://www.codechef.com/viewsolution/26583214