Corruption
With the purpose of fight against a shadow economy a bank inculcated association of the N accounts of firm in one. For one operation 2 accounts and bank unite automatically deducts on the own charge Ð% from the sum of association for implementation of operation and closing of one of accounts. What most of facilities can remain on the account of firm? On each from accounts to introduction of policy of association was G UAH no more than.
Specifications
Input
In the first line we have 2 number: amount of accounts and percent of deduction.
The second line of N numbers: the amount of each of the accounts of the company.
Output
Most sum, that can remain on the account.
2 ≤ N ≤ 100000
0 ≤ Ð ≤ 20
0 ≤ G ≤ 10000
Problem information
Time Limit: 1 secondsMemory Limit: 64 MB
Balls for the passed test: 7.5
Complexity: 93% 12/177
Classes: Greedy algorithm
Example
Example input4 5 1000 1100 1200 1300 |
Example output4151.50 |
| ← How many times to repeat? | Problems | "Mirror prime" numbers → |
