projects
/
advent-of-code-18.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
864aa7e
)
tidying
author
Neil Smith
<neil.git@njae.me.uk>
Thu, 6 Dec 2018 09:33:56 +0000
(09:33 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Thu, 6 Dec 2018 09:33:56 +0000
(09:33 +0000)
src/advent06/advent06.hs
patch
|
blob
|
history
diff --git
a/src/advent06/advent06.hs
b/src/advent06/advent06.hs
index 2ff18f51cc2cf9aaa8f0869838da685558f0256a..74e11f7767862bf44c45dda57d1f708501a5a4e8 100644
(file)
--- a/
src/advent06/advent06.hs
+++ b/
src/advent06/advent06.hs
@@
-15,7
+15,7
@@
import qualified Control.Applicative as CA
import qualified Data.Map.Strict as M
type Coord = (Integer, Integer) -- x, y
import qualified Data.Map.Strict as M
type Coord = (Integer, Integer) -- x, y
-type Bounds = (Integer, Integer, Integer, Integer)
+type Bounds = (Integer, Integer, Integer, Integer)
-- minX, maxX, minY, maxY
type Region = M.Map Coord Int
main :: IO ()
type Region = M.Map Coord Int
main :: IO ()
@@
-27,8
+27,6
@@
main = do
print boundingBox
print $ part1 coords boundingBox
print $ part2 coords boundingBox
print boundingBox
print $ part1 coords boundingBox
print $ part2 coords boundingBox
- -- print $ part1 activity
- -- print $ part2 activity
part1 coords bounds = largestRegion $ regionSizes $ finite edgeLabels regions
part1 coords bounds = largestRegion $ regionSizes $ finite edgeLabels regions