Logo
(追記) (追記ここまで)

26470번 - Most distant point from the stations 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB93241625.000%

문제

JAG-island is a rectangular island on the $xy$-plane. The 4 coastlines of JAG-island are parallel to the $x$-axis or the $y$-axis. The left-bottom and right-top corners of JAG-island are located at $(0,0)$ and $(W,H),ドル respectively.

There are $N$ stations in JAG-island. The $i$-th station is located in $(x_i, y_i)$. You are interested in the coordinates that maximize the (Euclidean) distance to the nearest station. Find the distance from such a coordinate to its nearest station. In other words, calculate the value of $$\max_{0 ≤ x ≤ W,0円 ≤ y ≤ H}\min_{i}\sqrt{\left(x-x_i\right)^2 + \left(y-y_i\right)^2}\text{.}$$

입력

$N$ $W$ $H$

$x_1$ $y_1$

$\vdots$

$x_N$ $y_N$

The first line of the input consists of three integers, the number $N$ (1ドル ≤ N ≤ 2,000円$) of stations, the width $W$ and the height $H$ (1ドル ≤ W, H ≤ 1,000円$) of JAG-island.

The $i$-th of the following $N$ lines has two integers $x_i$ and $y_i$ (0ドル ≤ x_i ≤ W,ドル 0ドル ≤ y_i ≤ H$), which represent the coordinate of the $i$-th station. The coordinates of stations are distinct, i.e. $(x_i, y_i) \ne (x_j, y_j)$ for any $i,ドル $j$ ($i \ne j$).

출력

Print the answer in a line. Absolute or relative errors less than 10ドル^{-6}$ are permissible.

제한

예제 입력 1

1 1 1
0 0

예제 출력 1

1.41421356237

예제 입력 2

1 4 4
2 2

예제 출력 2

2.82842712475

예제 입력 3

2 6 6
3 1
3 5

예제 출력 3

3.60555127546

예제 입력 4

4 10 10
1 1
1 9
9 1
9 9

예제 출력 4

5.65685424949

예제 입력 5

9 10 10
1 1
1 5
1 9
5 1
5 5
5 9
9 1
9 5
9 9

예제 출력 5

2.82842712475

힌트

출처

Contest > ICPC Japanese Alumni Group > JAG Practice Contest for ICPC Asia Regional > JAG Practice Contest for ICPC 2022 Asia Yokohama Regional J번

Camp > Petrozavodsk Programming Camp > Winter 2024 > Day 1: Welcome Contest I번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /