結果

問題 No.1137 Circles
ユーザー roarisroaris
提出日時 2020-07-27 23:04:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 555 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 83,324 KB
最終ジャッジ日時 2023-09-11 06:06:08
合計ジャッジ時間 3,936 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
81,992 KB
testcase_01 AC 123 ms
82,992 KB
testcase_02 AC 92 ms
82,984 KB
testcase_03 AC 106 ms
83,324 KB
testcase_04 AC 113 ms
83,124 KB
testcase_05 AC 95 ms
82,640 KB
testcase_06 AC 117 ms
83,292 KB
testcase_07 AC 103 ms
83,052 KB
testcase_08 AC 116 ms
83,292 KB
testcase_09 AC 97 ms
82,672 KB
testcase_10 AC 104 ms
83,072 KB
testcase_11 AC 104 ms
83,200 KB
testcase_12 AC 125 ms
83,204 KB
testcase_13 AC 101 ms
82,648 KB
testcase_14 AC 123 ms
83,292 KB
testcase_15 AC 101 ms
83,300 KB
testcase_16 AC 109 ms
83,008 KB
testcase_17 AC 95 ms
82,964 KB
testcase_18 AC 116 ms
82,908 KB
testcase_19 AC 100 ms
82,472 KB
testcase_20 AC 99 ms
82,640 KB
testcase_21 AC 85 ms
82,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
imos = [0]*(8*10**5+2)

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

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

print(max(imos))
0