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

建议使用的浏览器:

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

2863:Top Shooter

题目描述
Since the Border War in 1962, Both China and India abide by the principle of no-expansion of military power, but India's recent actions are obviously going against this principle. Indian Prime Minister Singh delivered a speech in Congress, said that "regardless of face of China or other countries, India will, by all means to ensure the territorial integrity, national unity and security."
At the same time, India increases more than sixty thousand troops to the southern Tibetan, including the construction of five airports and advanced landing field. Obviously this behavior undermines the trust between the two countries. Aggressive as a result of India, China announced the establishment of commando in Tibet!



The commando consists of N snipers. Messages show that Indian will send airborne to our Border. Our Army organizes the commando ambushing in the mountains.
A sniper can only hit the target in his field of vision. And will not be able to hit the target outside his field of vision
As the captain of the commando, how will you show your talent to win the battle?

输入解释
The input consists of several test cases. The first line of each case contains two integers N, M (1<=N<=50, 1<=M<=1000), N representing the number of snipers, M representing the number of airborne. The next line contains N numbers (Hi,(1<=i<=N)), representing each sniper’s field of vision.(the field of vision Hi means that the sniper can only see the target higher than or equal to Hi meters), The next M lines contain a pair of integers(Ai,Hi) each, representing the airborne i (1<=i<=M) begin to fall at the moment Ai, and from the height Hi,(1<=Ai<=100,1<=Hi<=500).
We assume that each airborne falls one meter per second, a sniper can only hit one target per second.
输出解释
Output the maximum number of airborne the sniper team can hit.
输入样例
2 5
1 9
1 2
1 2
1 2
2 2
2 4
输出样例
4
来自杭电HDUOJ的附加信息
Recommend gaojie

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

源链接: HDU-2863

最后修改于 2020-10-25T22:57:36+00:00 由爬虫自动更新

共提交 0

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