Author: | A. Tyshchenko, A. Klenin | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 512 Mb | |
Output file: | Standard output |
Let X, Y be sequences each consisting of N unique integers and 1⩽. The Kendall correlation coefficient between these sequences is
\tau=\sum\limits_{i\lt j}\sgn\left(x_i-x_j\right)\sgn\left(y_i-y_j\right).
sgn(x) = x \lt 0 \Rightarrow -1,\,x \gt 0 \Rightarrow +1,\,x = 0 \Rightarrow 0.
Suppose that sequence X is 1, 2, \ldots,\,N. Your program must find sequence Y such that \tau(X,\,Y) = 0.
Input contains a single integer N — number of elements in a sequence.
Output must contain N integers — sequence Y. If the required sequence does not exist, output -1. If there are several solutions, output any of them.
1 \le N \le 10^5
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|