src/2019/days/day-02.lisp @ 2848a4548adf

2023/01 and 2022/01

Also start porting my test data to the new account, since Twitter imploded and
apparently it's impossible for a website to store a goddamn username and
password in The Year of Our Lord 2023 so everyone just outsources auth all
the time, ugh.
author Steve Losh <steve@stevelosh.com>
date Fri, 01 Dec 2023 11:05:43 -0500
parents 182bdd87fd9e
children (none)
(advent:defpackage* :advent/2019/02)
(in-package :advent/2019/02)

(define-problem (2019 2) (data read-numbers) (3790689 6533)
  (let ((program (fresh-vector data)))
    (flet ((run (a b)
             (setf (aref program 1) a
                   (aref program 2) b)
             (advent/intcode:run program)))
      (values
        (run 12 2)
        (iterate
          (for-nested ((a :from 0 :to 99)
                       (b :from 0 :to 99)))
          (when (= 19690720 (run a b))
            (return (+ (* 100 a) b))))))))