結果

問題 No.1137 Circles
ユーザー 夜
提出日時 2020-08-08 10:42:20
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 678 bytes
コンパイル時間 1,772 ms
コンパイル使用メモリ 91,724 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2024-04-08 15:53:57
合計ジャッジ時間 3,430 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,548 KB
testcase_01 AC 58 ms
6,548 KB
testcase_02 AC 5 ms
6,548 KB
testcase_03 AC 30 ms
6,548 KB
testcase_04 AC 43 ms
6,548 KB
testcase_05 AC 10 ms
6,548 KB
testcase_06 WA -
testcase_07 AC 23 ms
6,548 KB
testcase_08 AC 51 ms
6,548 KB
testcase_09 WA -
testcase_10 AC 27 ms
6,548 KB
testcase_11 AC 30 ms
6,548 KB
testcase_12 AC 64 ms
6,548 KB
testcase_13 AC 19 ms
6,548 KB
testcase_14 AC 62 ms
6,548 KB
testcase_15 AC 21 ms
6,548 KB
testcase_16 WA -
testcase_17 AC 7 ms
6,548 KB
testcase_18 WA -
testcase_19 AC 18 ms
6,548 KB
testcase_20 AC 14 ms
6,548 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
int co[400040] = { 0 };
int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int x, r;
        cin >> x >> r;
        co[x - r + 200000]++;
        co[x + r + 1 + 200000]--;
    }
    int ans = 0, c = 0;
    for (int i = 0; i < 400040; i++) {
        c += co[i];
        if (c > ans) {
            ans = c;
        }
    }
    cout << ans << endl;
    return 0;
}
0