29 lines
799 B
Rust
29 lines
799 B
Rust
use std::{fs, time::Instant};
|
|
|
|
use utils::time::get_elapsed_string;
|
|
use y2015::days::d15;
|
|
|
|
fn main() {
|
|
let now = Instant::now();
|
|
println!("Part 1:");
|
|
part1();
|
|
println!("Ran in {}", get_elapsed_string(now.elapsed()));
|
|
let now = Instant::now();
|
|
println!("Part 2:");
|
|
part2();
|
|
println!("Ran in {}", get_elapsed_string(now.elapsed()));
|
|
}
|
|
|
|
fn part1() {
|
|
let root = env!("CARGO_MANIFEST_DIR");
|
|
let content = fs::read_to_string(format!("{root}/resources/15_input.txt")).unwrap();
|
|
println!("{}", d15::process_part1(&content));
|
|
}
|
|
|
|
fn part2() {
|
|
//let root = env!("CARGO_MANIFEST_DIR");
|
|
//let content = fs::read_to_string(format!("{root}/resources/15_input.txt")).unwrap();
|
|
// change comments in part1
|
|
//println!("{}", d15::process_part2(&content));
|
|
}
|