QOJ.ac

QOJ

時間限制: 3 s 記憶體限制: 512 MB 總分: 100

#6205. 星空観察

统计

EIは望遠鏡で星を観測しています。星空には $n$ 個の星があり、各星は二次元直交座標 $(x, y)$ で表されます。望遠鏡を $(x_0, y_0)$ に向けると、$(x - x_0)^2 + (y - y_0)^2 \le r^2$ を満たす範囲にある星を観測できます。望遠鏡の大きさ $r$ は調整可能です。少なくとも $m$ 個の星を観測したい場合、望遠鏡の半径 $r$ を最小でいくつに設定すればよいか求めてください。

入力

1行目に2つの正整数 $n, m$ が与えられます。これは星の数と観測したい星の数を表します。

続く $n$ 行には、各星の座標を表す2つの整数 $x, y$ が与えられます。どの2つの星も同じ座標にはないことが保証されます。

出力

望遠鏡の最小半径を1行で出力してください。あなたの答えを $a$、正解を $b$ としたとき、$\frac{|a-b|}{\max(1,b)} \leq 10^{-6}$(絶対誤差または相対誤差が $10^{-6}$ 以下)であれば正解とみなされます。

入出力例

入力 1

4 3
0 0
1 1
2 3
3 3

出力 1

1.41421356

注記 1

これは $\sqrt 2$ です。

制約

すべてのデータにおいて、$2\le m\le n\le 2000, |x|, |y| \le 10^4$ を満たします。

子任務番号 $n$ $m$ 配点
$1$ $\le 50$ $\le n$ $10$
$2$ $\le 200$ $15$
$3$ $\le 700$ $15$
$4$ $\le 2000$ $= n$ $20$
$5$ $\le n$ $40$

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.