2019-2020 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) |
---|

Finished |

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

G. Game Relics

time limit per test

3 secondsmemory limit per test

512 megabytesinput

standard inputoutput

standard outputEsports is a form of competitive sports using video games. Dota 2 is one of the most popular competitive video games in Esports. Recently, a new video game Dota 3 was released. In Dota 3 a player can buy some relics for their hero. Relics are counters that track hero's actions and statistics in a game.

Gloria likes to play Dota 3, so she wants to buy all $$$n$$$ available relics for her favorite hero.

Relics can be bought using an in-game currency called shards. Each relic has its own price — $$$c_i$$$ shards for the $$$i$$$-th relic. A player can buy a relic using one of the following options:

- Pay $$$c_i$$$ shards to buy the $$$i$$$-th relic;
- Pay $$$x$$$ shards and randomly get one of all $$$n$$$ relics. The probability of getting a relic is the same for all $$$n$$$ relics. If a duplicate relic is received, then the relic is recycled and $$$\frac{x}{2}$$$ shards are given back to the player.

Gloria wants to buy all $$$n$$$ relics. Help her minimize the expected number of shards she spends to buy all the relics.

Input

The first line contains two integers $$$n$$$ and $$$x$$$ ($$$1 \le n \le 100$$$; $$$1 \le x \le 10\,000$$$) — the number of relics and the cost to receive a random relic.

The second line consists of $$$n$$$ integers $$$c_1, c_2, \ldots, c_n$$$ ($$$x \le c_i \le 10\,000$$$; $$$\sum{c_i} \le 10\,000$$$) — the prices of $$$n$$$ relics.

Output

Print a single real number — the minimum expected number of shards that Gloria must spend to buy all the relics.

The absolute or relative error should not exceed $$$10^{-9}$$$.

Examples

Input

2 20 25 100

Output

47.50000000000000000

Input

4 30 60 50 60 80

Output

171.25000000000000000

Note

In the first example, the optimal strategy is to randomly get one of the two relics paying $$$20$$$ shards. Then there are two scenarios.

The first one happens if Gloria receives the first relic. Then she keeps getting random relics until she obtains the second relic. The expected number of shards to spend in this scenario is $$$20 + 30 = 50$$$.

In the second scenario, Gloria initially gets the second relic. Then it is better to buy the first relic for $$$25$$$ shards, so the expected number of shards to spend in this scenario is $$$20 + 25 = 45$$$.

Thus, the expected number of shards to spend is $$$\frac{50 + 45}{2} = 47.5$$$.

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/29/2020 12:48:13 (g1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|