aboutsummaryrefslogtreecommitdiff
path: root/2022/01/b.rs
blob: ca0b324dba1636dfaa3ebcd88d23b9d9432fff86 (plain)
1
2
3
4
5
6
7
8
9
mod common;
use common::*;

fn main() {
    let e = get_elves_from_stdin();
    let mut w = e.iter().map(|a| a.iter().sum()).collect::<Vec<i64>>();
    w.sort_by(|a, b| b.cmp(a));
    println!("{}", w[0] + w[1] + w[2]);
}

Generated with cgit - Back to sebastiano.tronto.net