For each candidate bucket point, fix each rope at its pole distance and compute the area shared by all disks.
Hard8GeometryNo attempts yetTime limit5sMemory limit512 MBFarmer John brought N goats to his field. Goat i is tied to a pole at position Pi with a rope of length Li. The goat can go anywhere within distance Li of the point Pi, and nowhere outside that. The field is large and flat, so treat it as an infinite two-dimensional plane.
The pole positions stay where Farmer John put them for his last herd, so only the rope lengths are still open. Two conditions make that choice tricky.
Farmer John is not good at geometry, so he needs help with this part.
For each bucket position Qj, pick the rope lengths so that the area Aj reachable by every goat is as small as possible when the bucket sits at Qj, then compute that area Aj.
In the picture below, the four blue points are the pole positions P1,P2,P3,P4, and the two red points are the candidate bucket positions Q1 and Q2. The two shaded regions have areas A1 and A2.

The first line contains the number of test cases T. The T test cases follow. Each test case begins with a line containing the integers N and M.
The next N lines contain the pole positions P1,P2,…,PN, one per line, and the M lines after that contain the candidate bucket positions Q1,Q2,…,QM, one per line.
Each of these N+M lines holds the x coordinate and the y coordinate of the corresponding position, separated by a single space.
For each test case, print one line in the format Case #x: A1 A2 ... AM, where x is the test case number starting from 1, and A1 through AM are separated by single spaces.
Print each area rounded to exactly three digits after the decimal point. When the minimum area is 0, print 0.000.