405234: GYM101853 I Circles

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. Circlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

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?

Input

The 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.

Output

For 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.

ExampleInput
1
2 3 8
Output
32

加入题单

算法标签: