use advent_of_code::{prob1, prob2, prob3, prob4, prob5, prob6, prob7}; use color_eyre::eyre::Result; fn main() -> Result<()> { color_eyre::install()?; { let file_path = "prob1.txt"; let max_part1 = prob1::solve_part1(file_path); let max_part2 = prob1::solve_part2(file_path); println!("Solution for problem 1 part 1: {max_part1}\nSolution for problem 1 part 2: {max_part2}"); } { let file_path = "prob2_part1.txt"; let max_part1 = prob2::solve_part1(file_path); let max_part2 = prob2::solve_part2(file_path); println!("Solution for problem 2 part 1: {max_part1}\nSolution for problem 2 part 2: {max_part2}"); } { let file_path = "prob3_part1.txt"; let max_part1 = prob3::solve_part1(file_path); println!("Solution for problem 3 part 1: {max_part1}"); } { let file_path = "prob3_part2.txt"; let max_part2 = prob3::solve_part2(file_path); println!("Solution for problem 3 part 2: {max_part2}"); } { let file_path = "prob4_part1.txt"; let max_part1 = prob4::solve(file_path, &prob4::mutual_inclusion); println!("Solution for problem 4 part 1: {max_part1}"); } { let file_path = "prob4_part1.txt"; let max_part1 = prob4::solve(file_path, &prob4::complete_overlap); println!("Solution for problem 4 part 2: {max_part1}"); } { let file_path = "prob5_part1.txt"; let max_part1 = prob5::solve_part1(file_path); println!("Solution for problem 5 part 1: {max_part1}"); } { let file_path = "prob5_part2.txt"; let max_part1 = prob5::solve_part2(file_path); println!("Solution for problem 5 part 2: {max_part1}"); } { let _file_path = "prob6_part1.txt"; let solution = prob6::solve_part1(include_str!("../prob6_part1.txt")); println!("Solution for problem 6 part 1: {solution}"); } { let _file_path = "prob6_part1.txt"; let solution = prob6::solve_part2(include_str!("../prob6_part1.txt")); println!("Solution for problem 6 part 2: {solution}"); } { let _file_path = "prob7_part1.txt"; let solution = prob7::solve_part1(include_str!("../prob7_part1.txt"))?; println!("Solution for problem 7 part 1: {solution}"); } Ok(()) }