N Queens by murky-satyr

(use srfi-1)(let q[(p(iota(read)))(o())](if(null?(map(rec,x(or(any(rec,i(=(abs(-(ref o(- #0=(length o)i))x))i))(iota #0# 1))(q(delete x p)`(,@o,x))))p))(print(string-join(map x->string o)))))

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

download

return to the top page