{"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\"\u003eFall wants to draw a perfect binary tree.\u003cbr\u003e\u003cbr\u003eWe first stipulate that all nodes in the tree with the same depth also have the same y-coordinate in the plane. Define nodes with the same depth to be nodes at the same level, then the perfect binary tree has four properties.\u003cbr\u003e\u003cbr\u003e- It is a full binary tree.\u003cbr\u003e- The difference between the y-coordinates of two nodes at each adjacent level is a constant.\u003cbr\u003e- The difference between the x-coordinates of two adjacent nodes at the same level is constant.\u003cbr\u003e- The x-coordinate of each node is the average of the x-coordinates of its sons.\u003cbr\u003e\u003cbr\u003eFall has drawn the root node and its left and right sons of this binary tree. Now Fall intends to draw a total of $k$ levels and cut the binary tree down and paste it on the wall afterwards, so he wants to know what is the area of the convex hull of all nodes of this perfect binary tree.\u003cbr\u003e\u003cbr\u003e\u003cdiv style\u003d\"font-family:Times New Roman;font-size:14px;background-color:F4FBFF;border:#B7CBFF 1px dashed;padding:6px\"\u003e\u003cdiv style\u003d\"font-family:Arial;font-weight:bold;color:#7CA9ED;border-bottom:#B7CBFF 1px dashed\"\u003e\u003ci\u003eHint\u003c/i\u003e\u003c/div\u003e\u003cbr\u003eHere\u0027s the picture of the perfect binary tree for the first example, whose area is $S_{ABC}+S_{BCGD}\u003d14$\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/b67576ed9227732c02598c3aeac3c81f?v\u003d1714552128\"\u003e\u003c/center\u003e\u003cbr\u003e\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input consists of multiple test cases. \u003cbr\u003e\u003cbr\u003eThe first line contains an integer $T$ ($T \\leq 2\\times 10^5$) -- the number of test cases.\u003cbr\u003e\u003cbr\u003eFor each test case:\u003cbr\u003e\u003cbr\u003eIn the first line, there is an integer $k$ ($2 \\leq k \\leq 10^4$).\u003cbr\u003e\u003cbr\u003eIn the second line, there are six integers $x_{root},y_{root},x_{lson},y_{lson},x_{rson},y_{rson}\\in [-10^4,10^4]$ ,which represent the coordinates of the root node and its sons.\u003cbr\u003e\u003cbr\u003eIt is guaranteed that all the coordinates meet the conditions of the question, which means:\u003cbr\u003e- $x_{lson}+x_{rson}\u003d2\\times x_{root}$\u003cbr\u003e- $y_{lson}\u003dy_{rson}$\u003cbr\u003e- $y_{root}\u0026gt;y_{lson},x_{lson}\u0026lt;x_{rson}$"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output a real number representing the answer, with three decimal places.\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\u003e3\r\n3\r\n0 0 -2 -2 2 -2\r\n4\r\n0 0 -4 -2 4 -2\r\n10000\r\n0 0 -10000 -10000 10000 -10000\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e14.000\r\n54.000\r\n3999000000000.000\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}