Supervisors (supervisors)

12 teams scored 877 points on this task, for a maximum score of 100, an average score of 73.1 and a median score of 100.

Highlights

  1. I.O. Rosselli - Rasetti, Castiglione Del Lago is the institute with the most points (300).
  2. Umbria is the region with the most points (369).

Statement

Dario's company is facing a particularly hard task. To tackle it, Dario plans to select a task force of K people in the best way possible. The choice will be influenced by the company's highly hierarchical tree-like structure. There are N employees, numbered from 0 to N-1. For each 1 < i < N-1, employee i has a manager P_i, where P_i < i. Dario, who is employee number 0, has no direct manager. We say that employee i is a supervisor of employee j if either i = j or i is the manager of a supervisor of j. Note that this is a recursive definition. The coordinator of a pair of employees i and j is their lowest common ancestor in the company's hierarchy tree, i.e. the employee with the highest identifying number among those that supervise both i and j. This is well defined because Dario supervises everyone in the company. Moreover, each employee has a skill level S_i...