diff --git a/README.md b/README.md index 77c5565..f272a8c 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,9 @@ Solutions for [Advent of Code](https://adventofcode.com/) in [Rust](https://www. | [Day 7](./src/bin/07.rs) | `43.5ms` | `3.7s` | | [Day 8](./src/bin/08.rs) | `110.0µs` | `395.4µs` | | [Day 9](./src/bin/09.rs) | `897.8µs` | `549.0ms` | +| [Day 10](./src/bin/10.rs) | `836.4µs` | `1.6ms` | -**Total: 12224.23ms** +**Total: 12226.66ms** --- diff --git a/src/bin/10.rs b/src/bin/10.rs index 16e0c4b..478ba1b 100644 --- a/src/bin/10.rs +++ b/src/bin/10.rs @@ -1,7 +1,5 @@ advent_of_code::solution!(10); -use std::iter::successors; - #[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq)] struct Pos { x: usize, @@ -94,27 +92,6 @@ impl Topo { } } -fn print_route(route: Vec<(Pos, u8)>, max: &Pos) { - println!("=========="); - for y in 0..max.y { - print!("|"); - for x in 0..max.x { - let mut found = false; - for r in &route { - if r.0.x == x && r.0.y == y { - found = true; - print!("{}", r.1); - } - } - if !found { - print!(" "); - } - } - println!("|"); - } - println!("=========="); -} - pub fn part_one(input: &str) -> Option { let topo = Topo::init(input).ok()?; let ths = topo.get_trailheads();