I think TCs accept both solutions currently. I have pinged editorialist for that as soon as I understood David’s query. He’ll take it up from there I guess.
Thank you, for the reply. I had brought my post down after I understood the problem with my code. But I really felt the problem statement was a bit confusing during contest time. Anyway, have a good day!