回复:可能是这样

本帖于 2008-10-02 14:54:46 时间, 由普通用户 康MM 编辑

Intuitively, to have 2 and 4 both in the car is not optimal, because 4 walks faster than 3. So it's always better to just have 3 in the car whenever 2 is in the car.

So morefun is right. Just have 4,5 on the car and 2,3 on the car and compute x, y.

In general, the slowest always drives the car, and the rest are sorted from low to high and then are divided in groups of size (n-1), where n is the capacity of the car. In each group the slowest person represents the speed of the whole group. Then the problem reduces to computer x_i for each group i.

请您先登陆,再发跟帖!