X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=advent12%2FMainBruteForce.hs;h=6b8620395a377b30138beae95080ccfa3895606d;hb=1d4b99f4d671d943b51a1a1e5f48c906f6da7aa6;hp=9aa9ae3914320522e9bfc2a087dea28c743fc2fe;hpb=eec28208f9b74e65a360b374fcd90b5406fdf527;p=advent-of-code-23.git diff --git a/advent12/MainBruteForce.hs b/advent12/MainBruteForce.hs index 9aa9ae3..6b86203 100644 --- a/advent12/MainBruteForce.hs +++ b/advent12/MainBruteForce.hs @@ -1,4 +1,4 @@ --- Writeup at https://work.njae.me.uk/2023/12/08/advent-of-code-2023-day-8/ +-- Writeup at https://work.njae.me.uk/2023/12/15/advent-of-code-2023-day-12/ import AoC import Data.Text (Text) @@ -49,9 +49,6 @@ choose n (x:xs) | length xs == n - 1 = [(x:xs)] | otherwise = (fmap (x:) (choose (n-1) xs)) ++ (choose n xs) --- unknownIndices :: [Spring] -> [Int] --- unknownIndices = elemIndices Unknown - numDamagedToPlace :: Record -> Int numDamagedToPlace (Record springs signature) = totalDamaged - knownDamaged where knownDamaged = length $ filter (== Damaged) springs