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 ⩽ xi,yi ⩽ N. The Kendall correlation coefficient between these sequences is
τ = ∑i < jsgn(xi − xj)sgn(yi − yj).
sgn(x) = x < 0⇒ − 1, x > 0⇒ + 1, x = 0⇒ 0.
Suppose that sequence X is 1, 2, …, N. Your program must find sequence Y such that τ(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 ≤ N ≤ 105
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|