418 teams scored 28665 points on this task, for a maximum score of 100, an average score of 69 and a median score of 65.
Eduardo is designing roller coasters. A roller coaster track consists of N sections, numbered from 0 to N-1. Each section is of one of four types (represented by a character): (1) [\bullet] `D' -- Downward section: increases speed by 9 km/h. (2) [\bullet] `U' -- Upward section: decreases speed by 11 km/h. (3) [\bullet] `H' -- Horizontal section: does not change speed. (4) [\bullet] `B' -- Boost section: increases speed by 10 km/h. A carriage moves along a track, occupying one section at a time. It starts in section 0 with an initial speed of 0 km/h. A track design is called plausible if, after passing section 0, the carriage's speed remains strictly positive at every section -- including after the last one. This means that the first section must be either D or B; otherwise, the speed would become zero or negative. Eduardo's current track design is represented by a string S of length N, where each character denotes a section type...