#Q18. 「一本通 1.2 练习 4」传送带
「一本通 1.2 练习 4」传送带
Description
Original Source: SCOI 2010
On a two-dimensional plane, there are two conveyor belts, each of which can be considered as a line segment. The two conveyor belts are segments and respectively. lxhgww moves at speed on , at speed on , and at speed elsewhere on the plane.
Now, lxhgww wants to travel from point to point and wishes to know the minimum time required.
Input Format
The first line of input contains four integers representing the coordinates of and , namely ;
The second line contains four integers representing the coordinates of and , namely ;
The third line contains three integers, .
Output Format
The output consists of a single line, displaying the shortest time for lxhgww to travel from point to point , rounded to two decimal places.
Sample 1
0 0 0 100
100 0 100 100
2 2 1
136.60
Data Range and Hint
For of the data, $1 \leq A_x, A_y, B_x, B_y, C_x, C_y, D_x, D_y \leq 1000$, and .