168 teams scored 11720 points on this task, for a maximum score of 100, an average score of 70 and a median score of 100.
Near the end of 2017, the cryptocurrency known as "Bitcoin" (BTC) reached a record value of more than 16000€. William noticed this increase and is now wondering: how much money could someone have made in the best possible scenario starting with 1 BTC? For this reason, William collected every price increase (and decrease) of the last N days, and now he wants to know: starting with 1 BTC, how much € could he get by repeatedly selling and buying? For example, let's assume the value of 1 BTC is initially 1000€ and that there will be 5 price changes: -20, +85, +10, -100, +1 In this case, the best strategy is to: (1) Sell 1 BTC immediately, earning 1000€. (2) Wait for the price to go down by 20€, and then sell the EUR for BTC. (3) Wait for the price to go up by 85€, and hold the BTC. (4) Wait for the price to go up by 10€, and sell the BTC for EUR. (5) Wait for the price to go down by 100€, and then sell the EUR for BTC. (6) Wait for the price to go up by 1€, and then sell the BTC for EUR...