diff --git a/src/main/scala/eu/sim642/adventofcode2023/Day12.scala b/src/main/scala/eu/sim642/adventofcode2023/Day12.scala index 4bb5477a..36399a12 100644 --- a/src/main/scala/eu/sim642/adventofcode2023/Day12.scala +++ b/src/main/scala/eu/sim642/adventofcode2023/Day12.scala @@ -26,7 +26,7 @@ object Day12 { } case ('#' :: _, _ :: _) => 0 // not enough length remaining case ('?' :: newMask, lengths) => // recursively solve both cases - countArrangements('.' :: newMask, lengths) + countArrangements('#' :: newMask, lengths) + countArrangements(newMask, lengths) + countArrangements('#' :: newMask, lengths) case (mask, lengths) => throw new IllegalArgumentException(s"impossible mask ($mask) and lengths ($lengths)") } })