問題一覧 > 通常問題

No.948 Bomb vs Dush

レベル : / AI推定難易度 : 1575 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-5}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : (AC するまで非表示) / 解いたユーザー数 79
作問者 : ningenMe / テスター : 37zigen
お気に入りにしたユーザー ProblemId : 3661 / 自分の提出
問題文最終更新日: 2019-12-01 20:31:52
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
Advent Calendar Contest 2019 (順位表) の他の問題:

Problem Statement

We play a game in which jupiro, who "has bombs", tries to catch sarashin, who "runs fast".
Initially, at time $t=0$, sarashin is at coordinates $(0,0)$ on the $xy$-plane, and jupiro is at coordinates $(a(t),b(t))$.
Here, $a(t),b(t)$ are functions of time $t$, and they always satisfy the following condition.

$(a(t)-R\cos{t})^2+(b(t)-R\sin{t})^2 \le r^2 \ (0 < r < R \le 100)$

sarashin's goal is to reach the safe zone, the point at coordinates $(100^{100^{100}},100^{100^{100}})$, which jupiro can never reach.
At the current time $t$, sarashin cannot enter any region where jupiro may have been at some past time $s\ (0 \le s \le t)$, because a bomb may have been planted there.
sarashin must move to the safe zone while avoiding the regions where jupiro has been.
Since sarashin runs very fast, he can move on the $xy$-plane at a speed of $100^{100^{100}}$.

In this game, if sarashin stays at the initial position $(0,0)$ without moving at all, it can be proved that there exists a $t'$ such that he can reach the safe zone point during times $t\ (0 \le t < t')$,
but can no longer reach the safe zone point at times $t\ (t' \le t)$.
Find this boundary time $t'$. Also, find the area of the region where jupiro may have been between time $t=0$ and $t=t'$.
In this problem, sarashin and jupiro are regarded as points with no size.

Input

$r$
$R$

$0 < r < r + 0.01 < R \le 100$
Input values are given with at most 7 digits after the decimal point.
Time $t$ is $t=0$ in the initial state and advances only in the positive direction.

Output

On the first line, output the boundary time $t'$.
On the second line, output the area of the region where jupiro may have been between time $t=0$ and $t=t'$.
Your answer is considered correct if the absolute or relative error from the judge's output is at most $10^{-5}$.
Print a newline at the end.

Sample

Sample 1
Input
0.5
1
Output
5.2359877560
6.0213859194

Sample 2
Input
0.98
1
Output
3.5422623382
9.9600197675

Sample 3
Input
0.001
2.5
Output
6.2823853072
0.0314150681

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。