結果

問題 No.2559 眩しい数直線
ユーザー RYOH2718RYOH2718
提出日時 2023-12-02 14:49:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 68,436 KB
最終ジャッジ日時 2023-12-02 14:49:51
合計ジャッジ時間 2,581 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,460 KB
testcase_01 AC 38 ms
53,460 KB
testcase_02 AC 37 ms
53,460 KB
testcase_03 AC 53 ms
64,168 KB
testcase_04 AC 54 ms
64,172 KB
testcase_05 AC 59 ms
64,292 KB
testcase_06 AC 71 ms
68,436 KB
testcase_07 AC 66 ms
68,420 KB
testcase_08 AC 68 ms
68,420 KB
testcase_09 AC 62 ms
66,364 KB
testcase_10 AC 55 ms
64,164 KB
testcase_11 AC 45 ms
59,724 KB
testcase_12 AC 48 ms
61,960 KB
testcase_13 AC 66 ms
68,420 KB
testcase_14 AC 69 ms
68,436 KB
testcase_15 AC 69 ms
68,408 KB
testcase_16 AC 53 ms
64,312 KB
testcase_17 AC 66 ms
68,420 KB
testcase_18 AC 55 ms
64,172 KB
testcase_19 AC 66 ms
68,420 KB
testcase_20 AC 61 ms
66,360 KB
testcase_21 AC 53 ms
64,312 KB
testcase_22 AC 64 ms
66,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def INT():
    return int(input())


def MI():
    return map(int, input().split())


def LI():
    return list(map(int, input().split()))


N, X = MI()
place = [0] * (X + 1)
A = []
B = []

for i in range(N):
    a, b = MI()
    A.append(a)
    B.append(b)

for x in range(1, X + 1):
    for i in range(N):
        place[x] = max(B[i] - abs(x - A[i]), place[x])

print(*place[1:])
0