Advent of Code solutions
1#[macro_export]
2macro_rules! yippee {
3 () => {
4 fn part_2(_: Self::Input) -> Option<String> {
5 Some("🥳".to_string())
6 }
7 };
8}
9
10#[macro_export]
11macro_rules! grid_day {
12 ($day:literal, $e_1:literal, $e_2:literal, $t:ty) => {
13 day_stuff!($day, $e_1, $e_2, utils::grid::Grid<$t>);
14
15 fn parse_input(input: &str) -> Self::Input {
16 Self::Input::parse(input)
17 }
18 };
19}
20
21#[macro_export]
22macro_rules! lines_day {
23 ($day:literal, $e_1:literal, $e_2:literal, $t:ty) => {
24 day_stuff!($day, $e_1, $e_2, Vec<$t>);
25
26 fn parse_input(input: &str) -> Self::Input {
27 input.lines().map(|l| l.parse().unwrap()).collect()
28 }
29 };
30}