I\'ve had this problem for a few years. It was on an informatics contest in my town a while back. I failed to solve it, and my teacher failed to solve it. I haven\'t met anyone
When the circles are disposed as a clover with four leafs with a fifth circle in the middle, a circle will cover an area equal to R * 2 * R
. In this arrangement, the question becomes: how many circles that cover an area of R * 2 * R
will cover an area of W * H
?, or N * R * 2 * R = W * H
. So N = W * H / R * 2 * R
.