結果
| 問題 |
No.1090 ソーシャルディスタンス / Social Distance
|
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 20:57:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 2,000 ms |
| コード長 | 325 bytes |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 82,208 KB |
| 実行使用メモリ | 88,320 KB |
| 最終ジャッジ日時 | 2025-03-20 20:57:25 |
| 合計ジャッジ時間 | 3,457 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
n, d = map(int, input().split())
a = list(map(int, input().split())) # a_2 to a_n, length n-1
current = [0] * n
for i in range(1, n):
current[i] = current[i-1] + a[i-1]
for i in range(1, n):
required = current[i-1] + d
if current[i] < required:
current[i] = required
print(' '.join(map(str, current)))
lam6er