結果

問題 No.2559 眩しい数直線
ユーザー yaakiyu
提出日時 2023-12-02 14:44:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 66,176 KB
最終ジャッジ日時 2024-09-26 17:15:36
合計ジャッジ時間 2,609 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline()[:-1]

n, x = map(int, input().split())
ab = tuple(tuple(map(int, input().split())) for i in range(n))

s = [0]*x

for i in range(n):
	for j in range(x):
		s[j] = max(s[j], ab[i][1]-abs(j-(ab[i][0]-1)))

print(*s)
0