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

建议使用的浏览器:

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

6070:Dirt Ratio

Special Judge 特殊评判
题目描述
In ACM/ICPC contest, the ''Dirt Ratio'' of a team is calculated in the following way. First let's ignore all the problems the team didn't pass, assume the team passed $X$ problems during the contest, and submitted $Y$ times for these problems, then the ''Dirt Ratio'' is measured as $\frac{X}{Y}$. If the ''Dirt Ratio'' of a team is too low, the team tends to cause more penalty, which is not a good performance.



Picture from MyICPC


Little Q is a coach, he is now staring at the submission list of a team. You can assume all the problems occurred in the list was solved by the team during the contest. Little Q calculated the team's low ''Dirt Ratio'', felt very angry. He wants to have a talk with them. To make the problem more serious, he wants to choose a continuous subsequence of the list, and then calculate the ''Dirt Ratio'' just based on that subsequence.

Please write a program to find such subsequence having the lowest ''Dirt Ratio''.
输入解释
The first line of the input contains an integer $T(1\leq T\leq15)$, denoting the number of test cases.

In each test case, there is an integer $n(1\leq n\leq 60000)$ in the first line, denoting the length of the submission list.

In the next line, there are $n$ positive integers $a_1,a_2,...,a_n(1\leq a_i\leq n)$, denoting the problem ID of each submission.
输出解释
For each test case, print a single line containing a floating number, denoting the lowest ''Dirt Ratio''. The answer must be printed with an absolute error not greater than $10^{-4}$.
输入样例
1
5
1 2 1 2 3
输出样例
0.5000000000
提示
 For every problem, you can assume its final submission is accepted.
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6070

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

共提交 0

通过率 --%
时间上限 内存上限
18000/9000MS(Java/Others) 524288/524288K(Java/Others)