CF576C Points on Plane

题目描述

给出 $N$ 个整点 $(x_i,y_i)$,求一个排列 $p$,使得 $\sum\limits_{i=2}^N (|x_{p_i} - x_{p_{i-1}}| + |y_{p_i} - y_{p_{i-1}}|) \leq 2.5 \times 10^9$。

输入格式

输出格式

说明/提示

In the sample test the total distance is: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF576C/1f55becbebb3a433830fac06fad46fefec8bbb8f.png) $ (|5-3|+|0-4|)+(|3-0|+|4-7|)+(|0-8|+|7-10|)+(|8-9|+|10-12|)=2+4+3+3+8+3+1+2=26 $