Problem D
Wrapping Snowballs
Turbo Granny Alice has a spherical golden snowball (don’t ask why it’s golden) of radius $R_{ball}$ she needs to wrap up as a present. Unfortunately, many of the pieces of paper Alice has are not large enough to wrap the snowball completely. Given circular, flat, pieces of paper with radius $R_i$, what is the maximum surface area of the snowball that each piece of paper can cover?
Note: Alice does not have scissors so she cannot cut the paper. However, the paper is allowed to fold and overlap with itself when wrapping the snowball. The pieces of paper cannot be stretched.
Input
The first line of input contains two integers, $1 \leq R_{ball} \leq 10^{4}$ and $1 \leq N \leq 1000$. The next $N$ lines each contain one integer, $1 \leq R_i \leq 10^{4}$ for $1 \leq i \leq N$.
Output
Output $N$ lines, each line containing the maximum surface area of the sphere covered by the piece of paper of radius $R_i$. Output within $10^{-6}$ absolute or relative error will be accepted.
Sample Input 1 | Sample Output 1 |
---|---|
5 2 1 5 |
3.13113463074296 72.209144937841 |
Sample Input 2 | Sample Output 2 |
---|---|
17 1 3 |
28.2010337101307 |