day 9: fix bug that didn't change the answer

This commit is contained in:
xenia 2020-12-09 01:19:10 -05:00
parent 4e2ea7d641
commit fd0c7a36d0
1 changed files with 1 additions and 1 deletions

2
9.rkt
View File

@ -21,7 +21,7 @@
;; continuously sort the part of the vector below the iterator, and call contains-sum?
(define (part1 vec)
(for*/first ([i (in-range 25 (vector-length vec))] [x (in-value (vector-ref vec i))]
#:unless (contains-sum? vec 0 i x))
#:unless (contains-sum? (vector-copy vec (- i 25) i) 0 25 x))
(cons i x)))
(define (part2 vec pt1-ans)