// Conclusion: you should think about it right away. Don't hesitate there. Let's push some shit formulas ,. ..
// Click one .. Otherwise, the time will be exhausted .. That's it ..
// Take a physical formula and clarify the requirements of the questions step by step .. The question shows the flight modes of the three birds, and then calculates the flight distance ..
# Include <stdio. h>
# Include <iostream>
# Include <math. h>
Using namespace STD;
Const double G = 9.8;
Int main ()
{
Double h;
While (CIN> H)
{
Char ch [10];
Scanf ("% s", CH );
If (CH [0] = 'R ')
{
Double VX, Vy;
Cin> VX> Vy;
Double T = (Vy + SQRT (Vy) * (Vy) + 2 * g * (H)/(g );
Printf ("%. 3lf \ n", VX * t );
}
Else if (CH [0] = 'B ')
{
Double VX, Vy, T, T, S0, S1, S2, S3, V1, V2, V3;
Cin> VX> Vy> T> V1> V2> V3;
S1 = S2 = S3 = VX * t;
T = (Vy + SQRT (Vy) * (Vy) + 2 * g * (H)/(g );
If (T <t)
{
Printf ("%. 3lf \ n", VX * t );
Continue;
}
S1 + = V1 * (t-t );
S2 + = V2 * (t-t );
S3 + = V3 * (t-t );
Printf ("%. 3lf %. 3lf %. 3lf \ n", S1, S2, S3 );
}
Else if (CH [0] = 'y ')
{
Double VX, Vy, T, T1, S1, S2, T;
Cin> VX> Vy> T;
T = (Vy + SQRT (Vy) * (Vy) + 2 * g * (H)/(g );
If (T <t)
{
Printf ("%. 3lf \ n", VX * t );
Continue;
}
S1 = Vy * t-0.5 * g * T * t;
S2 = VX * t;
Vy = Vy-G * t;
VX * = 2.0;
Vy * = 2.0;
T1 = (Vy + SQRT (Vy) * (Vy) + 2 * g * (S1 + H)/(g );
S2 + = VX * T1;
Printf ("%. 3lf \ n", S2 );
}
}
Return 0;
}