Which test cases make my code fail?

Can anyone tell me for which test cases my code https://www.codechef.com/viewsolution/28567044 for problem https://www.codechef.com/ZCOPRAC/problems/ZCO12002 fails?
I made some changes on line 24 & 32 and did get a working solution https://www.codechef.com/viewsolution/28567099 but I have no idea why it works now and didn’t work before.
Can anyone tell me where I can get the test cases to this problem from?

Edit: Sorry for the really messy code.