We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0fc512 commit 1300aabCopy full SHA for 1300aab
2015/day14/src/main.rs
@@ -84,8 +84,8 @@ fn main() -> io::Result<()> {
84
let result = race(&mut reindeers, 2503);
85
println!("P1> Max distance: {}", result);
86
87
- //let winner = reindeers.iter().max_by_key(|r| r.current_position).unwrap();
88
- //println!("P2> Winner is: {} wit {} pts", winner.name, winner.points);
+ let winner = reindeers.iter().max_by_key(|r| r.points).unwrap();
+ println!("P2> Winner is: {} wit {} pts", winner.name, winner.points);
89
90
// println!("{:?}", winner);
91
// println!("{:?}", reindeers);
0 commit comments