Author: | Krenium |
---|---|
Mode: | factor |
Date: | Sun, 23 Dec 2018 14:21:59 |
USING: io.encodings.ascii io.files kernel math math.distances parser prettyprint regexp sequences ; "input23.txt" ascii file-lines [ R/ -{,1}\d+/ all-matching-subseqs [ parse-number ] map ] map [ [ last ] supremum-by ] keep [ [ unclip-last swap ] dip 3 head manhattan-distance >= ] with count .