CF685C Optimal Point

题目描述

给定一个立体直角坐标系上的$n$个整点,求一个整点满足到这$n$个整点的曼哈顿距离的最大值最小。

输入格式

第一行一个正整数$t(1 \leq t \leq 10^5)$表示数据组数 接下来$t$组数据每组数据第一行一个正整数$n(1 \leq n , \sum n \leq 10^5)$表示点数,接下来$n$行每行三个整数$x_i,y_i,z_i(-10^{18} \leq x_i,y_i,z_i \leq 10^{18})$描述一个整点。

输出格式

对于每组测试数据输出一行三个整数表示选出的整点。

说明/提示

In the first sample, the maximum Manhattan distance from the point to the rose is equal to $ 4 $ . In the second sample, the maximum possible distance is $ 0 $ . Note that the positions of the roses may coincide with each other and with the position of the optimal point.