{"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\"\u003e\u003ci\u003eThe Tower shows a tall tower perched on the top of a rocky mountain. Lightning strikes, setting the building alight, and two people leap from the windows, head first and arms outstretched. It is a scene of chaos and destruction.\u003c/i\u003e\u003cbr\u003e\u003cbr\u003eThere is a cone tower with base center at (0, 0, 0), base radius r and apex (0, 0, h). At time 0 , a point located at ($x_0$, $y_0$, $z_0$) with velocity ($v_x$, $v_y$, $v_z$). What time will they collide? Here is the cone tower.\u003cbr\u003e\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/07ec4348e03362af7ab619f10a66a733?v\u003d1715964170\"\u003e\u003c/center\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains testcase number $T$ ($T$ ≤ 1000), For each testcase the first line contains space\u0026#x2;separated real numbers $r$ and $h$ (1 ≤ $r$, $h$ ≤ 1000) — the base radius and the cone height correspondingly.\u003cbr\u003eFor each testcase the second line contains three real numbers $x_0$, $y_0$, $z_0$ (0 ≤ |$x_0$|, |$y_0$|, $z_0$ ≤ 1000). For each testcase the third line contains three real numbers $v_x$, $v_y$, $v_z$ (1 ≤ $v_x^2$ + $v_y^2$ + $v_z^2$ ≤ 3 × $10^6$). It is guaranteed that at time 0 the point is outside the cone and they will always collide."}},{"title":"Output","value":{"format":"HTML","content":"For each testcase print Case $i$ : and then print the answer in one line, with absolute or relative error not exceeding $10^{-6}$"}},{"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\u003e2\r\n1 2\r\n1 1 1\r\n-1.5 -1.5 -0.5\r\n1 1\r\n1 1 1\r\n-1 -1 -1\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 0.3855293381\r\nCase 2: 0.5857864376\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}