Codeforces Round 477 (rated, Div. 2, based on VK Cup 2018 Round 3)
B
Watering System
Codeforces
1000
原题
← AC →
翻译中…

Arkady wants to water his only flower. Unfortunately, he has a very poor watering system that was designed for $n$ flowers and so it looks like a pipe with $n$ holes. Arkady can only use the water that flows from the first hole.

翻译中…

Arkady can block some of the holes, and then pour $A$ liters of water into the pipe. After that, the water will flow out from the non-blocked holes proportionally to their sizes $s_1, s_2, \ldots, s_n$. In other words, if the sum of sizes of non-blocked holes is $S$, and the $i$-th hole is not blocked, $\frac{s_i \cdot A}{S}$ liters of water will flow out of it.

翻译中…

What is the minimum number of holes Arkady should block to make at least $B$ liters of water flow out of the first hole?

翻译中…

Input

翻译中…

The first line contains three integers $n$, $A$, $B$ ($1 \le n \le 100\,000$, $1 \le B \le A \le 10^4$) — the number of holes, the volume of water Arkady will pour into the system, and the volume he wants to get out of the first hole.

翻译中…

The second line contains $n$ integers $s_1, s_2, \ldots, s_n$ ($1 \le s_i \le 10^4$) — the sizes of the holes.

翻译中…

Output

翻译中…

Print a single integer — the number of holes Arkady should block.

翻译中…

Note

翻译中…

In the first example Arkady should block at least one hole. After that, $\frac{10 \cdot 2}{6} \approx 3.333$ liters of water will flow out of the first hole, and that suits Arkady.

翻译中…

In the second example even without blocking any hole, $\frac{80 \cdot 3}{10} = 24$ liters will flow out of the first hole, that is not less than $20$.

翻译中…

In the third example Arkady has to block all holes except the first to make all water flow out of the first hole.

翻译中…

样例

Input #1
4 10 3
2 2 2 2
Output #1
1
InputCopy OutputCopy
Input #2
4 80 20
3 2 1 4
Output #2
0
InputCopy OutputCopy
Input #3
5 10 10
1000 1 1 1 1
Output #3
4
InputCopy OutputCopy
题目信息
题号
967B
时间限制
1 s
内存限制
256 MB
标签
数学
排序

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。