Problem I
Squirt Gun Trajectory
A popular game at Wally’s Water Park is the Squirt Gun
Challenge. In this game, players must shoot a target with a
squirt gun. The target is a small hole in a wall at the exact
same height as the nozzle of the squirt gun. For every second
the water stream from the squirt gun hits the target the player
earns a point. The player with the most points wins! The squirt
guns are mounted on sliding platforms that can move back and
forth along a straight line. A player can control a squirt gun
by moving the platform forwards or backwards between the two
ends of the track it’s on or by tilting the squirt gun up or
down. Being the careful observer you are, you notice that one
of the squirt guns has a sticky spot, a spot where the friction
makes it possible to get it stuck at a certain angle
While the game operator is distracted, you take the
opportunity to measure the angle the squirt gun gets stuck at
(relative to the ground)
You also think back to your physics class and remember the following:
-
The horizontal velocity
of any drop of water will be as it’s leaving the squirt gun -
The vertical velocity
of any drop of water will be as it’s leaving the squirt gun -
seconds after a drop of water has left the squirt gun it will have decelerated by m/s in the vertical direction (i.e. its vertical velocity will have decreased by that amount) due to gravity -
During the entire flight of each drop, the horizontal velocity will remain constant
-
It will take the same amount of time for any drop to reach its maximum height as it will to return to its starting height
-
The height of a drop (relative to its starting height)
seconds after leaving the squirt gun will be
However, your insatiable thirst for victory has led you to miss a small detail. It might not be possible to hit the target with the squirt gun stuck at that angle!
Input
The input consists of a single line containing four integers
Output
Output “POSSIBLE” if it is possible to hit the target using your strategy or “IMPOSSIBLE” otherwise.
Sample Input 1 | Sample Output 1 |
---|---|
30 10 6 10 |
POSSIBLE |
Sample Input 2 | Sample Output 2 |
---|---|
30 10 1 7 |
IMPOSSIBLE |