Chef had a sequence of positive integers with length $N + K$. He managed to calculate the arithmetic average of all elements of this sequence (let's denote it by $V$), but then, his little brother deleted $K$ elements from it. All deleted elements had the same value.
Chef still knows the remaining $N$ elements — a sequence $A_1, A_2, \ldots, A_N$. Help him with restoring the original sequence by finding the value of the deleted elements or deciding that there is some mistake and the described scenario is impossible.
Note that the if it is possible for the deleted elements to have the same value, then it can be proven that it is unique. Also note that this value must be a positive integer.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains three space-separated integers $N$, $K$ and $V$.
- The second line contains $N$ space-separated integers $A_1, A_2, \ldots, A_N$.

-----Output-----
For each test case, print a single line containing one integer — the value of the deleted elements, or $-1$ if there is a mistake.

-----Constraints-----
- $1 \le T \le 100$
- $1 \le N, K \le 100$
- $1 \le V \le 10^5$
- $1 \le A_i \le 10^5$ for each valid $i$

-----Subtasks-----
Subtask #1 (100 points): original constraints

-----Example Input-----
3
3 3 4
2 7 3
3 1 4
7 6 5
3 3 4
2 8 3

-----Example Output-----
4
-1
-1

Starter code:

Solutions:
def __starting_point():
 t=int(input())
 for _ in range(t):
  n,k,v=map(int,input().split())
  li=list(map(int,input().split()))
  sumn=0
  for i in range(n):
   sumn=sumn+li[i]
  sumk=v*(n+k)-sumn
  e=int(sumk/k)
  r=sumk%k
  if e<=0:
   print(-1)
  elif r!=0:
   print(-1)
  else:
   print(e)
__starting_point()

# cook your dish here
for _ in range(int(input())):
 n,k,v=list(map(int,input().split()))
 a=list(map(int,input().split()))
 s=v*(n+k)
 s-=sum(a)
 l=s//k
 if l<1 or s%k!=0:
  print(-1)
 else:
  print(l)


# cook your dish here
for t in range(int(input())):
 n,k,v=[int(x)for x in input().rstrip().split()]
 a=[int(x)for x in input().rstrip().split()]
 sums=(n+k)*v
 b=sums-sum(a)
 if b>0:
  if b%k==0:
   print(b//k)
  else:
   print(-1)
 else:
  print(-1)


# cook your dish here
import math
t=int(input())
def do():
 n,k,v=list(map(int,input().split()))
 a=[int(d) for d in input().split()]
 r=0
 r=((v*(n+k)-sum(a))//k)
 if r<=0:
  print(-1)
 elif((v*(n+k)-sum(a))%k!=0):
  print(-1)
 else:
  print(r)
 return
for i in range(t):
 do()
 
 


t=int(input())
for i in range(t):
 n,k,v=map(int,input().split())
 arr=list(map(int,input().split()))[:n]
 sums=sum(arr)
 l=v*(n+k)
 a=(l-sums)//k
 if(a<=0):
  print(-1)
 elif((l-sums)%k!=0):
  print(-1)
 else:
  print(a)

for i in range(int(input())):
 n,k,v=map(int,input().split())
 arr=list(map(int,input().split()))[:n]
 sums=sum(arr)
 l=v*(n+k)
 a=(l-sums)//k
 if(a<=0):
  print(-1)
 elif((l-sums)%k!=0):
  print(-1)
 else:
  print(a)

# cook your dish here
t=int(input())
for _ in range(t):
 n,k,v=list(map(int,input().split()))
 arr=list(map(int,input().split()))[:n]
 sums=sum(arr)
 l=v*(n+k)
 a=(l-sums)//k
 if(a<=0):
  print(-1)
 elif((l-sums)%k!=0):
  print(-1)
 else:
  print(a)


import math
t=int(input())
def do():
 n,k,v=list(map(int,input().split()))
 a=[int(d) for d in input().split()]
 r=0
 r=((v*(n+k)-sum(a))//k)
 if r<=0:
  print(-1)
 elif((v*(n+k)-sum(a))%k!=0):
  print(-1)
 else:
  print(r)
 return
for i in range(t):
 do()
 


# cook your dish here

for _ in range(int(input())):
 n,k,v=map(int,input().split())
 l=list(map(int,input().split()))
 a=v*(n+k)-sum(l)
 x=a//k 
 if(x<=0):
  print("-1")
 elif(a%k!=0):
  print("-1")
 else:
  print(x)

# cook your dish here
for _ in range(int(input())):
 n,k,v=map(int,input().split())
 a=[int(i) for i in input().split()]
 s=(n+k)*v - sum(a)
 if sum(a)>=(n+k)*v or s%k!=0:
  print(-1)
 else:
  print(s//k)

# cook your dish here
for i in range(int(input())):
 n,k,v = map(int,input().split())
 l = list(map(int,input().split()))
 a = v*(k+n)
 if sum(l)>=a:
  print(-1)
 else:
  if (a-sum(l))%k!=0:
   print(-1)
  else:
   print((a-sum(l))//k)

for _ in range(int(input())):
 N,K,v=list(map(int,input().split()))
 a=list(map(int,input().split()))[:N]
 s=(N+K)*v
 b=s-sum(a)
 if b>0:
  if b%K==0:
   print(b//K)
  else:
   print(-1)
 else:
  print(-1)


for _ in range(int(input())):
 N,K,V=map(int,input().split())
 A=list(map(int,input().split()))[:N]
 S=(N+K)*V
 B=S-sum(A)
 if B>0:
  if B%K==0:
   print(B//K)
  else:
   print(-1)
 else:
  print(-1)

for _ in range(int(input())):
 N,K,V=map(int,input().split())
 A=list(map(int,input().split()))[:N]
 S=(N+K)*V
 B=S-sum(A)
 if B>0:
  if B%K==0:
   print(B//K)
  else:
   print(-1)
 else:
  print(-1)

T=int(input())
for i in range(T):
 N,K,V=map(int,input().split())
 A=list(map(int,input().split()))[:N]
 S=(N+K)*V
 B=S-sum(A)
 if B>0:
  if B%K==0:
   print(B//K)
  else:
   print(-1)
 else:
  print(-1)

T=int(input())
for i in range(T):
 N,K,V=list(map(int,input().split()))
 A=list(map(int,input().split()))[:N]
 S=(N+K)*V
 B=S-sum(A)
 if B>0:
  if B%K==0:
   print(B//K)
  else:
   print(-1)
 else:
  print(-1)


# cook your dish here
for t in range(int(input())):
 n,k,v=map(int,input().split())
 L=list(map(int,input().split()))
 Y=((n+k)*v)-sum(L)
 if(Y>0 and Y%k==0):
  print(Y//k)
 else:
  print("-1")

# cook your dish here
for t in range(int(input())):
 n,k,v=list(map(int,input().split()))
 l=list(map(int,input().split()))
 v=v*(n+k)
 v=v-sum(l)
 if v>0 and v%k==0:
  print(v//k)
 else:
  print("-1")


# cook your dish here
for t in range(int(input())):
 n,k,v=map(int,input().split())
 a=list(map(int,input().split()))
 b=sum(a)
 x=(v*(n+k)-b)/k
 if int(x)==x and x>0:
  print(int(x))
 else:
  print('-1')

for t in range(int(input())):
 n,k,v=list(map(int,input().split()))
 l=list(map(int,input().split()))
 v=v*(n+k)
 v=v-sum(l)
 if v>0 and v%k==0:
  print(v//k)
 else:
  print("-1")


# cook your dish here
t = int(input())

while(t):
 n,k,v = map(int,input().split(" "))
 lst = list(map(int,input().split(" ")))
 tot = sum(lst)
 x = ((v * (n + k)) - tot) / k 
 if((int(x)==x) and x > 0):
  print(int(x))
 else:
  print(-1)
 
 t = t - 1

try:

 t=int(input())
 for i in range(t):
  n,k,v=list(map(int,input().split()))
  a=[int(x) for x in input().split()]
  p=0
  A=sum(a)
  p=int((v*(n+k)-A)/k)
  if((p>0) and ((v*(n+k)-A)%k)==0 ):
   print(p)
  else:
   print("-1")
   
except EOFError:
 pass

 

 



t = int(input())
for i in range(t):
 N,K,V=map(int,input().split())
 l=list(map(int,input().split()))
 sum1 = (N+K)*V - sum(l)
 avg = sum1/K
 avg1 = sum1//K
 if(avg==avg1 and avg>=1):
  print(avg1)
 else:
  print("-1")

# cook your dish here
for i in range(int(input())):
 N,K,V=map(int,input().split())
 list1=[]
 list1=[int(x) for x in input().split()]
 total=(N+K)*V - sum(list1)
 avg=total/K
 average=total//K
 if(avg==average and avg>=1):
  print(average)
 else:
  print("-1")

t=int(input())
for _ in range(t):
 
 n,k,v=list(map(int,input().split()))
 l=list(map(int,input().split()))
 count=sum(l)
 
 total=v*(n+k)
 
 num=total-count
 
 if(total<=count):
  
  print('-1')
  
 elif(num%k != 0):
  
  print('-1')
  
 else:
  
  print(int(num/k))