Read input from file
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
use aoc22::day1;
|
||||
use aoc22::util;
|
||||
|
||||
fn main() {
|
||||
let elves = day1::read_elves();
|
||||
let elves = day1::parse_elves(&util::parse_input());
|
||||
|
||||
let max = elves.iter().max().unwrap();
|
||||
println!("The elf with the most calories is carrying {} cal", max);
|
||||
|
||||
@ -4,7 +4,7 @@ use aoc22::util;
|
||||
const N_ELVES: usize = 3;
|
||||
|
||||
fn main() {
|
||||
let elves = day1::read_elves();
|
||||
let elves = day1::parse_elves(&util::parse_input());
|
||||
|
||||
let max_vals = util::max_n(elves.as_slice(), N_ELVES).unwrap();
|
||||
println!(
|
||||
|
||||
Reference in New Issue
Block a user