Improve the Team! (lootboxes)

40 teams scored 3340 points on this task, for a maximum score of 100, an average score of 84 and a median score of 100.

Highlights

  1. Galileo Ferraris, Molfetta is the institute with the most points (265).
  2. Puglia is the region with the most points (565).

Statement

William was very bored during lockdown, so he decided to download a soccer game on his smartphone. Since then, he has played a lot of matches and he has earned X coins in total. However, winning is becoming increasingly difficult so he needs to improve his team with new players. In order to do so, he wants to spend the coins he has earned to open some of the N loot boxes available. The i-th loot box has probability P_i of containing a good player and costs Q_i coins. Each probability P_i is an integer number between zero and one hundred, representing the probability as a percentage. Can you help William decide which loot boxes to open in order to maximize the expected number of good players he can get?