結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー ああいいああいい
提出日時 2021-12-25 11:21:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 190 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 11,912 KB
実行使用メモリ 21,588 KB
最終ジャッジ日時 2023-10-21 12:02:00
合計ジャッジ時間 4,681 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,068 KB
testcase_01 AC 31 ms
10,068 KB
testcase_02 AC 142 ms
17,012 KB
testcase_03 AC 44 ms
11,028 KB
testcase_04 AC 153 ms
17,804 KB
testcase_05 AC 40 ms
10,728 KB
testcase_06 AC 174 ms
19,556 KB
testcase_07 AC 107 ms
14,812 KB
testcase_08 AC 190 ms
20,012 KB
testcase_09 AC 113 ms
14,952 KB
testcase_10 AC 140 ms
16,852 KB
testcase_11 AC 185 ms
20,380 KB
testcase_12 AC 120 ms
15,764 KB
testcase_13 AC 117 ms
15,532 KB
testcase_14 AC 181 ms
19,288 KB
testcase_15 AC 148 ms
17,208 KB
testcase_16 AC 83 ms
13,300 KB
testcase_17 AC 34 ms
10,336 KB
testcase_18 AC 80 ms
13,716 KB
testcase_19 AC 107 ms
14,696 KB
testcase_20 AC 97 ms
14,420 KB
testcase_21 AC 120 ms
15,772 KB
testcase_22 AC 30 ms
10,068 KB
testcase_23 AC 30 ms
10,068 KB
testcase_24 AC 185 ms
21,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D = map(int,input().split())
b = list(map(int,input().split()))
b.insert(0,0)
a = [0]
for i in range(1,N):
    a.append(a[-1] + b[i])
print(0,end = " ")
for i in range(1,N):
    e = " "
    if a[i] - a[i-1] < D:
        a[i] = a[i-1] + D
    if i == N-1:e = ""
    print(a[i],end = e)
print()
0