n,a,b,*H=list(map(int,open(0).read().split()))

l,r=0,10**9

while r-l>1:

	x=0;m=(l+r)//2

	for h in H:

		x-=min(0,(h-m*b)//(b-a))

	if x>m:

		l=m

	else:

		r=m

print(r)
_,a,b,*H=list(map(int,open(0).read().split()))

l,r=0,10**9

while r-l>1:

	m=(l+r)//2

	if-sum(min(0,(h-m*b)//(b-a))for h in H)>m:l=m

	else:r=m

print(r)
n, a, b, *H = list(map(int, open(0).read().split()))
l, r = 0, 10**9
while r - l > 1:
    x = 0
    m = (l + r) // 2
    for h in H:
        x -= min(0, (h - m * b) // (b - a))
    if x > m:
        l = m
    else:
        r = m
print(r)

_, a, b, *H = list(map(int, open(0).read().split()))
l, r = 0, 10**9
while r - l > 1:
    m = (l + r) // 2
    if -sum(min(0, (h - m * b) // (b - a)) for h in H) > m:
        l = m
    else:
        r = m
print(r)

-n, a, b, *H = list(map(int, open(0).read().split())) +_, a, b, *H = list(map(int, open(0).read().split())) -    x = 0 -    for h in H: -        x -= min(0, (h - m * b) // (b - a)) -    if x > m: +    if -sum(min(0, (h - m * b) // (b - a)) for h in H) > m: