結果

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

ソースコード

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(4*G+1)
for _ in range(N):
    x,r=map(int,input().split())
    K.Add(x-r+2*G,x+r+2*G,1)
print(max(K.Cumulative_Sum()))
0