link of my submission is https://www.codechef.com/viewsolution/35893020

here is my code

for _ in range(int(input())):

```
M,x,y = map(int, input().split())
lis = list(map(int, input().split()))
low = []
up =[]
e = 0
coprange = x * y
for item in lis:
low.append(item - coprange)
up.append(item + coprange)
for i in range(len(low)):
if low[i] < 0:
low[i] = 1
for i in range(len(up)):
if up[i]>100:
up[i] = 100
low1 =sorted(low)
up1 =sorted(up)
for i in range(1,len(low)):
c = low1[i] - up1[i-1]
if c>0:
e += c
if up1[i]<100:
e += (100 - up1[-1])
print(e)
```