Symmetric matrix by fill

a[99];i,j,n,p;main(q){for(;~scanf("%d",&a[n++]););for(n=sqrt(2*n);j<n;++i<n?q+=i-1:(i=q=0,p+=j++))printf("%d%c",a[j>i?n*i-q+j-i:n*j-p+i-j],n-1>i?32:10);}

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

download

return to the top page