update a few of the benchmarks

This commit is contained in:
RussellChamp committed 2024-12-13 16:24:00 +00:00
1 parent a037d203af
commit 6502e63efe
4 files changed
+16 -9

No files matched your search

+2 -2
View File
@@ -72,14 +72,14 @@ pub fn part_two(input: &str) -> Option<u32> {
}
let w = plots.iter().map(|p| p.iter().map(|p| p.letter).collect::<String>()).join("\n");
println!("{}", w);
// println!("{}", w);
let total = regions.iter().sorted_by_key(|r| r.0).fold(0, |sum, (region_id, region)| {
let start_plot = find_plot(&plots, |p| p.region_id == Some(*region_id)).unwrap();
print!("REGION {}:", region.id);
let edges = traverse_start(&plots, &start_plot);
let total = sum + (region.count * edges);
println!(" = {} * {} = {}", region.count, edges, region.count * edges);
// println!(" = {} * {} = {}", region.count, edges, region.count * edges);
total
});