N Queens by hinoe

n=9,i;main(y,p,x)short*p;{for(x=47;y<n?++x<n+48:!puts(p-n);)for(i=~y;++i?(abs(p[i]%64-x)?:-i)+i:main(y-scanf("%d",&n),p+1,*p=x|(y+1<n)<<13););}

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

download

return to the top page