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 or returning -1 if none can fit every package. Return it 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 ...