opop1omar's blog

By opop1omar, history, 12 months ago, In English

Hello, can anyone help me how to solve this kind of problems https://codeforces.com/gym/104415/problem/B and I want a resource for the geometry at all and thanks a lot

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
12 months ago, # |
Rev. 11   Vote: I like it +1 Vote: I do not like it

The problem states that the projectile's trajectory is a perfect parabola, and that the cannon is positioned at the origin of the coordinate plane. The general equation of the parabola is: $$$y = a x^2 + b x+ c$$$, and the parabola passes through the three points: $$$(0,0)$$$, $$$(x_1,y_1)$$$ and $$$(x_2,y_2)$$$. You can use these points to compute the value of the parabola coefficients: $$$a$$$, $$$b$$$ and $$$c$$$. The landing condition is equivalent to finding the point on the parabolate at which $$$x > 0$$$ and $$$y = 0$$$. College Mathematics textbooks should give you sufficient theoretical background to solve geometry problems in competitive programming, but you can also check the Geometry section of the following website for topics that appear frequently in computational geometry problems.

Algorithms for Competitive Progreamming