P5252 [LnOI2019] Tokyo Summer Meetup

Background

![avartar](https://cdn.luogu.com.cn/upload/pic/52827.png) “I heard there will be a fireworks festival next week.” “Huh? I don’t really like places with lots of people.” “Ah, then I’ll just ask someone else. ╭(╯^╰)╮” “Hmm, it still sounds fun. I might go. (⊙﹏⊙)b”

Description

Of course, what happened above has absolutely nothing to do with Abbi. As a single deer with a long (zhang) neck, Abbi can only stay at home, holding a “telescope” and lonely watching the fireworks festival from afar. ![avartar](https://cdn.luogu.com.cn/upload/pic/52828.png) ~~What? A sniper rifle? This is a telescope! (seriously)~~ To see all the fireworks in the night sky, Abbi needs to adjust the magnification and position of the “telescope”. The night sky can be approximately considered as a plane. The $i$-th firework can be approximately considered as a circle with center $(x_i, y_i)$ and radius $r_i$. The telescope’s field of view can be approximately considered as a circle. Because adjusting the magnification is tiring, Abbi wants the radius of the field of view to be as small as possible while ensuring that all fireworks appear **completely** inside the field of view. Please find the center coordinates and the radius of the field-of-view circle.

Input Format

The first line contains an integer $n$, meaning there are $n$ fireworks. Lines $2$ to $n + 1$ each contain three real numbers $x_i$, $y_i$, and $r_i$, representing the center coordinates and radius of each firework.

Output Format

Output three real numbers $X$, $Y$, and $R$ on the first line, representing the center coordinates and radius of the telescope’s field of view. The error of the radius compared with the standard answer must not exceed $0.01$, and the error of the center coordinates compared with the standard answer must not exceed $0.04$.

Explanation/Hint

![avartar](https://cdn.luogu.com.cn/upload/pic/52900.png) **Please enable O2 optimization. It is recommended to use fast input or scanf to read the testdata.** Translated by ChatGPT 5