Pro.ID21406 TitlePit Stop Strategy Title链接http://10.20.2.8/oj/exercise/problem?problem_id=21406 AC0 Submit3 Ratio0.00% 时间&空间限制描述The speed of a racing car, all other factors being equal, depends on the amount of fuel it carries. In general, the weight of the fuel slows the car. In addition, the weight of the fuel increases fuel consumption. It is therefore an advantage to carry as little fuel as possible. Any amount of fuel may be loaded at the beginning of the race, and refueling pit shops may be made during the race. The time consumed for the pit stop increases with the amount of fuel loaded. Your task is to determine the optimal fueling and pit stop strategy for each of a number of cars, based on measurements taken immediately before the race. 输入Standard input consists of several lines of input, each containing:
输出Description The speed of a racing car, all other factors being equal, depends on the amount of fuel it carries. In general, the weight of the fuel slows the car. In addition, the weight of the fuel increases fuel consumption. It is therefore an advantage to carry as little fuel as possible. Any amount of fuel may be loaded at the beginning of the race, and refueling pit shops may be made during the race. The time consumed for the pit stop increases with the amount of fuel loaded. Your task is to determine the optimal fueling and pit stop strategy for each of a number of cars, based on measurements taken immediately before the race. Input Standard input consists of several lines of input, each containing:
Output For each input line, print the following information
All floating point results should be printed to 6 significant figures. All numbers on a single line be separated by a single space. If there are several optimal strategies, break the tie with an earlier pit stop. Sample Input 3 100 0 10 0 20 0 Sample Output 3 100 0 10 0 20 0 Source 样例输入3 100 0 10 0 20 0 样例输出3 100 0 10 0 20 0 作者 |