I realized having to host this potentially indefinitely might not be the best idea, so I am going to shut down this gitea instance eventually.
You’ll have time, at least until the end of 2022, probably longer, but please just get all your stuff somewhere safe in case we ever disappear.
If any of your build scripts rely on 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 there, tell me to migrate it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
303 B

2 years ago
import Data.List
import Data.List.Split
main :: IO ()
main = do
input <- splitOn "\n\n" <$> readFile "input"
print $ day6 input
day6 :: [String] -> (Int,Int)
day6 i = (c a i, c b i)
where a = nub . filter (/= '\n')
b = foldr1 intersect . lines
c p = sum . map (length . p)