mirror of
https://github.com/Noratrieb/advent-of-code.git
synced 2026-01-16 18:45:02 +01:00
binaries!
This commit is contained in:
parent
13ac9a70ce
commit
5dff963dc2
8 changed files with 286 additions and 69 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue