{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"It\u0027s raining outside. Farmer Johnson\u0027s bull Ben wants some rain to water his flowers. Ben nails two wooden boards on the wall of his barn. Shown in the pictures below, the two boards on the wall just look like two segments on the plane, as they have the same width.\r\u003cbr\u003e\u003ccenter\u003e\u003cimg src\u003d\"CDN_BASE_URL/e16138e52dbc31bae3615e02aeaaa0d3?v\u003d1723774510\"\u003e\u003c/center\u003e\r\u003cbr\u003eYour mission is to calculate how much rain these two boards can collect.\r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains the number of test cases.\r\u003cbr\u003eEach test case consists of 8 integers not exceeding 10,000 by absolute value, \u003ci\u003ex\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, \u003ci\u003ex\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e, \u003ci\u003ex\u003c/i\u003e\u003csub\u003e3\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub\u003e3\u003c/sub\u003e, \u003ci\u003ex\u003c/i\u003e\u003csub\u003e4\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub\u003e4\u003c/sub\u003e. (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e) are the endpoints of one board, and (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e3\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub\u003e3\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e4\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub\u003e4\u003c/sub\u003e) are the endpoints of the other one.\r\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case output a single line containing a real number with precision up to two decimal places - the amount of rain collected.\r\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\n0 1 1 0\r\n1 0 2 1\r\n\r\n0 1 2 1\r\n1 0 1 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1.00\r\n0.00\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}