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.
                Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
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  to player 
 is 
, then there is a directed edge from 
 to 
.
Finally, compare the distances from the back-most player to the player with  range.
Comments