import Data.List
import qualified Data.ByteString.Char8 as B
import Control.Monad

breads :: IO [Int]
breads = unfoldr uff <$> B.getLine
    where
        uff b = check <$> B.readInt b
        check (a, b)
            | B.null b = (a, b)
            | otherwise = (a, B.tail b)

main :: IO ()
main = breads >>= main'
    where
        main' [n, a, b] = replicateM n readLn >>= print . solve a b . sort

solve :: Int -> Int -> [Int] -> Int
solve a b hs = search 0 maxv maxv
    where
        maxv = last hs
        admg = a - b

        search under upper prev
            | upper > under = check hs
            | otherwise = upper
            where
                fdmg = b * upper

                check = nextSearch . fst . foldl' ff (0, True)
                    where
                        ff accs@(acc, flag) x
                            | flag && fdmg >= x = (acc, flag)
                            | otherwise = count accs x

                        count (acc, _) x
                            | m > 0 = (acc + r + 1, False)
                            | otherwise = (acc + r, False)
                            where
                                (r, m) = (x - fdmg) `divMod` admg

                nextSearch d
                    | d > upper = search upper prev prev
                    | d < upper && next /= upper = search under next upper
                    | otherwise = upper
                    where
                        (r, m) = (upper + under) `divMod` 2
                        next
                            | m > 0 = r + 1
                            | otherwise = r
