#P4399. [JSOI2008] Blue Mary的职员分配
[JSOI2008] Blue Mary的职员分配
Description
Thanks to Blue Mary’s dedicated management, Blue Mary’s Internet company is thriving. It currently has employees, but no money or reputation. On average, each employee can bring the company units of money or units of reputation per day (they cannot produce both at the same time). You can spend units of money to post a recruitment advertisement on the talent market; exactly three days after posting, one employee will be hired. Moreover, you may post the next advertisement only on the day when the hired employee arrives (i.e., exactly three days after a previous ad).
Blue Mary plans to obtain at least units of money and at least units of reputation in the shortest possible time. Please compute the minimum time she needs to reach this goal.
Input Format
The input contains exactly one line with six integers and , as described above.
Output Format
Output one line with a single integer, the minimum time Blue Mary needs to achieve the goal.
1 2 3 4 5 6
5
Hint
Constraints: .
Translated by ChatGPT 5
京公网安备 11011102002149号