Search⌘ K
AI Features

Minimum Space Wasted from Packaging

Minimum Space Wasted from Packaging asks you to choose one supplier's boxes for all packages, minimizing unused space. Return -1 if no supplier can fit them all, or the result modulo a large prime.

Statement

You have n packages that need to be placed into boxes, with one package per box. There are m suppliers, and each supplier offers boxes of ...