結果
| 問題 | No.1137 Circles |
| ユーザー |
Sooh31
|
| 提出日時 | 2020-08-19 12:11:13 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 2,000 ms |
| コード長 | 505 bytes |
| 記録 | |
| コンパイル時間 | 1,380 ms |
| コンパイル使用メモリ | 210,936 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-12 12:55:23 |
| 合計ジャッジ時間 | 2,942 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod = 1000000007;
const int INF = 1001001001;
int main(){
int n; cin >> n;
vector<int> ans(500000,0);
for(int i = 0; i < n; i++){
int x, r; cin >> x >> r;
x += 200000;
ans[x-r]++;
ans[x+r]--;
}
for(int i = 0; i < 450000; i++){
ans[i+1] += ans[i];
}
int res = *max_element(ans.begin(), ans.end());
cout << res << endl;
}
Sooh31