From 658e4e4e288cd77f60feebc055ae54447f5f3b60 Mon Sep 17 00:00:00 2001 From: Keenan Tims Date: Tue, 5 Dec 2023 12:36:28 -0800 Subject: [PATCH] Add boilerplate --- boilerplate/src/main.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 boilerplate/src/main.rs diff --git a/boilerplate/src/main.rs b/boilerplate/src/main.rs new file mode 100644 index 0000000..d2bced3 --- /dev/null +++ b/boilerplate/src/main.rs @@ -0,0 +1,27 @@ +use std::fs::File; +use std::io::{BufRead, BufReader, Lines}; + +// BOILERPLATE +type InputIter = Lines>; + +fn get_input() -> InputIter { + let f = File::open("input").unwrap(); + let br = BufReader::new(f); + br.lines() +} + +fn main() { + println!("Problem 1 solution: {}", problem1(get_input())); + println!("Problem 2 solution: {}", problem2(get_input())); +} + +// PROBLEM 1 solution + +fn problem1(input: InputIter) -> u64 { + 0 +} + +// PROBLEM 2 solution +fn problem2(input: InputIter) -> u64 { + 0 +} \ No newline at end of file