Editorial for RGPC '18 P2 - Performance Points


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: chenj

We need to keep track of the number of each type of note click, as well as the length of the longest combo. We can do this by simply reading in the timings one at a time, using the absolute value function to get the correct note types, and then incrementing the respective counters. We also update the length of the current combo and update the max combo if required (be careful where you update the combo).

In addition, don't forget to output 0.0 if Kashif's score is lower than before (recall the definition of increase).

Time complexity: \mathcal{O}(N)


Comments

There are no comments at the moment.