
P

R

O

G

R

A

M

M

I

N

G


C

O

M

P

E

T

I

T

I

O

N


Particle
Trajectory



Task Description
A trajectory
is a curve that describes the motion of an object, such as the orbit of a comet
or the flight path of a rocket.

Program Input
The
first line of the input file specifies the number of trajectories described in
the file. Each line thereafter is a separate trajectory descriptor. Each trajectory
is described by two values: (1) the initial speed in meters per second, and (2)
the launch angle in degrees.
2
44.8 30.0
72.1 56.9
Program Output
The
program must write the three computed values to the output file using the text
prompts shown in the example output below. Each trajectory should produce four
lines of output in the order shown. You must include unit measures (like meters
and seconds). For contest purposes you may ignore roundoff error.
trajectory 1
horizontal distance: 177 meters
flight time: 4.57 seconds
maximum height: 25.6 meters
trajectory 2
horizontal distance: 485 meters
flight time: 12.3 seconds
maximum height: 186 meters
Hint
To compute the horizontal (or X axis) and vertical (or Y axis) components of the initial velocity use the formulas below. See Figure 2 for the corresponding vector diagram. One way to solve this task is to break it down into sub
tasks like this:
