sln_2018_11
Copyright(c) Eric Mertens 2018
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2018/day/11

This solution uses dynamic programming to efficiently compute the area of an arbitrary square on the power-cell grid.

This efficiency is achieved using a summed-area table. https://en.wikipedia.org/wiki/Summed-area_table

Once we've computed this table we're able compute the sum of the elements contained in an arbitrary rectangle via addition and subtraction of 4 elements.

Synopsis

Documentation

main :: IO () Source #

Print the answers to day 11

>>> :main
241,40
166,75,12