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
//! # Day 19: A Series of Tubes
//!
//! Somehow, a network packet got lost and ended up here. It's trying to follow a routing diagram
//! (your puzzle input), but it's confused about where to go.
//!
//! Its starting point is just off the top of the diagram. Lines (drawn with `|`, `-`, and `+`) show
//! the path it needs to take, starting by going down onto the only line connected to the top of the
//! diagram. It needs to follow this path until it reaches the end (located somewhere within the
//! diagram) and stop there.
//!
//! Sometimes, the lines cross over each other; in these cases, it needs to continue going the same
//! direction, and only turn left or right when there's no other option. In addition, someone has
//! left **letters** on the line; these also don't change its direction, but it can use them to keep
//! track of where it's been. For example:
//!
//! ```txt
//! |
//! | +--+
//! A | C
//! F---|----E|--+
//! | | | D
//! +B-+ +--+
//! ```
//!
//! Given this diagram, the packet needs to take the following path:
//!
//! - Starting at the only line touching the top of the diagram, it must go down, pass through `A`,
//! and continue onward to the first `+`.
//! - Travel right, up, and right, passing through `B` in the process.
//! - Continue down (collecting `C`), right, and up (collecting `D`).
//! - Finally, go all the way left through `E` and stopping at `F`.
//!
//! Following the path to the end, the letters it sees on its path are `ABCDEF`.
//!
//! The little packet looks up at you, hoping you can help it find the way. **What letters will it
//! see** (in the order it would see them) if it follows the path? (The routing diagram is very
//! wide; make sure you view it without line wrapping.)
use anyhow::Result;
pub const INPUT: &str = include_str!("d19.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() {}
}