CodeForces 388A Fox and Box Accumulation (模拟)

Fox Ciel has n boxes in her room. They have the same size and weight, but they might have different strength. Thei-th box can hold at most xi boxes on its top (we’ll callxi the strength of the box).

Since all the boxes have the same size, Ciel cannot put more than one box directly on the top of some box. For example, imagine Ciel has three boxes: the first has strength 2, the second has strength 1 and the third has strength 1. She cannot put the second and the third box simultaneously directly on the top of the first one. But she can put the second box directly on the top of the first one, and then the third box directly on the top of the second one. We will call such a construction of boxes a pile.

Fox Ciel wants to construct piles from all the boxes. Each pile will contain some boxes from top to bottom, and there cannot be more thanxi boxes on the top ofi-th box. What is the minimal number of piles she needs to construct?

,如果你在以的话,别人就会知道你害怕被说,他们就会加倍地说你,

CodeForces 388A Fox and Box Accumulation (模拟)

相关文章:

你感兴趣的文章:

标签云: