[hs] Solve 2020_19 part 2
This commit is contained in:
parent
e8f3e01617
commit
bd7575a9f5
1 changed files with 5 additions and 0 deletions
|
|
@ -67,5 +67,10 @@ solver (rules, msgs) = do
|
||||||
putStrLn ">> Part 1"
|
putStrLn ">> Part 1"
|
||||||
print $ length $ filter (isValid rules) msgs
|
print $ length $ filter (isValid rules) msgs
|
||||||
|
|
||||||
|
putStrLn ""
|
||||||
|
putStrLn ">> Part 2"
|
||||||
|
let rules2 = Map.insert 8 (Branch [[42],[42,8]]) $ Map.insert 11 (Branch [[42,31],[42,11,31]]) rules
|
||||||
|
print $ length $ filter (isValid rules2) msgs
|
||||||
|
|
||||||
day :: Day
|
day :: Day
|
||||||
day = dayParse parser solver
|
day = dayParse parser solver
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue