| Copyright | (c) Eric Mertens 2017 |
|---|---|
| License | ISC |
| Maintainer | emertens@gmail.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Main
Description
https://adventofcode.com/2017/day/10
Day 10 poses a convoluted knot-tying algorithm to implement.
Documentation
Print the solution to both parts of Day 10. Input file is configurable via the command-line.
>>>:main23874 e1a65bfb5a5ce396025fab5528c25a87
Compute the product of the first two elements after performing the knot-tying ritual using the lengths given as inputs.
>>>part1 5 "3,4,1,5""12"
Given a rope size and an input string, compute the resulting hash.
>>>part2 256 """a2582a3a0e66e6e86e3812dcb672a272">>>part2 256 "AoC 2017""33efeb34ea91902bb2f59c9920caa6cd">>>part2 256 "1,2,3""3efbe78a8d82f29979031a4aa0b16a9d">>>part2 256 "1,2,4""63960835bcdc130f0b66d7ff4f6a5a8e"
Transform the input string according to the part 1 rule to produce the list of knot lengths required.
>>>part1Input "1,2,3"[1,2,3]
Transform the input string according to the part 2 rule to produce the list of knot lengths required.
>>>part2Input "1,2,3"[49,44,50,44,51,17,31,73,47,23]