Alice, Bob,and Cindy are playing the exciting board game Jumanji. If you die in the game, you die for real!
Each of them starts with $$$a$$$, $$$b$$$, and $$$c$$$ points of HP (Health Points) respectively.
All gameplay takes place on a long path with $$$n+1$$$ squares, labeled $$$0$$$ to $$$n$$$. Each square has a damage value written on it—the damage value of square $$$i$$$ is $$$d_i$$$. You are guaranteed that $$$d_0 = d_n = 0$$$.
Gameplay goes as follows:
The first line of input contains the four space separated integers $$$n$$$, $$$a$$$, $$$b$$$, $$$c$$$.
The second line contains the $$$n+1$$$ space-separated integers $$$d_0, d_1, d_2, \dots, d_n$$$.
Output a single line containing a single real number denoting the probability that all three of them survive Jumanji.
Your answer will be considered correct if the absolute error between it and the judge's answer is at most $$$10^{-12}$$$. In other words, if $$$a$$$ is the correct answer and $$$a_0$$$ is your answer, then it is accepted if $$$$$$ |a - a_0| \leq 10^{-12}. $$$$$$ Remember to output your solution to sufficiently many decimal places.
$$$$$$\begin{align*}
&\begin{array}{|l|} \hline \text{Constraints For All Subtasks} \\ \hline 1 \leq n \leq 200 \\ 1 \leq a, b, c \leq 2024 \\ \text{$1 \leq d_i \leq 2024$ for $0 \lt i \lt n$} \\ d_0 = d_n = 0 \\ \hline \end{array}\\
&\begin{array}{|c|c|l|} \hline \text{Subtask} & \text{Points} & \text{Constraints} \\ \hline 1 & \mathbf{25} & n \leq 5 \\ \hline 2 & \mathbf{25} & n \leq 7 \\ \hline 3 & \mathbf{25} & d_i, a, b, c \leq 70 \\ \hline 4 & \mathbf{25} & \text{No further constraints.} \\ \hline \end{array}\\
\end{align*}$$$$$$
4 10 20 30 0 12 8 15 0
0.94444444444444441977
11 10 20 30 0 1 1 5 2 3 5 1 8 12 9 0
0.75393091994762695407