I use the same logic as the editorial suggests, calculating the max distance to which each frog can transmit its message, and then frogs with equal maximum distance can communicate. But I am getting WRONG ANSWER.
It would be really helpful if I could get some test cases where my code fails. Thanks.
Your code doesn’t fail! Just remove the useless printf statements!
1 Like
Thanks, that was really silly of me.
1 Like