From f92617828df7fe9974ba3afc94b6ff338d25bd9b Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Fri, 22 Dec 2023 13:58:55 +0200 Subject: ideas for day 21 part 2 --- 2023/src/bin/day_21.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/2023/src/bin/day_21.rs b/2023/src/bin/day_21.rs index d5126bd..11cdc07 100644 --- a/2023/src/bin/day_21.rs +++ b/2023/src/bin/day_21.rs @@ -16,6 +16,13 @@ fn main() -> Result<(), Box> { dbg!(&walled_garden.count_walkable()); let mut open_garden = OpenGarden::parser(&input).unwrap().1; + // - the paths straight up / down, and left / right from the middle and edges are clear. + // - this would allow finding a "single tile" version (eg part 1) to see how much of a tile could be filled at the boundaries. + // - start at the top boundary I can get into, 26501365 / 131 + // - when I find a fully explored garden, I can extrapolate that any closer gardens are also filled out + // - for filled out gardens, there will be an 'even' and an 'odd' answer (alternating checkerboard). choose the right one to add it. + // - this is still around 202300 pages in each direction, so multiplying the rows etc seems like a good idea. Eg do the two sides, then multiply out the fully explored middle. + let open_iters = 26501365; for i in 0..open_iters { if i % 100000 == 0 { -- cgit v1.2.3