Breath of Fire
Limits: 2 sec., 256 MiB
Senior told Dragon that last night he saw a fire over a forest K times from his house. Dragon remembers N locations where he has breathed fire over the forest yesterday. In order to be able to see a fire Senior has to be not further than R meters away from Dragon breathing fire.
You are given the location of Senior’s house and fire locations Dragon remembers. Your task is to find the smallest valid value of R, i.e. Senior could saw a fire at least K times.
Input
The first line contains two integers X and Y — coordinates of Senior’s house. The second line contains two integers N and K separated by a single space. Each of the following N lines contains two integers \(\mathbf{x_i}\) and \(\mathbf{y_i}\) — coordinates of the i-th location where Dragon was breathing fire.
Output
Pring minimal valid value of R. An output will be considered as correct if the absolute or relative error does not exceed \(10^{-4}\).
Constraints
\(1 \le N \le 100\),
\(1 \le K \le N\),
\(0 \le X, Y, x_i, y_i \le 1000000000\ (10^9)\).
Samples
Input (stdin) | Output (stdout) |
---|---|
5 6 4 2 3 4 8 11 6 5 17 25 | 2.82842712 |
Submit a solution
Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
---|
Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
---|