advent-of-code 2025.5.0

Solutions to Advent of Code
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::common::parser::parse_lines;
use crate::input::Input;

pub fn solve(input: &Input) -> Result<usize, String> {
    Ok(parse_lines::<u32>(input.text)?
        .windows(input.part_values(2, 4))
        .filter(|data| data.last() > data.first())
        .count())
}

#[test]
pub fn tests() {
    let real_input = include_str!("day01_input.txt");
    test_part_one!(real_input => 1766);
    test_part_two!(real_input => 1797);
}