#abc255b. B - Light It Up

B - Light It Up

Score : 200200 points

问题描述

xyxy 平面上有 NN 名编号为 1,2,,N1, 2, \dots, N 的人。第 ii 个人位于坐标 (Xi,Yi)(X_i, Y_i)

NN 人中有 KK 位,分别是第 A1,A2,,AKA_1, A_2, \dots, A_K 号人,他们将获得强度相同的灯光。
当一个位于坐标 (x,y)(x, y) 的人拥有强度为 RR 的灯光时,它会照亮以 (x,y)(x, y) 为中心、半径为 RR 的圆的内部(包括边界)。
找出使每个人至少被一盏灯照亮所需的灯光最小强度。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

There are NN people numbered 1,2,,N1, 2, \dots, N in the xyxy-plane. Person ii is at the coordinates (Xi,Yi)(X_i, Y_i).
KK of these people, Persons A1,A2,,AKA_1, A_2, \dots, A_K, will receive lights of the same strength.
When a person at coordinates (x,y)(x, y) has a light of strength RR, it lights up the interior of a circle of radius RR centered at (x,y)(x, y) (including the boundary).
Find the minimum strength of the lights needed for every person to be lit by at least one light.

Constraints

  • All values in input are integers.
  • 1K<N10001 \le K < N \le 1000
  • 1A1<A2<<AKN1 \le A_1 < A_2 < \dots < A_K \le N
  • Xi,Yi105|X_i|,|Y_i| \le 10^5
  • (Xi,Yi)(Xj,Yj)(X_i,Y_i) \neq (X_j,Y_j), if iji \neq j.

Input

Input is given from Standard Input in the following format:

NN KK

A1A_1 A2A_2 \dots AKA_K

X1X_1 Y1Y_1

X2X_2 Y2Y_2

\vdots

XNX_N YNY_N

Output

Print the answer as a real number.
Your output will be considered correct if its absolute or relative error from the judge's output is at most 10510^{-5}.

Sample Input 1

4 2
2 3
0 0
0 1
1 2
2 0

Sample Output 1

2.23606797749978969

This input contains four people. Among them, Persons 22 and 33 will have lights.
Every person will be lit by at least one light if R52.236068R \ge \sqrt{5} \approx 2.236068.

Sample Input 2

2 1
2
-100000 -100000
100000 100000

Sample Output 2

282842.712474619009

Sample Input 3

8 3
2 6 8
-17683 17993
93038 47074
58079 -57520
-41515 -89802
-72739 68805
24324 -73073
71049 72103
47863 19268

Sample Output 3

130379.280458974768

update @ 2024/3/10 10:51:11