day19, example

This commit is contained in:
efim
2023-12-19 09:02:39 +00:00
parent 6efd55ae6a
commit 5f62ea45f7
4 changed files with 277 additions and 3 deletions

18
main.go
View File

@@ -3,12 +3,24 @@ package main
import (
"log"
"sunshine.industries/aoc2023/day18"
"sunshine.industries/aoc2023/day19"
)
func main() {
log.Print("> starting run:")
result := day18.Run()
log.Printf("\n\nday18 result: %d\n****\n", result)
// lnx{m>1548:A,A}
// qqz{s>2770:qs,m<1801:hdj,R}
// kt{m>2215:R,x>3386:A,x<3107:R,R}
testSorter := day19.ReadSorterLine("kt{m>2215:R,x>3386:A,x<3107:R,R}")
log.Printf("my test sorter is %+v", testSorter)
simplified := day19.SimplifyOperation(testSorter)
log.Printf("> simplivied %+v", simplified)
detail := day19.ReadDetailLine("{x=787,m=2655,a=1222,s=2876}")
log.Printf("> detail %+v", detail)
result := day19.Run()
log.Printf("\n\nday19 result: %d\n****\n", result)
}