結果

問題 No.2559 眩しい数直線
ユーザー Basin-BugBasin-Bug
提出日時 2023-12-02 14:40:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 277 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 70,492 KB
最終ジャッジ日時 2023-12-02 14:40:04
合計ジャッジ時間 2,221 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,332 KB
testcase_01 AC 33 ms
53,332 KB
testcase_02 AC 33 ms
53,332 KB
testcase_03 AC 51 ms
66,376 KB
testcase_04 AC 50 ms
66,372 KB
testcase_05 AC 52 ms
66,352 KB
testcase_06 AC 73 ms
70,492 KB
testcase_07 AC 64 ms
68,404 KB
testcase_08 AC 63 ms
70,484 KB
testcase_09 AC 62 ms
66,348 KB
testcase_10 AC 53 ms
66,352 KB
testcase_11 AC 42 ms
62,384 KB
testcase_12 AC 50 ms
64,288 KB
testcase_13 AC 71 ms
68,436 KB
testcase_14 AC 74 ms
70,492 KB
testcase_15 AC 66 ms
68,396 KB
testcase_16 AC 50 ms
64,304 KB
testcase_17 AC 62 ms
68,404 KB
testcase_18 AC 50 ms
66,380 KB
testcase_19 AC 61 ms
68,424 KB
testcase_20 AC 55 ms
66,344 KB
testcase_21 AC 51 ms
64,300 KB
testcase_22 AC 63 ms
68,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, X = map(int, input().split())
lights = []
for i in range(N):
  a, b = map(int, input().split())
  lights.append([a, b])

for i in range(1, X + 1):
  ans = 0
  for m, n in lights:
    strong = max(0, n - abs(i - m))
    ans = max(ans, strong)
  print(ans, end = " ")

print()
0