結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,612 KB
testcase_01 AC 73 ms
71,288 KB
testcase_02 AC 105 ms
91,996 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 81 ms
76,744 KB
testcase_06 WA -
testcase_07 AC 97 ms
86,916 KB
testcase_08 WA -
testcase_09 AC 97 ms
87,428 KB
testcase_10 AC 105 ms
90,996 KB
testcase_11 WA -
testcase_12 AC 100 ms
88,316 KB
testcase_13 WA -
testcase_14 AC 114 ms
98,340 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 85 ms
76,896 KB
testcase_18 WA -
testcase_19 AC 98 ms
86,060 KB
testcase_20 AC 94 ms
84,924 KB
testcase_21 AC 99 ms
88,632 KB
testcase_22 AC 69 ms
71,444 KB
testcase_23 AC 71 ms
71,240 KB
testcase_24 AC 119 ms
101,492 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] = a[i - 1] + D
    else:
        a[i] = ans[-1] + a[i]
    ans.append(a[i])
print(*ans)
0