Buggy python submission (verdict: Time Limit Exceeded):
N , K = map(int,input().split())
Lum = [a for a in map(int,input().split())]

K = min(K,20)
for i1 in range(K):
    B = [0]*N
    for i in range(N):
        l = max(0,i-Lum[i])
        r = min(N-1,i+Lum[i])
        B[l]+=1
        if r+1<N:
            B[r+1]-=1
    for i in range(1,N):
        B[i]+=B[i-1]
    Lum = B
    
Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)


Fixed submission:
import numpy as np
from numba import jit 
N , K = map(int,input().split())
Lum = np.array(list(map(int,input().split())))

@jit("i8,i8,i8[:]")
def fn(N,K,A):
    K1 = min(K,41)
    for i1 in range(K1):
        B = np.zeros(N,dtype=np.int64)
        for i in range(N):
            l = max(0,i-A[i])
            r = min(N-1,i+A[i])
            B[l]+=1
            if r+1<N:
                B[r+1]-=1
        for i in range(1,N):
            B[i]+=B[i-1]
        A = B
    return A

Lum = list(fn(N,K,Lum))
Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)

Buggy python submission (verdict: Time Limit Exceeded):
N , K = map(int,input().split())
Lum = list(map(int,input().split()))

K = min(K,41)
for i1 in range(K):
    B = [0]*N
    for i in range(N):
        l = max(0,i-Lum[i])
        r = min(N-1,i+Lum[i])
        B[l]+=1
        if r+1<N:
            B[r+1]-=1
    for i in range(1,N):
        B[i]+=B[i-1]
    Lum = B
    
Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)


Fixed submission:
import numpy as np
from numba import jit 
N , K = map(int,input().split())
Lum = np.array(list(map(int,input().split())))

@jit("i8,i8,i8[:]")
def fn(N,K,A):
    K1 = min(K,41)
    for i1 in range(K1):
        B = np.zeros(N,dtype=np.int64)
        for i in range(N):
            l = max(0,i-A[i])
            r = min(N-1,i+A[i])
            B[l]+=1
            if r+1<N:
                B[r+1]-=1
        for i in range(1,N):
            B[i]+=B[i-1]
        A = B
    return A

Lum = list(fn(N,K,Lum))
Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)

Buggy python submission (verdict: Time Limit Exceeded):
N , K = map(int,input().split())
Lum = list(map(int,input().split()))

K = min(K,42)
for i1 in range(K):
    B = [0 for n in range(N)]
    for i in range(N):
        l = max(0,i-Lum[i])
        r = min(N-1,i+Lum[i])
        B[l]+=1
        if r+1<N:
            B[r+1]-=1

    for i in range(1,N):
        B[i]+=B[i-1]

    Lum = B

Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)

Fixed submission:
import numpy as np
from numba import jit 
N , K = map(int,input().split())
Lum = np.array(list(map(int,input().split())))

@jit("i8,i8,i8[:]")
def fn(N,K,A):
    K1 = min(K,41)
    for i1 in range(K1):
        B = np.zeros(N,dtype=np.int64)
        for i in range(N):
            l = max(0,i-A[i])
            r = min(N-1,i+A[i])
            B[l]+=1
            if r+1<N:
                B[r+1]-=1
        for i in range(1,N):
            B[i]+=B[i-1]
        A = B
    return A

Lum = list(fn(N,K,Lum))
Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)

Buggy python submission (verdict: Time Limit Exceeded):
N , K = map(int,input().split())
Lum = [a for a in map(int,input().split())]

for i1 in range(min(K,50)):
    B = [0 for i in range(N)]
    for i in range(N):
        for j in range(max(0,i-Lum[i]),min(i+Lum[i]+1,N)):
            B[j]+=1
    Lum = B

Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)


Fixed submission:
import numpy as np
from numba import jit 
N , K = map(int,input().split())
Lum = np.array(list(map(int,input().split())))

@jit("i8,i8,i8[:]")
def fn(N,K,A):
    K1 = min(K,41)
    for i1 in range(K1):
        B = np.zeros(N,dtype=np.int64)
        for i in range(N):
            l = max(0,i-A[i])
            r = min(N-1,i+A[i])
            B[l]+=1
            if r+1<N:
                B[r+1]-=1
        for i in range(1,N):
            B[i]+=B[i-1]
        A = B
    return A

Lum = list(fn(N,K,Lum))
Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)

Buggy python submission (verdict: Time Limit Exceeded):
N , K = map(int,input().split())
Lum = [a for a in map(int,input().split())]

for i1 in range(K):
    B = [0 for i in range(N)]
    for i in range(N):
        for j in range(max(0,i-Lum[i]),min(i+Lum[i]+1,N)):
            B[j]+=1
    Lum = B

Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)


Fixed submission:
import numpy as np
from numba import jit 
N , K = map(int,input().split())
Lum = np.array(list(map(int,input().split())))

@jit("i8,i8,i8[:]")
def fn(N,K,A):
    K1 = min(K,41)
    for i1 in range(K1):
        B = np.zeros(N,dtype=np.int64)
        for i in range(N):
            l = max(0,i-A[i])
            r = min(N-1,i+A[i])
            B[l]+=1
            if r+1<N:
                B[r+1]-=1
        for i in range(1,N):
            B[i]+=B[i-1]
        A = B
    return A

Lum = list(fn(N,K,Lum))
Lum = [str(l) for l in Lum]
Lum=" ".join(Lum)
print(Lum)