当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

7229:Vale of Eternal

题目描述
$\space \space$*To ask why we fight?*

$\space \space$*Is to ask why the leaves fall?*

$\space \space$*It is in the nature.*

$\space \space$*Perhaps there is a better question.*

$\space \space$*Why do we fight?*

$\space \space$*To protect home and family,*

$\space \space$*To preserve balance and bring harmony.*

$\space \space$*For my kind,*

$\space \space$*The true question is what is worth fighting for.*

$\space \space \space \space \space \space \space \space\space \space \space \space \space \space \space \space\space \space \space \space \space \space \space \space\space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space\space \space \space \space \space \space \space \space\space \space \space \space \space \space \space \space\space \space \space \space \space \space \space \space$ *——CG《Mists of Pandaria》*

Chen is practicing Kungfu. He uses Chi Burst to make energy points split.

Initially, there are $n$ energy points on the infinite 2D plane, in every second, every energy point will check its four neighbouring positions (up $(0, 1)$, down $(0, -1)$, left $(-1, 0)$, right $(1, 0)$ ) If there is no energy point at that position, a new energy point will be generated at that position.

Chen would like to know the progress of the practice in advance. He will give you $q$ queries, each query consists of a single integer $t$, and you need to find the area of the convex polygon constructed by all energy points after $t$ seconds.
输入解释
The input consists of multiple test cases.

The first line contains a single integer $T\ (1 \leq T \leq 11)$, denoting the number of test cases.

In each test case, the first line contains two integers $n,q(1 \leq n,q \leq 2*10^5)$, denoting the number of points initially and the number of queries.

The following $n$ lines, the $i$-th line contains two integers $x, y(0 \leq x, y \leq 10^8)$, denoting the coordinate of the $i$-th initial energy point.

Then following $q$ lines, each line contain one integer $t(0 \leq t \leq 10^8)$, denoting the number of seconds.

It's guaranteed that $\sum n \leq 5 * 10^5, \sum q \leq 5 * 10^5$.
输出解释
For each query, output a single line, denoting the answer, your answer should be rounded to one decimal place.
输入样例
2
3 3
2 3
4 3
1 1
1
2
3
3 3
4 1
3 4
2 1
2
3
4
输出样例
11.0
24.0
41.0
27.0
45.0
67.0

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-7229

最后修改于 2022-09-15T06:17:30+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 524288/524288K(Java/Others)