{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n div.illustration {\n float: right;\n padding-left: 20px;\n }\n div.illustration .illustration {\n width: 100%;\n border-radius: 4px;\n }\n pre {\n display: block;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n color: #333;\n word-break: break-all;\n word-wrap: break-word;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\n \u003cp\u003eThat went well! As police sirens rang out around the palace,\n Mal Reynolds had already reached his lifting device outside of\n the city.\u003c/p\u003e\n\n \u003cp\u003eNo spaceship can escape Planet Zarzos without permission\n from the High Priest. However, Mal’s spaceship, Firefly, is in\n geostationary orbit well above the controlled zone and his\n small lifting device can avoid being recognised as an intruder\n if its vertical velocity is exactly \u003cspan class\u003d\"tex2jax_process\"\u003e$1$\u003c/span\u003e km/min.\u003c/p\u003e\n\n \u003cp\u003eThere are still two problems. First, Mal will not be able to\n control the vehicle from his space suit, so he must set up the\n autopilot while on the ground. The vertical velocity must be\n exactly \u003cspan class\u003d\"tex2jax_process\"\u003e$1$\u003c/span\u003e km/min and the\n horizontal velocity must be set in such a way that Mal will hit\n the Firefly on the resulting trajectory. Second, the energy\n shields of the planet disturb the autopilot: They will decrease\n or increase the horizontal velocity by a given factor. The\n original horizontal velocity is restored as soon as there is no\n interference. For this problem we consider Firefly to be a\n single point – the shape shown in Figure\u0026nbsp;1 is merely for\n decorative purposes.\u003c/p\u003e\n\n \u003cdiv id\u003d\"fig:heist sample\" class\u003d\"figure\"\u003e\n \u003ccenter\u003e\n \u003cimg src\u003d\"CDN_BASE_URL/74f479e25d17ddf18583e6a177a3e5b8?v\u003d1715311668\" alt\u003d\"\\includegraphics[width\u003d0.6\\textwidth ]{sample1.pdf}\" style\u003d\"width:60.00%\"\u003e\n\n \u003cdiv class\u003d\"caption\"\u003e\n \u003cb\u003eFigure 1\u003c/b\u003e: Illustration of Sample Input 1.\n \u003c/div\u003e\n \u003c/center\u003e\n \u003c/div\u003e\n\n \u003cp\u003eLuckily, Mal recorded the positions of the shields and their\n influence on the autopilot during his descent. What he needs\n now is a program telling him the right horizontal velocity\n setting.\u003c/p\u003e\n\n \u003ch2\u003eInput\u003c/h2\u003e\n\n \u003cp\u003eThe input consists of:\u003c/p\u003e\n\n \u003cul class\u003d\"itemize\"\u003e\n \u003cli\u003e\n \u003cp\u003eone line with two integers \u003cspan class\u003d\"tex2jax_process\"\u003e$x$\u003c/span\u003e, \u003cspan class\u003d\"tex2jax_process\"\u003e$y$\u003c/span\u003e (\u003cspan class\u003d\"tex2jax_process\"\u003e$-10^7 \\le x \\le 10^7$\u003c/span\u003e,\n \u003cspan class\u003d\"tex2jax_process\"\u003e$|x| \\le y \\le 10^8$\u003c/span\u003e\n and \u003cspan class\u003d\"tex2jax_process\"\u003e$1 \\le y$\u003c/span\u003e),\n Firefly’s coordinates relatively to Mal’s current position\n (in kilometres).\u003c/p\u003e\n \u003c/li\u003e\n\n \u003cli\u003e\n \u003cp\u003eone line with an integer \u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e (\u003cspan class\u003d\"tex2jax_process\"\u003e$0 \\le n\\le 100$\u003c/span\u003e), the number of\n shields.\u003c/p\u003e\n \u003c/li\u003e\n\n \u003cli\u003e\n \u003cp\u003e\u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e lines\n describing the \u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e\n shields, the \u003cspan class\u003d\"tex2jax_process\"\u003e$i$\u003c/span\u003eth\n line containing three numbers:\u003c/p\u003e\n\n \u003cul class\u003d\"itemize\"\u003e\n \u003cli\u003e\n \u003cp\u003ean integer \u003cspan class\u003d\"tex2jax_process\"\u003e$l_\n i$\u003c/span\u003e (\u003cspan class\u003d\"tex2jax_process\"\u003e$0 \\le l_ i\n \u0026lt; y$\u003c/span\u003e), the lower boundary of shield\n \u003cspan class\u003d\"tex2jax_process\"\u003e$i$\u003c/span\u003e (in\n kilometres).\u003c/p\u003e\n \u003c/li\u003e\n\n \u003cli\u003e\n \u003cp\u003ean integer \u003cspan class\u003d\"tex2jax_process\"\u003e$u_\n i$\u003c/span\u003e (\u003cspan class\u003d\"tex2jax_process\"\u003e$l_ i \u0026lt; u_\n i \\le y$\u003c/span\u003e), the upper boundary of shield\n \u003cspan class\u003d\"tex2jax_process\"\u003e$i$\u003c/span\u003e (in\n kilometres).\u003c/p\u003e\n \u003c/li\u003e\n\n \u003cli\u003e\n \u003cp\u003ea real value \u003cspan class\u003d\"tex2jax_process\"\u003e$f_\n i$\u003c/span\u003e (\u003cspan class\u003d\"tex2jax_process\"\u003e$0.1 \\le f_ i\n \\le 10.0$\u003c/span\u003e), the factor with which the horizontal\n velocity is multiplied during the traversal of shield\n \u003cspan class\u003d\"tex2jax_process\"\u003e$i$\u003c/span\u003e.\u003c/p\u003e\n \u003c/li\u003e\n \u003c/ul\u003e\n\n \u003cp\u003eIt is guaranteed that shield ranges do not intersect,\n i.e., for every pair of shields \u003cspan class\u003d\"tex2jax_process\"\u003e$i \\ne j$\u003c/span\u003e either \u003cspan class\u003d\"tex2jax_process\"\u003e$u_ i\\le l_ j$\u003c/span\u003e or \u003cspan class\u003d\"tex2jax_process\"\u003e$u_ j\\le l_ i$\u003c/span\u003e must hold.\u003c/p\u003e\n\n \u003cp\u003eAll real numbers will have at most \u003cspan class\u003d\"tex2jax_process\"\u003e$10$\u003c/span\u003e digits after the decimal\n point.\u003c/p\u003e\n \u003c/li\u003e\n \u003c/ul\u003e\n\n \u003ch2\u003eOutput\u003c/h2\u003e\n\n \u003cp\u003eOutput the horizontal velocity in km/min which Mal must\n choose in order to reach Firefly. The output must be accurate\n to an absolute or relative error of at most \u003cspan class\u003d\"tex2jax_process\"\u003e$10^{-6}$\u003c/span\u003e.\u003c/p\u003e\n\n \u003ch2\u003eSample 1\u003c/h2\u003e\u003cbody\u003e\u003ctable class\u003d\"vjudge_sample\"\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\u003e100 140\n1\n40 90 0.2000000000\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1.0\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n\n \u003ch2\u003eSample 2\u003c/h2\u003e\u003cbody\u003e\u003ctable class\u003d\"vjudge_sample\"\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\u003e100 100\n3\n0 20 2.0000000000\n50 100 0.1000000000\n20 50 0.2000000000\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1.96078431373\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n "}}]}