giving wrong answer for subtask = 1 for COUPON in LTIME01

please check my answer for COUPON in LTIME01.
it is giving wrong snswer for subtask 1 and right for all other subtask.
i have also matched the code with accepted solutions but unable to find error…

link :: www.codechef.com/viewsolution/2585970