for _ in range(int(input())):
	n, x, y = map(int, input().split())
	a = list(map(int, input().split()))
	if x < y:
		print((max(a) + y - 1)//y)
		continue
	ans = 0
	for i in reversed(range(0, n)):
		a[i] -= ans*y
		if a[i] <= 0:
			continue
		reqd = (a[i] + x - 1)//x
		ans += reqd
	print(ans)