Boilerplate day 05

This commit is contained in:
Max Nuding 2022-12-04 08:24:27 +00:00
parent ab92541119
commit a9127c3301
3 changed files with 1023 additions and 0 deletions

1000
input/05.txt Normal file

File diff suppressed because it is too large Load Diff

19
src/day05/mod.rs Normal file
View File

@ -0,0 +1,19 @@
use crate::read;
use tuple_map::*;
pub fn run() {
let input = read("05");
let lines = input.lines().map(|l| l).collect::<Vec<_>>();
#[cfg(feature = "part1")]
{
let count = lines.iter().count();
println!("Day 5, Part 01: {}", count);
}
#[cfg(feature = "part2")]
{
let count = 1;
println!("Day 5, Part 02: {}", count);
}
}

View File

@ -5,6 +5,7 @@ mod day01;
mod day02;
mod day03;
mod day04;
mod day05;
fn main() {
let today = Local::now().day();
@ -21,6 +22,9 @@ fn main() {
if cfg!(feature = "day04") || (cfg!(feature = "today") && today == 4) {
day04::run();
}
if cfg!(feature = "day05") || (cfg!(feature = "today") && today == 5) {
day04::run();
}
println!("Finished, time taken: {:?}", now.elapsed())
}