{"trustable":false,"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":"MD","content":"LYD给了你一个长度为n的序列a,并且为每一个区间定义了一个丰富度f(l,r),其意义为在该区间[l,r]中的数字种类x与区间长度r-l+1的商。现在他想知道在所有区间[l,r](1\u003c\u003dl\u003c\u003dr\u003c\u003dn)中丰富度最小的那一个,机智的你一定能快速得到答案的。"}},{"title":"Input","value":{"format":"MD","content":"第一行一个整数代表数据组数。\n每组数据第一行包含一个整数n(1\u003c\u003dn\u003c\u003d60000)。\n第二行包含n个整数ai(1\u003c\u003dai\u003c\u003dn),代表序列a。"}},{"title":"Output","value":{"format":"MD","content":"每组数据输出一个小数代表最小丰富度,需保证误差小于1e-4。"}},{"title":"Sample Input","value":{"format":"MD","content":"1\n3\n1 2 1"}},{"title":"Sample Output","value":{"format":"MD","content":"0.66666667"}}]}