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

32573번 - Cowpproximation 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
4 초 (추가 시간 없음) 1024 MB60301948.718%

문제

There are cows in a 2ドル$ by 2ドル$ kilometer field. The cows want to have a group meeting, and all of them must attend! It is up to you to plan the meeting to take place as soon as possible.

To model this problem, we approximate each cow as a circle, and for our purposes, there are no collisions — cows can pass through each other freely.

The $i$-th cow is represented by its initial position $(x_i , y_i)$ and its radius $r_i,ドル all distances are measured in meters. You can tell each cow to travel in any direction from its initial position at a constant speed from 0ドル$ to 1ドル$ meter per second. The meeting takes place as soon as all cows occupy the same point in the plane, i.e., there exists a point contained within all circles representing the cows. Find the minimum time in seconds required for the cows to meet.

입력

The first input line contains a single integer $N$ (1ドル ≤ N ≤ 10^3$), representing the number of cows. Each of the following $N$ lines contains three space separated integers $x_i,ドル $y_i,ドル $r_i,ドル describing a cow, where $-10^3 ≤ x_i , y_i ≤ 10^3$ and 1ドル ≤ r_i ≤ 10^3$.

출력

Output the minimum time $T$ in seconds after which all the cows meet. Your answer will be considered correct if it has an absolute or relative error at most 10ドル^{-5}$. Formally, let $T_{OPT}$ be the optimal value. Then your answer is considered correct if either $|T - T_{OPT}| ≤ 10^{-5}$ or $\left| \frac{T - T_{OPT}}{\max\{1,T_{OPT}\}} \right| ≤ 10^{-5}$ holds.

제한

예제 입력 1

2
-10 3 2
10 3 4

예제 출력 1

7.0000000

Figure 1: Visualization of sample input 1. The empty dot represents the meeting location.

예제 입력 2

3
-4 -4 1
6 0 3
0 8 5

예제 출력 2

3.7039181

Figure 2: Visualization of sample input 2. The empty dot represents the meeting location.

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > CTU Open Contest > CTU Open Contest 2024 C번

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

출처

대학교 대회

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

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