B. Salty Fish Go!
题号:NC15701
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

A few days ago, WRD was playing a small game called Salty Fish Go. We can simplify the rules of the game as follows.

The road can be abstracted into a one-dimensional axis, and the length of the road is L. There are two magic doors at the ends of the road, which can instantly transfer WRD from position L to position 0, or from location 0 to location L, without spending time.

WRD can select the initial position, the initial direction of movement, and the initial speed (from the speed set).

There are some amazing gas stations on the way, whose location is random. At the gas station WRD can change speed to one of the speed set, without spending time. (Do not change direction!)

There are some jewels on the road, whose location is random. WRD needs to take away all the jewels to win the game.

How long does it take WRD to win the game?

It’s an easy game. But considering that WRD has become a salty fish without brain, all his operations are completely random. Can you calculate the expected time for him to win the game?

输入描述:

Input contains multiple test cases, please process to the end of input.

For each test case, the first line of the input contains four positive integers V (), L (), n (), m () to indicate the size of speed set, the length of the road, the number of the gas stations, the number of the jewels.

Then, there are V integers in a line, the speed set, each integer is between 1 and .

输出描述:

The output is a real number, let your answer be a, and jury's answer be b, your answer will be considered as correct if and only if .
示例1

输入

复制
2 8 1 1
2 4
2 8 1 1
2 4

输出

复制
1.333333333
1.333333333