Question
Courier Speed Limit
A courier traverses
Input
First line: KaTeX can only parse string typed expression.
Second line: segment lengths.
Output
Print the minimum feasible speed or -1.
Example
Input:
At speed 3, travel times are 3, 1, 3, and 2. Including three pauses, total time is 12. Speed 2 needs more than 12, so 3 is minimum.
4 12 1
7 3 9 5Output:3Explanation:At speed 3, travel times are 3, 1, 3, and 2. Including three pauses, total time is 12. Speed 2 needs more than 12, so 3 is minimum.