After the struggle of graduating from college, TangTang is about to move from a student apartment to his new home. TangTang has n items to move, the i-th of which is of volume viv_ivi. He can pack all these items into at most K boxes of the same volume. TangTang is so clever that he uses the following strategies for packing items: - Each time, he would put items into a box by the next strategy, and then he would try to fill another box. - For each box, he would put an unpacked item of the largest suitable volume into the box repeatedly until there is no such item that can be fitted in the box. Now, the question is what is the minimum volume of these boxes required to pack all items.
After the struggle of graduating from college, TangTang is about to move from a student apartment to his new home. TangTang has n items to move, the i-th of which is of volume viv_ivi. He can pack all these items into at most K boxes of the same volume. TangTang is so clever that he uses the following strategies for packing items: - Each time, he would put items into a box by the next strategy, and then he would try to fill another box. - For each box, he would put an unpacked item of the largest suitable volume into the box repeatedly until there is no such item that can be fitted in the box. Now, the question is what is the minimum volume of these boxes required to pack all items.