diff --git a/day18/sol.py b/day18/sol.py index f71ed65..780fd58 100644 --- a/day18/sol.py +++ b/day18/sol.py @@ -53,11 +53,10 @@ def flood(lava, border): x |= roll(a, 1, +1) x |= roll(a, 2, -1) x |= roll(a, 2, +1) - x = x & ~border - x = x & ~lava - if (a == x).all(): - a |= border + x &= ~lava + b = a | x + if (a == b).all(): return a - a = x + a = b solve()