summaryrefslogtreecommitdiff
path: root/2017
diff options
context:
space:
mode:
Diffstat (limited to '2017')
-rw-r--r--2017/11.hs30
-rw-r--r--2017/11.in1
2 files changed, 31 insertions, 0 deletions
diff --git a/2017/11.hs b/2017/11.hs
new file mode 100644
index 0000000..19fe862
--- /dev/null
+++ b/2017/11.hs
@@ -0,0 +1,30 @@
+import Control.Monad
+import Data.Char
+import qualified Data.Map.Strict as Map
+import Data.Map.Strict ((!))
+
+splitOn :: Eq a => a -> [a] -> [[a]]
+splitOn c xs = case break (== c) xs of
+ (pre, []) -> [pre]
+ (pre, _ : post) -> pre : splitOn c post
+
+strip :: String -> String
+strip = dropWhile isSpace . reverse . dropWhile isSpace . reverse
+
+dirmap :: Map.Map String (Int, Int)
+dirmap = Map.fromList [("n", (0,2)), ("ne", (1,1)), ("se", (1,-1)), ("s", (0,-2)), ("sw", (-1,-1)), ("nw", (-1,1))]
+
+add :: (Int, Int) -> (Int, Int) -> (Int, Int)
+add (a,b) (c,d) = (a + c, b + d)
+
+distance :: (Int, Int) -> Int
+distance (0,0) = 0
+distance (0,y) = abs y `div` 2
+distance (x,0) = abs x
+distance (x,y) = let m = min (abs x) (abs y) in m + distance (x - m * signum x, y - m * signum y)
+
+main :: IO ()
+main = do
+ input <- liftM (map (dirmap !) . splitOn ',' . strip) (readFile "11.in")
+ print $ distance $ foldl1 add input
+ print $ maximum $ map distance $ scanl add (0,0) input
diff --git a/2017/11.in b/2017/11.in
new file mode 100644
index 0000000..1cdbd36
--- /dev/null
+++ b/2017/11.in
@@ -0,0 +1 @@
+ne,n,n,nw,nw,nw,nw,sw,nw,nw,s,sw,sw,sw,s,n,sw,s,s,s,s,se,se,s,s,se,s,s,se,se,se,nw,s,se,n,se,s,se,se,se,se,se,se,nw,n,se,nw,ne,ne,ne,se,ne,se,ne,ne,ne,ne,ne,ne,nw,ne,n,ne,sw,s,ne,ne,se,n,n,n,ne,nw,ne,ne,n,n,n,n,n,n,n,n,n,n,n,ne,n,se,n,n,n,n,ne,nw,n,s,n,nw,n,n,n,n,sw,n,n,nw,n,sw,n,nw,n,n,n,nw,sw,n,sw,n,nw,n,n,ne,sw,n,nw,se,sw,sw,nw,n,nw,n,n,nw,n,n,nw,nw,nw,n,nw,n,nw,nw,nw,nw,nw,nw,s,nw,nw,nw,ne,nw,sw,s,sw,nw,nw,nw,nw,nw,sw,sw,ne,sw,sw,nw,sw,nw,sw,n,nw,nw,se,n,nw,nw,n,sw,s,sw,nw,nw,nw,sw,sw,sw,nw,sw,sw,nw,nw,sw,nw,sw,sw,n,sw,sw,sw,nw,s,n,n,nw,sw,n,sw,sw,nw,sw,sw,sw,n,sw,se,sw,sw,sw,nw,se,sw,sw,sw,sw,nw,sw,n,sw,sw,sw,s,sw,sw,s,se,n,se,s,sw,sw,sw,sw,se,s,s,sw,sw,sw,sw,n,sw,sw,sw,sw,s,s,sw,sw,ne,sw,ne,sw,s,sw,sw,sw,s,s,s,sw,s,se,s,ne,s,s,s,ne,sw,s,s,s,s,s,s,s,s,s,ne,s,s,s,s,s,s,s,s,nw,s,s,sw,s,n,s,sw,s,s,s,n,s,s,n,se,s,s,s,s,s,s,s,ne,s,nw,sw,s,s,n,ne,s,s,s,se,n,s,nw,sw,se,s,s,s,s,s,s,ne,s,ne,se,s,s,n,s,n,s,s,s,s,s,s,s,se,n,ne,nw,ne,s,nw,s,s,s,s,nw,nw,se,s,s,se,se,s,s,s,s,s,s,s,se,se,se,nw,s,s,se,s,s,se,se,se,s,se,se,se,s,s,se,s,n,se,ne,s,s,se,se,s,se,sw,sw,se,ne,se,s,se,s,ne,se,se,s,se,se,ne,nw,se,s,se,se,s,se,s,se,s,sw,se,se,s,sw,s,se,se,s,s,se,se,se,nw,se,se,n,s,se,ne,se,se,se,se,se,se,se,se,se,se,n,s,se,se,sw,se,se,sw,ne,se,se,se,se,se,se,se,se,se,se,se,n,n,se,se,se,se,se,se,se,se,se,se,se,ne,se,se,sw,ne,se,se,se,se,se,se,ne,se,se,se,se,ne,se,se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,sw,s,s,s,s,s,s,s,s,se,s,s,s,n,n,se,s,se,s,se,s,s,s,s,nw,s,s,s,s,ne,s,s,s,s,s,s,se,s,sw,s,ne,s,nw,s,s,s,s,s,se,s,s,se,se,s,s,se,s,s,s,se,s,sw,sw,s,n,s,s,s,s,s,n,n,s,s,s,s,s,s,s,se,n,s,s,se,ne,nw,s,nw,se,s,n,s,s,s,se,s,ne,se,s,s,s,n,s,nw,ne,sw,se,s,s,s,n,se,s,se,se,s,s,s,se,nw,sw,s,s,se,s,se,s,s,se,se,se,s,se,s,s,s,sw,s,se,s,s,s,s,s,se,s,n,s,s,s,ne,sw,se,sw,s,s,s,s,s,s,nw,se,s,s,nw,se,s,s,s,se,se,n,sw,sw,se,ne,s,n,s,ne,nw,s,n,ne,se,nw,nw,s,s,se,s,s,s,se,sw,se,s,s,se,s,ne,se,se,nw,se,s,s,s,n,s,ne,s,se,s,se,se,s,s,s,se,s,se,n,s,n,s,s,s,se,se,se,sw,se,s,se,sw,se,n,s,s,ne,s,s,se,ne,s,n,se,se,s,s,se,s,s,s,s,s,s,s,se,n,s,s,s,se,n,se,se,s,n,s,s,se,s,sw,se,ne,s,s,s,s,sw,se,s,s,s,s,s,sw,s,ne,se,s,se,s,se,sw,s,se,s,s,se,s,s,s,se,n,n,n,nw,s,s,s,s,sw,nw,se,se,n,sw,se,s,s,ne,sw,s,se,s,nw,s,se,s,se,se,s,se,s,s,s,s,ne,s,s,s,nw,se,se,ne,se,se,se,se,se,s,s,s,s,s,se,s,n,se,se,se,se,se,nw,se,s,s,se,s,s,s,s,s,s,se,se,se,s,se,se,ne,s,n,s,s,s,se,se,s,s,ne,se,s,se,se,se,ne,s,se,s,se,se,s,se,se,s,s,se,ne,s,se,se,se,se,s,se,se,se,sw,se,se,s,se,s,se,se,s,s,se,ne,n,sw,s,s,n,se,nw,s,se,s,se,se,se,se,n,se,s,sw,s,se,s,se,s,nw,se,s,se,s,se,s,se,s,se,se,se,s,se,se,s,se,se,se,nw,sw,sw,s,se,se,se,s,ne,se,nw,ne,ne,s,sw,sw,s,se,se,s,se,se,se,se,s,se,sw,nw,nw,s,se,s,se,s,n,se,se,se,se,s,ne,se,se,se,se,s,sw,nw,sw,s,se,se,s,s,n,se,sw,ne,se,se,n,se,sw,sw,ne,s,s,s,se,se,s,se,sw,s,se,s,se,se,n,s,se,s,nw,se,s,n,nw,se,sw,se,se,se,se,se,se,se,s,s,s,s,se,n,se,s,se,se,s,se,se,se,se,s,s,s,s,s,se,sw,se,se,se,s,se,s,se,se,s,se,se,se,sw,se,s,se,s,s,se,se,n,se,se,s,se,s,se,se,se,s,ne,se,se,s,se,se,ne,nw,sw,se,ne,s,se,se,se,sw,s,s,s,se,se,se,ne,se,s,se,s,s,se,se,n,se,s,se,se,se,s,ne,se,se,sw,s,se,s,se,s,se,se,s,s,sw,se,s,se,se,s,se,s,se,ne,se,se,s,se,se,se,se,ne,se,se,se,s,s,se,s,se,se,se,n,se,se,s,s,se,s,se,se,se,se,nw,se,se,ne,se,se,se,se,se,s,se,se,sw,se,s,s,n,s,se,se,s,nw,s,se,se,se,sw,se,s,se,se,se,se,se,se,nw,se,se,s,se,se,s,s,s,se,sw,n,se,se,ne,s,se,se,sw,se,s,se,se,se,se,s,se,nw,s,se,se,s,sw,ne,se,s,se,se,se,s,se,s,se,se,se,n,se,se,se,s,se,se,se,se,se,se,ne,se,se,nw,se,se,n,se,se,ne,se,se,se,se,se,sw,s,s,se,se,sw,se,n,n,s,se,s,se,se,ne,se,se,ne,se,se,nw,se,n,ne,se,se,sw,se,se,se,se,sw,s,s,se,se,se,n,se,s,n,se,se,se,s,se,s,se,se,se,se,se,se,se,se,se,se,se,se,se,ne,s,se,se,se,se,se,ne,se,se,n,s,se,se,n,se,se,se,se,se,se,se,se,se,s,se,se,se,se,se,se,n,se,se,se,se,se,se,se,se,se,se,se,se,se,se,ne,se,se,se,se,se,se,sw,sw,se,nw,se,sw,se,se,se,nw,se,se,se,s,se,se,se,se,ne,se,n,se,se,se,se,se,se,se,sw,se,s,nw,se,se,s,se,se,se,se,s,ne,se,se,se,se,ne,se,se,se,se,se,se,se,se,se,se,s,se,n,se,se,se,se,se,se,se,ne,se,s,se,se,se,se,s,se,se,se,se,sw,se,se,se,se,se,se,nw,se,se,se,nw,se,se,se,se,se,se,sw,se,sw,se,nw,se,se,se,ne,se,se,se,se,se,se,se,s,se,se,s,se,se,se,se,se,se,s,se,s,se,se,se,se,sw,sw,ne,se,ne,se,se,se,se,se,se,se,n,se,se,se,se,se,se,s,se,se,se,se,se,se,ne,se,se,ne,se,sw,se,se,se,se,sw,se,se,se,se,se,se,se,se,se,ne,se,se,se,se,se,se,se,sw,ne,n,ne,nw,se,n,se,ne,se,sw,se,se,se,ne,nw,nw,se,ne,se,se,se,ne,se,ne,se,ne,s,se,se,se,nw,se,se,se,s,ne,s,se,se,nw,se,se,se,sw,ne,se,s,se,se,se,se,nw,nw,se,s,ne,s,ne,se,se,se,s,sw,ne,sw,se,se,se,se,se,se,se,se,ne,se,se,se,sw,se,se,se,ne,se,se,se,se,se,n,se,se,s,se,se,se,se,se,ne,sw,se,ne,se,se,se,se,se,se,se,ne,se,se,se,se,sw,nw,se,ne,ne,ne,ne,se,se,se,se,ne,se,se,n,n,ne,s,ne,se,se,se,ne,se,se,se,se,se,ne,se,n,ne,se,ne,se,n,se,se,se,se,n,ne,se,ne,ne,se,s,sw,se,n,n,se,se,se,se,s,n,se,se,se,nw,se,ne,se,nw,se,n,ne,se,se,se,se,sw,se,se,sw,n,se,ne,se,se,ne,se,se,se,se,se,se,ne,ne,se,n,ne,ne,se,se,se,nw,se,n,se,se,se,se,nw,se,ne,sw,se,ne,se,se,se,se,se,ne,se,se,se,se,n,se,se,se,ne,s,se,ne,sw,nw,se,ne,se,se,se,se,se,sw,sw,ne,se,se,ne,se,ne,se,ne,se,sw,se,n,se,n,s,se,se,se,ne,se,sw,se,nw,se,ne,nw,n,se,sw,se,ne,n,se,se,se,se,ne,ne,ne,se,se,nw,ne,ne,se,se,se,ne,se,se,se,nw,se,s,ne,se,se,nw,ne,ne,ne,se,se,nw,ne,se,se,se,nw,se,s,ne,se,sw,se,se,sw,se,nw,se,s,se,se,se,se,se,se,se,se,sw,se,s,se,se,se,n,se,sw,se,se,se,se,se,sw,ne,ne,se,sw,nw,s,ne,ne,s,ne,ne,se,ne,ne,ne,se,ne,se,ne,ne,ne,nw,se,n,se,n,ne,se,ne,se,ne,ne,ne,se,nw,se,se,n,se,se,se,n,sw,ne,ne,se,ne,se,se,se,se,nw,se,ne,se,s,se,ne,s,se,ne,ne,s,ne,nw,se,nw,ne,se,se,se,n,ne,se,se,se,se,se,s,se,se,se,sw,n,se,se,se,se,ne,ne,ne,ne,ne,ne,ne,se,nw,se,sw,se,se,se,n,se,se,se,se,se,sw,sw,ne,sw,se,ne,ne,n,se,ne,se,ne,ne,se,ne,se,ne,s,se,ne,ne,se,ne,ne,ne,ne,s,n,ne,ne,s,ne,nw,sw,se,ne,s,ne,ne,ne,se,se,se,s,se,se,se,ne,sw,nw,se,ne,se,sw,sw,nw,ne,se,se,ne,s,se,ne,se,se,n,se,ne,se,se,ne,ne,se,se,se,nw,se,nw,se,ne,ne,ne,n,ne,se,s,se,se,ne,se,ne,se,ne,se,ne,n,nw,ne,ne,ne,ne,ne,se,n,nw,sw,se,ne,sw,ne,se,se,ne,nw,ne,se,ne,ne,ne,ne,n,ne,se,sw,ne,se,ne,se,se,n,se,se,se,ne,ne,nw,se,s,se,nw,ne,ne,nw,se,ne,s,se,ne,ne,ne,nw,ne,ne,ne,se,se,sw,sw,se,ne,n,ne,nw,se,se,se,ne,ne,ne,s,sw,ne,se,se,ne,se,se,ne,se,ne,se,se,sw,se,se,se,se,se,n,se,ne,ne,se,nw,ne,sw,se,n,se,ne,nw,se,ne,s,se,ne,ne,sw,ne,ne,se,ne,se,ne,se,ne,ne,ne,se,se,ne,se,se,nw,ne,ne,se,sw,se,se,s,ne,ne,se,se,s,se,n,ne,se,se,nw,nw,se,se,se,ne,ne,ne,ne,n,se,se,se,ne,ne,ne,ne,ne,ne,se,se,se,sw,ne,se,ne,ne,ne,ne,se,se,se,se,nw,sw,ne,ne,ne,s,s,ne,se,se,ne,sw,ne,ne,se,se,se,ne,ne,nw,se,se,se,se,se,se,ne,se,se,se,se,se,se,ne,ne,ne,ne,ne,se,se,n,se,ne,se,nw,se,se,se,ne,ne,ne,se,se,ne,ne,ne,se,se,sw,se,ne,ne,nw,ne,ne,se,ne,sw,ne,se,se,ne,ne,ne,ne,se,se,se,ne,ne,sw,se,nw,se,ne,s,ne,nw,se,ne,ne,se,ne,ne,se,s,ne,ne,se,se,se,se,s,ne,s,se,ne,n,ne,n,ne,s,ne,se,sw,ne,se,se,ne,se,ne,ne,se,se,se,ne,ne,ne,ne,se,nw,se,ne,se,ne,se,sw,ne,se,ne,ne,sw,ne,ne,ne,nw,se,ne,ne,se,se,ne,ne,ne,ne,ne,ne,se,ne,ne,ne,sw,n,se,se,sw,ne,ne,ne,ne,se,ne,ne,se,se,se,ne,s,ne,s,ne,nw,n,s,se,se,ne,ne,ne,s,se,n,ne,n,ne,se,se,ne,se,ne,ne,se,ne,ne,se,nw,ne,ne,n,se,ne,ne,ne,ne,ne,ne,sw,se,ne,ne,nw,ne,ne,ne,se,ne,se,s,se,ne,nw,ne,se,ne,se,s,sw,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,se,se,ne,ne,n,ne,ne,ne,ne,ne,ne,se,ne,s,ne,se,se,ne,se,n,se,ne,se,ne,s,nw,ne,ne,nw,se,se,se,ne,s,s,n,ne,ne,se,ne,ne,ne,ne,ne,ne,nw,n,se,s,ne,ne,ne,ne,ne,se,ne,ne,ne,se,ne,ne,ne,se,ne,ne,ne,se,ne,ne,ne,ne,ne,ne,ne,sw,ne,se,s,ne,ne,se,s,ne,ne,s,ne,n,n,n,se,ne,ne,ne,se,ne,ne,ne,se,ne,se,ne,se,se,ne,ne,se,ne,ne,ne,ne,ne,ne,sw,s,ne,ne,ne,se,ne,ne,nw,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ne,ne,ne,ne,ne,n,ne,ne,nw,ne,ne,s,ne,ne,ne,ne,ne,ne,se,sw,ne,ne,ne,ne,ne,n,ne,ne,ne,se,ne,ne,ne,sw,ne,sw,ne,se,ne,ne,ne,ne,ne,ne,ne,ne,sw,ne,ne,ne,se,ne,ne,ne,nw,ne,s,ne,ne,se,se,ne,ne,se,ne,s,se,ne,ne,ne,ne,ne,ne,ne,se,ne,se,ne,ne,ne,se,ne,se,ne,se,se,ne,se,se,ne,se,ne,ne,se,ne,ne,ne,ne,se,se,ne,s,s,ne,ne,se,se,ne,se,ne,s,ne,ne,se,se,ne,se,sw,ne,sw,se,ne,ne,sw,se,ne,ne,se,se,ne,se,se,se,se,se,nw,ne,se,ne,sw,ne,se,se,se,ne,se,se,se,se,ne,nw,ne,se,ne,se,ne,sw,se,se,ne,se,se,se,ne,se,nw,ne,s,se,se,ne,s,se,ne,ne,se,sw,nw,se,sw,n,n,se,se,s,se,s,se,ne,se,se,se,n,se,n,sw,ne,se,se,se,se,nw,se,n,se,se,ne,se,sw,se,n,n,se,s,se,se,n,se,se,nw,se,se,se,se,sw,se,se,se,ne,se,ne,se,se,se,se,se,se,se,se,se,nw,se,se,nw,se,n,se,se,se,se,se,se,se,se,se,sw,se,se,se,se,se,s,s,se,sw,ne,se,se,ne,nw,s,n,ne,s,se,se,se,n,ne,s,se,s,se,se,se,se,se,nw,se,se,nw,se,se,se,s,se,se,se,se,se,se,s,se,sw,ne,s,s,se,se,s,se,se,se,se,nw,se,se,se,nw,se,s,se,se,se,sw,se,se,nw,s,se,s,se,se,se,se,s,s,se,s,se,se,se,n,s,n,sw,s,se,s,s,se,s,se,s,se,se,s,se,sw,s,se,s,s,se,se,s,n,sw,se,s,se,se,se,s,s,se,nw,se,se,sw,se,s,s,se,se,s,s,se,ne,nw,se,s,s,se,s,n,s,ne,s,s,sw,s,s,se,sw,s,s,se,s,s,s,s,s,se,s,s,s,s,se,se,se,s,s,nw,se,s,s,s,s,se,nw,ne,s,se,s,se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