A permutation of integers $1,2\dots,n$ is called beautiful if there are no adjacent elements whose difference is $1$.
Given $n$, construct a beautiful permutation if such a permutation exists.
輸入只有一行:$n$
Print a beautiful permutation of integers $1,2,\dots,n$. If there are several solutions, you may print any of them. If there are no solutions, print "NO SOLUTION".
3
NO SOLUTION
25%: $1\leq n\leq 10$
50% $1\leq n\leq 1000$
75%: $1\leq n\leq 10^4$
100%: $1\leq n\leq 10^6$
| 編號 | 身分 | 題目 | 主題 | 人氣 | 發表日期 |
沒有發現任何「解題報告」 |
|||||