Cool, asteroids! Not cool, trigonometry!
Let me just search my brain for math I haven’t used in years, no problem at
all. Let’s see… if I have one asteroid,
x, and two others,
the angle between
y is the same as
z, the only one of
z is visible. For the first problem, calculating the angles between all
the asteroids and eliminating duplicates will show how many other asteroids are
visible from a single asteroid.