#P11099. [2016杭电多校]Hard problem

    ID: 10241 传统题 1000ms 256MiB 尝试: 1 已通过: 1 难度: 4 上传者: 标签>CF1600普及+/提高-圆相交对称性分析补集转化

[2016杭电多校]Hard problem

Hard problem

Problem Description

cjj is fun with math problem. One day he found a Olympic Mathematics problem for primary school students. It is too difficult for cjj. Can you solve it?

Consider the square [0,L]×[0,L][0,L]\times[0,L]. Let DD be its inscribed disk, with center (L/2,L/2)(L/2,L/2) and radius L/2L/2. Draw quarter disks of radius LL inside the square, centered at the two opposite vertices (0,L)(0,L) and (L,0)(L,0).

The shaded area consists of points in DD that lie outside at least one of the two quarter disks. Given LL, compute the total shaded area.

Original diagram showing the two shaded regions

Input

The first line contains a integer T(1<=T<=10000), means the number of the test case. Each case contains one line with integer l(1<=l<=10000).

Output

For each test case, print the shaded area on its own line, rounded to exactly two digits after the decimal point.

Sample Input

1
1

Sample Output

0.29

Author

BUPT

Source

2016 Multi-University Training Contest 10

Original problem (HDU 5858)