To The Finals (finals2)

399 teams scored 39744 points on this task, for a maximum score of 100, an average score of 100 and a median score of 100.

Highlights

  1. ITI Planck, Villorba is the institute with the most points (1600).
  2. Lombardia is the region with the most points (6000).

Statement

After three rounds of the IIOT, Davide is on top of the IIOT ranking. His goal is to reach the final, but there is still one round left to go. N teams participate in the IIOT, numbered from 0 to N-1, Davide's team is the team 0. The team i scored S_i,1, S_i,2, S_i,3 points respectively in the first three rounds. Also, Davide knows that in the last round there are P problems, each with a maximum score of 100 points. To secure his place in the final, Davide wants to finish first in the overall ranking of the four rounds, which means that his team needs to have a strictly higher total score than all the other teams. However, Davide is lazy and doesn't want to score more points than he strictly needs. Help Davide find the minimum necessary score that guarantee him to finish first overall regardless of the score that the other teams will get.