結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー TakoKurageTakoKurage
提出日時 2020-06-24 20:54:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 19,592 KB
最終ジャッジ日時 2023-09-16 21:20:34
合計ジャッジ時間 3,474 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,132 KB
testcase_01 AC 16 ms
8,176 KB
testcase_02 AC 92 ms
14,884 KB
testcase_03 AC 25 ms
9,124 KB
testcase_04 AC 95 ms
15,932 KB
testcase_05 AC 23 ms
8,812 KB
testcase_06 AC 110 ms
17,680 KB
testcase_07 AC 70 ms
13,068 KB
testcase_08 AC 133 ms
17,960 KB
testcase_09 AC 73 ms
13,648 KB
testcase_10 AC 89 ms
14,528 KB
testcase_11 AC 122 ms
18,496 KB
testcase_12 AC 77 ms
13,572 KB
testcase_13 AC 76 ms
13,536 KB
testcase_14 AC 121 ms
17,404 KB
testcase_15 AC 98 ms
15,392 KB
testcase_16 AC 53 ms
11,888 KB
testcase_17 AC 19 ms
8,548 KB
testcase_18 AC 50 ms
11,920 KB
testcase_19 AC 69 ms
13,468 KB
testcase_20 AC 63 ms
13,112 KB
testcase_21 AC 79 ms
13,712 KB
testcase_22 AC 16 ms
8,116 KB
testcase_23 AC 16 ms
8,112 KB
testcase_24 AC 117 ms
19,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate

N, D, *A = map(int, open(0).read().split())

X = [0] + list(accumulate(A))

for i in range(N - 1):
    dx = X[i + 1] - X[i]
    if dx < D:
        X[i + 1] = X[i] + D

print(*X)
0