humancannonball2 - bradendubois/competitive-programming GitHub Wiki
The Amazing Human Cannonball
ID: humancannonball2
Difficulty: 1.4
CPU Time: 1 second
Memory: 1024 MB
Solution
For this problem, one can first find the time, t, but isolating it from the first equation, since one knows all the other parts of this equations, and then using t (when one is at the hole) in the second equation to know where one will be at that time, and check that this number is 1 away from both h1 and h2.