KCON PROBLEM

WHY I AM NOT GETTING AC
HERE IS MY CODE
https://www.codechef.com/viewsolution/27871758
PROBLEM LINK https://www.codechef.com/problems/KCON/