#Lutece2397. Gift For You
Gift For You
Migrated from Lutece 2397 Gift For You
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Hey guys, we have a gift for you~
但是这要根据你队伍的比赛排名领奖,fatdog
参加了 场吹气球比赛(与此同时他的队友写了 场比赛的代码),每场吹气球比赛有 支队伍,礼物的分发由fatdog
最终的总排名决定,总排名计算方式如下:
设fatdog
第 比赛的排名为 ,他的总得分就为 ,则他的排名就为: = 队伍总得分严格小于 的队伍数 + 1。
fatdog
很想知道自己能领到什么样的奖励,但是他是个弱智,他只记得自己每场的排名。
快帮fatdog
算一下他总排名的期望为多少。
Input
第一行包含两个整数 和 ()。
下一行包含 个整数,第 个整数 代表fatdog
第 场比赛的排名 ()。
Output
输出一个浮点数,表示fatdog
总排名的期望。
结果四舍五入保留 位小数。
Samples
4 10
2
1
2
1
1.000000
Note
fatdog
总得分为 ,在他得分的前提下不可能存在另一支队伍的得分小于 ,所以他的总排名为 。
Resources
2020 UESTC ICPC Training for Dynamic Programming