Author: | Kacarott |
---|---|
Mode: | factor |
Date: | Tue, 6 Dec 2022 06:35:46 |
! Copyright (C) 2022 Keldan Chapman. ! See http://factorcode.org/license.txt for BSD license. USING: kernel AOC prettyprint sequences grouping sets math ; IN: AOC.2022.6 : find-clump ( input n -- result ) [ clump [ all-unique? ] find drop ] keep + ; : part-1 ( input -- result ) 4 find-clump ; : part-2 ( input -- result ) 14 find-clump ; MAIN: [ 6 read-day-input [ part-1 . ] [ part-2 . ] bi ]