P4710 平抛运动

  题目:https://www.luogu.org/problemnew/show/P4710

  洛谷上的这道题是不是少了一个时间条件。。。不然没法求阿。

  因为:

$$ v_x = v_{x_0} = v_0, \  v_y = v_{y_0} + gt = gt = v \ cos \theta $$

$$ \left \{ \begin{aligned} x &= v_x t \\ y &= \frac{1}{2}gt^2 = \frac{1}{2}v_yt \end{aligned} \right. $$

  t是没办法消去的。。。难道默认是历时1s?如果默认质点做平抛运动时长总是1s的话,那么代码就这样:

猜你喜欢

转载自www.cnblogs.com/darkchii/p/9250186.html