結果

問題 No.3759 Watch Fireworks
コンテスト
ユーザー t98slider
提出日時 2026-10-09 23:04:46
言語 C++23
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 522 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,842 ms
コンパイル使用メモリ 332,928 KB
実行使用メモリ 9,928 KB
最終ジャッジ日時 2026-10-09 23:04:55
合計ジャッジ時間 5,579 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 WA * 40
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll inf = 1ll << 60;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    array<ll, 4> tmp = {-inf, inf, -inf, inf};
    for(int i = 0; i < n; i++){
        ll x, y;
        cin >> x >> y;
        tmp[0] = max(tmp[0], x + y);
        tmp[1] = min(tmp[1], x + y);
        tmp[2] = max(tmp[2], x - y);
        tmp[3] = min(tmp[3], x - y);
    }
    cout << max(tmp[0] - tmp[1], tmp[2] - tmp[3]) / 2 << '\n';
}
0