#import std #import nat (# The input file contains one or more sudoku puzzles, each on one line expressed as a sequence of 81 decimal digits in row major order, with 0 as a place holder for the unassigned cells. #) #executable (<'par'>,<>) #optimize+ sudoku = ~command.files; <.file$[contents: --<''>]>+ *= ~contents.&F; * -+ ~&rSL+ (psort (nleq+)* <~&blrl,~&blrr>)+ ~&arg^& -+ ~&al?\~&ar ~&aa^&~&afahPRPfafatPJPRY+ ~&farlthlriNCSPDPDrlCS2DlrTS2J, ^|J/~& ~&rt!=+ ^= ~&s+ ~&H( -+.|=&lrr;,|=&lrl;,|=≪+-, ~&rgg&& ~&irtPFXlrjrXPS; ~&lrK2tkZ2g&& ~&llrSL2rDrlPrrPljXSPTSL)+-, //~&p ^|DlrDSLlrlPXrrPDSL(~&,num*+ rep2 block3)*= num block27 ~&iiK0 iota9, * `0?=\~&iNC ! ~&t digits+-