結果

問題 No.1137 Circles
ユーザー rlangevinrlangevin
提出日時 2023-01-18 12:30:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 678 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 85,396 KB
最終ジャッジ日時 2023-09-02 07:51:12
合計ジャッジ時間 6,081 ms
ジャッジサーバーID
(参考情報)
judge16 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
83,652 KB
testcase_01 AC 170 ms
85,124 KB
testcase_02 AC 107 ms
84,780 KB
testcase_03 AC 135 ms
85,160 KB
testcase_04 AC 146 ms
85,136 KB
testcase_05 AC 117 ms
85,080 KB
testcase_06 AC 151 ms
85,192 KB
testcase_07 AC 129 ms
85,248 KB
testcase_08 AC 153 ms
85,192 KB
testcase_09 AC 123 ms
85,396 KB
testcase_10 AC 128 ms
85,032 KB
testcase_11 AC 134 ms
85,104 KB
testcase_12 AC 165 ms
85,192 KB
testcase_13 AC 122 ms
85,164 KB
testcase_14 AC 162 ms
85,036 KB
testcase_15 AC 124 ms
85,288 KB
testcase_16 AC 133 ms
85,112 KB
testcase_17 AC 111 ms
84,740 KB
testcase_18 AC 150 ms
85,164 KB
testcase_19 AC 121 ms
85,148 KB
testcase_20 AC 118 ms
85,248 KB
testcase_21 AC 84 ms
83,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
geta = 101010 * 2
M = 505050
A = [0] * M
for i in range(N):
    x, r = map(int, input().split())
    A[x - r + 1 + geta] += 1
    A[x + r + geta + 1] -= 1
Ac = [0] * (M + 1)
for i in range(M):
    Ac[i + 1] = Ac[i] + A[i]
print(max(Ac)) 
0