結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー roaris
提出日時 2020-06-24 03:08:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 82,348 KB
実行使用メモリ 99,900 KB
最終ジャッジ日時 2024-07-03 19:48:10
合計ジャッジ時間 3,076 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 13 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

N, D = map(int, input().split())
a = list(map(int, input().split()))
ans = [0]

for ai in a:
    if ai-ans[-1]<D:
        ans.append(ans[-1]+D)
    else:
        ans.append(ai)

print(*ans)
0