ICUP by twobit

while 1:
 i=input();r=range(i);a=["1"]+["_"]*~-i*2+r
 for m in r:
\x09x=0
\x09for j in r:
\x09 w=0
\x09 while"9"<a[j-w]:w-=1
\x09 if w/2<x/2:x=w;y=j
\x09if-2>x:a[y+~x/2]=`m+2`
 print"%d:"%i," ".join(a[:i])

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page