Problem Description
There are two kinds of tasks, namely A and B. There are N workers and the i-th worker would like to finish one task A in ai minutes, one task B in bi minutes. Now you have X task A and Y task B, you want to assign each worker some tasks and finish all the tasks as soon as possible. You should note that the workers are working simultaneously.

这篇博客通过二分查找结合动态规划的方法,解决了一个关于任务分配的问题。给定n个工人,每个工人完成A任务和B任务所需的时间不同,以及x个A任务和y个B任务,博主求解完成所有任务所需的最短时间。代码中详细展示了如何利用DP数组和二分搜索实现这一算法。
最低0.47元/天 解锁文章
748

被折叠的 条评论
为什么被折叠?



