結果
問題 |
No.1137 Circles
|
ユーザー |
![]() |
提出日時 | 2025-08-06 00:15:21 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 519 bytes |
コンパイル時間 | 3,087 ms |
コンパイル使用メモリ | 278,984 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-08-06 00:15:26 |
合計ジャッジ時間 | 5,251 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; constexpr int m = 4e5 + 5; constexpr int pos = 2e5 + 2; vector<int> cnt(m, 0); rep(i, n) { int x, r; cin >> x >> r; cnt[x - r + pos]++, cnt[x + r + 1 + pos]--; } rep(i, m - 1) cnt[i + 1] += cnt[i]; cout << *max_element(cnt.begin(), cnt.end()) << '\n'; return 0; }