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

24699번 - Yellow Blue Bus 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
6 초 512 MB3611743.750%

문제

You are given $n$ blue points and $m$ yellow points. You need to find a circle such that all blue points are located outside or on the boundary of this circle, and all yellow are located inside or on the boundary of this circle.

The tests for this problem were generated in such a way that, for each test case, there exists a circle with the following properties:

  • the radius is $r \le 10^9,ドル
  • the center is at a point $(x, y)$ where $|x| \le 10^9$ and $|y| \le 10^9,ドル
  • for each blue point $P,ドル the distance from the center to $P$ is at least $r + 10^{-7} \cdot \max(1, r),ドル and
  • for each yellow point $Q,ドル the distance from the center to $Q$ is at most $r - 10^{-7} \cdot \max(1, r)$.

To check when your answer will be considered correct, see output format.

입력

The first line contains $t,ドル the number of test cases you need to solve (1ドル \le t \le 10^5$).

The first line of each test case contains an integer $n,ドル the number of blue points (1ドル \le n \le 50,000円$).

Each of the next $n$ lines contains two integers $x$ and $y$: the coordinates of a blue point ($-10^9 \le x, y \le 10^9$).

The next line contains an integer $m,ドル the number of yellow points (1ドル \le m \le 50,000円$).

Each of the next $m$ lines contains two integers $x$ and $y$: the coordinates of a yellow point ($-10^9 \le x, y \le 10^9$).

It is guaranteed that, in each test case, all points (blue and yellow) are pairwise distinct. Additionally, the sum of $n$ over all test cases does not exceed 50ドル,000円,ドル and the sum of $m$ over all test cases does not exceed 50ドル,000円$.

출력

For each test case, output two lines.

On the first line, output a real number $r,ドル the radius of your circle.

On the second line output two real numbers $x$ and $y,ドル the coordinates of the center of your circle.

Your answer will be considered correct if:

  • 0ドル \le r \le 10^{10},ドル
  • $|x| \le 10^{10}$ and $|y| \le 10^{10},ドル
  • for each blue point $P,ドル the distance from center to $P$ is at least $r - 10^{-7} \cdot \max(1, r),ドル and
  • for each yellow point $Q,ドル the distance from center to $Q$ is at most $r + 10^{-7} \cdot \max(1, r)$.

제한

예제 입력 1

3
3
3 1
1 3
4 5
3
3 3
4 3
3 4
2
0 0
-1 -1
2
1 1
2 2
4
2 0
0 2
-2 0
0 -2
4
1 0
0 1
-1 0
0 -1

예제 출력 1

1.001
3 3
1.000
1.5 1.5
1.001
0 0

힌트

출처

Camp > Petrozavodsk Programming Camp > Winter 2022 > Day 5: Yandex Cup D번

Contest > Open Cup > 2021/2022 Season > Stage 12: Grand Prix of Grushevka D번

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

출처

대학교 대회

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

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