結果

問題 No.1137 Circles
ユーザー 双六双六
提出日時 2020-08-19 17:52:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 85,008 KB
最終ジャッジ日時 2024-04-20 09:40:57
合計ジャッジ時間 3,887 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
68,120 KB
testcase_01 AC 150 ms
84,296 KB
testcase_02 AC 79 ms
80,488 KB
testcase_03 AC 114 ms
84,420 KB
testcase_04 AC 131 ms
84,572 KB
testcase_05 AC 92 ms
84,432 KB
testcase_06 AC 138 ms
84,416 KB
testcase_07 AC 109 ms
84,428 KB
testcase_08 AC 143 ms
84,608 KB
testcase_09 AC 100 ms
84,500 KB
testcase_10 AC 112 ms
84,836 KB
testcase_11 AC 116 ms
84,680 KB
testcase_12 AC 154 ms
84,360 KB
testcase_13 AC 99 ms
84,432 KB
testcase_14 AC 152 ms
84,352 KB
testcase_15 AC 105 ms
85,008 KB
testcase_16 AC 115 ms
84,392 KB
testcase_17 AC 86 ms
84,500 KB
testcase_18 AC 138 ms
84,876 KB
testcase_19 AC 101 ms
84,308 KB
testcase_20 AC 96 ms
84,336 KB
testcase_21 AC 52 ms
67,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	imos = [0] * (10 ** 6)
	for i in range(N):
		x, r = getlist()
		x += 3 * 10 ** 5 + 10
		imos[2 * x - 2 * r + 1] += 1
		imos[2 * x + 2 * r] -= 1

	ans = 0
	for i in range(1, 10 ** 6):
		imos[i] += imos[i - 1]
		ans = max(ans, imos[i])

	print(ans)

if __name__ == '__main__':
	main()
0