Why my solution is WRONG? (September Cook Off (BULBS))

Problem link :-https://www.codechef.com/COOK122B/problems/BULBS

My solution:- https://www.codechef.com/viewsolution/38149454

I am not getting why my solution is getting Wrong Answer even after watching the editorial video of codechef.
please help…