Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long LL;
- typedef vector<int> VI;
- typedef pair<int,int> PI;
- const int N=1e5+1;
- int n,a,b,s,fhole,ans;
- int t[N];
- int main() {
- cin >> n >> a >> b >> fhole;
- s = fhole;
- for(int i = 0 ; i < n-1 ; i++) {
- cin >> t[i];
- s += t[i];
- }
- sort(t,t+n,greater<int>());
- for(int i = 0 ; i < n - 1 ; i++) {
- if((fhole * a) / s < b)
- ans++;
- else
- break;
- s -= t[i];
- }
- cout << ans;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement