Codeforces Round #398 (Div.2)
はい。
http://codeforces.com/contest/767
A. Snacktower
ざっくりと大意
・問題文が何を言ってるかわからない
Python3
n=int(input()) l=[int(i) for i in input().split()] ans=[] chkl=0 for i in l[::-1]: if i>chkl: ans.append(i) chkl=i else: ans.append(0) res=[] t=0 for i in ans: if i!=0: res.append(list(range(i,t,-1))) t=i else: res.append(0) for i in res[::-1]: if i==0: print() else: print(*i)
入力は1行目にnが与えられて、2行目には1からnまでの適当な並び方の数列が与えられる。
出力はi行目に数列のi番目の数から見て右側により大きい数がなければ何となく出力する。