結果

問題 No.1137 Circles
ユーザー roarisroaris
提出日時 2020-07-27 23:07:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 557 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 80,272 KB
最終ジャッジ日時 2023-09-11 06:06:23
合計ジャッジ時間 3,841 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
78,840 KB
testcase_01 AC 116 ms
80,068 KB
testcase_02 AC 86 ms
79,680 KB
testcase_03 AC 101 ms
79,928 KB
testcase_04 AC 105 ms
80,092 KB
testcase_05 AC 88 ms
79,760 KB
testcase_06 AC 110 ms
79,888 KB
testcase_07 AC 99 ms
80,048 KB
testcase_08 AC 111 ms
80,072 KB
testcase_09 AC 93 ms
79,760 KB
testcase_10 AC 98 ms
80,068 KB
testcase_11 AC 103 ms
79,708 KB
testcase_12 AC 118 ms
80,064 KB
testcase_13 AC 94 ms
79,544 KB
testcase_14 AC 116 ms
79,896 KB
testcase_15 AC 97 ms
80,032 KB
testcase_16 AC 102 ms
80,068 KB
testcase_17 AC 87 ms
79,276 KB
testcase_18 AC 111 ms
80,272 KB
testcase_19 AC 93 ms
79,448 KB
testcase_20 AC 93 ms
79,668 KB
testcase_21 AC 82 ms
78,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
imos = [0]*(4*10**5+1)

for _ in range(N):
    x, r = map(int, input().split())
    l = x-r+2*10**5
    r = x+r+2*10**5
    imos[l] += 1
    imos[r] -= 1

for i in range(1, 4*10**5+1):
    imos[i] += imos[i-1]

print(max(imos))
0