diff options
author | Justin Wernick <j.wernick@eyeo.com> | 2023-12-22 13:58:55 +0200 |
---|---|---|
committer | Justin Wernick <j.wernick@eyeo.com> | 2023-12-22 13:58:55 +0200 |
commit | f92617828df7fe9974ba3afc94b6ff338d25bd9b (patch) | |
tree | 28be6387c0cdb56f186fd3c4cda1533ad9336b14 /2023/src | |
parent | b7379a29b9b83464bf60bca6d2d9e3e02863db94 (diff) |
ideas for day 21 part 2
Diffstat (limited to '2023/src')
-rw-r--r-- | 2023/src/bin/day_21.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<dyn std::error::Error>> { 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 { |