400784: GYM100247 F Battle Fury

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

F. Battle Furytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

A hero named Magina is battling the group of n monsters with the help of the legendary axe known as Battle Fury. Each monster has ai hit-points. Every hit Magina lowers the health of the monster which was directly hit by p hit-points, while the health of all other monsters lowers by q hit-points. If the monster's hit-points become non-positive, this monster dies. Every hit Magina wants to choose the target properly because he's going to kill all monsters in a minimal number of hits. You should determine this number.

Input

The first line contains three integers separated by spaces: n, p and q (1 ≤ n ≤ 200000, 1 ≤ q ≤ p ≤ 109) — the number of monsters, the damage on the target and the damage on the others.

The second line contains n integers separated by spaces: ai (1 ≤ ai ≤ 109) — monsters' hit-points.

Output

Output the only integer — minimal number of hits that Magina needs to kill all monsters.

ExamplesInput
2 3 2
5 5
Output
2
Input
3 5 3
17 13 14
Output
5

加入题单

上一题 下一题 算法标签: