Problem E. Optimal Number Permutation

时间限制 1 ms   内存限制 256 MB

You have array a that contains all integers from 1 to n twice. You can arbitrary permute any numbers in a.

Let number i be in positions xi, yi (xi < yi) in the permuted array a. Let's define the value di = yi - xi — the distance between the positions of the number i. Permute the numbers in array a to minimize the value of the sum .

输入数据

The only line contains integer n (1 ≤ n ≤ 5·105).

输出数据

Print 2n integers — the permuted array a that minimizes the value of the sum s.

样例

提交

请先 登录

© 2025 FAQs Contact About