This is the problem: https://www.codechef.com/ZCOPRAC/problems/ZCO13003
This is my solution: https://ideone.com/cz06mj
I seem to pass all test cases except one, the last one!
Sorry if I seem to be asking every question on the forum, but getting to know the fault in the codes will help me be an ace in ZCO. I appreciate all the help provided by the forum.
Thanks for all the help!