Little Dwayne

Little Dwayne Johnson is hosting a programming contest. A lot of teams mail him everyday to ask abou…

Click here to read the complete problem statement.

If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

Might there be a problem in the dataset? My last JS solution (not the previous ones, they were incorrect) is similar to the CPP solution from which I got AC. (Or, I might have made any mistake that I currently can’t figure out.)

Would love to hear back, anyway. Thanks!