As the manager of your company, you have to carefully consider, for each project, the time taken to finish it, the deadline, and the profit you can gain, in order to decide if your group should take this project. For example, given 3 projects as the following:
Project[1] takes 3 days, it must be finished in 3 days in order to gain 6 units of profit.
Project[2] takes 2 days, it must be finished in 2 days in order to gain 3 units of profit.Project[3] takes 1 day only, it must be finished in 3 days in order to gain 4 units of profit.
You may take Project[1] to gain 6 units of profit. But if you take Project[2] first, then you will have 1 day left to complete Project[3] just in time, and hence gain 7 units of profit in total. Notice that once you decide to work on a project, you have to do it from beginning to the end without any interruption.
Input Specification:

作为公司经理,你需要根据每个项目的完成时间、截止日期和预期利润来决定是否接受项目。例如,给定3个项目,通过动态规划计算可以找到在满足截止日期的情况下获得最大利润的项目组合。在样例输入中,给出了4个项目的详细信息,需要求解能够获得的最大总利润。
最低0.47元/天 解锁文章
1272

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



