|
||||||||||
Imaginary DateTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 972 Accepted Submission(s): 499 Problem Description 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. 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. Sample Input
Sample Output
Author totalfrank Source | ||||||||||
|