T = int(input())
for j in range(T):
n, m= map(int, input().split(' '))
Array= list(map(int, input().split(' ')))
a, b = min(Array), max(Array)
ar=[]
for i in range(n):
ar.append(max(abs(i-a), abs(i-b)))
print(*ar)
Why this is showing NZEC Error on platform IDE but not on replit?