Radioactive Islands (Small)

Find the minimum radiation dose for a boat crossing from (-10, A) to (10, B) at speed 1, given 1 unit/hour plus 1/D^2 per island at (0, C_i).

Hard8GeometryMathGreedyImplementationNo attempts yetTime limit30sMemory limit512 MB

Problem

You are steering a boat from the coordinates (10,A)(-10, A) to the coordinates (10,B)(10, B). The coordinates are measured in kilometers, and your boat travels at a constant speed of 1 kilometer per hour. You have full control over the path the boat takes. We model the boat as a single point.

There are NN islands in the area; we model them as single points. The ii-th island is at the coordinates (0,Ci)(0, C_i).

The area is radioactive, and you constantly receive 1 microsievert per hour of radiation from the general environment, no matter where you are. The islands themselves are also radioactive, and you constantly receive additional radiation at a rate of Di2D_i^{-2} microsieverts per hour from the ii-th island, where DiD_i is your current distance (in kilometers) from the ii-th island. (Formally: let Di(t)D_i(t) be your distance from the ii-th island as a function of time tt, and let XX be the total time your journey takes. Then the total radiation received from the ii-th island is the definite integral 0XDi(t)2dt\int_0^X D_i(t)^{-2}\,dt.) You can get as close to an island as you like, as long as you do not match its exact coordinates.

Find the minimum total radiation dose that you can receive if you plot your course optimally.

Input

The first line of the input gives the number of test cases, TT; TT test cases follow. Each test case consists of two lines. The first line of a test case contains an integer NN and two floating-point numbers AA and BB, as described above. The second line of a test case contains NN floating-point numbers CiC_i; the ii-th of these numbers is the yy coordinate of the ii-th island.

All floating-point numbers are given with exactly two decimal places.

Limits

  • 1T201 \le T \le 20
  • 1N21 \le N \le 2
  • 10.00A10.00-10.00 \le A \le 10.00
  • 10.00B10.00-10.00 \le B \le 10.00
  • 10.00Ci10.00-10.00 \le C_i \le 10.00 for all ii
  • CiCjC_i \ne C_j for all iji \ne j

Output

For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is the minimum radiation dose (in microsieverts) received while completing the journey.

Print y rounded to exactly two digits after the decimal point.

Hint

Here is a diagram of the optimal path for the first test case of sample 1. The island is drawn enlarged to make it visible, but remember to treat it as a single point.