luogu#P4669. [BalticOI 2011 Day2] Meetings
[BalticOI 2011 Day2] Meetings
题目描述
The Society for Saving the World has called their members to an emergency congress to finally agree on a plan for saving the world. To reach a common decision in any meeting at the congress, the meeting participants proceed as follows:
-
Each of them has a proposal and takes minutes to present it to the others.
-
After all participants have made their presentations, they vote for the best proposal, which takes minutes.
For example, if each proposal takes one minute and voting also takes one minute , a meeting with participants would reach a decision in minutes. To speed up the overall decision-making process, the participants of the congress have decided to split into groups and work in parallel. Each group selects the best proposal among themselves using the procedure described above. Then the representatives of the groups meet and pick the final plan among the proposals voted best in each group. For example, if the participants would split into two groups of and , respectively, the process could work as follows (again, ):
- the larger group takes minutes to select their best proposal;
- the smaller group takes minutes to do the same and then has to wait for the larger group to finish;
- then the two representatives of the groups meet and spend minutes presenting to each other and minute to vote.
The total time spent is thus minutes. But the groups might further divide themselves into subgroups and sometimes it could be useful to split into more than two groups. As a special case, a subgroup of member can decide in no time, as there is no need to present one’s own proposal to oneself. Write a program that, given presentation and voting times and , computes the minimal time needed for the participants of the congress to reach a common decision, assuming they organize their meetings and groups optimally.
输入格式
The first and only line of input contains the three integers and : is the number of participants of the congress, is the presentation time (in minutes), and is the voting time (in minutes).
输出格式
The first and only line of output should contain the integer , the minimal number of minutes needed for the congress to reach a decision.
题目大意
** 译自 BalticOI 2011 Day2 T1「Meetings」**
有 人需达成一项计划。每人都花 陈述自己的提案,所有人陈述完毕后再花 表决出最佳提案。例如,如果有 人,,总共需要 来达成计划。
为了加快进度,他们想分成小组,每个小组表决出一份最佳议案,再由全部人一起表决各小组选出的议案。注意小组内可以再分组。小组内表决的方式类似,也是每人陈述自己的提案后再表决。例如, 人分成两组,一组 人,一组 人,那么过程如下(与前面相同,):
- 人组花 选出最佳议案,同时 人组花 选出最佳议案(自然,他们要等待 人组);
- 两组再花 陈述,然后花 表决。
总用时 。
试求:他们至少要多久才能达成计划。
Translated by @Planet6174
9 1 1
8
6 1 2
8
6 2 1
12
提示
Sample Explanation 1
In sample 1,the nine people should be divided into 3 groups.There should be 3 people in each group.
数据范围
对于 的数据,。
对于 的数据,。
对于所有数据,。