|
||||||||||
StarTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 574 Accepted Submission(s): 230 Problem Description One of Resty's interests is to watch stars. The Stars are so beautiful! Lyra's Vega, Alpha Aquila - Altair and Alpha Cyg consist of the Summer Triangle. Resty likes them very much. One day, Resty comes to the Moon to have his picnic. Soon he found that he can see so many beautiful stars here! You can never find such a view again - All the beautiful stars are in one line!! So Resty wants to take photos to record the incredible moment. Resty likes those stars so much so he knows which one is more beautiful. Now he gives each star a score, (a number between 1 and 200000, the higher, the better). So we can use an integer sequence to show the stars from left to right. Resty's camera is very strange and it will take two photos at one time, and each photo will contain a series of continuous stars in it. No stars will appear in both photos, and even no two stars that adjacent to each other will be in different photos. The number of stars in each photo will between x and y. Now, Resty tells you the sequence, you must find two photos that the average score of all the stars in the photos is as great as possible. Input The input consists of more than one test case. Process to the END OF DATA. For each test case: The first line contains 3 integers: n, x, y. n is the number of stars. 1 <= x < y <= n <=50000 The second line contains n integers (between 1 and 200000), the score of each stars. Output You must output the max average score Resty could get with the precision to 3 digits after the decimal point. Output Format is "Case ID: ANS" one line for each data Don't print any empty line to the output Sample Input
Sample Output
Author Resty Source | ||||||||||
|