1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
//! # Day 20: Donut Maze
//!
//! You notice a strange pattern on the surface of Pluto and land nearby to get a closer look. Upon
//! closer inspection, you realize you've come across one of the famous space-warping mazes of the
//! long-lost Pluto civilization!
//!
//! Because there isn't much space on Pluto, the civilization that used to live here thrived by
//! inventing a method for folding spacetime. Although the technology is no longer understood, mazes
//! like this one provide a small glimpse into the daily life of an ancient Pluto citizen.
//!
//! This maze is shaped like a [donut]. Portals along the inner and outer edge of the donut can
//! instantly teleport you from one side to the other. For example:
//!
//! ```txt
//! A
//! A
//! #######.#########
//! #######.........#
//! #######.#######.#
//! #######.#######.#
//! #######.#######.#
//! ##### B ###.#
//! BC...## C ###.#
//! ##.## ###.#
//! ##...DE F ###.#
//! ##### G ###.#
//! #########.#####.#
//! DE..#######...###.#
//! #.#########.###.#
//! FG..#########.....#
//! ###########.#####
//! Z
//! Z
//! ```
//!
//! This map of the maze shows solid walls (`#`) and open passages (`.`). Every maze on Pluto has a
//! start (the open tile next to `AA`) and an end (the open tile next to `ZZ`). Mazes on Pluto also
//! have portals; this maze has three pairs of portals: `BC`, `DE`, and `FG`. When on an open tile
//! next to one of these labels, a single step can take you to the other tile with the same label.
//! (You can only walk on `.` tiles; labels and empty space are not traversable.)
//!
//! One path through the maze doesn't require any portals. Starting at `AA`, you could go down 1,
//! right 8, down 12, left 4, and down 1 to reach `ZZ`, a total of 26 steps.
//!
//! However, there is a shorter path: You could walk from `AA` to the inner `BC` portal (4 steps),
//! warp to the outer `BC` portal (1 step), walk to the inner `DE` (6 steps), warp to the outer `DE`
//! (1 step), walk to the outer `FG` (4 steps), warp to the inner `FG` (1 step), and finally walk to
//! `ZZ` (6 steps). In total, this is only **23** steps.
//!
//! Here is a larger example:
//!
//! ```txt
//! A
//! A
//! #################.#############
//! #.#...#...................#.#.#
//! #.#.#.###.###.###.#########.#.#
//! #.#.#.......#...#.....#.#.#...#
//! #.#########.###.#####.#.#.###.#
//! #.............#.#.....#.......#
//! ###.###########.###.#####.#.#.#
//! #.....# A C #.#.#.#
//! ####### S P #####.#
//! #.#...# #......VT
//! #.#.#.# #.#####
//! #...#.# YN....#.#
//! #.###.# #####.#
//! DI....#.# #.....#
//! #####.# #.###.#
//! ZZ......# QG....#..AS
//! ###.### #######
//! JO..#.#.# #.....#
//! #.#.#.# ###.#.#
//! #...#..DI BU....#..LF
//! #####.# #.#####
//! YN......# VT..#....QG
//! #.###.# #.###.#
//! #.#...# #.....#
//! ###.### J L J #.#.###
//! #.....# O F P #.#...#
//! #.###.#####.#.#####.#####.###.#
//! #...#.#.#...#.....#.....#.#...#
//! #.#####.###.###.#.#.#########.#
//! #...#.#.....#...#.#.#.#.....#.#
//! #.###.#####.###.###.#.#.#######
//! #.#.........#...#.............#
//! #########.###.###.#############
//! B J C
//! U P P
//! ```
//!
//! Here, `AA` has no direct path to `ZZ`, but it does connect to `AS` and `CP`. By passing through
//! `AS`, `QG`, `BU`, and `JO`, you can reach `ZZ` in **58** steps.
//!
//! In your maze, **how many steps does it take to get from the open tile marked AA to the open tile
//! marked `ZZ`?**
//!
//! [donut]: https://en.wikipedia.org/wiki/Torus
use anyhow::Result;
pub const INPUT: &str = include_str!("d20.txt");
pub fn solve_part_one(input: &str) -> Result<i64> {
Ok(0)
}
pub fn solve_part_two(input: &str) -> Result<i64> {
Ok(0)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn part_one() {}
#[test]
fn part_two() {}
}