384 teams scored 34390 points on this task, for a maximum score of 100, an average score of 90 and a median score of 100.
Edoardo is very passionate about technology, especially about smartphones. Unfortunately, he just dropped his phone and the screen shattered, so he needs to buy another one as soon as possible! Edoardo is going to visit N shops in order. Every time he enters a new shop, he looks for the phone with the highest price and, if it is strictly more valuable than all of the smartphones he currently has, he buys it. Edoardo doesn't skip any shop, even if he has already purchased a smartphone elsewhere (he wants only the very best!). You know that the most valuable smartphone in the i-th shop costs P_i. You also know that the initial smartphone has no value, since it is broken. How much will Edoardo spend in total?