BOJ 21061 : Beautiful Permutation
https://www.acmicpc.net/problem/21061 21061번: Beautiful Permutation A permutation $a_0, a_1, \ldots, a_{n - 1}$ of $0, 1, \ldots, n - 1$ is said to be beautiful if the sequence $b_0, \ldots, b_{n - 1}$ defined as $b_i = |a_i - i|$ is also a permutation of $0, \ldots, n - 1$. Given $n$, construct a beautiful permutation o www.acmicpc.net 상당히 힘들었던 문제. 풀고 나서 보는 걸 추천한다. 일단 n%4의 값이 0,1일때만 성립하고, 아니면 N..
2021.08.03