{"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":"Power By Solo_Dance","value":{"format":"HTML","content":"给出n个城市的x,y坐标以及每个城市的人数, 这些城市的主人想建造最小生成树,这时候有个会魔法的道士说, 我可以让一条路权值为0, 求A/B的最大值, 其中A是权值为0的道路连接的城市的人数之和, B是最小生成树的权值。"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains an integer t meaning that there are t test cases(t \u0026lt;\u003d 10). \n\u003cbr\u003eFor each test case: \n\u003cbr\u003eThe first line is an integer n meaning that there are n cities(2 \u0026lt; n \u0026lt;\u003d 1000). \n\u003cbr\u003eThen n lines follow. Each line contains three integers X, Y and P ( 0 \u0026lt;\u003d X, Y \u0026lt;\u003d 1000, 0 \u0026lt; P \u0026lt; 100000). (X, Y) is the coordinate of a city and P is the population of that city. \n\u003cbr\u003eIt is guaranteed that each city has a distinct location."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, print a line indicating the above mentioned maximum ratio A/B. The result should be rounded to 2 digits after decimal point."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2\n4\n1 1 20\n1 2 30\n200 2 80\n200 1 100\n3\n1 1 20\n1 2 30\n2 2 40\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e65.00\n70.00\u003c/pre\u003e"}}]}