結果

問題 No.2559 眩しい数直線
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2024-02-18 20:53:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 68,604 KB
最終ジャッジ日時 2024-02-18 20:53:22
合計ジャッジ時間 2,952 ms
ジャッジサーバーID
(参考情報)
judge15 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
55,604 KB
testcase_01 AC 42 ms
55,604 KB
testcase_02 AC 42 ms
55,604 KB
testcase_03 AC 56 ms
66,140 KB
testcase_04 AC 57 ms
66,144 KB
testcase_05 AC 63 ms
66,396 KB
testcase_06 AC 69 ms
68,604 KB
testcase_07 AC 69 ms
68,476 KB
testcase_08 AC 64 ms
68,476 KB
testcase_09 AC 62 ms
68,476 KB
testcase_10 AC 56 ms
66,396 KB
testcase_11 AC 51 ms
64,076 KB
testcase_12 AC 52 ms
63,936 KB
testcase_13 AC 68 ms
68,604 KB
testcase_14 AC 66 ms
68,476 KB
testcase_15 AC 67 ms
68,476 KB
testcase_16 AC 56 ms
66,284 KB
testcase_17 AC 63 ms
68,476 KB
testcase_18 AC 57 ms
66,144 KB
testcase_19 AC 66 ms
68,604 KB
testcase_20 AC 59 ms
66,392 KB
testcase_21 AC 56 ms
66,152 KB
testcase_22 AC 64 ms
68,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys, math

input = sys.stdin.readline

N, X = map(int, input().split())
AB = [tuple(map(int, input().split())) for _ in range(N)]

ans = [0] * (X + 1)
for x in range(1, X + 1):

    for a, b in AB:

        ans[x] = max(ans[x], b - abs(x - a))
print(*ans[1:])
0