CHEFRECP - Can anyone please tell me what is wrong with my code?

https://www.codechef.com/viewsolution/33324778