当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3569:Imaginary Date

题目描述
XMM met his ex-girlfriend on Double Seventh Festival Day. Though what happened between these two little kids was in the past, there did exist some strange and complicated feelings or something you can call it desire, which XMM cannot deny and tried as hard as he can to keep those things inside to ensure nobody else knows. But as his friends, just to be clear, it is so obvious to us.

So, today is a day. How could XMM possibly give up this wonderful chance? He once again asked XLZ out and then took her to a nice restaurant and prepared to give some delicious chocolate to XLZ to satisfy her which we think is useless.

There are n kinds of chocolate in the restaurant, XLZ likes them in varying degrees. To simplify this, every chocolate have a integer value vi(1 <= vi <= 1000 for all 1 <= i <= n <= 1000). This implies how much XLZ likes it. But since it has been such a long time that XMM Broke up with XLZ, XMM didn’t know it. So he’d like to randomly choose a chocolate every minute to give it to her. The total time XMM has is m minutes (1 <= m <= 1000).But there is another restriction: the kitchen is not so effective so after XMM buy a chocolate, it needs k (1 <= k <= n) minutes to make this kind of chocolate which means the next time XMM can order this is at least k minutes later.

Now we want to know the expect value XLZ gets on that special night.
输入解释
The first line is a single integer T indicating the number of cases that follow.
For each case, three integers n, m, k are give in the first line which is mentioned above.
The next line contains n integers which are the value of the n chocolates.
输出解释
For each case just output the result in a single line in the format of "Case x: d" in which x is the case number counted from one and d is the expect value that Xlz gets, rounded to 5 digits after the decimal point.
输入样例
2

3 3 1
1 3 5

4 4 4
1 2 3 4
输出样例
Case 1: 9.00000
Case 2: 10.00000
来自杭电HDUOJ的附加信息
Author totalfrank
Recommend zhouzeyong

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3569

最后修改于 2020-10-25T23:04:51+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)