advent-of-code-2023

My solutions to AoC 2023
git clone git://git.entf.net/advent-of-code-2023
Log | Files | Refs

day-19.lisp (562B)


      1 (defpackage #:aoc-test/day-19
      2   (:use #:cl #:lisp-unit2))
      3 (in-package #:aoc-test/day-19)
      4 
      5 (define-test test-day-19
      6     ()
      7   (multiple-value-bind (task-1)
      8       (aoc:run-day 19 "px{a<2006:qkq,m>2090:A,rfg}
      9 pv{a>1716:R,A}
     10 lnx{m>1548:A,A}
     11 rfg{s<537:gd,x>2440:R,A}
     12 qs{s>3448:A,lnx}
     13 qkq{x<1416:A,crn}
     14 crn{x>2662:A,R}
     15 in{s<1351:px,qqz}
     16 qqz{s>2770:qs,m<1801:hdj,R}
     17 gd{a>3333:R,R}
     18 hdj{m>838:A,pv}
     19 
     20 {x=787,m=2655,a=1222,s=2876}
     21 {x=1679,m=44,a=2067,s=496}
     22 {x=2036,m=264,a=79,s=2244}
     23 {x=2461,m=1339,a=466,s=291}
     24 {x=2127,m=1623,a=2188,s=1013}")
     25     (assert= 19114 task-1)))