82 teams scored 3970 points on this task, for a maximum score of 100, an average score of 48.4 and a median score of 40.
Winter is beginning and Giorgio's shop has some unsold items left in its warehouses, which will now be put on sale. The items are arranged in N boxes, numbered from 0 to N - 1, stacked one on top of the other, each with a weight W_i. Box 0 is the topmost box. A box can only be removed if all the boxes above it have already been removed. Giorgio must completely empty his warehouse and to do so he has M carts numbered from 0 to M - 1. The j-th cart can move a maximum of K_j boxes and the total weight of the boxes transported cannot exceed T_j. On each trip, Giorgio chooses one of his carts, goes to the warehouse and loads the boxes from the top, respecting the cart's limits. He then returns to the shop and unloads the boxes. Next, if there are still boxes left, he repeats the operation, choosing whether to change carts or use the same one. Help Giorgio plan his day by calculating the minimum number of trips he will need to make to empty the warehouse.