文件名称:科技(1) B 064 04
介绍说明--下载内容均来自于网络,请自行研究使用
某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统,但是这样的导弹拦截系统有个缺陷,虽然他的第一发炮弹能够达到任意高度,但是以后每一发炮弹都不能高于前一发的高度。某一天,雷达捕捉到敌国的导弹来袭。由于该系统还在使用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹。输入导弹依次飞来的高度(雷达给出高度数据是不大于30000的整数),计算这套系统最多能拦截多少导弹,如果要拦截所有的导弹最少配备多少套这种导弹系统。
三;问题分析:
该系统的第一发炮弹能够达到任意高度,所以要求出系统最多能够拦截的导弹数,其实就是在求一个最长的下降序列。要求出系统拦截所有的导弹至少需要配备的套数,可用贪婪算法,采用数组记录导弹数量和导弹的分类,算出数组的元素个数即为系统的套数。
-a country to defend against enemy missile attacks, the development of a missile interception system, but such a missile interceptor system has a flaw, though his first rounds to achieve highly arbitrary, but each shell and should not be higher than the former was too high. One day, the radar to capture incoming enemy missiles. As the system is still in use stage, only a system, it is not possible to intercept all missiles. The importation of missile followed the flying height (height of the radar data is not more than 30,000 of the integer), the system calculated the maximum number of interceptor missiles to intercept all missiles with a minimum number of sets of such missile systems. 3; Analysis : The system of the first rounds of arbitrary height can be achieved, requires the system to t
三;问题分析:
该系统的第一发炮弹能够达到任意高度,所以要求出系统最多能够拦截的导弹数,其实就是在求一个最长的下降序列。要求出系统拦截所有的导弹至少需要配备的套数,可用贪婪算法,采用数组记录导弹数量和导弹的分类,算出数组的元素个数即为系统的套数。
-a country to defend against enemy missile attacks, the development of a missile interception system, but such a missile interceptor system has a flaw, though his first rounds to achieve highly arbitrary, but each shell and should not be higher than the former was too high. One day, the radar to capture incoming enemy missiles. As the system is still in use stage, only a system, it is not possible to intercept all missiles. The importation of missile followed the flying height (height of the radar data is not more than 30,000 of the integer), the system calculated the maximum number of interceptor missiles to intercept all missiles with a minimum number of sets of such missile systems. 3; Analysis : The system of the first rounds of arbitrary height can be achieved, requires the system to t
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 89346497科技(1) b 064 04.rar 列表 科技(1) B 064 04.doc