Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 1.17 KB

README.md

File metadata and controls

10 lines (7 loc) · 1.17 KB

Haskell: Part 1 (01:11:37, rank 7001), Part 2 (01:20:23, rank 5952)

This was the first tough day, although staying out in a pub until 1am last night, then starting the challenge at 5am probably didn't help. A fun challenge but as usual parsing threw me off.

Part 1

Another massive struggle mainly due to poor use of Parsec. I only realised after hacking for a long time that I was getting a single board which was the individual boards concatenated. Turned out it was mostly caused by me using sepEndBy instead of sepEndBy1. So frustrating. Hopefully I'll get more competent at parsing...

Part 2

After part 1 I was worried this would be a massive step, but nope, I was able to just filter out winning boards as I marked them until there was only one left. I did get tripped up by the fact that multiple boards can win at once, except the final board of course, so I needed to exclude the set of winning boards at each move, and reduce the remaining count accordingly.