diff --git a/src/aoc2024/Day22.kt b/src/aoc2024/Day22.kt index 7ef9cd2..ac43a31 100644 --- a/src/aoc2024/Day22.kt +++ b/src/aoc2024/Day22.kt @@ -6,6 +6,7 @@ import kotlinx.coroutines.awaitAll import kotlinx.coroutines.runBlocking import println import readInput +import java.util.* /* --- Day 22: Monkey Market --- @@ -76,7 +77,7 @@ fun main() { var lastd = 0 var code = 0 var countDown = 4 - val seenArray = BooleanArray(19 * 19 * 19 * 19) + val seenArray = BitSet(19 * 19 * 19 * 19) for (v in priceSequence(it).take(2001)) { val d = v % 10 val delta = d - lastd