CF363D Renting Bikes
Description
A group of $ n $ schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them $ m $ bikes. The renting price is different for different bikes, renting the $ j $ -th bike costs $ p_{j} $ rubles.
In total, the boys' shared budget is $ a $ rubles. Besides, each of them has his own personal money, the $ i $ -th boy has $ b_{i} $ personal rubles. The shared budget can be spent on any schoolchildren arbitrarily, but each boy's personal money can be spent on renting only this boy's bike.
Each boy can rent at most one bike, one cannot give his bike to somebody else.
What maximum number of schoolboys will be able to ride bikes? What minimum sum of personal money will they have to spend in total to let as many schoolchildren ride bikes as possible?
Input Format
N/A
Output Format
N/A
Explanation/Hint
In the first sample both schoolchildren can rent a bike. For instance, they can split the shared budget in half (5 rubles each). In this case one of them will have to pay 1 ruble from the personal money and the other one will have to pay 2 rubles from the personal money. In total, they spend 3 rubles of their personal money. This way of distribution of money minimizes the amount of spent personal money.