| 2021-2022 ICPC, Moscow Subregional |
|---|
| Finished |
Gleb has just had a good time in a bar on Nekrasova street, and is now heading to the place of his accommodation that happened to be hotel Indigo. His path goes along Liteyny Avenue that we consider to be a perfect straight line.
For the purpose of this problem Gleb only moves along the avenue and across it. He now stays at point $$$0$$$ along the avenue and the hotel he goes to is located at point $$$L$$$. Moreover, the hotel is located on the other side of the avenue. There are $$$n$$$ pedestrian crossings between Gleb and Indigo, the $$$i$$$-th of them is located at integer point $$$x_i$$$. In order to get to the hotel Gleb needs to walk all the avenue from point $$$0$$$ to point $$$L$$$ and cross the street at some moment of this walk.
All crossings are equipped with a traffic light. All these traffic lights have cycles of the same duration. They go green for $$$g$$$ seconds and red for $$$r$$$ seconds. However, they are not synchronized, i.e. each traffic light has some random equiprobable cycle shift. All shifts are integers, so there are only $$$r + g$$$ possible shifts in total. Gleb knows integers $$$r$$$ and $$$g$$$ but at beginning he knows nothing about the shifts.
Each crossing traffic light has a timer that shows the current state of this traffic light's cycle. If the light is green, the timer shows how many seconds are left to cross the street, if the light is red, the timer shows how many seconds to wait before the light goes green. Gleb is able to notice the light's color and the timer state only when he is at the exact point this crossing and traffic light are located. The good part is that Gleb is capable of remembering everything he has seen during this walk, so he keeps in mind the current state of all the traffic lights he has already seen.
All coordinates are integer and are given in meters. Gleb moves with a speed of one meter per second. Moreover, it is known that pedestrian crossings are not too frequent. Formally, there are no three crossings located within $$$g + r$$$ meters.
Gleb can move in any direction along the avenue and cross it arbitrary number of times. It takes $$$b$$$ seconds to cross the avenue, and the traffic light must be green during all this period.
The first line of the input contains integers $$$n$$$, $$$L$$$, $$$g$$$, $$$r$$$ and $$$b$$$ ($$$1 \leq n \leq 100\,000$$$, $$$1 \leq L, g, r \leq 10^9$$$, $$$1 \leq b \leq g$$$) — the number of crossings along the avenue, initial distance between Gleb and hotel Indigo in meters, the duration of the green phase of the traffic light in seconds, the duration of the red phase of the traffic light in seconds, the time it takes Gleb to cross the avenue.
Then follow $$$n$$$ lines that describe crossings' positions $$$x_1, x_2, \ldots, x_n$$$ ($$$0 \lt x_1 \lt x_2 \lt \ldots \lt x_n \lt L$$$). It is guaranteed that $$$x_{i+2} - x_i \gt g + r$$$ for all $$$1 \leq i \leq n - 2$$$.
Print one real value — the expected time it will take Gleb to get to Indigo in case he acts optimally. The absolute or relative error should not exceed $$$10^{-9}$$$.
1 10 2 4 1 2
12.6666666666667
2 820 30 50 23 400 810
866.0250000000000
3 100 20 50 1 10 15 85
107.6141690962099
| Name |
|---|


