Please don’t rely on this Gitea instance being around forever. If any of your build scripts use my (kageru’s) projects hosted here, check my Github or IEW on Github for encoding projects. If you can’t find what you’re looking for there, tell me to migrate it.

Day16: Time/6 when dropping unneeded calculations

master
Arranun 3 years ago
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)

Loading…
Cancel
Save