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:

$ (|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 $