結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー Theta
提出日時 2022-10-20 11:09:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 50,960 KB
最終ジャッジ日時 2024-06-30 05:09:01
合計ジャッジ時間 16,917 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 13 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

from numpy import diff


def main():
    N, D = map(int, input().split())
    others = list(map(int, input().split()))
    moved = [0]

    for person in others:
        if person - moved[-1] < D:
            moved.append(moved[-1] + D)
        else:
            moved.append(person)
    print(*moved)


if __name__ == "__main__":
    main()
0