Permutations
- Giới hạn thời gian
- 1,0 s
- Giới hạn bộ nhớ
- 256 MB
- Điểm
- 10một phần
- Tỉ lệ AC
- 66,7%
- Người giải
- 2
A permutation of integers is called beautiful if there are no adjacent elements whose difference is 1.
Given , construct a beautiful permutation if such a permutation exists.
Input
The only input line contains an integer n.
Output
Print a beautiful permutation of integers . If there are several solutions, you may print any of them. If there are no solutions, print "NO SOLUTION".
Constraints
Example 1
Input:
5Output:
4 2 5 3 1Example 2
Input:
3Output:
NO SOLUTION
Bình luận