結果

問題 No.1137 Circles
ユーザー lloyzlloyz
提出日時 2022-10-07 00:02:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 2,190 ms
コンパイル使用メモリ 86,828 KB
実行使用メモリ 80,640 KB
最終ジャッジ日時 2023-09-02 03:45:59
合計ジャッジ時間 5,699 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
79,112 KB
testcase_01 AC 155 ms
80,404 KB
testcase_02 AC 94 ms
80,100 KB
testcase_03 AC 117 ms
80,228 KB
testcase_04 AC 130 ms
80,640 KB
testcase_05 AC 106 ms
80,464 KB
testcase_06 AC 132 ms
80,240 KB
testcase_07 AC 115 ms
80,308 KB
testcase_08 AC 135 ms
80,344 KB
testcase_09 AC 106 ms
80,540 KB
testcase_10 AC 115 ms
80,344 KB
testcase_11 AC 116 ms
80,360 KB
testcase_12 AC 143 ms
80,344 KB
testcase_13 AC 105 ms
80,492 KB
testcase_14 AC 143 ms
80,640 KB
testcase_15 AC 107 ms
80,224 KB
testcase_16 AC 119 ms
80,368 KB
testcase_17 AC 95 ms
80,012 KB
testcase_18 AC 133 ms
80,340 KB
testcase_19 AC 109 ms
80,344 KB
testcase_20 AC 105 ms
80,452 KB
testcase_21 AC 78 ms
78,804 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