結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,332 KB
testcase_01 AC 33 ms
53,332 KB
testcase_02 AC 34 ms
53,332 KB
testcase_03 AC 48 ms
64,176 KB
testcase_04 AC 48 ms
64,180 KB
testcase_05 AC 52 ms
64,160 KB
testcase_06 AC 67 ms
70,628 KB
testcase_07 AC 62 ms
68,564 KB
testcase_08 AC 66 ms
68,544 KB
testcase_09 AC 56 ms
66,240 KB
testcase_10 AC 47 ms
64,160 KB
testcase_11 AC 40 ms
61,984 KB
testcase_12 AC 68 ms
62,088 KB
testcase_13 AC 62 ms
68,572 KB
testcase_14 AC 64 ms
68,568 KB
testcase_15 AC 67 ms
68,552 KB
testcase_16 AC 44 ms
64,192 KB
testcase_17 AC 61 ms
68,572 KB
testcase_18 AC 48 ms
64,184 KB
testcase_19 AC 66 ms
68,572 KB
testcase_20 AC 53 ms
66,368 KB
testcase_21 AC 45 ms
64,192 KB
testcase_22 AC 59 ms
68,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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