# 排水系统

``````4 10 3
2 2 2 2
``````

``1``

``````#include<cstdio>
#include<algorithm>
using namespace std;
int n,a,b,s[100005],sum;
int main()
{
int i;
scanf("%d%d%d",&n,&a,&b);
for(i=1;i<=n;i++)
{
scanf("%d",&s[i]);
sum+=s[i];
}
if(n<=1)
{
printf("0\n");
return 0;
}
sort(s+2,s+n+1);
if(s[1]*a/sum>=b)
{
printf("0\n");
return 0;
}
int y=0;
for(i=n;i>1;i--)
{
sum-=s[i];
y++;
if(s[1]*a/sum>=b)
{
break;
}
}
printf("%d\n",y);
return 0;
} ``````

``````#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <set>
#include <utility>
using namespace std;
typedef long long ll;
#define inf 0x3f3f3f3f
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define lep(i,l,r) for(int i=l;i>=r;i--)
#define ms(arr) memset(arr,0,sizeof(arr))
//priority_queue<int,vector<int> ,greater<int> >q;
const int maxn = (int)1e5 + 5;
const ll mod = 1e9+7;
int s[maxn];
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
ios::sync_with_stdio(0),cin.tie(0);
int n,A,B;
cin>>n>>A>>B;
int sum=0;
rep(i,1,n) {
cin>>s[i];
sum+=s[i];
}
sort(s+2,s+n+1);
int nape=0,t=n;
int i;
for(i=1;i<n;i++)
{
nape+=s[t];
t--;
if((s[1]*A)/(sum-nape)>=B)
break;
}
if((s[1]*A)/sum>=B)
i=0;
cout<<i<<endl;
return 0;
}``````