Skip to content

kohanyirobert/advent-of-code-2017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2017

Run solutions with stack like

cd 01
stack runghc Part1 < input.txt

or

cd 01
stack ghc Part1
./Part1 < input.txt

To pass flags use

stack runghc -- -i../:. Part1

Note: there’s no space between the flag and its argument.

Notes

  • Day 5 — Part2 finishes in ~30 seconds when compiled.

  • Day 13 — Part2 finishes in ~13 minutes when compiled.

  • Day 14 — feed -i.:../10 to ghci or ghc in order to run or compile.

  • Day 20 — Part2 runs much faster when compiled; the solution is based on heuristic rather than a proof.

  • Day 21 — Part2 runs very slow, it could be optimized, because all 3x3 patterns can be treated independently from each other — divide and conquer.

  • Day 23 — feed -i.:../18 to ghci or ghc in order to run or compile. Compile the C code like gcc -Wall -o Part1 Part1.c and gcc -Wall -o Part2 Part2.c -lm.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published