{"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\u003eIn target practice you sometimes shoot at cardboard figures.\n In this problem a target is described by a simple polygon which\n is the outline of the target. For each target you will find out\n where a number of shots fired at the target struck. Some may\n have hit the target and some may have missed. Your job is to\n determine for each shot whether it hit or whether it missed. If\n the shot missed, you should determine how far away from the\n target the shot was. If the shot hit, you should determine how\n large a margin there was, i.e., how far away from the contour\n of the target the shot was.\u003c/p\u003e\n \u003ch2\u003eInput\u003c/h2\u003e\n \u003cp\u003eEach test case starts with a number \u003cspan class\u003d\"tex2jax_process\"\u003e$3 \\le n \\le 1000$\u003c/span\u003e which is the number\n of vertices of the target polygon (in clockwise or counter\n clockwise order). Then follow \u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e lines giving the coordinates\n \u003cspan class\u003d\"tex2jax_process\"\u003e$x$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$y$\u003c/span\u003e of each vertex. Then follows a\n line with an integer \u003cspan class\u003d\"tex2jax_process\"\u003e$s \\le\n 100$\u003c/span\u003e which is the number of shots fired at that target.\n Finally, there are \u003cspan class\u003d\"tex2jax_process\"\u003e$s$\u003c/span\u003e\n lines giving the coordinates \u003cspan class\u003d\"tex2jax_process\"\u003e$x$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$y$\u003c/span\u003e of each shot. Coordinates are\n integers between \u003cspan class\u003d\"tex2jax_process\"\u003e$-10\\,\n 000$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$10\\, 000$\u003c/span\u003e\n inclusive.\u003c/p\u003e\n \u003cp\u003eThe final test case is followed by a line with \u003cspan class\u003d\"tex2jax_process\"\u003e$n\u003d0$\u003c/span\u003e. There are at most \u003cspan class\u003d\"tex2jax_process\"\u003e$5$\u003c/span\u003e test cases.\u003c/p\u003e\n \u003ch2\u003eOutput\u003c/h2\u003e\n \u003cp\u003eFor each test case, output “\u003ctt class\u003d\"ttfamily\"\u003eCase\n \u003cspan class\u003d\"tex2jax_process\"\u003e$c$\u003c/span\u003e\u003c/tt\u003e” where\n \u003cspan class\u003d\"tex2jax_process\"\u003e$c$\u003c/span\u003e is the number of the\n test case. Then follows a line for every shot fired at the\n target. For each shot, if it missed, print “\u003ctt class\u003d\"ttfamily\"\u003eMiss! \u003cspan class\u003d\"tex2jax_process\"\u003e$d$\u003c/span\u003e\u003c/tt\u003e”\n and if it hit, print “\u003ctt class\u003d\"ttfamily\"\u003eHit! \u003cspan class\u003d\"tex2jax_process\"\u003e$d$\u003c/span\u003e\u003c/tt\u003e” where \u003cspan class\u003d\"tex2jax_process\"\u003e$d$\u003c/span\u003e is the distance mentioned above.\n If a shot hits the edge of the target, print “\u003ctt class\u003d\"ttfamily\"\u003eWinged!\u003c/tt\u003e”. The distance should be given with an\n absolute error of at most \u003cspan class\u003d\"tex2jax_process\"\u003e$10^{-3}$\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\u003e4\n0 0\n0 10\n10 10\n10 0\n2\n3 1\n11 11\n3\n0 0\n10 10\n10 0\n1\n5 0\n0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1\nHit! 1.000000000\nMiss! 1.414213562\nCase 2\nWinged!\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n "}}]}