結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー tomoyaatcodertomoyaatcoder
提出日時 2020-08-01 17:00:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 999 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 101,424 KB
最終ジャッジ日時 2023-09-22 11:01:00
合計ジャッジ時間 4,886 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
71,288 KB
testcase_01 AC 77 ms
71,204 KB
testcase_02 AC 116 ms
91,752 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 93 ms
76,848 KB
testcase_06 WA -
testcase_07 AC 112 ms
86,904 KB
testcase_08 WA -
testcase_09 AC 111 ms
87,252 KB
testcase_10 AC 116 ms
90,612 KB
testcase_11 WA -
testcase_12 AC 113 ms
88,184 KB
testcase_13 WA -
testcase_14 AC 126 ms
97,944 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 92 ms
76,896 KB
testcase_18 WA -
testcase_19 AC 112 ms
85,992 KB
testcase_20 AC 108 ms
84,576 KB
testcase_21 AC 115 ms
88,540 KB
testcase_22 AC 82 ms
71,292 KB
testcase_23 AC 81 ms
71,412 KB
testcase_24 AC 131 ms
101,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, D = map(int, input().split())
a = list(map(int, input().split()))

ans = [0]
a = [0] + a
# print("a =", a)
for i in range(1, N):
    gap = a[i] - a[i - 1]
    if gap < D:
#         ans += D
        a[i] = ans[-1] + D
    else:
        a[i] = ans[-1] + a[i]
    ans.append(a[i])
print(*ans)
0