結果

問題 No.2559 眩しい数直線
ユーザー MasKoaTS
提出日時 2024-01-03 13:28:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 82,460 KB
実行使用メモリ 70,476 KB
最終ジャッジ日時 2024-09-27 18:24:17
合計ジャッジ時間 2,279 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x = map(int, input().split())
light = [list(map(int, input().split())) for _ in [0] * n]

ans = [0] * (x + 1)
for a, b in light:
	for i in range(1, x + 1):
		ans[i] = max(ans[i], b - abs(i - a))
print(*ans[1:])
0