QOJ.ac

QOJ

実行時間制限: 1.0 s メモリ制限: 256 MB 満点: 100

#18654. 生存路线

統計

最近发现的行星 i1c5l 的表面是一个半径为 $R$ 的完美球体。地球航天部队发射了一个科研舱 Waldemar-63,原本计划在行星表面的 $A$ 点着陆。然而,由于计算失误,Waldemar-63 最终降落在了 $B$ 点。幸运的是,Waldemar 系列科研舱配备了轮式行驶机构,可以帮助其前往最初的目的地。尽管如此,其能量储备非常有限,因此以最短的行驶距离到达 $A$ 点至关重要。

一个主要的复杂情况是,行星表面上的某个点 $O$ 会辐射出未知来源的波。这些波在半径为 $r$ 的范围内传播(距离在球面上测量)。正如前 62 次任务所表明的那样,任何进入该辐射区域的设备都会立即损坏。因此,Waldemar-63 的路线必须避开辐射区域。请找出该设备从 $B$ 到 $A$ 必须行驶的最短距离。

输入格式

第一行包含整数 $X_A, Y_A$($-90 \le X_A \le 90, -180 \le Y_A \le 180$)—— $A$ 点的坐标(以度为单位的纬度和经度)。

第二行包含 $B$ 点的坐标。

第三行包含三个整数:$O$ 点的坐标和辐射半径 $r$。

第四行包含一个不超过 $1000$ 的正整数 —— 行星半径 $R$。

保证点 $A$ 和点 $B$ 均在辐射区域之外。

输出格式

输出计算出的距离。如果绝对或相对误差小于 $10^{-4}$,则认为答案正确。

样例

输入样例 1

55 49
55 129
90 0 1
2

输出样例 1

1.510687

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.