Problems
The astronomer has a passion for stargazing. In particular, he gets immense pleasure out of gazing at
How much does it cost to build and move a telescope that allows
All coordinates and distances are given in the Euclidean plane.
Here is an example with
Input
The first line consists of four integers: the number
1\leq k\leq n\leq 700 .x_i, y_i\in \{-10^9,\ldots, 10^9\} for alli\in\{1,\ldots,n\} .s,t\in \{0,\ldots, 10^9\} .Your output is accepted if it is within a relative or absolute tolerance of
\epsilon = 10^{-6} of the correct answer.
Output
A single real number: the minimum number of kroner that the astronomer needs to spend.
Subtask
| # | Score | Condition |
|---|---|---|
| #1 | 8 | |
| #2 | 9 | |
| #3 | 18 | |
| #4 | 13 | |
| #5 | 14 | |
| #6 | 15 | |
| #7 | 23 | No further constraints |
Example #1
2 3 1000 500
0 0
2 0
3 1
1000.0
Example #2
2 3 500 3000
0 0
2 0
3 1
3387.277541898787
Example #3
2 3 250 750
0 0
2 0
3 1
1000.0
Example #4
2 3 0 500
0 0
2 0
3 1
353.5533905932738
Example #5
3 4 0 10
0 0
10 0
5 10
5 5
50.0