{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eIn ACM/ICPC contest, the \u0027\u0027Dirt Ratio\u0027\u0027 of a team is calculated in the following way. First let\u0027s ignore all the problems the team didn\u0027t pass, assume the team passed $X$ problems during the contest, and submitted $Y$ times for these problems, then the \u0027\u0027Dirt Ratio\u0027\u0027 is measured as $\\frac{X}{Y}$. If the \u0027\u0027Dirt Ratio\u0027\u0027 of a team is too low, the team tends to cause more penalty, which is not a good performance.\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003e\u003cbr\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/66e377dbb545f7fb41e64e32a5b4ac00?v\u003d1714282015\"\u003e\u003cbr\u003ePicture from MyICPC\u003cbr\u003e\u003c/center\u003e\u003cbr\u003e\u003cbr\u003eLittle 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\u0027s low \u0027\u0027Dirt Ratio\u0027\u0027, 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 \u0027\u0027Dirt Ratio\u0027\u0027 just based on that subsequence.\u003cbr\u003e\u003cbr\u003ePlease write a program to find such subsequence having the lowest \u0027\u0027Dirt Ratio\u0027\u0027.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input contains an integer $T(1\\leq T\\leq15)$, denoting the number of test cases.\u003cbr\u003e\u003cbr\u003eIn each test case, there is an integer $n(1\\leq n\\leq 60000)$ in the first line, denoting the length of the submission list.\u003cbr\u003e\u003cbr\u003eIn 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."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, print a single line containing a floating number, denoting the lowest \u0027\u0027Dirt Ratio\u0027\u0027. The answer must be printed with an absolute error not greater than $10^{-4}$."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n5\r\n1 2 1 2 3\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0.5000000000\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cbr\u003e For every problem, you can assume its final submission is accepted.\u003cbr\u003e"}}]}