HBC200511Guard the empire题解

arkfactor 算法基础篇 48 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
Hbb is a general and respected by the entire people of the Empire. The wizard will launch an attack in the near future in an attempt to destroy the empire. Hbb had knew the way the Wizards wil

    Hbb is a general and respected by the entire people of the Empire. The wizard will launch an attack in the near future in an attempt to destroy the empire. Hbb had knew the way the Wizards will attack this time: they will summon N bone dragons on the broad flat ground outside the wall and let the bone dragons spray a flame (the flame can only be emitted once). If the wall is sprayed by flames, the wall will be completely destroyed in an instant. To withstand the wizard's attack, Hbb feels very anxious, although he already knew where all the bone dragons would be summoned.    Coincidentally, scientists at the Capital Laboratory have developed a new type of weapon. The striking range of the weapon is a circle with the weapon as the center and a radius of D. In other words, if the weapons are properly placed, the bone dragons within the strike range will be destroyed.    Weapons can only be placed on the wall, but Hbb is too anxious at this time to know how to place the weapon, so he tells you the position of the bone dragon . Since the cost of the weapon is very expensive, Hbb gives you a requirement: tell him what the minimum number of weapons to use in order to destroy all bone dragons. If there is no way to destroy all bone dragons, output -1.

HBC200511Guard the empire题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: HBC200511Guard the empire题解