結果

問題 No.2559 眩しい数直線
ユーザー AlgeotAlgeot
提出日時 2023-12-08 00:04:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 72,672 KB
最終ジャッジ日時 2023-12-08 00:04:09
合計ジャッジ時間 2,427 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,332 KB
testcase_01 AC 37 ms
53,332 KB
testcase_02 AC 37 ms
53,332 KB
testcase_03 AC 55 ms
63,776 KB
testcase_04 AC 54 ms
65,852 KB
testcase_05 AC 63 ms
66,224 KB
testcase_06 AC 78 ms
70,620 KB
testcase_07 AC 74 ms
70,624 KB
testcase_08 AC 76 ms
70,608 KB
testcase_09 AC 67 ms
68,300 KB
testcase_10 AC 62 ms
66,092 KB
testcase_11 AC 44 ms
59,472 KB
testcase_12 AC 50 ms
61,844 KB
testcase_13 AC 68 ms
70,624 KB
testcase_14 AC 69 ms
70,620 KB
testcase_15 AC 79 ms
72,672 KB
testcase_16 AC 52 ms
64,040 KB
testcase_17 AC 67 ms
70,624 KB
testcase_18 AC 56 ms
65,852 KB
testcase_19 AC 69 ms
70,624 KB
testcase_20 AC 60 ms
68,428 KB
testcase_21 AC 51 ms
66,112 KB
testcase_22 AC 66 ms
70,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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