
ZOJ Problem Set  4111
Consider a point $P(x_p, y_p)$ on the twodimensional plane. Starting from $(a, 0)$, point $P$ moves along the circumference of the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$ with a uniform speed of 1 unit per second in counterclockwise direction. A moving square $S$, whose sides are parallel with the xaxis or the yaxis, takes $P$ as its center and changes its side length during its movement. Precisely speaking, the side length of $S$ is exactly $2y_p$. What's the total area passed through by $S$ after point $P$ moving for $t$ seconds? InputThere are multiple test cases. The first line of the input is an integer $T$ (about $10^5$), indicating the number of test cases. For each test case: The first and only line contains three real numbers $a, b, t$ ($1 \le \frac{a}{2} \le b \le a \le 100, 1 \le t \le 1000$) with at most six digits after the decimal point, indicating the length of the semimajor axis of the ellipse, the length of the semiminor axis of the ellipse and the moving time in seconds. OutputFor each test case output one line, indicating the total area passed through by the moving square. Your answer will be considered correct if and only if the absolute error or relative error of your answer is less than $10^{6}$. Sample Input2 3 3 2 4 3 2 Sample Output13.765723680546197 12.734809553184123 Author: JIN, Mengge Source: The 16th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple 