Codeforces Round #136 (Div. 2)
はい。
http://codeforces.com/contest/221
A. Little Elephant and Function
ざっくりと大意
・xが1なら関数は何もしない
・1より大きければcall f(x - 1), and then make swap(ax - 1, ax) (swap the x-th and (x - 1)-th elements of a)
方針のようなもの
・なるほどわからん
n=int(raw_input()) a=range(1,n+1) chk=a[::-1] ans=[] for i in range(n): if i%n: ans.append(chk[-1]) chk.pop(-1) else: ans.append(chk[0]) chk.pop(0) print ' '.join(map(str,ans))
なるほどわからんけど提出2回目でAC。test3のケースをみてソレに合わせて書いたら通った