Police Patrol 2 (patrol2)

28 teams scored 2130 points on this task, for a maximum score of 100, an average score of 76 and a median score of 100.

Highlights

  1. Galileo Galilei, Trento is the institute with the most points (200).
  2. Lombardia is the region with the most points (580).

Statement

Valerio is trying to escape from a bank that he has robbed. An alarm has gone off and the police are searching for him. Valerio needs to get out as fast as possible through the sewer tunnels that run near the bank. There is only one police patrol that has been sent to guard the manholes connected to the sewer system. There are N manholes, indexed from 0 to N - 1, and M tunnels, indexed from 0 to M - 1. Tunnel i is connecting manholes A_i and B_i. Valerio starts from manhole 0. Valerio's friend, Filippo, is waiting for him near manhole N - 1, and if Valerio reaches it without getting caught, he will escape safely. In each minute, Valerio can choose to either (1) move to a manhole connected by a tunnel to the one he is at, or (2) stay for another minute at the same manhole. The police patrol is guarding a sequence C = [C_0, C_1, …, C_L-1] of manholes, where L > 2 and the C_i values are pairwise distinct positive integers...