Editorial for Back From Summer '17 P3: Basketball Dodgeball


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.

Author: kobortor

First, find the back-most player.

Next, use a queue to run Breadth-First-Search to find the shortest path from the back-most player to every other player. To find the possible edges, go from each player to each other player. If the distance from player A to player B is \leq r_A, then there is a directed edge from A to B.

Finally, compare the distances from the back-most player to the player with 9001 range.


Comments

There are no comments at the moment.