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

K. Blowing Candles

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

As Jacques-Édouard really likes birthday cakes, he celebrates his birthday every hour, instead of every year. His friends ordered him a round cake from a famous pastry shop, and placed candles on its top surface. The number of candles equals the age of Jacques-Édouard in hours. As a result, there is a huge amount of candles burning on the top of the cake. Jacques-Édouard wants to blow all the candles out in one single breath.

You can think of the flames of the candles as being points in the same plane, all within a disk of radius \(R\) (in nanometers) centered at the origin. On that same plane, the air blown by Jacques-Édouard follows a trajectory that can be described by a straight strip of width \(W\), which comprises the area between two parallel lines at distance \(W\), the lines themselves being included in that area. What is the minimum width \(W\) such that Jacques-Édouard can blow all the candles out if he chooses the best orientation to blow?

제약
입력 형식

The first line consists of the integers \(N\) and \(R\), separated with a space, where \(N\) is Jacques-Édouard's age in hours. Then \(N\) lines follow, each of them consisting of the two integer coordinates \(x_i\) and \(y_i\) of the \(i\)th candle in nanometers, separated with a space.

Limits
- \(3 \leq N \leq 2\cdot 10^{5}\);
- \(10 \leq R \leq 2\cdot 10^{8}\);
- for \(1\leq i\leq N\), $x^2_i + y^2_i
\leq R^{2}$;
- all points have distinct coordinates.

출력 형식

Print the value \(W\) as a floating point number. An additive or multiplicative error of \(10^{-5}\) is tolerated: if \(y\) is the answer, any number either within \([y-10^{-5}; y+10^{-5}]\) or within $[(1-10^{-5})y;
(1+10^{-5})y]$ is accepted.

예제 1
입력
3 10
0 0
10 0
0 10
출력
7.0710678118654755
문제 정보

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

출처 ICPC SWERC 2017

평가 및 의견

K. Blowing Candles

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

Log in to rate problems.

개별 의견

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

풀이 제출

K. Blowing Candles

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