Special Permutation
MediumRating 1600CodeforcesConstructive Algorithms
Approach hintTry it first, then revealHide
Very small n has no answer. Otherwise consider placing all odd numbers in decreasing order followed by the even numbers, and choose the first two even numbers so the junction difference stays within [2, 4].