結果

問題 No.1137 Circles
ユーザー 👑 Kazun
提出日時 2020-07-26 22:28:47
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 479 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 857 ms
コンパイル使用メモリ 84,768 KB
実行使用メモリ 68,940 KB
最終ジャッジ日時 2026-03-17 21:32:07
合計ジャッジ時間 3,465 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 1 RE * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

class Imos_1:
    def __init__(self,N):
        self.len=N
        self.list=[0]*(N+1)

    def Add(self,F,T,C=1):
        self.list[F]+=C
        self.list[T+1]-=C

    def Cumulative_Sum(self):
        Y=[0]*(self.len)
        S=0
        for i in range(self.len):
            S+=self.list[i]
            Y[i]=S

        return Y

N=int(input())

G=10**5
K=Imos_1(2*G+1)
for _ in range(N):
    x,r=map(int,input().split())
    K.Add(x-r+G,x+r+G)
print(max(K.Cumulative_Sum()))
0