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

H. Pandemic Restrictions

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

After a long time living abroad, you have decided to move back to Italy and have to find a place to live, but things are not so easy due to the ongoing global pandemic. Your three friends Fabio, Flavio and Francesco live at the points with coordinates (\(x_{1}\), \(y_{1}\)), (\(x_{2}\), \(y_{2}\)) and (\(x_{3}\), \(y_{3}\)), respectively. Due to the mobility restrictions in response to the pandemic, meetings are limited to 3 persons, so you will only be able to meet 2 of your friends at a time. Moreover, in order to contain the spread of the infection, the authorities have imposed the following additional measure: for each meeting, the sum of the lengths travelled by each of the attendees from their residence place to the place of the meeting must not exceed \(r\). What is the minimum value of \(r\) (which can be any nonnegative real number) for which there exists a place of residence that allows you to hold the three possible meetings involving you and two of your friends? Note that the chosen place of residence need not have integer coordinates.

제약
입력 형식

The first line contains the two integers \(x_{1}\), \(y_{1}\) (−\(10^{4} \le x_{1}\), \(y_{1} \le 10^{4}\)) — the coordinates of the house of your friend Fabio. The second line contains the two integers \(x_{2}\), \(y_{2}\) (−\(10^{4} \le x_{2}\), \(y_{2} \le 10^{4}\)) — the coordinates of the house of your friend Flavio. The third line contains the two integers \(x_{3}\), \(y_{3}\) (−\(10^{4} \le x_{3}\), \(y_{3} \le 10^{4}\)) — the coordinates of the house of your friend Francesco. It is guaranteed that your three friends live in different places (i.e., the three points (\(x_{1}\), \(y_{1}\)), (\(x_{2}\), \(y_{2}\)), (\(x_{3}\), \(y_{3}\)) are guaranteed to be distinct).

출력 형식

Print the minimum value of \(r\) which allows you to find a residence place satisfying the above conditions. Your answer is considered correct if its absolute or relative error does not exceed \(10^{−4}\). Formally, let your answer be \(a\), and the jury’s answer be \(b\). Your answer is accepted if and only if |\(a - b\)| _{max (1,|b|)} ^{≤\(10 - 4\).}

예제 1
입력
0 0
5 0
3 3
출력
5.0686143166
예제 2
입력
-1 0
0 0
1 0
출력
2.0000000000
문제 정보

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

출처 ICPC SWERC 2021

평가 및 의견

H. Pandemic Restrictions

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

Log in to rate problems.

개별 의견

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

풀이 제출

H. Pandemic Restrictions

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