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

建议使用的浏览器:

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

6365:Shoot Game

题目描述
You are playing a shooting game. The rules of the game are like this: You are in a two-dimensional plane and stand at $(0, 0)$. There are some obstacles above the x-axis. The location of each obstacle can be expressed as a tuple $(H, L, R)$, It means there is an obstacle at the height of $H$, interval $L$ to $R$. The $i_{th}$ obstacle with $W_i$ defense power.

You can shoot out "Energy beam of life". Each time you can consume $X$ vitality then shoot out an energy beam with $X$ attack power. The energy beam is a ray, When an energy beam hit an obstacle. If it's attack power not less than defense power of obstacle, it will destroy and pass through this obstacle. Otherwise it will disappear in smoke.

Now you want to find an optimal strategy to destroy all obstacles and consume minimum vitality.
输入解释
The first line contain a integer $T$ (no morn than 10), the following is $T$ test case, for each test case :

The first line of each test case contains a integers n (1 $\le$ n $\le$ 300), number of obstacle.

Each of the next n lines contains 4 integers $H_i$, $L_i$, $R_i$, $W_i$, ($1\le H_i\le 1,000,000,000$, $-1,000,000,000\le L_i\le R_i\le 1,000,000,000$, $0\le W_i\le 1,000,000,000$) means information of obstacles.
输出解释
For each test case output the answer as described previously.
输入样例
2
3
1 1 2 2
2 -1 1 4
3 -2 -1 3
3
1 -1 1 2
2 -1 1 3
3 0 2 0
输出样例
6
3

提示
The first testcase as shown in the picture:
来自杭电HDUOJ的附加信息
Recommend chendu

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

源链接: HDU-6365

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

共提交 0

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