結果

問題 No.1137 Circles
ユーザー hir355hir355
提出日時 2020-08-01 23:06:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 407 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 10,500 KB
実行使用メモリ 23,008 KB
最終ジャッジ日時 2023-09-22 19:35:05
合計ジャッジ時間 7,093 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
11,152 KB
testcase_01 AC 381 ms
22,944 KB
testcase_02 AC 116 ms
17,588 KB
testcase_03 AC 239 ms
22,612 KB
testcase_04 AC 303 ms
22,676 KB
testcase_05 AC 147 ms
21,692 KB
testcase_06 AC 326 ms
23,004 KB
testcase_07 AC 214 ms
22,440 KB
testcase_08 AC 340 ms
23,008 KB
testcase_09 AC 182 ms
22,288 KB
testcase_10 AC 225 ms
22,744 KB
testcase_11 AC 245 ms
22,600 KB
testcase_12 AC 407 ms
23,008 KB
testcase_13 AC 183 ms
22,172 KB
testcase_14 AC 390 ms
22,912 KB
testcase_15 AC 202 ms
22,156 KB
testcase_16 AC 246 ms
22,756 KB
testcase_17 AC 130 ms
20,568 KB
testcase_18 AC 337 ms
22,680 KB
testcase_19 AC 192 ms
22,380 KB
testcase_20 AC 171 ms
22,172 KB
testcase_21 AC 100 ms
11,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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