Codeforces Round #275 (Div. 1) 　　A. Diverse Permutation
链接：http://codeforces.com/contest/482/problem/A
test