Cardinality Wrong Answer

somebody please explain why this is giving wrong answer

qusetion link http://www.codechef.com/ACMKAN13/problems/CARDINAL

code link https://ideone.com/PuMKLw

thanks

//