You are given n circles (n <= 35000) and m points (m <= 35000). No pair of circles intersect each other. In one turn, you can move a point into or out of a circle, each time it costs amount of given variable which go with each circle. So which you try to find is the minimum cost to gather all point into one region which are divided by the perimeter of circles.

Absolute value of coordinate does not exceed 10^6 Featured cost of each circle does not exceed 10^6, too.

Actually this problem originates from my training test, but I cannot find any solution in contest's t. So I will be really appreciated if you consider to give me any idea.

Do you have any link of the above question?

I'm pretty sure that there will be some related link but I cannot find it by myself. Sorry

Is each point inside at most 1 circle?

it does not lie on border of any circle, and no two circle intersect but a circle can be completely contained by a larger circle. So a point can be contained by > 1 circle :3

Auto comment: topic has been updated by Tutituti (previous revision, new revision, compare).