CF371E Subway Innovation
题目描述
直线上 $n$ 个点,定义点 $i, j$之间的距离为 $|x_i-x_j|$。保留 $k$ 个点,使这些点**两两之间的距离和**最小。输出 $k$ 个点的下标。
输入格式
第一行,一个正整数 $n$,表示点的个数。
第二行,$n$ 个整数 $x_1,x_2,...,x_n$,表示每个点的位置。
输出格式
一行,$k$ 个正整数 $t_1,t_2,...,t_k$,表示保留的点的下标。两个正整数之间用一个空格连接。
注意答案不唯一,所有正确的答案都会被接受。
说明/提示
In the sample testcase the optimal answer is to destroy the first station (with $ x=1 $ ). The average commute time will be equal to 1 in this way.