You are given N boxes and M objects. Each box has a capacity of N (I), stored in a list. Each object has a volume of M (I), stored in a list. The Design of a packing solution that packs as many items as possible. Moreover, if there are multiple solutions, waste as little space as possible. Return a list where l (I) stores the corresponding box to be the packed inside. If the object I always be the packed, set the l (I) the as - 1.
Algorithm is a novice, really have no idea, hope leaders can some directions