Full-Body Workout (workout)

22 teams scored 1033 points on this task, for a maximum score of 98, an average score of 47 and a median score of 50.

Highlights

  1. ITST Kennedy, Pordenone is the institute with the most points (120).
  2. Friuli-Venezia Giulia is the region with the most points (218).

Statement

Giorgio has recently undertaken a tough full-body workout plan, consisting of a sequence of N exercises, each with a fatiguing coefficient F_i for i = 0… N-1. In particular, some exercises are tiresome (F_i > 0) while others are restful (F_i < 0). The plan has already proven to be effective, however, it takes up a lot of time every day! In order to save at least a bit of time, Giorgio has decided to completely remove the cool down times between the different exercises… and now needs to carefully choose the exercise scheduling, in order to keep the fatigue limited and be able to complete the workout plan anyway! Suppose that the exercises are arranged in some order F_π_0, F_π_1, … F_π_N-1 where π_0 … π_N-1 is a permutation of the numbers 0 … N-1. Then, the total fatigue values T_i reached from the training start until the end are obtained by summing the fatiguing coefficient, while avoiding to go below zero...