結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー DrDrpilotDrDrpilot
提出日時 2022-04-13 14:27:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 19,740 KB
最終ジャッジ日時 2023-08-25 00:42:35
合計ジャッジ時間 5,761 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,168 KB
testcase_01 AC 16 ms
8,220 KB
testcase_02 AC 93 ms
15,096 KB
testcase_03 AC 26 ms
9,292 KB
testcase_04 AC 93 ms
15,996 KB
testcase_05 AC 23 ms
8,968 KB
testcase_06 AC 104 ms
17,592 KB
testcase_07 AC 68 ms
13,168 KB
testcase_08 AC 122 ms
17,876 KB
testcase_09 AC 73 ms
13,480 KB
testcase_10 AC 87 ms
14,840 KB
testcase_11 AC 117 ms
18,580 KB
testcase_12 AC 76 ms
13,620 KB
testcase_13 AC 74 ms
13,716 KB
testcase_14 AC 115 ms
17,452 KB
testcase_15 AC 95 ms
15,408 KB
testcase_16 AC 50 ms
11,916 KB
testcase_17 AC 18 ms
8,588 KB
testcase_18 AC 49 ms
11,876 KB
testcase_19 AC 67 ms
13,340 KB
testcase_20 AC 61 ms
13,344 KB
testcase_21 AC 75 ms
13,776 KB
testcase_22 AC 16 ms
8,228 KB
testcase_23 AC 15 ms
8,116 KB
testcase_24 AC 113 ms
19,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d=map(int,input().split())
a=[0]+list(map(int,input().split()))
from itertools import accumulate
b=list(accumulate(a))
for i in range(1,n):
    if b[i]-b[i-1]<d:
        b[i]=b[i-1]+d
print(*b)
0