本场比赛其他题目题解
A. Regular Bracket Sequences
B. Combinatorics Homework
C. Slay the Dragon
D. The Strongest Build
D. The Strongest Build
题目描述
Ivan is playing yet another roguelike computer game. He controls a single hero in the game. The hero has n n n equipment slots. There is
a list of c i c_i ci items for the i i i-th slot, the j j j-th of them increases the hero strength by a i , j a_{i, j} ai,j. The items for each slot are pairwise distinct and are listed in the increasing order of their strength increase. So, a i , 1 < a i , 2 < ⋯ < a i , c i a_{i, 1}\lt a_{i, 2}\lt \dots \lt a_{i, c_i} ai,1<ai,2<⋯<ai,ci.
For each slot Ivan chooses exactly one item. Let the chosen item for the i i i-th slot be the b i b_i <