题意 You are given n points on a line with their coordinates $x_i$. Find the point x so the sum of distances to the given points is minimal. 分析 答案是直觉上显然的:输出数组的中位数即可(对于偶数个数的,则是中间靠左).这样的结果正确的原因也很显然.首先,答案肯定在$[x_{min},x_{max}]$中,那么点无论在哪里,对于$x_i,x_{n-i}$这一对…