Advertisement

uvalive 2949 Elevator Stop Plan(贪心+二分)

阅读量:

The problem requires designing an optimal elevator stopping plan. The objective is to minimize the total waiting time for all passengers while ensuring smooth operation of the elevator system. This involves determining the most efficient sequence of stops and assigning priority to passengers boarding on different floors. The solution must consider both passenger demand and elevator capacity constraints to achieve a balanced and efficient schedule.

一家简陋的公司只有一个电梯,在一楼有n位乘客开始他们的旅程。每位乘客都有自己的目标楼层,并希望尽快到达那里。每次上一层楼耗时4秒,在每一层楼停下时需花费10秒钟锁门(locked)。请问如何安排操作使得所有乘客都能最快地到达各自的指定楼层?

由于人们能够上下楼梯,在完成一次下楼动作后可以选择

全部评论 (0)

还没有任何评论哟~