시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
4 초 (추가 시간 없음) | 256 MB | 6 | 3 | 2 | 100.000% |
As the saying goes, "if you are hesitant, you will lose the game; if you are decisive, you will die in vain."
Calabash doesn't want to lose the game, neither to die in vain. But, this is not important, because he doesn't have enough money to buy the game.
Fortunately, Roundgod, the banker of a casino, gives him a chance to fulfill his dream. Roundgod promises to buy him the game if he could win in one round of Blackjack. The Blackjack involves a deck of playing cards, each has some points on it. It is carried out as follows: Roundgod gives a number $a$ and tells Calabash the number of points on each of the cards. Then, Calabash begins to draw cards, according to the following procedure:
Calabash wants to know the probability to win if he plays optimally so that he can obtain his favorite game. Please help him to calculate the probability.
There are two lines in the input. The first line consists of three integers $n, a, b$ $(1 \leq n \leq 500, 1 \leq a < b \leq 500)$, denoting the number of cards in the deck, the number given by Roundgod, and the limit to the total number of points, respectively.
The second line contains $n$ integers $x_1, x_2, \cdots, x_n$ $(1 \leq x_i \leq 500)$, denoting the numbers of points of these cards. It is guaranteed that $\sum_{i=1}^n x_i > b$.
Output the answer within an absolute error of no more than $10^{-6}$.
5 2 4 1 1 1 5 5
0.100000000000
5 2 4 1 1 1 3 5
0.450000000000