问题2851--Area of Circles

2851: Area of Circles

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 MB

题目描述

There are two circles on the plane. Now you must to calculate the area which they cover the plane. For example, in Figure 1, the area of the red region is the answer of this problem.

输入

The input contains multiple test cases. The first line contains an integer T describing the number of test cases. Each case contains two lines. One line describes one circle. For each line has three integers x, y, r, indicating the coordinate of the centre and radius. All the numbers are separated by spaces. All the input integers are within the range of [-1000, 1000].

输出

For each test case, output one line containing a number with 3 digits after decimal point representing the answer describing above.

样例输入 Copy

2
2 2 2 1 4 3
2 2 1 -2 -2 1

样例输出 Copy

32.462
6.283

来源/分类