結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー rythem00359rythem00359
提出日時 2020-08-13 14:11:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 194 ms / 2,000 ms
コード長 149 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,848 KB
最終ジャッジ日時 2024-04-18 01:31:04
合計ジャッジ時間 4,571 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,496 KB
testcase_01 AC 31 ms
10,624 KB
testcase_02 AC 138 ms
16,952 KB
testcase_03 AC 47 ms
11,648 KB
testcase_04 AC 152 ms
17,456 KB
testcase_05 AC 41 ms
11,392 KB
testcase_06 AC 184 ms
18,752 KB
testcase_07 AC 107 ms
15,464 KB
testcase_08 AC 193 ms
19,552 KB
testcase_09 AC 112 ms
15,448 KB
testcase_10 AC 135 ms
16,892 KB
testcase_11 AC 193 ms
19,456 KB
testcase_12 AC 117 ms
15,560 KB
testcase_13 AC 116 ms
15,536 KB
testcase_14 AC 176 ms
18,920 KB
testcase_15 AC 144 ms
17,176 KB
testcase_16 AC 81 ms
13,904 KB
testcase_17 AC 35 ms
10,880 KB
testcase_18 AC 84 ms
13,900 KB
testcase_19 AC 106 ms
15,276 KB
testcase_20 AC 97 ms
15,248 KB
testcase_21 AC 117 ms
15,560 KB
testcase_22 AC 32 ms
10,496 KB
testcase_23 AC 32 ms
10,496 KB
testcase_24 AC 194 ms
20,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D=map(int,input().split())
a=[0]+[*map(int,input().split())]
b=[0]
for i in range(1,N):
    a[i]+=a[i-1]
    b.append(max(D+b[i-1],a[i]))
print(*b)
0