#P1257. Let's plant something!
Let's plant something!
题目描述
With the warm sun lights and the soft winds, Special Week is on her way to the carrots field which she has just bought in the countryside.
The former land owner is very reluctant to sell all his lands to Special Week to plant carrots, so he has done some plans to allocate his lands to Special Week. As the former land owner is very rich, you can just imagine that the land is a infinite square in the countryside.
The allocation plan is very easy to understand, just given four pair wise parallel lines, and the area within the four lines is the land planed to give Special Week as carrots field.
Which formally, you can just imagine that the four lines in the infinite square is:
And this image below shows under these above constraints the final land is: And now the owner just gives Special Week the price per inch, can you help Special Week calculate the total number of dollars needed to buy the land?
输入格式
The first line contains one positive integer indicates the number of test cases.
For each test case, one line with seven positive integers which indicates the four lines:
And it is guaranteed that , all integers is between to and all integers are distinct.
输出格式
or each test case print one line the total dollars needed to buy the land.
Your answer will be considered correct, if its absolute or relative error isn't greater than . Formally, let your answer be , while jury's answer be . Your answer will be considered correct if holds.
样例
2
1 -2 5 -5 3 -3 10
8 -3 10 9 8 2 3
200.0000000000
1.6363636364