結果
| 問題 |
No.1137 Circles
|
| ユーザー |
👑 |
| 提出日時 | 2020-11-16 22:32:04 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 362 bytes |
| コンパイル時間 | 396 ms |
| コンパイル使用メモリ | 7,068 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-23 01:46:48 |
| 合計ジャッジ時間 | 3,470 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
local t = {}
local offset = 200001
for i = 1, 800004 do
t[i] = 0
end
local n = io.read("*n")
for i = 1, n do
local x, r = io.read("*n", "*n")
x = x + offset
t[(x - r) * 2 + 1] = t[(x - r) * 2 + 1] + 1
t[(x + r) * 2] = t[(x + r) * 2] - 1
end
local ret = 0
for i = 2, 800004 do
t[i] = t[i] + t[i - 1]
if ret < t[i] then ret = t[i] end
end
print(ret)