QOJ.ac

QOJ

Limite de temps : 2.0 s Limite de mémoire : 256 MB Points totaux : 100

#9899. 平面上的正方形

Statistiques

考虑二维平面上的一个点 $P(x_p, y_p)$。点 $P$ 从 $(a, 0)$ 出发,沿着椭圆 $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$ 的周长以每秒 1 个单位的恒定速度逆时针运动。

一个运动的正方形 $S$,其边平行于 $x$ 轴或 $y$ 轴,以 $P$ 为中心,且其边长在运动过程中会发生变化。具体来说,$S$ 的边长始终为 $2|y_p|$。

求点 $P$ 运动 $t$ 秒后,正方形 $S$ 所扫过的总面积。

输入格式

输入包含多组测试数据。第一行是一个整数 $T$(约 $10^5$),表示测试数据的组数。对于每组测试数据:

仅一行,包含三个实数 $a, b, t$($1 \le \frac{a}{2} \le b \le a \le 100$,$1 \le t \le 1000$),小数点后最多有六位数字,分别表示椭圆的半长轴长度、半短轴长度以及运动时间(秒)。

输出格式

对于每组测试数据,输出一行,表示运动正方形扫过的总面积。如果你的答案与标准答案的绝对误差或相对误差小于 $10^{-6}$,则视为正确。

样例

输入 1

2
3 3 2
4 3 2

输出 1

13.765723680546197
12.734809553184123

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.