#import std #import nat remove_reflections = ^D(length@ht,~&); ~&K2hlPS+ * ^lrNCCs/~&r difference*D remove_rotations = ~&K2hlrS2S+ * num; ~&srlXSsPNCCs #executable <'par',''> #optimize+ queens = %np+~command.options.&h.keyword.&iNC; -+ ~&iNC+ file$[contents: --<''>+ mat` *+ %nP*=*], remove_rotations+ remove_reflections+ ~&rSSs+ nleq-<&l*rFlhthPXPSPS, ~&i&& ~&lNrNCXX; ~&rr->rl ^/~&l ~&lrrhrSiF4E?/~&rrlPlCrtPX @r ^|/~& ^|T\~& -+ -<&l^|*DlrTS/~& ~&iiDlSzyCK9hlPNNXXtCS, ^jrX/~& @rZK20lrpblPOlrEkPK13lhPK2 ~&i&& nleq$-&lh+-, ^/~&NNXS+iota -<&l+ ~&plll2llr2lrPrNCCCCNXS*=irSxPSp+ ^H/block iota; *iiK0 ^/~& sum+-