結果
| 問題 | No.3759 Watch Fireworks |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-09 23:06:33 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 528 bytes |
| 記録 | |
| コンパイル時間 | 1,850 ms |
| コンパイル使用メモリ | 333,344 KB |
| 実行使用メモリ | 9,924 KB |
| 最終ジャッジ日時 | 2026-10-09 23:06:45 |
| 合計ジャッジ時間 | 5,300 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 40 |
ソースコード
#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]) + 1) / 2 << '\n';
}