2016-17 Woburn Challenge Finals Round - Senior Division
It would seem that war is inevitable. Bo Vine's communication with his cow spy has been intercepted by the devious monkeys, confirming his suspicions that the Head Monkey is up to no good! In preparation for the impending conflict with the monkeys, Bo Vine has ordered the construction of a new, state-of-the-art Cow-Bot model from scratch.
The schematics call for
Please help the cows determine the minimum amount of time required for
all
In test cases worth
Input Specification
The first line of input consists of three space-separated integers
Output Specification
Output one line consisting of a single integer – the minimum number of
minutes required for all
Sample Input
7 7 4
4
0
4
2
6
4
4
Sample Output
34
Sample Explanation
One optimal sequence of module installations is as follows (with each step's completion time indicated):
- Module
by the Cow-Bot ( minutes) - Module
by the engineers ( minutes) - Module
by the engineers ( minutes) - Module
by the Cow-Bot ( minutes) - Module
by the Cow-Bot ( minutes) - Module
by the Cow-Bot ( minutes) - Module
by the Cow-Bot ( minutes)
Comments