Jumping Path
시간 제한2초메모리 제한1024 MB
일직선 위 n개 공공장소 반경 r 안에서는 흡연이 금지될 때, 길이 2R 반원 점프(비용 pi*R)를 섞어 A에서 B까지 가는 최소 시간을 구한다.
문제
Popeye the Sailor loves to eat spinach. He also loves to smoke his corn-made pipe. And which he constantly smokes.
Popeye lives in the Sweethaven village. On the main street of Sweethaven, which can be represented as a straight line, there are public places, which can be considered as points on a straight line located at coordinates , respectively.
Popeye needs to get from the point on the main street to the point. Everything would have been simple, if not for the law that passed Sweethaven's authority: now smoking nearer than from a public place is prohibited. Fortunately, Popeye has a pole length ,, with which he can jump over forbidden zones.
Popeye is initially located at point . He can move from to on foot in time. Also, at any time, he can use the pole and move from point to point or , moving along a semicircle of radius , while he spends time. At the end of the path, Popeye must be at point , and at no point on the trajectory of Popeye can be closer than to any public place.
Determine the shortest time it takes Popeye to get from to . Or determine that it is impossible to get from to under the given constraints, so Popeye will have to use the power of spinach.
입력
The first line contains five integers , , , and (, , ). The second line contains integers (, ). All are pairwise distinct. It is guaranteed that the points and are different and are not located in any of the forbidden zones.
출력
Print one real number --- the smallest time. The answer will be counted if it differs from the jury's answer by no more than in absolute or relative value. If it is impossible to get from to , print .
힌트
For an example from the statement, one of the optimal trajectories of movement looks as follows:

Elapsed time --- .