ICUP by nu

a[];main(N,d,p,x,k,i){for(;x=~scanf("%d",&N);puts(""))for(*a=d=~N;p=++d<N;d<0||printf(d?a[d]?a[d]=0," %d":" _":"%d: 1",~a[d]))for(;d<-1&++p<N;k?a[p]=--x:0)for(k=i=N;i--;)k*=(p-i)/d||!a[i];}

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

download

return to the top page