IntermediateRating 1300
Fill the Bag
Items have value and weight; you may take fractions. Maximise value with capacity W. Print the best value with 2 decimals.
Input
n W, then n lines 'value weight'.
Output
A number.
Sample 1
Input
3 50 60 10 100 20 120 30
Output
240.00
Sample 2
Input
1 5 10 10
Output
5.00
Output appears here