9154: Geometry Problem

内存限制:128 MB 时间限制:6 S
题面:传统 评测方式:文本比较 上传者:
提交:0 通过:0

题目描述


You are given nnn distinct\textbf{distinct}distinct circles in the 2-dimensional plane. Please find a minimum square to enclose all the circles.

输入格式


The first line contains a single integer nnn (1≤n≤5×104)(1\le n\le 5\times 10^4)(1n5×104), denoting the number of circles.
Then follows nnn lines, each line contains three integers x, y, rx,~y,~rx, y, r (−106≤x,y≤106, 1≤r≤106)(-10^6 \le x,y\le 10^6,~ 1\le r\le 10^6)(106x,y106, 1r106), denoting a circle with its center at (x,y)(x,y)(x,y) and radius rrr.

输出格式


Print a single real number - the minimum side length of the square. Your answer will be accepted if the absolute or relative error to the jury's answer is less than or equal to 10−610^{-6}106.

输入样例 复制

4
0 100 50
100 0 50
-100 0 50
0 -100 150

输出样例 复制

341.4213562373

数据范围与提示

The first example is shown as follows: