Day 3 done!

This commit is contained in:
Steph 2022-12-03 10:02:56 +01:00
parent 22b7ebfe93
commit 9d1c6f30c5
5 changed files with 366 additions and 2 deletions

View File

@ -29,7 +29,7 @@ executable aoc2022
-- LANGUAGE extensions used by modules in this package.
-- other-extensions:
build-depends: base ^>=4.16.3.0
build-depends: base ^>=4.16.3.0, split ^>=0.2.3.5
hs-source-dirs: app
default-language: Haskell2010
other-modules: Day1.Main Day2.Main
other-modules: Day1.Main Day2.Main Day3.Main

61
2022/app/Day3/Main.hs Normal file
View File

@ -0,0 +1,61 @@
module Day3.Main (main) where
import System.IO
import Data.Char
import Data.List.Split
main :: IO ()
main = do
putStrLn "Day 3"
handle <- openFile "app/Day3/input" ReadMode
contents <- hGetContents handle
let r1 = part1 contents
putStrLn $ "part 1: " ++ show r1
let r2 = part2 contents
putStrLn $ "part 2: " ++ show r2
type Rucksack = (String, String)
parseData :: String -> [Rucksack]
parseData input = compartments
where
rucksacks = lines input
compartmentSize = map ((`div` 2) . length) rucksacks
firstCompartments = map (\(s, r) -> take s r) (zip compartmentSize rucksacks)
secondCompartments = map (\(s, r) -> drop s r) (zip compartmentSize rucksacks)
compartments = zip firstCompartments secondCompartments
inBoth :: Eq a => [a] -> [a] -> [a]
inBoth a b = [x | x <- a, y <- b, x == y]
allEqual :: Eq a => [a] -> Bool
allEqual [] = True
allEqual (x:xs) = all (== x) xs
inAll :: Eq a => [[a]] -> [a]
inAll xs = map ((!! 0) . snd) res
where
prod = sequence xs
equal = map allEqual prod
res = filter fst (zip equal prod)
getValue :: Char -> Int
getValue a | a >= 'a' && a <= 'z' = ord a - ord 'a' + 1
getValue a | a >= 'A' && a <= 'Z' = ord a - ord 'A' + 1 + 26
part1 :: String -> Int
part1 contents = sum values
where
both = map (uncurry inBoth) (parseData contents)
single = map (!! 0) both
values = map getValue single
part2 :: String -> Int
part2 contents = sum values
where
groups = chunksOf 3 (lines contents)
badges = map ((!! 0) . inAll) groups
values = map getValue badges

300
2022/app/Day3/input Normal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rlZzCblBvnCDWNGLmvGDLPNG
dqZglgbzrzbbgZqzTFSBHHFJSSSfjjSMfwhj
NMWJSjLMCnHHNMNNHWCHMbVVGBPZTrPVPBVDrBSDGTTr
zvttlFpgdtldwwvftPDPTWQdBZrsrWrGBZ
hFlFmhRFvfCbmWJWHcnj

View File

@ -2,8 +2,10 @@ module Main where
import qualified Day1.Main as Day1
import qualified Day2.Main as Day2
import qualified Day3.Main as Day3
main :: IO ()
main = do
Day1.main
Day2.main
Day3.main

View File

@ -7,6 +7,7 @@ pkgs.stdenv.mkDerivation rec {
name = "aoc-2022";
buildInputs = [
pkgs.haskell.compiler.${hc}
pkgs.haskellPackages.split
pkgs.git
pkgs.zlib
pkgs.cabal-install