結果

問題 No.2559 眩しい数直線
ユーザー けんぴんけんぴん
提出日時 2023-11-03 17:15:56
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 377 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 81,868 KB
実行使用メモリ 796,960 KB
最終ジャッジ日時 2023-11-03 17:16:00
合計ジャッジ時間 4,081 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,604 KB
testcase_01 AC 31 ms
53,604 KB
testcase_02 AC 67 ms
81,056 KB
testcase_03 MLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
N,X = map(int,input().split())
ans = [0]*X
for _ in range(N):
    # A: 座標, B: 人数
    q = deque([list(map(int,input().split()))])
    while q:
        A,B = q.popleft()
        ans[A-1] = max(ans[A-1], B)
        if 1 < A and 1 < B:
            q.append([A-1, B-1])
        if A < X and 1 < B:
            q.append([A+1, B-1])
print(*ans)
0