Love for Chocolates Problem Help

Problem : https://www.codechef.com/problems/GKSMNLC
Solution : https://www.codechef.com/viewsolution/37686781

Why above solution is not accepted. I have done using bitmasking