結果

問題 No.2559 眩しい数直線
ユーザー hiro1729hiro1729
提出日時 2023-12-02 14:33:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 73,016 KB
最終ジャッジ日時 2023-12-02 14:33:54
合計ジャッジ時間 2,322 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 33 ms
53,460 KB
testcase_03 AC 48 ms
63,904 KB
testcase_04 AC 49 ms
63,904 KB
testcase_05 AC 55 ms
66,756 KB
testcase_06 AC 76 ms
73,008 KB
testcase_07 AC 68 ms
73,012 KB
testcase_08 AC 62 ms
70,904 KB
testcase_09 AC 61 ms
68,848 KB
testcase_10 AC 56 ms
66,752 KB
testcase_11 AC 39 ms
59,636 KB
testcase_12 AC 48 ms
64,724 KB
testcase_13 AC 73 ms
73,016 KB
testcase_14 AC 71 ms
73,008 KB
testcase_15 AC 71 ms
73,008 KB
testcase_16 AC 47 ms
64,044 KB
testcase_17 AC 61 ms
68,848 KB
testcase_18 AC 51 ms
64,052 KB
testcase_19 AC 74 ms
73,012 KB
testcase_20 AC 58 ms
68,848 KB
testcase_21 AC 47 ms
64,044 KB
testcase_22 AC 69 ms
70,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x = map(int, input().split())
ans = [0] * x
for _ in range(n):
	a, b = map(int, input().split())
	a -= 1
	for i in range(max(0, a - b), min(x, b + a + 1)):
		ans[i] = max(ans[i], b - abs(i - a))
print(*ans)
0