22334_Subway

2022-5-16 18:21| 发布者: Hocassian| 查看: 24| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506331943799-Problem List-采集的数据-后羿采集器.html

Pro.ID

22334

Title

Subway

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22334

AC

1

Submit

1

Ratio

100.00%

时间&空间限制

  • Time Limit: 1200/400 MS (Java/Others)     Memory Limit: 131072/65536 K (Java/Others)
  • 描述

    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.

    • d - the distance between stations, in metres
    • m - the maximum allowable speed of the train, in metres/sec
    • a - the maximum absolute acceleration of the train, in metres/sec2
    • j - the maximum absolute jerk, in metres/sec3
    The train must be completely stopped at each station and must move in one direction at speeds not exceeding m. Acceleration can be positive (forward) or negative (backwards) but its absolute value must not exceed a. The last parameter, jerk, is the rate of change of acceleration in either direction. That is, acceleration cannot increase or decrease at greater than this rate. This parameter prevents toppling the standing passengers.

    输入

    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.

    • d - the distance between stations, in metres
    • m - the maximum allowable speed of the train, in metres/sec
    • a - the maximum absolute acceleration of the train, in metres/sec2
    • j - the maximum absolute jerk, in metres/sec3
    The train must be completely stopped at each station and must move in one direction at speeds not exceeding m. Acceleration can be positive (forward) or negative (backwards) but its absolute value must not exceed a. The last parameter, jerk, is the rate of change of acceleration in either direction. That is, acceleration cannot increase or decrease at greater than this rate. This parameter prevents toppling the standing passengers.
    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

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部