From 1eca15741771affa3cd8bbe74674adf96f4df44f Mon Sep 17 00:00:00 2001 From: Chris Hodges Date: Thu, 21 Dec 2023 09:35:32 +0100 Subject: [PATCH] Minor clarification. Change-Id: I987576476869e24d727ecc3f941a1b627e96a417 --- src/aoc2023/Day21.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aoc2023/Day21.kt b/src/aoc2023/Day21.kt index 7777731..d788b04 100644 --- a/src/aoc2023/Day21.kt +++ b/src/aoc2023/Day21.kt @@ -120,7 +120,7 @@ fun main() { val grid = CharGrid(input, '%') var exp = grid.findMatches { it == 'S' }.map { RelPos(it.first, it.second) }.toSet() val mp = steps % 262 - for (i in 1..589) { + for (i in 1..(262 * 2 + mp)) { exp = exp.flatMap { CharGrid.PLUS_POS.map { rp -> it.translate(rp) }