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.

Author: AvaLovelace

Look for the star with the lowest magnitude and find out if it is less than R units away from (X, Y). 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


  • -1
    max  commented on Dec. 13, 2018, 10:19 a.m. edited

    It may also be worth mentioning that to assert whether a point P is inside a circle, you can take the Euclidean Distance between the centre of the circle and P. 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.