binaries!

This commit is contained in:
nora 2023-12-03 13:58:31 +01:00
parent 13ac9a70ce
commit 5dff963dc2
8 changed files with 286 additions and 69 deletions

View file

@ -9,20 +9,7 @@ use nom::{
};
fn main() {
let kind = std::env::args().nth(1).unwrap_or("naive".into());
let input = std::hint::black_box(include_str!("../input.txt")).to_owned();
let result = match kind.as_str() {
"part1" => part1(&input),
"part2" => part2(&input),
_ => {
eprintln!("error: invalid mode, must be part1");
std::process::exit(1);
}
};
println!("result: {result}");
helper::main::<Day2>(include_str!("../input.txt"));
}
struct Day2;