Hello, can anyone help me how to solve this kind of problems https://mirror.codeforces.com/gym/104415/problem/B and I want a resource for the geometry at all and thanks a lot
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 151 |
Name |
---|
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