結果
問題 | No.1137 Circles |
ユーザー |
👑 ![]() |
提出日時 | 2020-07-26 22:33:55 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 496 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 82,440 KB |
実行使用メモリ | 89,096 KB |
最終ジャッジ日時 | 2024-06-28 19:31:25 |
合計ジャッジ時間 | 3,059 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
class Imos_1:def __init__(self,N):self.len=Nself.list=[0]*(N+1)def Add(self,F,T,C=1):self.list[F]+=Cself.list[T+1]-=Cdef Cumulative_Sum(self):Y=[0]*(self.len)S=0for i in range(self.len):S+=self.list[i]Y[i]=Sreturn YN=int(input())G=10**5K=Imos_1(8*G+1)for _ in range(N):x,r=map(int,input().split())K.Add(2*(x-r)+4*G+1,2*(x+r)+4*G-1,1)print(max(K.Cumulative_Sum()))