Problem 1929 --Problem B - Subway

1929: Problem B - Subway

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $1$ 正确数量 $1$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签

Problem B - Subway

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. 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.

1000 70 20 1
31.7

推荐代码 查看1929 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] AOJ大管家 84444 2017-04-27 15:29:55
内存最少[$960 $KB] AOJ大管家 84444 2017-04-27 15:29:55
第一AC AOJ大管家 84444 2017-04-27 15:29:55
第一挑战 AOJ大管家 84444 2017-04-27 15:29:55

赛题来源/所属竞赛 NA N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛