結果

問題 No.1137 Circles
ユーザー lloyzlloyz
提出日時 2022-10-07 00:02:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 422 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 23,200 KB
最終ジャッジ日時 2023-09-02 03:46:36
合計ジャッジ時間 7,078 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
11,292 KB
testcase_01 AC 382 ms
22,896 KB
testcase_02 AC 130 ms
18,008 KB
testcase_03 AC 251 ms
22,760 KB
testcase_04 AC 319 ms
22,988 KB
testcase_05 AC 163 ms
21,708 KB
testcase_06 AC 346 ms
22,948 KB
testcase_07 AC 230 ms
22,756 KB
testcase_08 AC 364 ms
22,944 KB
testcase_09 AC 190 ms
22,440 KB
testcase_10 AC 237 ms
22,708 KB
testcase_11 AC 260 ms
22,728 KB
testcase_12 AC 422 ms
23,200 KB
testcase_13 AC 199 ms
22,520 KB
testcase_14 AC 402 ms
22,960 KB
testcase_15 AC 210 ms
22,404 KB
testcase_16 AC 265 ms
22,824 KB
testcase_17 AC 143 ms
20,788 KB
testcase_18 AC 343 ms
22,964 KB
testcase_19 AC 213 ms
22,404 KB
testcase_20 AC 190 ms
22,108 KB
testcase_21 AC 115 ms
11,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
accumA = [0 for _ in range(4 * 10**5 + 10)]
for _ in range(n):
    x, r = map(int, input().split())
    accumA[x - r + 2 * 10**5] += 1
    accumA[x + r + 2 * 10**5] -= 1
for i in range(4 * 10**5 + 5):
    accumA[i + 1] += accumA[i]
print(max(accumA))
0