結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー first_vilfirst_vil
提出日時 2020-06-25 09:57:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 19,812 KB
最終ジャッジ日時 2023-09-16 21:45:54
合計ジャッジ時間 3,520 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,788 KB
testcase_01 AC 13 ms
7,920 KB
testcase_02 AC 88 ms
15,516 KB
testcase_03 AC 24 ms
9,224 KB
testcase_04 AC 99 ms
16,796 KB
testcase_05 AC 20 ms
8,912 KB
testcase_06 AC 117 ms
18,920 KB
testcase_07 AC 64 ms
13,468 KB
testcase_08 AC 122 ms
19,188 KB
testcase_09 AC 73 ms
13,772 KB
testcase_10 AC 89 ms
15,300 KB
testcase_11 AC 134 ms
19,664 KB
testcase_12 AC 74 ms
14,060 KB
testcase_13 AC 73 ms
13,964 KB
testcase_14 AC 117 ms
18,404 KB
testcase_15 AC 94 ms
16,340 KB
testcase_16 AC 48 ms
11,412 KB
testcase_17 AC 17 ms
8,156 KB
testcase_18 AC 52 ms
12,008 KB
testcase_19 AC 66 ms
13,452 KB
testcase_20 AC 60 ms
12,680 KB
testcase_21 AC 72 ms
14,088 KB
testcase_22 AC 14 ms
7,876 KB
testcase_23 AC 14 ms
7,844 KB
testcase_24 AC 130 ms
19,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d=map(int,input().split())
a=[0]+list(map(int,input().split()))
for i in range(1,n):
    a[i]+=a[i-1]
for i in range(1,n):
    a[i]=max(a[i],a[i-1]+d)
print(' '.join(map(str,a)))
0