結果
| 問題 | No.1090 ソーシャルディスタンス / Social Distance |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 18:45:13 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 83 ms / 2,000 ms |
| コード長 | 325 bytes |
| 記録 | |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 95,980 KB |
| 実行使用メモリ | 100,480 KB |
| 最終ジャッジ日時 | 2026-07-07 07:32:21 |
| 合計ジャッジ時間 | 4,919 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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