projects
/
advent-of-code-18.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Day 13
[advent-of-code-18.git]
/
src
/
advent12
/
advent12.hs
diff --git
a/src/advent12/advent12.hs
b/src/advent12/advent12.hs
index cbf75dbd5af434c3551130bb1de338dfad61cdc5..67bfef15fae2831dfd061465eb213743aa861d20 100644
(file)
--- a/
src/advent12/advent12.hs
+++ b/
src/advent12/advent12.hs
@@
-29,7
+29,6
@@
part1 rules row = sum $ (iterate (\r -> applyRules rules r) row)!!20
part2 :: [Rule] -> Pots -> Integer
part2 :: [Rule] -> Pots -> Integer
--- part2 rules pots = (length differentQuads, steadyDiff, sum la, sum lb, sum lc, sum ld)-- (fromIntegral (sum la)) + steadyDiff * remainingGenerations
part2 rules pots = (fromIntegral (sum lc)) + steadyDiff * remainingGenerations
where rows = (iterate (\r -> applyRules rules r) pots)
rowQuads = zip4 rows (drop 1 rows) (drop 2 rows) (drop 3 rows)
part2 rules pots = (fromIntegral (sum lc)) + steadyDiff * remainingGenerations
where rows = (iterate (\r -> applyRules rules r) pots)
rowQuads = zip4 rows (drop 1 rows) (drop 2 rows) (drop 3 rows)