405234: GYM101853 I Circles
Description
Let d be the diameter of a circle with center c = (a, b). A square has been drawn inside that circle such that its vertices lies at the circle's circumference. Four circles have been drawn on the square's sides such that the diameter of each circle is the side of the square, as shown in the figure below.
Your task is to calculate the shaded area in the figure for a given d. Can you?
InputThe first line contains an integer T (1 ≤ T ≤ 105), in which T is the number of test cases.
Each test case consists of a line containing an three integers a, b, and d ( - 109 ≤ a, b ≤ 109) (1 ≤ d ≤ 109), giving the center and the diameter of a circle.
OutputFor each test case, print a single line containing shaded area.
Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6.
ExampleInput1Output
2 3 8
32