sln_2023_15
Copyright(c) Eric Mertens 2023
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2023/day/15

This problem has us follow a lens update sequence. The solution below stores the lenses in an array and uses accumArray to efficiently apply updates to that array in-place.

>>> :main + "rn=1,cm-,qp=3,cm=2,qp-,pc=4,ot=9,ab=5,pc-,pc=6,ot=7\n"
1320
145
Synopsis

Documentation

main :: IO () Source #

Parse the input sequence and print the results of both parts.

>>> :main
503487
261505