Skip to content

anhtumai/advent_of_code_2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

advent-of-code-2020

Advent of Code 2020 🎄 Haskell Solutions by @anhtumai Linkedin

MIT license

What is Advent of Code?

Advent of Code is an online event created by Eric Wastl. Each year, starting on Dec 1st, an advent calendar of small programming puzzles are unlocked once a day at midnight (EST/UTC-5). Developers of all skill sets are encouraged to solve them in any programming language they choose!

Advent of Code 2020 Story

After saving Christmas five years in a row, you've decided to take a vacation at a nice resort on a tropical island. Surely, Christmas will go on without you.

The tropical island has its own currency and is entirely cash-only. The gold coins used there have a little picture of a starfish; the locals just call them stars. None of the currency exchanges seem to have heard of them, but somehow, you'll need to find fifty of these coins by the time you arrive so you can pay the deposit on your room.

To save your vacation, you need to get all fifty stars by December 25th.

Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one star. Good luck!

Progress

Day Part One Part Two
Day 1: Report Repair
Day 2: Password Philosophy
Day 3: Toboggan Trajectory
Day 4: Passport Processing
Day 5: Binary Boarding
Day 6: Custom Customs
Day 7: Handy Haversacks
Day 8: Handheld Halting
Day 9: Encoding Error
Day 10: Adapter Array
Day 11: Seating System
Day 12: Rain Risk
Day 13: Shuttle Search
Day 14: Docking Data
Day 15: Rambunctious Recitation
Day 16: Ticket Translation
Day 17: TBD
Day 18: TBD
Day 19: TBD
Day 20: TBD
Day 21: TBD
Day 22: TBD
Day 23: TBD
Day 24: TBD
Day 25: TBD

Running Programss

Each day contains 2 parts:

// Working directory: day...
$> stack runhaskell part1.hs
$> stack runhaskell part2.hs

Except for day 15, since it requires a lot of memory, we need to compile the code:

$> ghc Main.hs -dynamic -O
$> ./Main

Releases

No releases published

Packages

No packages published