大家都说这是水题

TimeLimit: 2000/1000 MS (Java/Others)  MemoryLimit: 65536/32768 K (Java/Others)
64-bit integer IO format:%I64d
未提交 | 登录后收藏 | 已有6人收藏了本题
Problem Description
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.
Input
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.
Output
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.
SampleInput
2

3 3 1
1 3 5

4 4 4
1 2 3 4
SampleOutput
Case 1: 9.00000
Case 2: 10.00000
Submit
题目统计信息详细
总AC数161
通过人数148
尝试人数174
总提交量426
AC率34.74%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: