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

建议使用的浏览器:

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

5934:Bomb

题目描述
There are $N$ bombs needing exploding.

Each bomb has three attributes: exploding radius $r_i$, position $(x_i,y_i)$ and lighting-cost $c_i$ which means you need to pay $c_i$ cost making it explode.

If a un-lighting bomb is in or on the border the exploding area of another exploding one, the un-lighting bomb also will explode.

Now you know the attributes of all bombs, please use the minimum cost to explode all bombs.
输入解释
First line contains an integer $T$, which indicates the number of test cases.

Every test case begins with an integers $N$, which indicates the numbers of bombs.

In the following $N$ lines, the ith line contains four intergers $x_i$, $y_i$, $r_i$ and $c_i$, indicating the coordinate of ith bomb is $(x_i, y_i)$, exploding radius is $r_i$ and lighting-cost is $c_i$.

Limits
- $1 \leq T \leq 20$
- $1 \leq N \leq 1000$
- $-10^8 \leq x_i, y_i, r_i \leq 10^8$
- $1 \leq c_i \leq 10^4$
输出解释
For every test case, you should output 'Case #x: y', where x indicates the case number and counts from 1 and y is the minimum cost.
输入样例
1
5
0 0 1 5
1 1 1 6
0 1 1 7
3 0 2 10
5 0 1 4
输出样例
Case #1: 15
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-5934

最后修改于 2020-10-25T23:26:52+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)