From e31486df29a844ab211b53450cdc8f5d4c3be276 Mon Sep 17 00:00:00 2001 From: believer Date: Wed, 6 Dec 2023 21:51:36 +0100 Subject: [PATCH] chore(2023): prepare day 7 --- rust/2023/src/day_07.rs | 57 +++++++++++++++++++++++++++++++++++++++++ rust/2023/src/lib.rs | 1 + 2 files changed, 58 insertions(+) create mode 100644 rust/2023/src/day_07.rs diff --git a/rust/2023/src/day_07.rs b/rust/2023/src/day_07.rs new file mode 100644 index 0000000..c4cba06 --- /dev/null +++ b/rust/2023/src/day_07.rs @@ -0,0 +1,57 @@ +// Day 7: + +#[derive(Debug)] +pub struct Input {} + +#[aoc_generator(day7)] +pub fn input_generator(input: &str) -> Input { + println!("{input}"); + Input {} +} + +/* Part One +* +*/ +// Your puzzle answer was +/* +/// ``` +/// use advent_of_code_2023::day_07::*; +/// let data = include_str!("../input/2023/day7.txt"); +/// assert_eq!(solve_part_01(&input_generator(data)), 861300); +/// ``` +*/ +#[aoc(day7, part1)] +pub fn solve_part_01(_input: &Input) -> u64 { + 0 +} + +/* Part Two +* +* Here we combine all the race times and distance from the previous data into +* two large numbers. This means we only have one race, but since the time +* is longer, we have a lot more ways to beat the record. +* +*/ +/* +/// ``` +/// use advent_of_code_2023::day_07::*; +/// let data = include_str!("../input/2023/day7.txt"); +/// assert_eq!(solve_part_02(&input_generator(data)), 28101347); +/// ``` +*/ +#[aoc(day7, part2)] +pub fn solve_part_02(_input: &Input) -> u64 { + 0 +} + +#[cfg(test)] +mod tests { + use super::*; + + const DATA: &str = ""; + + #[test] + fn sample_01() { + assert_eq!(solve_part_01(&input_generator(DATA)), 0) + } +} diff --git a/rust/2023/src/lib.rs b/rust/2023/src/lib.rs index 27edd3a..00c0719 100644 --- a/rust/2023/src/lib.rs +++ b/rust/2023/src/lib.rs @@ -14,5 +14,6 @@ pub mod day_03; pub mod day_04; pub mod day_05; pub mod day_06; +pub mod day_07; aoc_lib! { year = 2023 }