|
|
@ -22,17 +22,7 @@ part1
|
|
|
|
; part 2
|
|
|
|
; part 2
|
|
|
|
|
|
|
|
|
|
|
|
; Can we just count the number of times a segment appears?
|
|
|
|
; Can we just count the number of times a segment appears?
|
|
|
|
; From the example:
|
|
|
|
; No. Damn. But it gets us close. Naming the segments A - G
|
|
|
|
;
|
|
|
|
|
|
|
|
; a = 8
|
|
|
|
|
|
|
|
; b = 6
|
|
|
|
|
|
|
|
; c = 8 * dup
|
|
|
|
|
|
|
|
; d = 7
|
|
|
|
|
|
|
|
; e = 4
|
|
|
|
|
|
|
|
; f = 9
|
|
|
|
|
|
|
|
; g = 7 * dup again
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
; So no. But it's still helpful. Naming the segments A - G
|
|
|
|
|
|
|
|
;
|
|
|
|
;
|
|
|
|
; A has 8 instances and IS NOT in 1
|
|
|
|
; A has 8 instances and IS NOT in 1
|
|
|
|
; B has 6 instances
|
|
|
|
; B has 6 instances
|
|
|
@ -90,4 +80,4 @@ part1
|
|
|
|
(define part2
|
|
|
|
(define part2
|
|
|
|
(foldl (λ (l acc) (+ acc (line->number l))) 0 data))
|
|
|
|
(foldl (λ (l acc) (+ acc (line->number l))) 0 data))
|
|
|
|
|
|
|
|
|
|
|
|
part2
|
|
|
|
part2
|
|
|
|