[Tricky Function。](https://www.luogu.com.cn/problem/CF429D) $(i-j)^2+(s_i-s_j)^2$ 转化成平面最近点对。 时间复杂度:$mathcal O(nlog n)$。
確定! 回上一頁