Day16: Time/6 when dropping unneeded calculations

This commit is contained in:
Arranun 2019-12-16 13:04:34 +01:00
parent 17ef30b293
commit 46b9098db9

@ -1,11 +1,14 @@
import Data.Char
import Debug.Trace as T
main = do
content <- getContents
let input = map digitToInt $ init content
cont <- getContents
let content = (map digitToInt $ init cont)
let base = [0,1,0,-1]
let patter = map (getPatternForIndex base (length input)) [0..(length input)]
let test1 = doSteps input patter 100
let patter = drop 500 (map (getPatternForIndex base (length content)) [0..(length content)])
let input = drop 500 content
let test1 = doSteps input patter 1
--putStrLn (show input)
--mapM putStrLn (map show patter)
putStrLn (show test1)