Upsetting Finals (finals)

115 teams scored 1555 points on this task, for a maximum score of 100, an average score of 14 and a median score of 5.

Highlights

  1. Galileo Galilei, Trento is the institute with the most points (255).
  2. Emilia-Romagna is the region with the most points (515).

Statement

William is getting ready for finals, at his university. This semester he has N exams available, each of them with a scheduled time T_i and an "upsetting coefficient" U_i. The upsetting value is greater for the most hated exams (some exams are so traumatic that you start to question if you really want to graduate university!). William will try to take as many exams as he can, but he will follow this rule: if he takes an exam at time T_i with an upsetting coefficient of U_i, then he won't be able to endure the stress of taking any other exam in the time interval [T_i - U_i, T_i + U_i]. Help William compute how many exams he can take at most.