Orderly Evacuation (evacuation)

28 teams scored 1815 points on this task, for a maximum score of 100, an average score of 65 and a median score of 80.

Highlights

  1. I.S. Fermi MN, Mantova is the institute with the most points (200).
  2. Lombardia is the region with the most points (500).

Statement

The OIS control room, where the staff prepares tasks for the contests, consists of N workstations (numbered from 0 to N-1) each assigned to a staff member (so that workstation i is assigned to staff member i). Whenever the room alarm signals that lunch is ready, the whole staff rushes for the exit of the room, which is located by workstation 0, while orderly following the evacuation plan. The evacuation plan of the room has a tree shape, so that anyone in workstation i has only one option for going towards the exit, which is workstation E_i (we say that E_0 = -1 to represent that workstation 0 is connected to the exit). However, multiple workstations i, j may compete for the same E_i = E_j, forcing the staff members to use their arrogance to move forward. More precisely, every staff member i has an arrogance score A_i, and the evacuation proceeds as follows: (1) The staff member in workstation 0 exits the room...