{"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\u003eYou have a fence post located at the point \u003cspan class\u003d\"tex2jax_process\"\u003e$(x, y)$\u003c/span\u003e in the plane, to which a goat\n is tethered by a rope. You also have a house, which you model\n as an axis-aligned rectangle with diagonally opposite corners\n at the points \u003cspan class\u003d\"tex2jax_process\"\u003e$(x_1, y_1)$\u003c/span\u003e\n and \u003cspan class\u003d\"tex2jax_process\"\u003e$(x_2, y_2)$\u003c/span\u003e. You want\n to pick a length of rope that guarantees the goat cannot reach\n the house.\u003c/p\u003e\n \u003cp\u003eDetermine the minimum distance from the fence post to the\n house, so that you can make sure to use a shorter rope.\u003c/p\u003e\n \u003ch2\u003eInput\u003c/h2\u003e\n \u003cp\u003eThe input consists of a single line containing six\n space-separated 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$x_1$\u003c/span\u003e, \u003cspan class\u003d\"tex2jax_process\"\u003e$y_1$\u003c/span\u003e, \u003cspan class\u003d\"tex2jax_process\"\u003e$x_2$\u003c/span\u003e, and \u003cspan class\u003d\"tex2jax_process\"\u003e$y_2$\u003c/span\u003e, each in the range \u003cspan class\u003d\"tex2jax_process\"\u003e$[-999, 999]$\u003c/span\u003e.\u003c/p\u003e\n \u003cp\u003eIt is guaranteed that \u003cspan class\u003d\"tex2jax_process\"\u003e$x_1\n \u0026lt; x_2$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$y_1 \u0026lt;\n y_2$\u003c/span\u003e, and that \u003cspan class\u003d\"tex2jax_process\"\u003e$(x,\n y)$\u003c/span\u003e is strictly outside the axis-aligned rectangle with\n corners at \u003cspan class\u003d\"tex2jax_process\"\u003e$(x_1, y_1)$\u003c/span\u003e\n and \u003cspan class\u003d\"tex2jax_process\"\u003e$(x_2, y_2)$\u003c/span\u003e.\u003c/p\u003e\n \u003ch2\u003eOutput\u003c/h2\u003e\n \u003cp\u003ePrint the minimum distance from the goat’s post to the\n house, with a relative or absolute error no more than\n \u003cspan class\u003d\"tex2jax_process\"\u003e$0.001$\u003c/span\u003e.\u003c/p\u003e\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\u003e7 3 0 0 5 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2.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 \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\u003e6 0 0 2 7 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2.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 \u003ch2\u003eSample 3\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\u003e3 -4 -3 -1 -1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5.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 "}}]}