aoc_1
This commit is contained in:
parent
2dac973d45
commit
716e66aa01
11
Cargo.toml
Normal file
11
Cargo.toml
Normal file
@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "aoc2025"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = { version = "0.7", features = ["html_reports"] }
|
||||
|
||||
[[bench]]
|
||||
name = "bench_aoc_1"
|
||||
harness = false
|
||||
20
src/main.rs
Normal file
20
src/main.rs
Normal file
@ -0,0 +1,20 @@
|
||||
pub mod aoc;
|
||||
use crate::aoc::*;
|
||||
|
||||
fn main() {
|
||||
println!("answer: {}", aoc_1::solve_1_f( include_bytes!("aoc/input/full_input_aoc1.txt")));
|
||||
println!("answer: {}", aoc_1::solve_2(include_bytes!("aoc/input/full_input_aoc1.txt")));
|
||||
//println!("{:?}", include_bytes!("aoc/input/full_input_aoc1.txt"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_aoc_1_1() {
|
||||
assert_eq!(aoc_1::solve_1( include_bytes!("aoc/input/test_input_aoc1.txt")), 3);
|
||||
assert_eq!(aoc_1::solve_1( include_bytes!("aoc/input/full_input_aoc1.txt")), 1195);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_aoc_1_2() {
|
||||
assert_eq!(aoc_1::solve_2f(include_bytes!("aoc/input/test_input_aoc1.txt")), 6);
|
||||
assert_eq!(aoc_1::solve_2f(include_bytes!("aoc/input/full_input_aoc1.txt")), 6770);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user