pre y2024d15
This commit is contained in:
parent
f56780d1cf
commit
86c52a1a59
71
y2024/resources/15_input.txt
Normal file
71
y2024/resources/15_input.txt
Normal file
@ -0,0 +1,71 @@
|
||||
##################################################
|
||||
#OOO#..O.O#O#...#.O.OO...............OO.....O....#
|
||||
#O#O...#...#...O............OO.#...OO..O..OO...O.#
|
||||
#..O....O#.O..O.O..O#O##.OO..O..........#O....OO.#
|
||||
#...O#.OOO.O.O.O......O.OO.O..#.O.OO#O.#OO.O.O#..#
|
||||
#OO..O....O....#....OO#OO..O..OO..O.....#O.O..O.O#
|
||||
#O.....#.O.O...#..OO.......OO....O.#O.O..#..O..O.#
|
||||
#..OO.O.#O.O.O..##O..O#OO....#.O..O...O.OO..#OOO##
|
||||
#....OO...OO..O..O.#.OOO..O..#O....OO#O..O..#.O..#
|
||||
#....OO.#...O#..O...#.....O......#.....#.....#.O.#
|
||||
#..O.....O.O.O..O....OO#.O.#.O......#..#O.O..OO..#
|
||||
#.#..OO....O........O.#....OO...#.O.OO...O.......#
|
||||
#OO...OO.OO...#.OOO........O#...O.#.OO....OO...OO#
|
||||
#.O..O..OO.OOOO....#..O.#OO.O..O#.......O.#....###
|
||||
#O...O.......OO....#......OO.O.#O.O..O.O.O.#..O.O#
|
||||
#OO#OO....#O...O#....#...OOO.O.O..O..#...O.O#O..O#
|
||||
#....OOO#OO.......#.OO....#...O..#.O...#.O.......#
|
||||
#OOOO....O...O.OOOO.....OO.......O#..O.OO.....O.O#
|
||||
#..#..O.#.O..OO.OOOO...OO#...OOO...O.##.O#.O..OOO#
|
||||
#O......O..O#...#....O...O.OO....O.O....OO..#....#
|
||||
#.....OOO..O.O......O...#...O...........#.OO..#O.#
|
||||
#...#.....O.O..#O#....O.#O#..O#....O..O....#OOO###
|
||||
####O.....O...O.#.......O.O.O...O.....O.O...O...O#
|
||||
#O...O...O.OO.O.....O.O......O.##.#O#.O.....O..OO#
|
||||
#...#..#...#...OO..#OO.O@.O......O............OO.#
|
||||
#O........OOO.O.O.O..#..#O...O.O..#.OO...#.OO..#.#
|
||||
#.O.#..O...O...OO...#..OOO......OO.#O#......O.OO.#
|
||||
#.O...OO#O...O..O......O..#O....O.....O..O..O.O..#
|
||||
#.O..O...O..#..OO.....O..O.........O#...#O#..OO.##
|
||||
#.....O..#..##........O.#..#...O..##..OO.....O...#
|
||||
#.O..O#...#.....O.O#....OOO.#..#.OO..O..OO.OOO...#
|
||||
#.#OO..O...O.....O.O#.....##..O.O#.O.O....O....#.#
|
||||
#....#..#.....#O.#..O..#......O..O.....OO#..O#.OO#
|
||||
#....O.O...#OO...#O.O..O..........OO..#O....O..O##
|
||||
#O...#..#.....O.......O.O.O....O.O.O..O.O.#...####
|
||||
#.OO........#.#..........#..O....OO#..#O.O.....O.#
|
||||
#.#..O.O....OO....#O.......#.O..O.#O.O..OO#......#
|
||||
#O...O.....O.OO#...#O.O.O.....O..OOO..O##.O...O..#
|
||||
#O...OO.#O#.O..O..O...O.O......O..##............##
|
||||
#O.O.#...........OO.....OO...O.O......#O.OO....OO#
|
||||
#...OO...OO#.O..O.O...O..OO......O.......O.O.OO..#
|
||||
#.#....O..O..O...O.......#...O.#O..O..O.O.O......#
|
||||
#O....O......O#.O......##.....#.....O.O.O#O......#
|
||||
#.OO.OO..O......OOOO..O#.O...O.O......#.....OO..O#
|
||||
#.O......O.O.OO.O..#..O....O.....#....O.#.OO#...O#
|
||||
#.O..#....#...O......#.O.....OO.O.....O.....O....#
|
||||
#.#..OO.....#.....#O.O.#O......O......OO....OOO.O#
|
||||
#..OO.O....O...O.O......O.O.OO...#.....O.......O.#
|
||||
#..O..O...#.O.O#........OO....O...O.OO...#.......#
|
||||
##################################################
|
||||
|
||||
^>v<v><>^<>v^<vvv<v>v<><>^^v>^^<<^<v^v>v<>v^<^<^v^v^>>v<><>^<^^^^<v^><v<^^>v>vv>v^><<vv>>^><v<^<^v^v>v>>^><>^^vv^<<<>v>v>>vvvv^<^><v>^^><>v>^v^^<>>^<^<v<v^^<v><v><<>>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^v>>v^^v<v<v^<<><^v<<^^<<>v>v>>v<><>^>^^<v>^>vvv<><<>><<v<<<^>^<^v<<<^<>^^>>v^><v<<<<><<>>^^^^^^vvv<><<v<vvv>^^>^v>>>^^>>>^<<<>^vv<^><<<<>^v^>>>v<>>v>><<^<vv><^^<><><v><>^^<vv^<<vvvvvv>vv^^v^v<>>^v<<^v^^>^vv^v>vv<><vv^<v^^>v^^<<<>>vvv^><>v^<v>^<^><><>>v>^><v><^<^^>v>vv<^v^^>^>^v^^>v<vv>v><v^v>>>>vvv^^v^>v>>^^<<<v><<v>v>v<<>^^v
|
27
y2024/src/bin/d15.rs
Normal file
27
y2024/src/bin/d15.rs
Normal file
@ -0,0 +1,27 @@
|
||||
use std::{fs, time::Instant};
|
||||
|
||||
use utils::time::get_elapsed_string;
|
||||
use y2024::days::d15;
|
||||
|
||||
fn main() {
|
||||
let now = Instant::now();
|
||||
println!("Part 1:");
|
||||
part1();
|
||||
println!("Ran in {}", get_elapsed_string(now.elapsed()));
|
||||
let now = Instant::now();
|
||||
println!("Part 2:");
|
||||
part2();
|
||||
println!("Ran in {}", get_elapsed_string(now.elapsed()));
|
||||
}
|
||||
|
||||
fn part1() {
|
||||
let root = env!("CARGO_MANIFEST_DIR");
|
||||
let content = fs::read_to_string(format!("{root}/resources/15_input.txt")).unwrap();
|
||||
println!("{}", d15::process_part1(&content));
|
||||
}
|
||||
|
||||
fn part2() {
|
||||
let root = env!("CARGO_MANIFEST_DIR");
|
||||
let content = fs::read_to_string(format!("{root}/resources/15_input.txt")).unwrap();
|
||||
println!("{}", d15::process_part2(&content));
|
||||
}
|
176
y2024/src/days/d15.rs
Normal file
176
y2024/src/days/d15.rs
Normal file
@ -0,0 +1,176 @@
|
||||
use std::error::Error;
|
||||
|
||||
use itertools::Itertools;
|
||||
|
||||
pub fn process_part1(input: &str) -> u32 {
|
||||
let (grid, movements) = input.split_once("\n").unwrap();
|
||||
let grid = parse_grid(grid);
|
||||
let movements = parse_movements(movements);
|
||||
for movement in movements {}
|
||||
}
|
||||
|
||||
pub fn process_part2(input: &str) -> u32 {
|
||||
0
|
||||
}
|
||||
|
||||
fn parse_grid(input: &str) -> Vec<Vec<GridTile>> {
|
||||
let mut grid_entities = Vec::new();
|
||||
let mut robot = GridTile {
|
||||
entity: GridTileType::Robot,
|
||||
..Default::default()
|
||||
};
|
||||
input.lines().enumerate().for_each(|(yidx, line)| {
|
||||
let mut row_entities = Vec::new();
|
||||
line.chars().enumerate().for_each(|(xidx, chara)| {
|
||||
if let Ok(entity) = GridTileType::from_character(chara) {
|
||||
match entity {}
|
||||
}
|
||||
});
|
||||
grid_entities.push(row_entities);
|
||||
});
|
||||
grid_entities
|
||||
}
|
||||
|
||||
fn parse_movements(input: &str) -> Vec<Movement> {
|
||||
input
|
||||
.lines()
|
||||
.map(|line| {
|
||||
line.chars()
|
||||
.map(|chara| Movement::try_from(chara).unwrap())
|
||||
.collect_vec()
|
||||
})
|
||||
.concat()
|
||||
}
|
||||
|
||||
fn move_up(robot: &mut GridTile, grid: &mut Vec<Vec<GridTile>>) {}
|
||||
|
||||
fn move_down(robot: &mut GridTile, grid: &mut Vec<Vec<GridTile>>) {}
|
||||
|
||||
fn move_left(robot: &mut GridTile, grid: &mut Vec<Vec<GridTile>>) {}
|
||||
|
||||
fn move_right(robot: &mut GridTile, grid: &mut Vec<Vec<GridTile>>) {}
|
||||
|
||||
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
enum GridTileType {
|
||||
Robot,
|
||||
Crate,
|
||||
Wall,
|
||||
#[default]
|
||||
Nothing,
|
||||
}
|
||||
|
||||
impl GridTileType {
|
||||
fn from_character(value: char) -> Result<GridTileType, Box<dyn Error>> {
|
||||
match value {
|
||||
'#' => Ok(Self::Wall),
|
||||
'O' => Ok(Self::Crate),
|
||||
'@' => Ok(Self::Robot),
|
||||
'.' => Ok(Self::Nothing),
|
||||
_ => Err(Box::from(format!("{value} is not a valid entity"))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
struct GridTile {
|
||||
entity: GridTileType,
|
||||
coords: (u32, u32),
|
||||
}
|
||||
|
||||
impl GridTile {
|
||||
fn get_gps(&self) -> u32 {
|
||||
if self.entity == GridTileType::Crate {
|
||||
self.coords.0 + self.coords.1 * 100
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
enum Movement {
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right,
|
||||
}
|
||||
|
||||
impl TryFrom<char> for Movement {
|
||||
type Error = Box<dyn Error>;
|
||||
|
||||
fn try_from(value: char) -> std::result::Result<Movement, Box<dyn Error>> {
|
||||
match value {
|
||||
'^' => Ok(Self::Up),
|
||||
'v' => Ok(Self::Down),
|
||||
'<' => Ok(Self::Left),
|
||||
'>' => Ok(Self::Right),
|
||||
_ => Err(Box::from(format!("{value} is not a valid direction"))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
const INPUT_SMALL: &str = "#######
|
||||
#...O..
|
||||
#......";
|
||||
|
||||
const INPUT_MEDIUM: &str = "########
|
||||
#..O.O.#
|
||||
##@.O..#
|
||||
#...O..#
|
||||
#.#.O..#
|
||||
#...O..#
|
||||
#......#
|
||||
########
|
||||
|
||||
<^^>>>vv<v>>v<<";
|
||||
|
||||
const INPUT_LARGE: &str = "##########
|
||||
#..O..O.O#
|
||||
#......O.#
|
||||
#.OO..O.O#
|
||||
#..O@..O.#
|
||||
#O#..O...#
|
||||
#O..O..O.#
|
||||
#.OO.O.OO#
|
||||
#....O...#
|
||||
##########
|
||||
|
||||
<vv>^<v^>v>^vv^v>v<>v^v<v<^vv<<<^><<><>>v<vvv<>^v^>^<<<><<v<<<v^vv^v>^
|
||||
vvv<<^>^v^^><<>>><>^<<><^vv^^<>vvv<>><^^v>^>vv<>v<<<<v<^v>^<^^>>>^<v<v
|
||||
><>vv>v^v^<>><>>>><^^>vv>v<^^^>>v^v^<^^>v^^>v^<^v>v<>>v^v^<v>v^^<^^vv<
|
||||
<<v<^>>^^^^>>>v^<>vvv^><v<<<>^^^vv^<vvv>^>v<^^^^v<>^>vvvv><>>v^<<^^^^^
|
||||
^><^><>>><>^^<<^^v>>><^<v>^<vv>>v>>>^v><>^v><<<<v>>v<v<v>vvv>^<><<>^><
|
||||
^>><>^v<><^vvv<^^<><v<<<<<><^v<<<><<<^^<v<^^^><^>>^<v^><<<^>>^v<v^v<v^
|
||||
>^>>^v>vv>^<<^v<>><<><<v<<v><>v<^vv<<<>^^v^>^^>>><<^v>>v^v><^^>>^<>vv^
|
||||
<><^^>^^^<><vvvvv^v<v<<>^v<v>v<<^><<><<><<<^^<<<^<<>><<><^^^>^^<>^>v<>
|
||||
^^>vv<^v^v<vv>^<><v<^v>^^^>>>^^vvv^>vvv<>>>^<^>>>>>^<<^v>^vvv<>^<><<v>
|
||||
v^^>>><<^^<>>^v^<v^vv<>v^<<>^<^v^v><^<<<><<^<v><v<>vv>>v><v^<vv<>v^<<^";
|
||||
|
||||
#[test]
|
||||
fn part1_small() {
|
||||
let result = process_part1(INPUT_SMALL);
|
||||
assert_eq!(result, 104);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn part1_medium() {
|
||||
let result = process_part1(INPUT_MEDIUM);
|
||||
assert_eq!(result, 2028);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn part1_large() {
|
||||
let result = process_part1(INPUT_LARGE);
|
||||
assert_eq!(result, 10092);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn part2() {
|
||||
let result = process_part2(INPUT_SMALL);
|
||||
assert_eq!(result, 0);
|
||||
}
|
||||
}
|
@ -17,3 +17,5 @@ pub mod d12;
|
||||
pub mod d13;
|
||||
|
||||
pub mod d14;
|
||||
|
||||
pub mod d15;
|
||||
|
Loading…
Reference in New Issue
Block a user