Imposing figures
Hard
Execution time limit is 2 seconds
Runtime memory usage limit is 64 megabytes
Peter cuts the cardboard into circle and triangle, and Vassya tries to impose them on each other to obtain such a position, in which area of overlapping 2 pieces will be maximised. Help Vassya.
Input
The first line specifies the number of pairs of figures T, Petya cut (1 ≤ T ≤ 20), and the subsequent T rows of four integers through the gap: the length of the triangle sides a, b, c and the radius of the circle R.
(1 ≤ a ≤ b ≤ c ≤ 100, 1 ≤ R ≤ 100, a+b>c)
Output
Output T numbers found Vassya (one per line). Bring out the results with an accuracy of 2 digits after the decimal point.
Examples
Input #1
Answer #1
Submissions 56
Acceptance rate 18%