結果

問題 No.2559 眩しい数直線
ユーザー yaakiyuyaakiyu
提出日時 2023-12-02 14:44:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 538 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 66,516 KB
最終ジャッジ日時 2023-12-02 14:44:23
合計ジャッジ時間 2,316 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 49 ms
61,852 KB
testcase_04 AC 52 ms
63,932 KB
testcase_05 AC 55 ms
64,452 KB
testcase_06 AC 69 ms
66,512 KB
testcase_07 AC 60 ms
66,516 KB
testcase_08 AC 59 ms
66,508 KB
testcase_09 AC 60 ms
66,516 KB
testcase_10 AC 53 ms
64,436 KB
testcase_11 AC 44 ms
59,628 KB
testcase_12 AC 44 ms
61,980 KB
testcase_13 AC 61 ms
66,516 KB
testcase_14 AC 60 ms
66,516 KB
testcase_15 AC 64 ms
66,508 KB
testcase_16 AC 50 ms
64,064 KB
testcase_17 AC 59 ms
66,516 KB
testcase_18 AC 51 ms
63,932 KB
testcase_19 AC 69 ms
66,516 KB
testcase_20 AC 56 ms
64,440 KB
testcase_21 AC 50 ms
63,928 KB
testcase_22 AC 62 ms
66,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline()[:-1]

n, x = map(int, input().split())
ab = tuple(tuple(map(int, input().split())) for i in range(n))

s = [0]*x

for i in range(n):
	for j in range(x):
		s[j] = max(s[j], ab[i][1]-abs(j-(ab[i][0]-1)))

print(*s)
0