If you have N
boxes each containing distinct
number of balls and you are allowed to choose at most x
of those boxes. You can open each box at most once
and then decide whether you want to select
the box or not before going to the next box. The final score would be the maximum (no. of balls) from all the boxes selected. What strategy can be followed to maximize the score?
A box can hold at most A
balls and at least B
balls. But it is not necessary that some box holds A
or B
balls.