bouzuya.hatenablog.com

ぼうずやのにっき

reqwest などに Pull Request がマージされた / ABC178 A, B, C, D, E を解いた

2 件の Pull Request を作成しマージされた。 reqwest 側は CI で落ちてしまった様子……。

https://github.com/abdolence/gcloud-sdk-rs/pull/87 https://github.com/seanmonstar/reqwest/pull/1922


ABC178 : AtCoder Beginner Contest 178

use proconio::input;

fn main() {
    input! {
        n: usize,
        xy: [(i64, i64); n],
    };
    let z = xy.iter().map(|&(x, y)| x + y).collect::<Vec<i64>>();
    let w = xy.iter().map(|&(x, y)| x - y).collect::<Vec<i64>>();
    let ans = (z.iter().max().unwrap() - z.iter().min().unwrap())
        .max(w.iter().max().unwrap() - w.iter().min().unwrap());
    println!("{}", ans);
}

今日のコミット。