An epidemic is seriously affecting people’s lives, prompting the city to organize a vaccination campaign across the entire area. Based on addresses, the Centers for Disease Control (CDC) divides the individuals into n groups and mobilizes m nurses to carry out vaccinations at the city’s largest hospital. Because the epidemic spreads rapidly, the infection control process in the vaccination area must adhere to a strict procedure as follows:
Upon completing the vaccination, each group must leave immediately for the next group to begin vaccination.
Requirements: You are given the number of groups n, the number of people in each group, and the number of nurses m. Find a way to assign each nurse to a group to minimize the total vaccination time for the n groups.
Since during the epidemic, nurses can be suddenly reassigned, you need to plan for t scenarios, each scenario specified by the number of nurses who can participate in the vaccination (m).
Input:
3 4
6 10 1
3
9
12
4
Output:
17
5
4
12
Digits | |
Partition | |
Green lines | |
Treasure | |
Shortest path | |
Vaccination |