#TOKIOMARINE2020C. Lamps

Lamps

Score : 500500 points

Problem Statement

We have NN bulbs arranged on a number line, numbered 11 to NN from left to right. Bulb ii is at coordinate ii.

Each bulb has a non-negative integer parameter called intensity. When there is a bulb of intensity dd at coordinate xx, the bulb illuminates the segment from coordinate xd0.5x-d-0.5 to x+d+0.5x+d+0.5. Initially, the intensity of Bulb ii is AiA_i. We will now do the following operation KK times in a row:

  • For each integer ii between 11 and NN (inclusive), let BiB_i be the number of bulbs illuminating coordinate ii. Then, change the intensity of each bulb ii to BiB_i.

Find the intensity of each bulb after the KK operations.

Constraints

  • 1N2×1051 \leq N \leq 2 \times 10^5
  • 1K2×1051 \leq K \leq 2 \times 10^5
  • 0AiN0 \leq A_i \leq N

Input

Input is given from Standard Input in the following format:

NN KK

A1A_1 A2A_2 \ldots ANA_N

Output

Print the intensity AiA{'}_i of each bulb ii after the KK operations to Standard Output in the following format:

A1A{'}_1 A2A{'}_2 \ldots ANA{'}_N

5 1
1 0 0 1 0
1 2 2 1 2

Initially, only Bulb 11 illuminates coordinate 11, so the intensity of Bulb 11 becomes 11 after the operation. Similarly, the bulbs initially illuminating coordinate 22 are Bulb 11 and 22, so the intensity of Bulb 22 becomes 22.

5 2
1 0 0 1 0
3 3 4 4 3