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

建议使用的浏览器:

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

3276:Star

题目描述
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.
输入解释
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.

输出解释
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
输入样例
5 1 2
1 2 3 4 5
6 2 3
6 1 2 4 3 5
输出样例
Case 1: 4.000
Case 2: 3.800
来自杭电HDUOJ的附加信息
Author Resty
Recommend chenheng

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

源链接: HDU-3276

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

共提交 0

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