#Lutece1713. 无关青云路,无关诗书,无你处,无江湖

无关青云路,无关诗书,无你处,无江湖

Migrated from Lutece 1713 无关青云路,无关诗书,无你处,无江湖

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

每个圆的属性可以使用三个参数来描述,xx-圆心横坐标,yy-圆心纵坐标,rr-半径,现给出两个圆分别的参数,求两个圆相交的面积。

Input

第一行是一个正整数TT(T12T \leq 12),表示有TT组测试数据 接下来有T行,每行有六个正整数描述两个圆的属性x1,y1,r1,x2,y2,r2x_1,y_1,r_1,x_2,y_2,r_20x1,y1,r1,x2,y2,r25000 \leq x_1,y_1,r_1,x_2,y_2,r_2 \leq 500

Output

对于每组测试数据输出一行,表示两个圆相交的面积大小,结果保留6位小数

Samples

输入数据 1

3
0 0 10 15 0 10
-10 -10 5 0 -10 10
100 100 20 100 110 20

输出数据 1

45.331175
35.076661
860.843690

Note

By Qyitong

Resources

2017 UESTC Training for Math