{"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 You want a tidy palace but you are too lazy to do the cleaning. As a result, your cousin Coach Pang gave you a cleaning robot. Unfortunately, the robot has some flaws and some furniture may hamper the cleaning.\u003cbr\u003e To simplify the problem, we consider all objects in a 2D-Plane. The room is viewed as a rectangle with edges parallel to the axis. Both robot and furniture are in shape of convex polygons.\u003cbr\u003e During the cleaning, the robot can move towards any direction (but only translation are permitted which means it cannot rotate). Although the robot has the ability to move through furniture, it can only do cleaning when it has no area outside the room or intersect with furniture. Besides, only one point can do the cleaning which is given as the first vertex of the robot in the input.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":" The first line of the input contains an integer T indicates the number of test cases.\u003cbr\u003e In the first line of each test case, there will be an integer n (0 \u0026lt;\u003d n \u0026lt;\u003d 20) and then (n + 1) blocks of data describing the objects. The first n blocks for furniture and the last one for the robot. All the vertices of an object are shown in corresponding block with counter-clockwise order. The first line of each block contains an integer m (3 \u0026lt;\u003d m \u0026lt;\u003d 20). Then m lines follow. In each line, there are two integers x\u003csub\u003ei\u003c/sub\u003e, y\u003csub\u003ei\u003c/sub\u003e indicating a vertex of the convex polygon.\u003cbr\u003eAt the end of each set of data, there will be four integers in a line, x\u003csub\u003eBL\u003c/sub\u003e, y\u003csub\u003eBL\u003c/sub\u003e, x\u003csub\u003eTR\u003c/sub\u003e, y\u003csub\u003eTR\u003c/sub\u003e, indicates the coordinates of the bottom left corner and the top right corner of your room.\u003cbr\u003eThe absolute value of all coordinates are within 10\u003csup\u003e3\u003c/sup\u003e.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":" For each test case, output one line “Case #x: y”, where x is the case number (starting from 1) and y is size of the area that robot can clean, rounded to 3 digits after decimal point.\u003cbr\u003e"}},{"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\r\n4\r\n3 3\r\n4 3\r\n4 4\r\n3 4\r\n4\r\n1 1\r\n2 1\r\n2 2\r\n1 2\r\n0 0 10 10\r\n0\r\n4\r\n1 1\r\n2 1\r\n2 2\r\n1 2\r\n0 0 10 10\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1: 77.000\r\nCase #2: 81.000\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}