Pro.ID22334 TitleSubway Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22334 AC1 Submit1 Ratio100.00% 时间&空间限制描述Subway trains are meant to move people as quickly, safely, and comfortably as possible from station to station. Although the train drivers' unions may not agree, computer operated trains accomplish these goals more effectively than human operated trains. You are to determine the optimal control strategy to move the train from one station to another within the constraints imposed by safety and comfort considerations, as well as the physical limitations of the train itself. The parameters to the problem are all positive integers not greater than 1000.
输入There are several test cases. For each test case, standard input has a single line with d, m, a, j. 输出Description Subway trains are meant to move people as quickly, safely, and comfortably as possible from station to station. Although the train drivers' unions may not agree, computer operated trains accomplish these goals more effectively than human operated trains. You are to determine the optimal control strategy to move the train from one station to another within the constraints imposed by safety and comfort considerations, as well as the physical limitations of the train itself. The parameters to the problem are all positive integers not greater than 1000.
Input There are several test cases. For each test case, standard input has a single line with d, m, a, j. Output For each test case, standard output should contain a single line giving the minimum time in seconds, to the nearest 0.1 second, required to move between the stations. Sample Input 1000 70 20 1 Sample Output 31.7 Source 样例输入1000 70 20 1 样例输出31.7 作者 |