#A. 抽卡(card)

    Type: Default File IO: card 1000ms 256MiB

抽卡(card)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

解压密码:gdoi2025%%rp++.AC~

小巡最近迷上了抽卡游戏。

抽卡游戏里面有抽卡池,里面有 nn 张卡片,每张卡片的价值分别是 a1,a2,,ana_1,a_2,\dots,a_n

小巡花费 mm 的金币抽一张卡,抽到卡池中每张卡片的概率是相等的。每次抽完卡之后,小巡可以决定是拿走卡片结束游戏,或者是放弃卡片继续抽卡。

一张卡如果被小巡抽出之后是不会在被抽出的,同时作为卡牌爱好者小巡必须要拿走一张卡牌。

小巡的收益为抽到的卡牌的价值减去使用的金币数量。同时小巡会使用最优策略进行抽卡。

你需要告诉小巡,其期望收益。

Input

第一行两个正整数表示 n,mn,m

接下来一行,nn 个正整数表示 a1,a2,,ana_1,a_2,\dots,a_n

Output

一行一个实数表示答案。

你的答案是正确的当且仅当和正确答案的绝对误差或者相对误差 109\leq 10^{-9}

Examples

【样例输入 #1】

3 1
1 2 3

【样例输出 #1】

1.1666666667

【样例输入 #2】

3 3
1 2 3

【样例输出 #2】

-1.0000000000

【样例输入 #3】

9 193138187
782710197 539624191 631858791 976609486 752268030 30225807 279200011 467188665 630132600

【样例输出 #3】

442999078.5373015873

Constraints

对所有数据,保证 1n1061\leq n\leq 10^61m,ai1091\leq m,a_i\leq 10^9

测试点编号 nn\leq ai,ma_i,m\leq
1 2020 10910^9
2 100100
3 2×1052\times 10^5
4 10610^6 1010
5 10910^9

GDOI2025 信心赛

Not Attended
Status
Done
Rule
OI
Problem
3
Start at
2025-2-26 7:30
End at
2025-2-26 12:00
Duration
4.5 hour(s)
Host
Partic.
14