QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 1024 MB Points totaux : 100

#14846. Enclosure

Statistiques

Pahom 想要圈出尽可能大的一片区域。他从黎明出发,黄昏结束,一路上用他的铁铲制作标记。由他的标记作为顶点所围成的多边形代表 Pahom 占领的土地。

Pahom 的步行速度为每秒 $1$ 米,制作每个标记需要花费 $m$ 秒,从黎明到黄昏的总可用时间为 $t$ 秒。求 Pahom 能够占领的最大面积。

Pahom 必须在结束前回到起点。

输入格式

输入的第一行包含测试用例的数量 $c$ ($1 \le c \le 1000$)。

接下来的 $c$ 行,每行包含两个空格分隔的整数 $m$ 和 $t$ ($1 \le m, t \le 10^8$) —— 制作一个标记所需的时间,以及 Pahom 的总可用时间。

输出格式

对于每个测试用例,输出一个实数,表示最大面积。

你的答案与标准答案的绝对误差或相对误差应不超过 $10^{-6}$。

样例

输入样例 1

5
1 27
2 67
8 1000
10 25
7278 753936335

输出样例 1

33.3084424754024
223.59324298054216
66096.3389106506
0
45141982491296061.7734375

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.