RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
문제 ICPC00113

C. Safe Distance

스페셜 저지 — 출력을 사용자 정의 프로그램으로 검사하므로 여러 정답이 인정될 수 있습니다.
설명

1

The past year has been difficult, with a virus spreading among the population. Fortunately, Alice knows that one of the keys to be healthy is to keep a safe distance from other people.

Alice is currently in a closed room, represented in the \(2D\) plane, with width \(X\) and height \(Y\). There are \(N\) other people inside the room, and we're given their \((x_i, y_i)\) coordinates.

We consider Alice and the \(N\) people as points in the \(2D\) plane. Alice's initial position is \((0, 0)\) and she wants to move to the exit at position \((X, Y)\). She can move freely in any direction inside the room, but can not step outside the room bounds.

Find the maximum distance Alice can keep from other people while moving from \((0, 0)\) to \((X, Y)\).

제약
입력 형식

The input begins with one line containing two space-separated integers, \(X\) and \(Y\), where \(X\) is the width, and \(Y\) is the height of the room. The second line consists of a single integer \(N\), the number of people in the room. Then \(N\) lines follow, each of them consisting of two floating-point numbers \(x_i\) and \(y_i\), the coordinates of the \(i^{th}\) person in the room.

출력 형식

The output consists of a single value \(d\), the maximum safe distance, as a floating-point number.

An additive or multiplicative error of \(10^{-5}\) is tolerated: if \(d\) is the answer, any number either within \([d - 10^{-5}; d + 10^{-5}]\) or within \([(1 - 10^{-5})d ;(1 + 10^{-5})d]\) is accepted.

예제 1
입력
8 6
3
3 1
3 5.5
6.5 1.5
출력
2.250000
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC SWERC 2020

평가 및 의견

C. Safe Distance

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

C. Safe Distance

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8