C. [R11C]匀加速运动

    Type: Default 1000ms 512MiB

[R11C]匀加速运动

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

时空限制

1S/512M

题目描述

与加速度有关的定义和公式如下:

  • 匀加速运动是指物体在运动过程中,加速度保持不变的运动,即每单位时间内速度的变化量是恒定的;

  • 匀速运动是指物体在运动过程中,速度保持不变的运动,即速度的变化量为 00

  • 当一辆车的初速度为 v0v_0,加速度为 aa,做匀加速运动,则 tt 时刻后它的速度 v1=v0+a×tv_1=v_0+a\times t,它的位移 s=v0×t+0.5×a×t2s=v_0\times t+0.5\times a\times t^2

  • 当一辆车的速度为 vv,做匀速运动,则 tt 时刻后它的位移 s=v×ts=v\times t

现在有一辆车初速度为 v0v_0,加速度为 aa,在速度达到极限速度 v1v_1 前做匀加速运动,在速度达到极限速度 v1v_1 后做匀速运动,求这辆车 tt 时刻后的位移。

格式

输入格式

第一行包含四个整数 v0,a,v1,tv_0,a,v_1,t,分别表示车的初速度、加速度、极限速度和运动时间。

输出格式

输出一个实数表示这辆车 tt 时刻后的位移,保留 33 位小数。

样例

样例输入 #1

1 2 2 3

样例输出 #1

5.750

样例解释 #1

00.50\sim0.5 时刻车做匀加速运动,0.50.5 时刻后车的速度达到 1+2×0.5=21+2\times 0.5=2,此阶段它的位移为 s1=1×0.5+0.5×2×0.52=0.75s_1=1\times 0.5+0.5\times 2\times 0.5^2=0.75

0.530.5\sim 3 时刻车做匀速运动,此阶段它的位移为 s2=2×2.5=5s_2=2\times 2.5=5

总位移为 s1+s2=5.75s_1+s_2=5.75

样例输入 #2

3 7 90 100

样例输出 #2

8459.357

样例输入 #3

3 7 90 11

样例输出 #3

456.500

数据规模

对于 100%100\% 的数据,1v0v11041\le v_0\le v_1\le 10^41a1041\le a\le 10^41t1041\le t\le 10^4

代码源挑战赛 Round 11

Not Attended
Status
Done
Rule
DMY
Problem
6
Start at
2025-5-9 20:00
End at
2025-5-9 21:30
Duration
1.5 hour(s)
Host
Partic.
580