結果

問題 No.2559 眩しい数直線
ユーザー Nikkuniku029Nikkuniku029
提出日時 2023-12-02 15:46:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 70,508 KB
最終ジャッジ日時 2023-12-02 15:46:10
合計ジャッジ時間 2,558 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
53,332 KB
testcase_01 AC 32 ms
53,332 KB
testcase_02 AC 32 ms
53,332 KB
testcase_03 AC 52 ms
66,004 KB
testcase_04 AC 51 ms
66,004 KB
testcase_05 AC 54 ms
66,112 KB
testcase_06 AC 71 ms
70,508 KB
testcase_07 AC 64 ms
70,508 KB
testcase_08 AC 65 ms
70,504 KB
testcase_09 AC 57 ms
68,184 KB
testcase_10 AC 52 ms
65,980 KB
testcase_11 AC 39 ms
61,864 KB
testcase_12 AC 45 ms
63,908 KB
testcase_13 AC 66 ms
70,508 KB
testcase_14 AC 68 ms
70,508 KB
testcase_15 AC 71 ms
70,504 KB
testcase_16 AC 49 ms
66,136 KB
testcase_17 AC 65 ms
70,508 KB
testcase_18 AC 51 ms
66,004 KB
testcase_19 AC 66 ms
70,508 KB
testcase_20 AC 55 ms
66,224 KB
testcase_21 AC 49 ms
66,136 KB
testcase_22 AC 66 ms
68,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, X = map(int, input().split())
ans = [0] * (X + 1)
AB = [list(map(int, input().split())) for _ in range(N)]
for j in range(1, X + 1):
    for a, b in AB:
        ans[j] = max(ans[j], max(b - abs(j - a), 0))
print(*ans[1:])
0