結果

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

ソースコード

diff #

n, x = map(int, input().split())
c = []
for i in range(n):
  a, b = map(int, input().split())
  c.append((a, b))

ans = []
for i in range(1, x + 1):
  res = 0
  for A, B in c:
    res = max(res, B - abs(i - A))
  ans.append(res)
print(*ans)
0