Editorial for DMOPC '18 Contest 4 P0 - Dr. Henri and Seeing Stars
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Look for the star with the lowest magnitude and find out if it is less than units away from . Remember that a lower magnitude means a higher brightness and that stars on the edge of the telescope's field of view are not visible.
Comments
It may also be worth mentioning that to assert whether a point is inside a circle, you can take the Euclidean Distance between the centre of the circle and . Then you can compare that distance with the radius of the circle. If it is less than the radius of the circle, then the point exists within the circle. If the distance is equal to the radius of the circle, then the point exists on the edge of the circle and relative to the problem statement this makes it invisible to Dr Henri.