http://acm.timus.ru/problem.aspx?space=1&num=1824
1824. Ifrit BomberTime limit: 0.5 second Memory limit: 64
MB
In the six years that passed since the
first experimental genie bombardments, Pitirim Schwartz has made
considerable advance. His latest invention is an ifrit bottle, which has
been developed especially for bombing large cities. Each ifrit from such a
bottle ruins everything within a radius of r miles from the
impact point. Only a few ifrit bottles are needed to demolish all
n large cities of a neighboring country… Alas, Pitirim has very
few ifrit bottles, so he has asked programmer Privalov to compute the
minimal number of bottles needed for the destruction of all the
cities. For the convenience of aiming, the bottles
can only be dropped exactly on cities. The radius of destruction is so
large that cities can be regarded as points of the plane. When an ifrit
bottle is dropped, any city within or on the border of the destruction
zone is demolished. |
30个城市,坐标为整数,0~1000。核弹炸的半径为整数,<=1000,只能在城市中投放。
求最少的核弹数,在哪几个城市投放,能炸完所有城市。
好像叫二分图的最小支配集…是个NP问题,只能搜索。
然后好像是用超碉的A*+dancinglinks,太强了,我不会口牙!
等我会了再来写
(准备写)URAL1824 Ifrit Bomber 题解,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/yuiffy/p/3748161.html