DBOY: Getting wa

I am getting a wrong answer for the practice problem DBOY. Can anyone tell me the problem with my solution?.Please tell me test cases where my code dosen’t work .