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

Main

Description

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

Shortest-path graph search where the graph states are the triple of a location, direction.

Distance traveled doesn't need to be stored because all of the distances that can be traveled from a starting location are added to the work queue at the same time for each starting point.

>>> :{
:main +
"2413432311323
3215453535623
3255245654254
3446585845452
4546657867536
1438598798454
4457876987766
3637877979653
4654967986887
4564679986453
1224686865563
2546548887735
4322674655533
"
:}
102
94
>>> :{
:main +
"111111111111
999999999991
999999999991
999999999991
999999999991
"
:}
59
71
Synopsis

Documentation

main :: IO () Source #

Parse input grid and print both answer parts.

>>> :main
866
1010