Bike
The cyclist is going to drive from point A to point B, the distance between them is l m. He has a bike that can reach the speed v m/sec. But before leaving the cyclist can do some upgrading for his bike. For each modernization it is known how much it increases the speed of the bike, as well as the time in which it can be done. He can perform any number of different upgrades, but each upgrade can be performed no more than once. Help the cyclist to reach the point B as soon as possible.
Input
First goes three integers: the distance between the points l (0 ≤ l ≤ 10^9
), initial speed of the bike v (1 ≤ v ≤ 10^6
) and number of different upgrades n (0 ≤ n ≤ 100). Next n pairs of integers are given, each defining the corresponding modernization: the speed increase after modernization v[i]
(0 ≤ v[i]
≤ 1000) and time t[i]
(0 ≤ t[i]
≤ 1000) spent for this upgrade. All values are given in meters and seconds.
Output
Print the minimal time with six digits after the decimal point, in which the cyclist will drive from point A to point B taking into account the modernization time.