There is a war and it doesn't look very promising for your country. Now it's time to act. You have a commando squad at your disposal and planning an ambush on an important enemy camp located nearby. You have N soldiers in your squad. In your master-plan, every single soldier has a unique responsibility and you don't want any of your soldier to know the plan for other soldiers so that everyone can focus on his task only. In order to enforce this, you brief every individual soldier about his tasks separately and just before sending him to the battlefield. You know that every single soldier needs a certain amount of time to execute his job. You also know very clearly how much time you need to brief every single soldier. Being anxious to finish the total operation as soon as possible, you need to find an order of briefing your soldiers that will minimize the time necessary for all the soldiers to complete their tasks. You may assume that, no soldier has a pl
Commando War(突击战)
最新推荐文章于 2020-07-07 13:32:57 发布
本文介绍了一种在突击战中如何高效安排士兵任务的问题。每个士兵都有特定的任务执行时间和简报时间,目标是找到一个顺序来最小化所有士兵完成任务所需的总时间。输入包含多个测试案例,每个案例包括士兵数量及其任务和简报时间。输出为每个案例的总执行时间。给定的代码可能是用于解决这个问题的算法实现。
摘要由CSDN通过智能技术生成