{"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\u003eAs an employee of Aqueous Contaminate Management, you must\n monitor the pollution that gets dumped (sometimes accidentally,\n sometimes purposefully) into rivers, lakes and oceans. One of\n your jobs is to measure the impact of the pollution on various\n ecosystems in the water such as coral reefs, spawning grounds,\n and so on.\u003c/p\u003e\n\n \u003cdiv id\u003d\"fig:pollution\" class\u003d\"figure\"\u003e\n \u003ccenter\u003e\n \u003cimg src\u003d\"CDN_BASE_URL/35c88f2a2bbcb496813155179c6cf7f9?v\u003d1714822901\" alt\u003d\"\\includegraphics[width\u003d0.6\\textwidth ]{sample}\" 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\u003eThe model you use in your analysis is illustrated in\n Figure\u0026nbsp;1. The shoreline (the horizontal line in the\n figure) lies on the \u003cspan class\u003d\"tex2jax_process\"\u003e$x$\u003c/span\u003e-axis with the source of the\n pollution located at the origin (0,0). The spread of the\n pollution into the water is represented by the semicircle, and\n the polygon represents the ecosystem of concern. You must\n determine the area of the ecosystem that is contaminated,\n represented by the dark blue region in the figure.\u003c/p\u003e\n\n \u003ch2\u003eInput\u003c/h2\u003e\n\n \u003cp\u003eThe input consists of a single test case. A test case starts\n with a line containing two integers \u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$r$\u003c/span\u003e, where \u003cspan class\u003d\"tex2jax_process\"\u003e$3 \\le n \\le 100$\u003c/span\u003e is the number of\n vertices in the polygon and \u003cspan class\u003d\"tex2jax_process\"\u003e$1\n \\le r \\le 1\\, 000$\u003c/span\u003e is the radius of the pollution field.\n This is followed by \u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e\n lines, each containing two integers \u003cspan class\u003d\"tex2jax_process\"\u003e$x_ i, y_ i$\u003c/span\u003e, giving the coordinates\n of the polygon vertices in counter-clockwise order, where\n \u003cspan class\u003d\"tex2jax_process\"\u003e$-1\\, 500 \\le x_ i \\le 1\\,\n 500$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$0 \\le y_ i \\le\n 1\\, 500$\u003c/span\u003e. The polygon does not self-intersect or touch\n itself. No vertex lies on the circle boundary.\u003c/p\u003e\n\n \u003ch2\u003eOutput\u003c/h2\u003e\n\n \u003cp\u003eDisplay the area of the polygon that falls within the\n semicircle centered at the origin with radius \u003cspan class\u003d\"tex2jax_process\"\u003e$r$\u003c/span\u003e. Give the result with an absolute\n error of at most \u003cspan class\u003d\"tex2jax_process\"\u003e$10^{-3}$\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\u003e6 10\n-8 2\n8 2\n8 14\n0 14\n0 6\n-8 14\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e101.576437872\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n "}}]}