#P4710. 「物理」平抛运动

「物理」平抛运动

Output Format

Output one line with two real numbers x0,y0x_0, y_0 (each with at most 1515 decimal places), which are your answers.

Your answer is considered correct if the absolute or relative error is less than 10310 ^ {-3}.

14.142136 0.785398
10 5

Hint

Sample Explanation

As shown.

A2

$14.142136 \approx 10 \sqrt 2, 0.785398 \approx \frac \pi 4 = 45 ^ \circ.$

If the ball is thrown from (10,5)(10, 5) with velocity (10,0)(-10, 0), then at t=1st = 1 s it hits (0,0)(0, 0) with velocity (10,10)(-10, -10).

Hint

If you have not studied the related content, the following may help:

zcy teaches you physics

First, since all units are standard, all results can be computed directly with numbers; treating the object as a point mass means it has no volume.

We can decompose the velocity of the ball as shown:

A3

The horizontal component of the velocity vxv_x is the initial throw speed and remains vsinθv \sin \theta during the motion.

The vertical component of the velocity vyv_y is accelerated by gravity, changing from 00 to vcosθv \cos \theta.

Starting timing from the moment of release, when the time is tt, let the magnitudes of the horizontal and vertical velocities at this moment be vxt,vytv_{xt}, v_{yt}, and the magnitudes of the horizontal and vertical displacements be xxt,xytx_{xt}, x_{yt}, respectively. Then:

vxt=vsinθv_{xt} = v \sin \theta

vyt=gtv_{yt} = gt

xxt=vxttx_{xt} = v_{xt}t

xyt=12gt2=12vyttx_{yt} = \frac 1 2 g t ^ 2 = \frac 1 2{v_{yt}t}

When tt is exactly the landing time, xxt,xytx_{xt}, x_{yt} are the answers.


About radians:

π=180\pi = 180 ^{\circ}

That is: $\frac \pi 2 = 90 ^{\circ}, \frac \pi 3 = 60 ^{\circ}, \ \cdots$


About trigonometric functions:

If you use C/C++, you can use sin() and cos() from math.h / cmath.

If you use Pascal, you can use sin() and cos() from the math library (add uses math; before begin).

If you use Python, you can use math.sin() and math.cos() from the math library.

If you use other languages, please refer to the corresponding documentation.

Translated by ChatGPT 5