Sponsored
Use these hints if you're stuck. Try solving on your own first.
If we have space for at least one box, it's always optimal to put the box with the most units.
Sort the box types with the number of units per box non-increasingly.
Iterate on the box types and take from each type as many as you can.